[eigen] Taking advantage of C++11 features in Eigen |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: [eigen] Taking advantage of C++11 features in Eigen
- From: Nicola Gigante <nicola.gigante@xxxxxxxxx>
- Date: Tue, 11 Feb 2014 20:54:18 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=gcxay5pJgo2G6iJZMoA+0mYzyGhieuzO3bNcbbzsSyo=; b=CH0Ssc1tpvgrVNHsRUm1+XnxtKH5ImICvYcevxbnmE/vIeUiaTOt9Hazod6SXEETT/ Lw2oj1q81aBeJT43ouYkZkYYPsNPqZKQeAApG4306btvPOVdVFfEhWhtZUj50zYcmj8D dJpjsaui57vdJEJChIcYhR1lSgJmqlkKTKIF7z43DrAe13Tm2tYQ1fRAGFb1xLlF+MJa xtmHzjEmqfVDClDcbiLXRwHYu2XdeHoieCJYwRosAb8JshcWBnrUvfAW6VPLBw3HFv51 ByNyrVrv4J+7LOwn4xiwV8/ZCudUfjtqRVIRNufYlnzH4ZkrdRr6f0ZGb9jUCf16yCBn mfAw==
Good evening!
I’m recently starting to follow the Eigen project and I was wondering which is the current status
of C++11 features support inside the library. It seems the library is “compatible” with C++11,
meaning that it compiles and works properly with the new standard, but does not take
advantage of new features when available.
The most important and obvious I can think of:
- Some Eigen types could take advantage of move semantics (for example dynamic matrices)?
- Could the new initializer list syntax be added to matrix types?
- Could the library avoid a lot of alignment problems with vectorizing code using
the new core-language support for the alignas() keyword? Also, custom “aligned” allocation
logic could be avoided with the new alignment support, and it could result in better performance
since the compiler and the runtime get to know what you need.
- Is there some use for “r-value references for this” in the optimization of the operations execution?
with this feature, we can now distinguish when a member function is called on an l-value or an
r-value (most probably a temporary object). I think it’s worth investigating which optimizations
can be enabled knowing this fact. What do you think?
Other minor issues:
- Is there a plan to use decltype to improve the reliability of the result_of<> trait in Meta.h?
- In C++11 mode, defining non_copyable (again in Meta.h) in terms of the ‘delete’ keyword
instead of private copy constructors can improve diagnostics
I would like to contribute in this area (as a starter project to gain confidence with Eigen internals).
What do you think about it?
Thank you and congratulations for the great work!
Nicola