mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-12 09:23:12 +08:00
Avoid using initializer lists in test since not all version of msvc support them
This commit is contained in:
parent
23aed8f2e4
commit
57b263c5b9
@ -83,7 +83,9 @@ static void test_contractions()
|
|||||||
|
|
||||||
// This contraction should be equivalent to a regular matrix multiplication
|
// This contraction should be equivalent to a regular matrix multiplication
|
||||||
typedef Tensor<float, 1>::DimensionPair DimPair;
|
typedef Tensor<float, 1>::DimensionPair DimPair;
|
||||||
Eigen::array<DimPair, 2> dims({{DimPair(2, 0), DimPair(3, 1)}});
|
Eigen::array<DimPair, 2> dims;
|
||||||
|
dims[0] = DimPair(2, 0);
|
||||||
|
dims[1] = DimPair(3, 1);
|
||||||
t_result = t_left.contract(t_right, dims);
|
t_result = t_left.contract(t_right, dims);
|
||||||
m_result = m_left * m_right;
|
m_result = m_left * m_right;
|
||||||
for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {
|
for (int i = 0; i < t_result.dimensions().TotalSize(); i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user