help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] matrix multiply question


From: Joakim Hove
Subject: Re: [Help-gsl] matrix multiply question
Date: Mon, 07 Feb 2005 19:34:09 +0100

Hello,

>Am I remembering my matrix math wrong? 

You have got your matrix-algebra alright.

>Or am I misunderstanding how that function works? 

The function works as you thought.

>Or am I looking at the wrong function for what I want to do? 

That is right, the function you are looking at is for multiplication
element by element - an honest thing to do, but nobody claimed it was
*matrix multiplication*.

>Is there a function that does what I want?

The basic linear algebra functions are implemented with the BLAS
functions, the matrix - matrix routines are BLAS Level 3. I think the
routine you want is cblas_dgemm(), see the GSL CBLAS example in the
documentation. But observe that if using this with a gsl_matrix
instance you must be certain that the memory block used by the matrix
is continous in memory, this is not necessarily the case if you have
used a matrix view to get at your matrix.

HTH - Joakim

-- 
Joakim Hove
hove AT ift uib no
Tlf: +47 (55 5)8 27 90 
Fax: +47 (55 5)8 94 40
http://www.ift.uib.no/~hove/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]