Re: [eigen] A complex FFT for Eigen

[ Thread Index | Date Index | More Archives ]

Hehe yeah, it's a very strange aspect of C++ syntax that we too
struggled with when we first encountered it...

it the faulty line


the problem is that data itself is of a templated type, so when you
call the templated method segment<int>(int) on it, you need to add the
"template" keyword, like this:

decimation.apply(data.template segment<N>(0),-1);

Otherwise the C++ compiler doesn't understand that the < sign means
template parameter, and tries to interprete it as operator<.


2008/11/29 Tim Molteno <tim@xxxxxxxxxxxxxxxxxxx>:
> Benoit Jacob wrote:
>> 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>
> Hi Benoit.
> I'm struggling here. The line
> decimation.apply(data.segment<N>(0),-1);
> Gives me strange errors,
> fft_complex.h:132: error: invalid operands of types '<unresolved overloaded
> function type>' and 'int' to binary 'operator<'
> but only in the header file. It works fine in the fft_test.cpp file! I have
> attached a small tar with the current version and a small test file. Any
> help appreciated, but I'll try some more tomorrow if you're too busy!
> Regards,
> Tim


Mail converted by MHonArc 2.6.19+