
Ublas : 
Subject: Re: [ublas] efficient way to convert a matrix to col major order
From: Kraus Philipp (philipp.kraus_at_[hidden])
Date: 20110808 11:56:11
Am 08.08.2011 um 13:26 schrieb Umut Tabak:
>
>> Hi Umut,
>>
>> I'm using the copyconstructor to change the order of the matrix, but I run into a memory problem, because I use very large matrices with around 10^6  10^9 (in some cases 10^12) nonzero elements, so with the copy constructor I duplicate the matrix data. I need only an iterator or something else for a columnmajor access without duplicating
>>
>> Phil
>> _______________________________________________
>> ublas mailing list
>> ublas_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/ublas
>> Sent to: u.tabak_at_[hidden]
>>
> So you initialize the matrix A_csc which is columnmajor with a rowmajor matrix B_csr, is that the case? So the copy ctor is called, if this is the case, I tested this and this takes too much time on a matrix on the order of 100K. I am confused a bit... Can you confirm this?
I do this:
ublas::matrix<T, ublas::column_major> l_matrix(p_matrix);
with p_matrix is ublas::row_major and working with the l_matrix object. In my code I need most times the ublas::row_major structure but some calls must be a ublas::column_major
Phil