aboutsummaryrefslogtreecommitdiff
path: root/test/nomalloc.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 15:56:36 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-04-28 15:56:36 +0000
commitb06cbe0aaab4156d7796d06083b29f0029caacf9 (patch)
treefb979fb4cf4f8052c8cc66b1ec9516d91fcd859b /test/nomalloc.cpp
parentebb9b35b8ba326e77933f1a8283f5f62decadf57 (diff)
parentbc0f5df265caa21a2120c22453655a7fcc941991 (diff)
downloadeigen-b06cbe0aaab4156d7796d06083b29f0029caacf9.tar.gz
Snap for 8512216 from bc0f5df265caa21a2120c22453655a7fcc941991 to tm-frc-media-releaset_frc_med_330443030android13-frc-media-release
Change-Id: I3ce64ce71cedb6c72ed116ba550b07bc9d82743c
Diffstat (limited to 'test/nomalloc.cpp')
-rw-r--r--test/nomalloc.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/nomalloc.cpp b/test/nomalloc.cpp
index 50756c2fb..cb4c073e9 100644
--- a/test/nomalloc.cpp
+++ b/test/nomalloc.cpp
@@ -24,7 +24,6 @@ template<typename MatrixType> void nomalloc(const MatrixType& m)
{
/* this test check no dynamic memory allocation are issued with fixed-size matrices
*/
- typedef typename MatrixType::Index Index;
typedef typename MatrixType::Scalar Scalar;
Index rows = m.rows();
@@ -173,7 +172,7 @@ template<typename MatrixType> void test_reference(const MatrixType& m) {
typedef typename MatrixType::Scalar Scalar;
enum { Flag = MatrixType::IsRowMajor ? Eigen::RowMajor : Eigen::ColMajor};
enum { TransposeFlag = !MatrixType::IsRowMajor ? Eigen::RowMajor : Eigen::ColMajor};
- typename MatrixType::Index rows = m.rows(), cols=m.cols();
+ Index rows = m.rows(), cols=m.cols();
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, Flag > MatrixX;
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic, TransposeFlag> MatrixXT;
// Dynamic reference:
@@ -203,7 +202,7 @@ template<typename MatrixType> void test_reference(const MatrixType& m) {
}
-void test_nomalloc()
+EIGEN_DECLARE_TEST(nomalloc)
{
// create some dynamic objects
Eigen::MatrixXd M1 = MatrixXd::Random(3,3);