Re: [eigen] [Review] Pull request 66, Huge Tensor module improvements

[ Thread Index | Date Index | More Archives ]


>>   - merge the pull request
>>   - create unsupported/Eigen/CXX11/Emulated module that includes the
>>     required emulation stuff
>>   - create unsupported/Eigen/CXX11/CoreOrEmulated that either includes
>>     CXX11/Core or CXX11/Emulated depending on compiler version
>>   - move tensor module to unsupported/Eigen/Tensor (one dir up)
>>   - change tensor module to include
>>     unsupported/Eigen/CXX11/CoreOrEmulated
>>   - leave TensorSymmetry underneath CXX11 and have it include CXX11/Core
>>     but not CoreOrEmulated
> I agree with the end-result. If you think doing the merge before moving 
> the headers really simplifies things I won't object. But IMO for now we 
> should remove things affecting the Core from the pull request, anyways.

Define "Core". unsupported/Eigen/CXX11/Core is currently just used by
the Tensor module, that was added by my initial pull request.

I only named it "Core" because it was more generic than simply tensors
and parts of it might be a candidate to be merged into Core.

> Not sure if this makes a practical difference. I made some tests using 
> Eigen::Arrays which compiled with -O1 where entirely simplified. E.g.:
>    int testEigen() {
>      Eigen::Array4i A(0,1,2,3);
>      return A(2)-A(3);
>    }
> resulted basically in
> _Z9testEigenv:
> 	movl	$-1, %eax
> 	ret

Hmmm.... It's been a while since I've had this issue with constexpr, so
maybe I'll have to recheck what I had in mind... The thing is that I
experimented quite a lot (especially with the involved TensorSymmetry
code) before I came to the final version I posted here, so maybe I
actually don't need it any more. I'll get back to you on that.

> I also think (hope) eventually we can provide prover constexpr support 
> for fixed-sized Eigen objects (see discussion on Bug 820) -- but I don't 
> think this has top-priority at the moment.

Yes, I see the problems.

Btw. note that constexpr implies const in C++11 but not in C++14. And in
C++14 you may want to add constexpr also to non-const methods.


Mail converted by MHonArc 2.6.19+