This is the mail archive of the
gsl-discuss@sourceware.org
mailing list for the GSL project.
Re: [row/column majority] gslclapack
- From: Z F <mail4me9999 at yahoo dot com>
- To: James Bergstra <james dot bergstra at umontreal dot ca>, gsl-discuss <gsl-discuss at sources dot redhat dot com>
- Date: Thu, 30 Mar 2006 15:01:26 -0800 (PST)
- Subject: Re: [row/column majority] gslclapack
Using RowMajor instead of ColMajor is like matrix transpose operation.
so A*B = (B^T * A^T)^T.
That is why the answers are the same.
Why the switch is needed? I do not know, but can speculate...
I suspect it is because fortran 77 can not allocate memory,
and to facilitate memory management, Col/Row Major and transpose might
be different operations if the size of matrix is smaller than the
allocated memory.
Lazar
> Can someone explain why we have CblasRowMajor and CblasColMajor?
>
> I just did a little test to convince myself, and indeed (with
> -lgslcblas) the two following calls seem to produce the same answers
> in the variable c.
>
> cblas_dgemm(CblasRowMajor, T2, T1, ... a, b, c)
> cblas_dgemm(CblasColMajor, T2, T1, ... b, a, c)
>
> T1 and T2 are each one of CblasNoTrans and CblasTrans.
>
> Did I make a mistake? Are there other BLAS functions for which you
> need to specify the data format for things to work?
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com