aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_broadcasting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unsupported/test/cxx11_tensor_broadcasting.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_broadcasting.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/unsupported/test/cxx11_tensor_broadcasting.cpp b/unsupported/test/cxx11_tensor_broadcasting.cpp
index 7df5b53d6..d3dab891f 100644
--- a/unsupported/test/cxx11_tensor_broadcasting.cpp
+++ b/unsupported/test/cxx11_tensor_broadcasting.cpp
@@ -91,7 +91,16 @@ static void test_vectorized_broadcasting()
}
}
+#if EIGEN_HAS_VARIADIC_TEMPLATES
tensor.resize(11,3,5);
+#else
+ array<Index, 3> new_dims;
+ new_dims[0] = 11;
+ new_dims[1] = 3;
+ new_dims[2] = 5;
+ tensor.resize(new_dims);
+#endif
+
tensor.setRandom();
broadcast = tensor.broadcast(broadcasts);
@@ -139,7 +148,16 @@ static void test_static_broadcasting()
}
}
+#if EIGEN_HAS_VARIADIC_TEMPLATES
tensor.resize(11,3,5);
+#else
+ array<Index, 3> new_dims;
+ new_dims[0] = 11;
+ new_dims[1] = 3;
+ new_dims[2] = 5;
+ tensor.resize(new_dims);
+#endif
+
tensor.setRandom();
broadcast = tensor.broadcast(broadcasts);