Re: [eigen] still the solve() API debate |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] still the solve() API debate
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 21 Sep 2009 10:29:09 -0400
- 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; bh=e7eKyIRg6kquI+IxdUvd3t19DN9/JjznlsMxvAkBcWY=; b=E9dNuEnB/DU+EqGJk2fU3nvEg0QfX2ZTMuFsNOx6nRzRGJsBJVZ05EGbI/drNBJUw3 yTAguSswJn4TSv0GIMdB2TzIGpkc4vS2P5z7k7Xmew1e1UcqM28486rmydzz3bNaanJp CL+tH1Nojk1pOOhMIGMCfANoG827WCPdfPBSQ=
- 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; b=U+VPKpzeG0zezk/fU9es/gEJzp+63zkL77RFL6XAKG+buomyxM/8MFXId2kJ/Kl5Fw SEr1FKBdt5+EU7Qc3Sj/fEZTZp9LJfjSu/AEIY9w+9lRL/eX53UD5Os3uG3GqTCESKn9 1JR6ja9A1LLKlp02B7cSR/zhvMK5mdJTVjUY0=
2009/9/21 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> On Mon, Sep 14, 2009 at 11:29 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
> wrote:
>>
>> void swap(typename ei_ref_to_temporary<MatrixBase<OtherDerived> >::type
>> other);
>
> It's done... though for some reason buggy (thus again a patch) and currently
> I am too blind to see the issue. But first things first. I added two new
> CMake flags, as discussed with Benoit
>
> a) EIGEN_TEST_RVALUE_REF_SUPPORT (enable rvalue references only in the unit
> tests, not supported on MSVC)
> b) EIGEN_TEST_C++0x (enable C++0x features in general, again unit tests only
> due to missing config file)
>
> Regarding a), I am not sure whether we should look up how to check the
> actual compiler versions. GCC supports this feature since 4.3 (correct me if
> I am wrong)
you're right :) See here:
http://gcc.gnu.org/projects/cxx0x.html
> and MSVC will starting from version VC10.
Yes, it's probably a good idea to enable using c++0x features
automatically when the compiler supports them and the user enabled
c++0x mode. We already do exactly the same for a lot for non-standard
features such as SIMD intrinsics, so why not also here.
This would go into Core/util/Macros.h.
>
> [........]
>
> p.s. What do you think about using CMake in order to create a
> system/compiler specific configuration file - if somebody want's to use it?
I was considering that not having a configured header was a feature,
not a lack. Indeed, we were so far able to do all our platform checks
with the preprocessor, so the result was the same, and we got the
flexibility of not having a configured header, which is very useful in
some circumstances, like when testing different compilers.
It seems to me that the real use case for configured headers is to
detect if particular libraries are installed and to test for functions
that they provide when that isn't possible with the preprocessor. As
long as we can do what we need with the preprocessor, let's do it...
Introducing an optional configured header would also require us to
ask, everytime a user reports an error, "did you use a configured
header", "try rerunning cmake", etc...
Let me make a counter proposal: we could offer a tool that generates a
configured header for tuning Eigen for the specific host machine,
instead of the platform. That can't be done with #ifdefs. For example,
that tool would detect the cache size and define
EIGEN_TUNE_FOR_CPU_CACHE_SIZE accordingly. The header wouldn't be
automatically included, the user would have to #include it explicitly
before #including eigen.
Benoit