aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2017-02-21 13:49:09 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2017-02-21 13:49:09 +0100
commitb3fc0007ae15208b6cbf42b37a56c855e72bd712 (patch)
tree34cb5898aaa9283f22f749945e6fabe62a5bbd51 /Eigen
parent9081c8f6eaeb61a682950fac53af6b321667e355 (diff)
Add support for mat(all) as an alias to mat.reshaped(mat.size(),fix<1>);
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/util/Constants.h2
-rw-r--r--Eigen/src/plugins/ReshapedMethods.h9
2 files changed, 11 insertions, 0 deletions
diff --git a/Eigen/src/Core/util/Constants.h b/Eigen/src/Core/util/Constants.h
index 5d37e5d04..612dbf5e8 100644
--- a/Eigen/src/Core/util/Constants.h
+++ b/Eigen/src/Core/util/Constants.h
@@ -339,6 +339,8 @@ enum SideType {
OnTheRight = 2
};
+
+
/* the following used to be written as:
*
* struct NoChange_t {};
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