Fwd: [eigen] A complex FFT for Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Fwd: [eigen] A complex FFT for Eigen
- From: "Benoit Jacob" <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 28 Nov 2008 21:30:11 +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=xwNS66kFVeCE+pFowEBwsNjYRbfVNtSFf1/ILGRiS90=; b=nY/DXpTZTTsKwp3P4CLIoY0A8Dd8D093zGhDyq9JnPBbcIymsFc3pI5XFY8jfakkoC KvHHJeYRUHXAFG5v0mMBgeK9M2ZopO635tu2M3hUNu596Cf7SYq3uc0zVqSeKEWqmNpZ h51Fw9U9PI1OAzjoCrWjozu/4Ad5rl3bo4tik=
- 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=CRPjqgeU6iSxb/XALahiIi7RrHdjXisNr9iJMt4Gd+rx+ORtBmvfJF1Cvfk3yPsenj jSmkdQqzAliFYVr8NPTLg0cjDJTEC97B59rCGzla12o65AZKUSL5tUitZzM6CWO8cOPY W7rjKGQUzx3xD4b5cmLRyzOEfH3iEwJsGZxbE=
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>
Cheers,
Benoit
> 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
>
---