Difference between revisions of "3.4"

From Eigen
Jump to: navigation, search
Line 1: Line 1:
 
Raw dump of the main novelties and improvements that will be part of the 3.4 release compared to the 3.3 branch:
 
Raw dump of the main novelties and improvements that will be part of the 3.4 release compared to the 3.3 branch:
  
* New features
+
=== New features ===
** New versatile API for sub-matrices, slices, and indexed views. It basically extends <code>operator()(?,?)</code> to let it accept anything that looks-like a sequence of indices with random access. To make it usable this new feature comes with new symbols: <code>Eigen::all</code>, <code>Eigen::last</code>, and functions generating arithmetic sequences: <code>Eigen::seq(first,last[,incr])</code>, <code>Eigen::seqN(first,size[,incr])</code>, <code>Eigen::lastN(size[,incr])</code>. Check the [http://eigen.tuxfamily.org/dox-devel/group__TutorialSlicingIndexing.html doc] for the details.
+
 
** Reshaped views through the new members <code>reshaped()</code> and <code>reshaped(rows,cols)</code>. This feature also comes with new symbols: <code>Eigen::AutoOrder</code>, <code>Eigen::AutoSize</code>. Check the [http://eigen.tuxfamily.org/dox-devel/group__TutorialReshape.html doc] for the details.
+
* New versatile API for sub-matrices, '''slices''', and '''indexed views''' [http://eigen.tuxfamily.org/dox-devel/group__TutorialSlicingIndexing.html [doc]]. It basically extends <code>A(.,.)</code> to let it accept anything that looks-like a sequence of indices with random access. To make it usable this new feature comes with new symbols: <code>Eigen::all</code>, <code>Eigen::last</code>, and functions generating arithmetic sequences: <code>Eigen::seq(first,last[,incr])</code>, <code>Eigen::seqN(first,size[,incr])</code>, <code>Eigen::lastN(size[,incr])</code>. Here is an example picking even rows but the first and last ones, and a subset of indexed columns:
** A new helper <code>Eigen::fix<N></code> to pass compile-time integer values to Eigen's functions. It is currently supported to pass compile-time sizes to <code>.block(...)</code>, <code>.segment(...)</code>, and all variants as well as the first, size and increment parameters of the seq, seqN, and lastN functions. You can also pass "possibly compile-time values" through <code>Eigen::fix<N>(n)</code>. See the respective [http://eigen.tuxfamily.org/dox-devel/group__Core__Module.html#title6 doc] for the details.
+
<source lang="cpp">
* Performance optimizations
+
MatrixXd A = ...;
** Vectorization of partial-reductions along outer-dimension, e.g.: colmajor.rowwise().mean()
+
std::vector<int> col_ind{7,3,4,3};
** Speed up evaluation of HouseholderSequence to a dense matrix, e.g.,<source lang="cpp">
+
MatrixXd B = A(seq(2,last-2,fix<2>, col_ind);
 +
</source>
 +
 
 +
* '''Reshaped''' views through the new members <code>reshaped()</code> and <code>reshaped(rows,cols)</code>. This feature also comes with new symbols: <code>Eigen::AutoOrder</code>, <code>Eigen::AutoSize</code>. [http://eigen.tuxfamily.org/dox-devel/group__TutorialReshape.html [doc]]
 +
 
 +
* A new helper <code>Eigen::fix<N></code> to pass compile-time integer values to Eigen's functions. It is currently supported to pass compile-time sizes to <code>.block(...)</code>, <code>.segment(...)</code>, and all variants as well as the first, size and increment parameters of the seq, seqN, and lastN functions. You can also pass "possibly compile-time values" through <code>Eigen::fix<N>(n)</code>. [http://eigen.tuxfamily.org/dox-devel/group__Core__Module.html#title6 [doc]]
 +
 
 +
===  Performance optimizations ===
 +
 
 +
* Vectorization of partial-reductions along outer-dimension, e.g.: colmajor.rowwise().mean()
 +
* Speed up evaluation of HouseholderSequence to a dense matrix, e.g.,<source lang="cpp">
 
MatrixXd Q = A.qr().householderQ();
 
MatrixXd Q = A.qr().householderQ();
 
</source>
 
</source>
* Hardware supports
+
 
** Generalization of the CUDA support to CUDA/HIP for AMD GPUs.
+
===  Hardware supports ===
** Add explicit support for MSA vectorization engine (MIPS).
+
 
** AVX512 is enabled by default when enabled on compiler side.
+
* Generalization of the CUDA support to CUDA/HIP for AMD GPUs.
 +
* Add explicit support for MSA vectorization engine (MIPS).
 +
* AVX512 is enabled by default when enabled on compiler side.

Revision as of 08:07, 11 November 2018

Raw dump of the main novelties and improvements that will be part of the 3.4 release compared to the 3.3 branch:

New features

  • New versatile API for sub-matrices, slices, and indexed views [doc]. It basically extends A(.,.) to let it accept anything that looks-like a sequence of indices with random access. To make it usable this new feature comes with new symbols: Eigen::all, Eigen::last, and functions generating arithmetic sequences: Eigen::seq(first,last[,incr]), Eigen::seqN(first,size[,incr]), Eigen::lastN(size[,incr]). Here is an example picking even rows but the first and last ones, and a subset of indexed columns:
MatrixXd A = ...;
std::vector<int> col_ind{7,3,4,3};
MatrixXd B = A(seq(2,last-2,fix<2>, col_ind);
  • Reshaped views through the new members reshaped() and reshaped(rows,cols). This feature also comes with new symbols: Eigen::AutoOrder, Eigen::AutoSize. [doc]
  • A new helper Eigen::fix<N> to pass compile-time integer values to Eigen's functions. It is currently supported to pass compile-time sizes to .block(...), .segment(...), and all variants as well as the first, size and increment parameters of the seq, seqN, and lastN functions. You can also pass "possibly compile-time values" through Eigen::fix<N>(n). [doc]

Performance optimizations

  • Vectorization of partial-reductions along outer-dimension, e.g.: colmajor.rowwise().mean()
  • Speed up evaluation of HouseholderSequence to a dense matrix, e.g.,
    MatrixXd Q = A.qr().householderQ();

Hardware supports

  • Generalization of the CUDA support to CUDA/HIP for AMD GPUs.
  • Add explicit support for MSA vectorization engine (MIPS).
  • AVX512 is enabled by default when enabled on compiler side.