This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: matrix multiplication
- To: David Clifford <clifford at galton dot uchicago dot edu>
- Subject: Re: matrix multiplication
- From: Brian Gough <bjg at network-theory dot co dot uk>
- Date: Thu, 1 Feb 2001 12:36:25 +0000 (GMT)
- Cc: gsl-discuss at sources dot redhat dot com
- References: <Pine.LNX.4.10.10101311247510.11376-100000@pcxterm7.uchicago.edu>
- Reply-To: gsl-discuss at sources dot redhat dot com
David Clifford writes:
> I was wondering if there is code available to do matrix multiplication
> within GSL. I have been writingi a program over the last few days and was
> delighted to see how easy it was to do many different things, reading in
> matrices, LU decomposition and all that, but I can't find anything about
> matrix multiplication. Also the gsl_matrix_mul and gsl_matrix_div
> functions are not working for me. What should I do
The functions gsl_matrix_mul_elements and gsl_matrix_div_elements
should work element by element on the first argument (if not that is a
bug).
For matrix-matrix multiplication use the BLAS routine gsl_blas_dgemm.
At the moment the gsl blas library does not include the corresponding
DGEMM, so you will need to link with an external cblas library such as
ATLAS which does have it. I am working on the gsl blas routines.
regards
Brian Gough