aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_thread_pool.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-01-30 10:46:36 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-01-30 10:46:36 -0800
commit2053478c5677b53c87b302d962a0545d08833a72 (patch)
tree4e09603e23bf5f89591e66d2d684d2d51e222f6f /unsupported/test/cxx11_tensor_thread_pool.cpp
parentd0db95f730b84e59bbad7fce24eb4becef106b9e (diff)
Made sure to use a tensor of rank 0 to store the result of a full reduction in the tensor thread pool test
Diffstat (limited to 'unsupported/test/cxx11_tensor_thread_pool.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_thread_pool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/test/cxx11_tensor_thread_pool.cpp b/unsupported/test/cxx11_tensor_thread_pool.cpp
index 8ee644ecc..8e5636bb7 100644
--- a/unsupported/test/cxx11_tensor_thread_pool.cpp
+++ b/unsupported/test/cxx11_tensor_thread_pool.cpp
@@ -239,15 +239,15 @@ void test_multithreaded_reductions() {
Tensor<float, 2, DataLayout> t1(num_rows, num_cols);
t1.setRandom();
- Tensor<float, 1, DataLayout> full_redux(1);
+ Tensor<float, 0, DataLayout> full_redux;
full_redux = t1.sum();
- Tensor<float, 1, DataLayout> full_redux_tp(1);
+ Tensor<float, 0, DataLayout> full_redux_tp;
full_redux_tp.device(thread_pool_device) = t1.sum();
// Check that the single threaded and the multi threaded reductions return
// the same result.
- VERIFY_IS_APPROX(full_redux(0), full_redux_tp(0));
+ VERIFY_IS_APPROX(full_redux(), full_redux_tp());
}