aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/test/cxx11_tensor_argmax.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-09-08 17:04:03 -0700
committerGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2015-09-08 17:04:03 -0700
commit05f2f94f2ba444119a5ab8f013bd790fd6adf26e (patch)
tree1264f912dda149316375c5ab9abe060458812b1b /unsupported/test/cxx11_tensor_argmax.cpp
parent98f8f0db9a2241083b86803ad2e2097cd0f3765b (diff)
Fixed a compilation warning
Diffstat (limited to 'unsupported/test/cxx11_tensor_argmax.cpp')
-rw-r--r--unsupported/test/cxx11_tensor_argmax.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/test/cxx11_tensor_argmax.cpp b/unsupported/test/cxx11_tensor_argmax.cpp
index 4c532409e..26c656e1a 100644
--- a/unsupported/test/cxx11_tensor_argmax.cpp
+++ b/unsupported/test/cxx11_tensor_argmax.cpp
@@ -186,7 +186,7 @@ static void test_argmax_dim()
VERIFY_IS_EQUAL(tensor_argmax.dimensions().TotalSize(),
size_t(2*3*5*7 / tensor.dimension(dim)));
- for (size_t n = 0; n < tensor_argmax.dimensions().TotalSize(); ++n) {
+ for (ptrdiff_t n = 0; n < tensor_argmax.size(); ++n) {
// Expect max to be in the first index of the reduced dimension
VERIFY_IS_EQUAL(tensor_argmax.data()[n], 0);
}
@@ -206,8 +206,8 @@ static void test_argmax_dim()
tensor_argmax = tensor.argmax(dim);
- VERIFY_IS_EQUAL(tensor_argmax.dimensions().TotalSize(),
- size_t(2*3*5*7 / tensor.dimension(dim)));
+ VERIFY_IS_EQUAL(tensor_argmax.size(),
+ ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));
for (size_t n = 0; n < tensor_argmax.dimensions().TotalSize(); ++n) {
// Expect max to be in the last index of the reduced dimension
VERIFY_IS_EQUAL(tensor_argmax.data()[n], tensor.dimension(dim) - 1);