Re: [eigen] [Review] Pull request 66, Huge Tensor module improvements |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
For that (simple) case it would just be
* The Array class lacks nice to have cxx11 features such as initialization
lists. This is syntactic sugar, but if I can use a recent compiler I'd
rather write:
Tensor<float, 3> T({1,2,3})
than
Array<ptrdiff_t, 3, 1> dims;
coeffs << 1, 2, 3;
Tensor<float, 3> T(dims);
Tensor<float, 3> T(Array3i(1,2,3));
That's with integers instead of ptrdiff, but so was your C++11 example. And it is currently limited to 4 dimensions.
I do agree that the C++11 syntax is nicer, and I would definitely not object supporting std::array if it is available -- my question was basically, if there is a need to partially re-implement std::array if it does not give additional features compared to Eigen::Array.
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |