mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Fixed a compilation warning
This commit is contained in:
parent
98f8f0db9a
commit
05f2f94f2b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user