mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-29 23:34:12 +08:00
Call internal::array_prod to compute the total size of the tensor.
This commit is contained in:
parent
9fd081cddc
commit
3011dc94ef
@ -21,7 +21,7 @@ static void test_0d()
|
|||||||
TensorFixedSize<float, Sizes<>, RowMajor> scalar2;
|
TensorFixedSize<float, Sizes<>, RowMajor> scalar2;
|
||||||
VERIFY_IS_EQUAL(scalar1.rank(), 0);
|
VERIFY_IS_EQUAL(scalar1.rank(), 0);
|
||||||
VERIFY_IS_EQUAL(scalar1.size(), 1);
|
VERIFY_IS_EQUAL(scalar1.size(), 1);
|
||||||
VERIFY_IS_EQUAL(array_prod(scalar1.dimensions()), 1);
|
VERIFY_IS_EQUAL(internal::array_prod(scalar1.dimensions()), 1);
|
||||||
|
|
||||||
scalar1() = 7.0;
|
scalar1() = 7.0;
|
||||||
scalar2() = 13.0;
|
scalar2() = 13.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user