Re: [eigen] Eigen::Complex attempt |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Eigen::Complex attempt
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Wed, 17 Jun 2009 16:04:45 +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=tp3d1RTkSg33bEv/cVUZsrg1CHqCHqIVA29fSNZp4jY=; b=SmVS4v06HkAMF7YPJbLB5C/JHHy5b/5Lxtd1eo7lGT8L8HYDv3pWBKY6DfAuYxl0g6 W42Ic35ewCeiCRlCqjifVFWZlUYnQjdUv1MpolI8RL0aNMLIhizcmjRRVUmRfbBjRO46 fulrU89PJEn/aKV6ZrMYe+o/usH2W2HBV32Ek=
- 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=s23BWmF9luobJvv+ZtjIDbQZubEvihYekrX6ZnXN0cRcjSB04N127xgPEh3TkLbPe5 EPfbuVXmS4JwM8GfwUu1Gw2WVa1hDLlGmvxMRCdW3HSutYsjQkRT9dNdtiXtrF7QzVwb 8Kf8U+UA0VlYqjmp/+gRn9t+vpm8RavH0sShM=
2009/6/17 Mark Borgerding <mark@xxxxxxxxxxxxxx>
>
> I just started out by trying to see if I could make the Complex class have an operator & which returns a "pointer object" that could be converted to either
> Eigen::Complex<T> *
> or
> std::complex<T> *
> That worked and then I just didn't know when to quit. So now here is a Complex class that has a superset of the std::complex interface and actually uses std::complex whenever it can. It has more accessors and mutators..
>
> http://bitbucket.org/mborgerd/eigen2_for_fft/src/tip/unsupported/Eigen/Complex
>
> Note the structure packing should be identical (assuming the C++ standards folks are correct in their assessment that "All existing implementations already have the layout proposed here." http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#387 )
Ah, thanks a lot for finding this link! This is enough to make me OK
to make this assumption.
If I understand well, your aim is to make Eigen::Complex entirely
interoperable with std::complex, and the tricky part was indeed to
handle pointers, good job.
(I'm not yet able to really review anything).
Benoit