diff options
author | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-09-08 17:04:03 -0700 |
---|---|---|
committer | Benoit Steiner <benoit.steiner.goog@gmail.com> | 2015-09-08 17:04:03 -0700 |
commit | 05f2f94f2ba444119a5ab8f013bd790fd6adf26e (patch) | |
tree | 1264f912dda149316375c5ab9abe060458812b1b /unsupported/test/cxx11_tensor_argmax.cpp | |
parent | 98f8f0db9a2241083b86803ad2e2097cd0f3765b (diff) |
Fixed a compilation warning
Diffstat (limited to 'unsupported/test/cxx11_tensor_argmax.cpp')
-rw-r--r-- | unsupported/test/cxx11_tensor_argmax.cpp | 6 |
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); |