Re: [eigen] about eebce0fdbf01 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] about eebce0fdbf01
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Fri, 21 May 2010 12:38:59 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=JlCNcYlcEZlT4+oBp+n4aGRbgsZbby+hCgVqhvtY2JY=; b=KswyJdrETmCCPGeu3iCHeUWwQ8aqqHmlDAtqNTgffVf7AvUCw44Ue1YIL6rl6y+F2+ 9NOK1rpnfqDiatc97QJ4xTqTcvl95ho5LU11YeAqTDo5nCrpcUoBR56xA9i6YETPS9EL a24GUDrTuu9uABt5xUYW0JLTBmYYmDjgVshzU=
- 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=ZVdd2wTxq1HzIzGIEMbm1OgS6JE+AESRA0ixY1LYOBE5LJLcCZtA7/rmLaIN2zXyia M5o+fBqvstHhWavPHYAEa/qN5aIRddy87El98d4MVJeSqIUHPqKnM3yjApAsuJhT/128 2UIWBDdz+cvQFk02ybMZwCPFvuFD9m8oKezVQ=
Yes, this stuff needs a cleanup and needs to be rewritten as
templates. The difficulty is that we must treat differently the Eigen
objects from the numeric types. Not a problem, just needs a little bit
of work.
For a long time having this non-templated was OK but it's become
problematic now that we allow a lot more types (all integer types
etc..).
Benoit
2010/5/21 Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>:
>
>
> Actually there are lot of things to do there. For example, i dont understand why
> inline bool test_ei_isApprox(const float& a, const float& b)
> inline bool test_ei_isApprox(const double& a, const double& b)
>
> and such are 'copy/pasted' and not using template. I've tried to define
>
> template <typename T>
> inline bool test_ei_isApprox(const T& a, const T& b)
> { return ei_isApprox(a, b, test_precision<T>()); }
>
> But the compilation fails because it tries to use it [with T = Eigen::CwiseUnaryOp<Eigen::ei_scalar_real_op<std::complex<double> >, Eigen::Matrix<std::complex<double>, 33331, 33331> >]
>
> so i gave up.... and i did not dare copy/pasting the "output error" on all those functions..
>
> Thomas
> --
> Thomas Capricelli <orzel@xxxxxxxxxxxxxxx>
> http://www.freehackers.org/thomas
>
> In data venerdì 21 maggio 2010 13:18:57, Benoit Jacob ha scritto:
> : > This commit is a good idea but one must be careful about one thing:
>>
>> if the test does VERIFY_IS_NOT_APPROX, this is currently defined as
>>
>> #define VERIFY_IS_NOT_APPROX(a, b) VERIFY(!test_ei_isApprox(a, b))
>>
>> so it will output to cerr whenever it succeeds! The fix is probably to
>> introduce a separate test_isNotApprox or something like that.
>>
>> Another thing is that for consistency, VERIFY_IS_EQUAL should do the samel.
>>
>> Benoit
>>
>>
>>
>
>
>