Sat Mar 12, 2022 6:15 pm
Hi, I'm in the process of converting some old vector operation code to use Eigen/ArrayXf. I have a lot of code like this:
where x, y and a can either be a double or vector. When they are vector represented as ArrayXf, I could change the formula to
but that would break the original code that works also for regular double. I tried to define
that would make the original code work without any changes, but this approach seems introducing temporary objects and slow down quite a bit. As the last resort and a temporary solution I was using marco, like this
It works for ArrayXf without code changes, but not for double. Any idea of how to get around it?
Registered users: bcooksley, Bing [Bot], claydoh, Google [Bot], paulgureghian, Yahoo [Bot]