mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
Fixed a compilation warning
This commit is contained in:
parent
05f2f94f2b
commit
84e0c27b61
@ -244,7 +244,7 @@ static void test_argmin_dim()
|
|||||||
|
|
||||||
VERIFY_IS_EQUAL(tensor_argmin.dimensions().TotalSize(),
|
VERIFY_IS_EQUAL(tensor_argmin.dimensions().TotalSize(),
|
||||||
size_t(2*3*5*7 / tensor.dimension(dim)));
|
size_t(2*3*5*7 / tensor.dimension(dim)));
|
||||||
for (size_t n = 0; n < tensor_argmin.dimensions().TotalSize(); ++n) {
|
for (ptrdiff_t n = 0; n < tensor_argmin.size(); ++n) {
|
||||||
// Expect min to be in the first index of the reduced dimension
|
// Expect min to be in the first index of the reduced dimension
|
||||||
VERIFY_IS_EQUAL(tensor_argmin.data()[n], 0);
|
VERIFY_IS_EQUAL(tensor_argmin.data()[n], 0);
|
||||||
}
|
}
|
||||||
@ -264,8 +264,8 @@ static void test_argmin_dim()
|
|||||||
|
|
||||||
tensor_argmin = tensor.argmin(dim);
|
tensor_argmin = tensor.argmin(dim);
|
||||||
|
|
||||||
VERIFY_IS_EQUAL(tensor_argmin.dimensions().TotalSize(),
|
VERIFY_IS_EQUAL(tensor_argmin.size(),
|
||||||
size_t(2*3*5*7 / tensor.dimension(dim)));
|
ptrdiff_t(2*3*5*7 / tensor.dimension(dim)));
|
||||||
for (size_t n = 0; n < tensor_argmin.dimensions().TotalSize(); ++n) {
|
for (size_t n = 0; n < tensor_argmin.dimensions().TotalSize(); ++n) {
|
||||||
// Expect min to be in the last index of the reduced dimension
|
// Expect min to be in the last index of the reduced dimension
|
||||||
VERIFY_IS_EQUAL(tensor_argmin.data()[n], tensor.dimension(dim) - 1);
|
VERIFY_IS_EQUAL(tensor_argmin.data()[n], tensor.dimension(dim) - 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user