Re: [eigen] Initial implementation of tensor support

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

sorry for replying that late to this thread.

A Tensor module would of course be very welcome: it is part of the features that we planed since the beginning of Eigen, so I'm very glad there is a concrete starting point.

There has been some debate on the C++11 issue, and I have to agree that having features relying on C++11 is quite a concern. After some thoughts, it seems pretty clear that C++11 features is the only way to implement a Tensor module the "right way". Looking at your code, a C++98 only version would look much more complicated while it's currently only about storage. So I'm not against importing it into unsupported to give the visibility it deserve and make it maturing more rapidly (hopefully).

However, it is important to make sure C++11 features cannot be used by mistake. It has been suggested to ask for the user to define a new preprocessor token (EIGEN_ENABLE_CXX11) for that purpose. Since I'm trying to limit the amount of compilation options, I'd like to suggest two other solutions:

- Put "CXX11" in the module name, e.g., Eigen/CXX11/Tensor and all CXX11 modules could go in Eigen/CXX11 more like "Eigen/CXX11" was a "side" project.
- Add a new namespace for C++11 features, e.g., Eigen::CXX11 or simply Eigen11 or ????

Note that these two options are not exclusive.

Anyway, this also means the Tensor module will never be included by Eigen/Dense or Eigen/Eigen.

Regarding the feature set, assignment and slices are of course one of the most important. Fixed sizes and tensor products have not been mentioned yet, but are very important too! With C++11, fixed-sizes should not be difficult to add. Tensor products is more challenging regarding the API! Let's see if we can come up with something better than Blitz++!

I've also a question regarding the ColMajor/RowMajor option. I guess they rather mean something like forward/backward storage order, but is that option really needed??

cheers,

gael




On Wed, Oct 23, 2013 at 3:09 PM, Christian Seiler <christian@xxxxxxxx> wrote:
Dear all again,

Anyway: I think a tensor class itself might really be useful for quite
a few people [...] and I do want to continue working on that in the
future [...] and wanted to ask

whether you'd consider including this in Eigen.

Now that I've come back from a longer vacation, I'd like to ask
whether the core Eigen developers would be interested in adding
this to Eigen's unsupported/? Not necessarily right now, if you
say this should mature a bit more before it's officially added;
I'm fine with that. However, I'd like to know about any generic
objections before I invest more time.  (For example, if even in
unsupported/,  C++98 support was considered a requirement, then
there would be no point in improving the current implementation
since it already contains all I need for myself so far.)

Regards,
Christian






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/