Re: [eigen] Comma initializing a very big matrix

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


This sounds like a compiler bug, but I have admittedly not tried to construct a matrix that large.

On Fri, Apr 12, 2024 at 7:50 AM Ian Bell <ian.h.bell@xxxxxxxxxx> wrote:
I tried to comma-initialize a 45x45 matrix of doubles and it hard-crashed the compiler (recent apple clang) with no error message. I had to fall back to a clunky workaround of storing first in a valarray (any STL container would do I think), and mapping that memory chunk into the matrix: https://github.com/usnistgov/teqp/blob/ff852ca67c1fd725223403e28ab97ebd96f2451d/src/data/FEANN.cpp#L24-L70 . It's annoying because the comma initialization and the 1D valarray have different row/column-major ordering, so it took a couple of tries to get right.

Is there a way to (in order of niceness): 
1. Get the comma init to work
2. Do a less-annoying workaround
3. At least crash with some sort of useful message
?

Or is this a bug?

Ian


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