mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 03:09:01 +08:00
Add missing initialization in cxx11_tensor_trace.cpp.
This commit is contained in:
parent
c488b8b32f
commit
366cf005b0
@ -37,6 +37,7 @@ static void test_all_dimensions_trace() {
|
||||
VERIFY_IS_EQUAL(result1(), sum);
|
||||
|
||||
Tensor<float, 5, DataLayout> tensor2(7, 7, 7, 7, 7);
|
||||
tensor2.setRandom();
|
||||
array<ptrdiff_t, 5> dims = { { 2, 1, 0, 3, 4 } };
|
||||
Tensor<float, 0, DataLayout> result2 = tensor2.trace(dims);
|
||||
VERIFY_IS_EQUAL(result2.rank(), 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user