Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.fortran

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 10-20-2006, 01:39 PM
aberte@gmail.com
Guest
 
Posts: n/a
Default input matrix

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

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 10-20-2006, 06:36 PM
glen herrmannsfeldt
Guest
 
Posts: n/a
Default Re: input matrix

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
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


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



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


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.