Re: [eigen] aliasing system

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


Schleimer, Ben wrote:

The point of my example with rows was that if we want to determine if rows/columns/blocks/minors overlap in memory, we're trying to do something that can't be done at compile-time (because the arguments that you pass to these functions is not necessary a compile-time constant). Hence that will have a cost, and if you want to handle all cases it'll be a big cost (you'll have to check for each entry in the matrix if overlapping occurs at that entry).

Umm, good point. I guess aliasing has to be documented then.

Cheers
ben



BUT i still would insist to have that check in _DEBUG mode only at runtime ! if it is possible without too much coding. it is very important to be able to somehow know that my code does what i assume it to do. and newbies and those who usually skip the FAQ and DOCs will be faced with strange errors if they try what seems to be a naturally equation: m=m*m.

but i have another idea:

if its too much trouble checking overlapping memories while dealing with expression templates,

might there be an easy way to simply turn of expression templates for debugging?

so i might compile my program with expression templates off, test if everything works fine, measure my performance. then i will switch on some #ifdef or whatever and test again, enjoying the performance boost of expression templates and additionally verify everything still works as expected.

and if it is not easy to switch off expression templates via some ifdef, then i would suggest the following:

first make eigen2 complete and working and near final,

then make in an concentrated effort of - lets say some days of programming - an eigen2_without_expression_templates !! maybe in another subdirectory. if it has the exact same interface, one could just exchange headers and do the tests if everything works fine.





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