Fwd: [eigen] A complex FFT for Eigen

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

Argh, stupid Google mail doesn't reply-to-list.

---------- Forwarded message ----------
From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
Date: 2008/11/28
Subject: Re: [eigen] A complex FFT for Eigen
To: Tim Molteno <tim@xxxxxxxxxxxxxxxxxxx>

Oh I see...

Here you need to make it templated.
template<typename VectorType>
static void apply(VectorType& data, int iSign)

The reason why you must make it templated is that, depending on the
depth of recursion, you get a different VectorType. For example at the
second level you get
Eigen::Block< Eigen::Block< Matrix<blabla>, blabla>, blabla>


> Here is as far as I can get. (N2 is N/2)
> static void apply(Eigen::Block<Matrix< std::complex<T>, N, 1>, N, 1>& data,
> int iSign)
>        {
>                /*! Call the next-level of recursion on the first half of the data */
>                next.apply(data.segment<N2>(0), iSign);
>                /*! Call the next-level of recursion on the second half of the data */
>                next.apply(data.segment<N2>(N2), iSign);
>                ...
>        }
> This does not compile. I could not figure out the return type of segment. Any
> help appreciated.
> Cheers
> Tim


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