diff options
author | Gael Guennebaud <g.gael@free.fr> | 2017-02-21 13:49:09 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2017-02-21 13:49:09 +0100 |
commit | b3fc0007ae15208b6cbf42b37a56c855e72bd712 (patch) | |
tree | 34cb5898aaa9283f22f749945e6fabe62a5bbd51 /Eigen/src/plugins | |
parent | 9081c8f6eaeb61a682950fac53af6b321667e355 (diff) |
Add support for mat(all) as an alias to mat.reshaped(mat.size(),fix<1>);
Diffstat (limited to 'Eigen/src/plugins')
-rw-r--r-- | Eigen/src/plugins/ReshapedMethods.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/plugins/ReshapedMethods.h b/Eigen/src/plugins/ReshapedMethods.h index 7a11a4bcc..3a1b20301 100644 --- a/Eigen/src/plugins/ReshapedMethods.h +++ b/Eigen/src/plugins/ReshapedMethods.h @@ -70,4 +70,13 @@ reshaped(NRowsType nRows, NColsType nCols, OrderType) const derived(), internal::get_runtime_value(nRows), internal::get_runtime_value(nCols)); } +// Views as linear vectors + +EIGEN_DEVICE_FUNC +inline const Reshaped<const Derived,SizeAtCompileTime,1> +operator()(const Eigen::internal::all_t&) +{ + return Reshaped<const Derived,SizeAtCompileTime,1>(derived(),size(),1); +} + #endif // EIGEN_PARSED_BY_DOXYGEN |