Re: [eigen] Block sparse matrices and std vector compilation error

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On 27.11.2014 00:50, Hilario Tomé wrote:
Thank you for the help Mathieu and Christoph. I have uploaded my gcc
compiler to 4.8 and the error indeed does not reproduce. I was compiling
with c++11 with the 4.6 gcc version.

I will take your design advice about using Blocks and I will also explain
my use case to see if you have any suggestions. My big sparse matrix has a
lot of fixed size blocks that are sparse with the same structure and must
be updated repeatedly. The blocks are updated through the same function and
my hope was to parallelize this by calling the function from different
threads using the blocks as an input parameter to the update function.

Do you access your big matrix as a whole at any point? If not, storing the sub-blocks directly might be a better idea. Otherwise, maybe implement some kind of proxy-object, which holds a pointer to your big matrix and indexes for start and size of the block. Give that proxy a method .value() (or whatever) which temporarily creates a corresponding Block<> object.

Overall, the best decision depends a lot on what you are doing. So if you really know what you are doing, maybe storing Block objects directly is ok. But be aware that strange things will happen if you (or an algorithm you call) call(s) things like:
  vec[i] = vec[j];


Christoph

--
----------------------------------------------
Dipl.-Inf., Dipl.-Math. Christoph Hertzberg
Cartesium 0.049
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen

Tel: +49 (421) 218-64252
----------------------------------------------



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/