aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_index_list.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-11-05 14:22:30 -0800
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-11-05 14:22:30 -0800
commit0d15ad80195ec5cd33f057068e34aa7e1dc2b783 (patch)
tree0361e379d2a085193853988e08c17466a93a44df /unsupported/test/cxx11_tensor_index_list.cpp
parentc75a19f81525591631670ded0a551e983677db1f (diff)
Updated the regressions tests that cover full reductions
Diffstat (limited to 'unsupported/test/cxx11_tensor_index_list.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_index_list.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/unsupported/test/cxx11_tensor_index_list.cpp b/unsupported/test/cxx11_tensor_index_list.cpp
index ca9d18254..7100c1628 100644
--- a/unsupported/test/cxx11_tensor_index_list.cpp
+++ b/unsupported/test/cxx11_tensor_index_list.cpp
@@ -142,7 +142,7 @@ static void test_type2index_list()
}
const Dims4 reduction_axis4;
- Tensor<float, 1> result4 = tensor.sum(reduction_axis4);
+ Tensor<float, 0> result4 = tensor.sum(reduction_axis4);
float expected = 0.0f;
for (int m = 0; m < 11; ++m) {
for (int l = 0; l < 7; ++l) {
@@ -155,7 +155,7 @@ static void test_type2index_list()
}
}
}
- VERIFY_IS_APPROX(result4(0), expected);
+ VERIFY_IS_APPROX(result4(), expected);
}
@@ -236,9 +236,9 @@ static void test_mixed_index_list()
EIGEN_STATIC_ASSERT((internal::indices_statically_known_to_increase<ReductionList>()() == true), YOU_MADE_A_PROGRAMMING_MISTAKE);
#endif
- Tensor<float, 1> result1 = tensor.sum(reduction_axis);
- Tensor<float, 1> result2 = tensor.sum(reduction_indices);
- Tensor<float, 1> result3 = tensor.sum(reduction_list);
+ Tensor<float, 0> result1 = tensor.sum(reduction_axis);
+ Tensor<float, 0> result2 = tensor.sum(reduction_indices);
+ Tensor<float, 0> result3 = tensor.sum(reduction_list);
float expected = 0.0f;
for (int i = 0; i < 2; ++i) {
@@ -250,9 +250,9 @@ static void test_mixed_index_list()
}
}
}
- VERIFY_IS_APPROX(result1(0), expected);
- VERIFY_IS_APPROX(result2(0), expected);
- VERIFY_IS_APPROX(result3(0), expected);
+ VERIFY_IS_APPROX(result1(), expected);
+ VERIFY_IS_APPROX(result2(), expected);
+ VERIFY_IS_APPROX(result3(), expected);
}