Re: [eigen] A complex FFT for Eigen

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


Benoit Jacob wrote:
- your code doesn't leverage Eigen as much as it could to enable high
performance. For example, in apply(), replacing the for loop by single
operations on vectors would let Eigen handle loop unrolling and
vectorization. Well, except that Eigen doesn't vectorize std::complex
currently, so I wonder if your code should be adapted to that or if
this means that we should consider vectorizing std::complex. (So far
we haven't seen many uses for std::complex anyway so we didn't
optimize it as much as we maybe could).
I'd love to vectorize this better. I'll look into this, but ran into the issue of addressing sub-vectors in-place. I could not work out how to do it in Eigen. How do I carry out operations like

data[1:N] += data[N+1:2N]

In other words, can I create a vector object that refers into part of another vector object?

I tried using MatrixBlock objects, but could not get it to work? Using pointers into the arrays loses bounds checking, and makes assumptions about how arrays are stored.

- the factorize() function here is not vectorizable at all because it
doesn't do any contiguous access. Aren't there other, more
hardware-friendly algorithms?
I think that FFT's are inherently non-local operations. There might be better ways of doing this, but as it stands this code is pretty fast for an FFT and extremely small and lightweight, so I'd rather vectorize the apply function first as this is where most of the computation is happening.

Cheers

Tim

---


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