Re: [eigen] strange sizeof on windows

[ Thread Index | Date Index | More Archives ]

Benoit Jacob wrote:
2009/1/5 Robert Carnecky Jr. <robin@xxxxxxxxxxxxx>:
I haven't used eigen for a while, but in beta2 I had a similar problem.

The offset of the actual float variable in the matrix was not zero for me,
due to some zero-sized structure or base class taking up actual memory.

Ah, very interesting. I see, we do indeed have some empty structs
there. Need to investigate why they cause trouble specifically with

The code generation was also incredibly bad (call stack depth of 5+ for
but as I paused my project at that time, I did not check whether it was my

I assume you mean in debug more. Then indeed you get very big stack
depth because of how expression templates work. Yes this means that
debug mode gives very poor performance.

It should however go away completely when you enable optimization, as
all these nested function calls get inlined.
No, that was in full optimization mode with link time code generation.
It was also orders of magnitude slower than plain C and crashed because my data was not correctly aligned due to the sizeof-problem above. So I figured I did something wrong with
the compiler or preprocessor settings :)



Mail converted by MHonArc 2.6.19+