From b3fc0007ae15208b6cbf42b37a56c855e72bd712 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 21 Feb 2017 13:49:09 +0100 Subject: Add support for mat(all) as an alias to mat.reshaped(mat.size(),fix<1>); --- Eigen/src/plugins/ReshapedMethods.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Eigen/src/plugins') 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 +operator()(const Eigen::internal::all_t&) +{ + return Reshaped(derived(),size(),1); +} + #endif // EIGEN_PARSED_BY_DOXYGEN -- cgit v1.2.3