Accessing raw matrix in MTL banded format
Wayne Crawford <[email protected]>
| Newsgroups | gmane.comp.lib.mtl.devel |
|---|---|
| Message-ID | <a05200f0fba792875eba6@[134.157.128.213]> |
Dear all, I want to use a LAPACK banded matrix solver (dgbsv) as a preliminary test of some code I'm writing using MTL. Unfortunately, I can't access the data within an MTL-created banded matrix, and I can't create a banded matrix using external data. What am I doing wrong? Here's me trying to get ahold of the data in an internal matrix: typedef matrix< double, banded<>, banded<>, column_major >::type BandMatrix; // Column major for BLAS BandMatrix bandA(numRows,numRows,subdiags,superdiags); double *bandAdata = bandA.data(); // This accesses the Column iterator start, not the data start This gives me the start value from within the Column iterator, not the start of the data. So I tried making my own matrix and putting it into MTL format: typedef matrix< double, banded<>, banded<external>, column_major >::type BandMatrix; // Column major for BLAS double *bandAdata = new double(numRows*LDAB); BandMatrix bandA(bandAdata,numRows,numRows,LDAB,subdiags,superdiags); This gives me a "no matching function" error What am I missing? I find the documentation confusing and incomplete (I found the reference to .data() in an mtl_devel message but nowhere in the documentation, thesis, etc). And I can only assume that my "banded<external>" declaration in the typedef is correct, since I haven't found an explicit reference to the arguments for the banded storage type. Or is MTL dead, and should I switch to uBLAS? Thanks for the help, Wayne Crawford -- _______________________________________________ This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/