Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   input matrix for blas and lapack (http://www.velocityreviews.com/forums/t457758-input-matrix-for-blas-and-lapack.html)

 aberte@gmail.com 10-20-2006 02:47 PM

input matrix for blas and lapack

Hi,

i'm learning how to use lapack library (in particular, Intel MKL). I
wish to know how I have to format the my inputs. I'm calling lapack
functions from c++ (zhetri, zhemm, zgemm, zhseqr, ztrevc).
I declare the 3x3 matrix (in c++) in this way:
complex MyMatrix[9];

I intend
MyMatrix[0], MyMatrix[1], MyMatrix[2]
as the first row, but
i'm not sure that also lapack routine interpret this the
same way (and not
MyMatrix[0],MyMatrix[3],MyMatrix[6]
as the first row).
So, how I have to manage matrixes, column major or row major (like in
c++)?.

Thank you.

 mlimber 10-20-2006 02:54 PM

Re: input matrix for blas and lapack

aberte@gmail.com wrote:
> i'm learning how to use lapack library (in particular, Intel MKL). I
> wish to know how I have to format the my inputs. I'm calling lapack
> functions from c++ (zhetri, zhemm, zgemm, zhseqr, ztrevc).
> I declare the 3x3 matrix (in c++) in this way:
> complex MyMatrix[9];
>
> I intend
> MyMatrix[0], MyMatrix[1], MyMatrix[2]
> as the first row, but
> i'm not sure that also lapack routine interpret this the
> same way (and not
> MyMatrix[0],MyMatrix[3],MyMatrix[6]
> as the first row).
> So, how I have to manage matrixes, column major or row major (like in
> c++)?.

This question is really about lapack, not the standard C++ language and
libraries. Since the latter is the topic of this group
(http://www.parashift.com/c++-faq-lit....html#faq-5.9),
you'll have to ask elsewhere (presumably in a group that deals with
lapack or mathematics programming or whatever) or reformulate the
question so it is on-topic.

Cheers! --M

 Bernard Bru 10-23-2006 08:04 AM

Re: input matrix for blas and lapack

mlimber wrote:
> aberte@gmail.com wrote:
>
>>i'm learning how to use lapack library (in particular, Intel MKL). I
>>wish to know how I have to format the my inputs. I'm calling lapack
>>functions from c++ (zhetri, zhemm, zgemm, zhseqr, ztrevc).
>>I declare the 3x3 matrix (in c++) in this way:
>>complex MyMatrix[9];
>>
>>I intend
>>MyMatrix[0], MyMatrix[1], MyMatrix[2]
>> as the first row, but
>>i'm not sure that also lapack routine interpret this the
>> same way (and not
>>MyMatrix[0],MyMatrix[3],MyMatrix[6]
>> as the first row).
>>So, how I have to manage matrixes, column major or row major (like in
>>c++)?.

>
>
> This question is really about lapack, not the standard C++ language and
> libraries. Since the latter is the topic of this group
> (http://www.parashift.com/c++-faq-lit....html#faq-5.9),

Is there an equivalent Net address like the above for Fortran?

Bernard Bru
> you'll have to ask elsewhere (presumably in a group that deals with
> lapack or mathematics programming or whatever) or reformulate the
> question so it is on-topic.
>
> Cheers! --M
>

 All times are GMT. The time now is 05:03 PM.