Re: [eigen] Lazy evaluation and adjoint(): Bug? |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
Dear Gael,
Am 14.09.2016 um 18:43 schrieb Gael Guennebaud:
but do you really need a custom complex type instead of using std::complex<custom> ? I know that the standard says it's undefined, but in practice it just work as expected. I guess it is left undefined because it's just too
difficult to thoroughly specify the behavior on a type that you don't known. The same goes for our matrix decompositions.
Presumably I could overload all operations also for std::complex<custom>,
but I got beaten up by 'undefined behaviour' too often in my life (*), so I'm just scared.
I just don't know what optimizers do.
All the best
Peter
(*)
P.S. One innocent looking example is the following code snippet
double x;
double y;
x=y; //undefined behavior
x=1;
f(x);
Although x was only used when initialized, it lead to a segfault far away at a completely different code segment,
nevertheless in practice that usually works.