diff options
author | 2016-10-08 19:12:44 +0000 | |
---|---|---|
committer | 2016-10-08 19:12:44 +0000 | |
commit | 5266ff8966c072defd5bfcfa74c1892fc500943b (patch) | |
tree | 5764fac42ae0e5957aac9f74ec3b0a51f04400e4 /unsupported/test/cxx11_tensor_argmax_cuda.cu | |
parent | 4860727ac2f404bddd23ba60896bc1288f0de06c (diff) |
Cleaned up a regression test
Diffstat (limited to 'unsupported/test/cxx11_tensor_argmax_cuda.cu')
-rw-r--r-- | unsupported/test/cxx11_tensor_argmax_cuda.cu | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unsupported/test/cxx11_tensor_argmax_cuda.cu b/unsupported/test/cxx11_tensor_argmax_cuda.cu index 6fe8982f2..653443dc5 100644 --- a/unsupported/test/cxx11_tensor_argmax_cuda.cu +++ b/unsupported/test/cxx11_tensor_argmax_cuda.cu @@ -116,10 +116,10 @@ void test_cuda_argmax_dim() assert(cudaMemcpyAsync(tensor_arg.data(), d_out, out_bytes, cudaMemcpyDeviceToHost, gpu_device.stream()) == cudaSuccess); assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess); - VERIFY_IS_EQUAL(tensor_arg.dimensions().TotalSize(), + VERIFY_IS_EQUAL(tensor_arg.size(), size_t(2*3*5*7 / tensor.dimension(dim))); - for (size_t n = 0; n < tensor_arg.dimensions().TotalSize(); ++n) { + for (DenseIndex n = 0; n < tensor_arg.size(); ++n) { // Expect max to be in the first index of the reduced dimension VERIFY_IS_EQUAL(tensor_arg.data()[n], 0); } @@ -144,7 +144,7 @@ void test_cuda_argmax_dim() assert(cudaMemcpyAsync(tensor_arg.data(), d_out, out_bytes, cudaMemcpyDeviceToHost, gpu_device.stream()) == cudaSuccess); assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess); - for (size_t n = 0; n < tensor_arg.dimensions().TotalSize(); ++n) { + for (DenseIndex n = 0; n < tensor_arg.size(); ++n) { // Expect max to be in the last index of the reduced dimension VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1); } @@ -205,10 +205,10 @@ void test_cuda_argmin_dim() assert(cudaMemcpyAsync(tensor_arg.data(), d_out, out_bytes, cudaMemcpyDeviceToHost, gpu_device.stream()) == cudaSuccess); assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess); - VERIFY_IS_EQUAL(tensor_arg.dimensions().TotalSize(), - size_t(2*3*5*7 / tensor.dimension(dim))); + VERIFY_IS_EQUAL(tensor_arg.size(), + 2*3*5*7 / tensor.dimension(dim)); - for (size_t n = 0; n < tensor_arg.dimensions().TotalSize(); ++n) { + for (DenseIndex n = 0; n < tensor_arg.size(); ++n) { // Expect min to be in the first index of the reduced dimension VERIFY_IS_EQUAL(tensor_arg.data()[n], 0); } @@ -233,7 +233,7 @@ void test_cuda_argmin_dim() assert(cudaMemcpyAsync(tensor_arg.data(), d_out, out_bytes, cudaMemcpyDeviceToHost, gpu_device.stream()) == cudaSuccess); assert(cudaStreamSynchronize(gpu_device.stream()) == cudaSuccess); - for (size_t n = 0; n < tensor_arg.dimensions().TotalSize(); ++n) { + for (DenseIndex n = 0; n < tensor_arg.size(); ++n) { // Expect max to be in the last index of the reduced dimension VERIFY_IS_EQUAL(tensor_arg.data()[n], tensor.dimension(dim) - 1); } |