Re: [eigen] A complex FFT for Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: "Tim Molteno" <tim@xxxxxxxxxxxxxxxxxxx>, eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] A complex FFT for Eigen
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Sat, 29 Nov 2008 15:46:44 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=qxIn6kJyW51XWYKCLGThFWnRDDVVfS/W0Bzt+rUQu3o=; b=H/L5wvstzJsaiTctn7toXAXhZ65xqD8g870CVYfjIMfQiopPwPyyy7/C3BMxZlWwiC 99KyWgu5EoegCUI/t00qc28VYi3dEYETmUqKuPl/XoIoIzTC7CEQl3PkIS57dQ8DL5Xv 2VA1abtfhYrd0fJZ0PxL+DqYMUUGBLgo1dQfk=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=w5rHm454bWRh8dKyenGngnypJZGO2CcX27Th+RU3NxI3MrUBh6SiPnWv+7dSXNzXKS DC06nkfbEb9L9pniMKPg1LPtBO6rGwwjm4j3+zrm3VnhpAHpK5IiBLv+GWg8hWnsRR9k FRueW5k3YZWT57I/eGoGxEN9zBFhtQuCfEaaA=
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
decimation.apply(data.segment<N>(0),-1);
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<.
Cheers,
Benoit
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
>
---