|
|||
|
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 |
|
|
||||
|
||||
|
|
|
|||
|
aberte@gmail.com <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++)?. Fortran stores arrays with the first (leftmost) subscript varying fastest. If the lapack documentations is described in those terms, you will store them as MyMatrix[0], MyMatrix[3], MyMatrix[6]. It seems that zgemm has an argument to specify the form of the input matrix. You can choose the appropriate one! -- glen |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re: How to build Dynamic Variable names and values | Arthur Tabachneck | Newsgroup comp.soft-sys.sas | 0 | 02-11-2006 06:34 PM |
| Re: How to build Dynamic Variable names and values | SUBSCRIBE SAS-L Chandra Gadde | Newsgroup comp.soft-sys.sas | 0 | 02-11-2006 03:50 PM |
| Re: How to input data from different column for different rows | nospam@HOWLES.COM (Howard Schreier | Newsgroup comp.soft-sys.sas | 0 | 09-13-2005 03:47 PM |
| Re: How to input data from different column for different rows | Peter Crawford | Newsgroup comp.soft-sys.sas | 0 | 09-13-2005 07:34 AM |
| Re: surveyselect question | Scott | Newsgroup comp.soft-sys.sas | 0 | 01-16-2005 10:48 PM |