Page 1 of 1

Vectors, heap arrays as arguments within lapack routines ?

PostPosted: Tue Aug 22, 2006 12:47 pm
by Mat
Hello,
after browsing the documentation for about an hour i post my simple question:
If i use lapack routine within my C++ code - is it somehow possible to use vectors or Heap Objects within the lapack routines? Or is there hard restriction to use C-arrays ?

Thanks a lot

PostPosted: Tue Aug 22, 2006 1:23 pm
by Julie
Hi Mat,

Not that I know, you cannot use directly Lapack with vectors or Heap Objects in C++.

But, you can have a look at http://cvmlib.com/.
The link has been given by a user on the forum, I never used it.
Be careful, as you don't have all the LAPACK routines in that library
It seems an on-going project...
Please contact directly the author of that library if you are interested.

Please let us know if it helps you
Thanks
Julie

PostPosted: Tue Aug 22, 2006 1:24 pm
by kurzak
What you actually need to use is FORTRAN 77 arrays.
The idea of C++ containers is that you access them
using iterators, in a way independent of their implementation.
So, you should not make assumptions about the implementation.
Unfortunately, (Sca)LAPACK requites that the representation
is that of FORTRAN 77. Besides, with (Sca)LAPACK you mostly
deal with matrices, and I do not see how you can utilize STL,
or other C++ constructs, to your advantage when dealing with
2 dimensional arrays.