Re: [eigen] FFT for Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] FFT for Eigen
- From: Gael Guennebaud <gael.guennebaud@xxxxxxxxx>
- Date: Tue, 19 May 2009 22:41:01 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=F8s/lPHEWIMh4WYFcNSxcMsAaGZZnxk9Y2vFXbcIJTE=; b=M6DZocaOUN6gH0ybv7PJwtEQOespJUXx8Egp1kOJwps6ZZ61hKhif68wgpx8Sg0BBj RI9TYyhYyoBOTalPeFoVf3aOJZAR+tg0APvROvobF4Qy7MI7L7NpHNqlE4buO1pVzMV6 2UcPRM5vTkHFG3j+hoLhjY+G1pDnYi0dgnMc8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Oy7aXC4IfOYg80qVywdx119Gcqg+M8AgDWh+IZCrfMFADHtm5KrIuDBK6CuH1a/FXS 2bJSo006h8Rw5ywkirKRYfItpT/la1VJ8lBRht5YIENAIEC2EVWS+f6Ce92NlfRTvwDS CyjB7GOIyb+7PYIkXoaq88sgwdx9E2yvdxCRw=
>> Really? The only real() that I can see is const, and anyway, how would
>> we implement that? std::real() and std::imag() only return references
>> with certain GCC implementations while e.g. on GCC 4.0 / Mac they
>> return by value.
>>
>> It seemed to me that allowing that was one of the things that would
>> require us to have our own complex numbers class.
>
> arf, you are right., one more stupid annoying std limitation....
>
ok, so, is anyone against adding that:
inline float& ei_real(std::complex<float>& x) { return
reinterpret_cast<float*>(&x)[0]; }
inline float& ei_imag(std::complex<float>& x) { return
reinterpret_cast<float*>(&x)[1]; }
so that we can have real() returning a lvalue ?
Gael.