From b8f16d30216aa4d472d41208d2ed650a679e3f96 Mon Sep 17 00:00:00 2001 From: Mikhail Katliar Date: Thu, 24 Oct 2024 17:21:42 +0200 Subject: [PATCH] Fixed DynamicRegisterMatrixTest on neon64 --- .../math/simd/DynamicRegisterMatrixTest.cpp | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/test/blast/math/simd/DynamicRegisterMatrixTest.cpp b/test/blast/math/simd/DynamicRegisterMatrixTest.cpp index e8de88d..63ac5fa 100644 --- a/test/blast/math/simd/DynamicRegisterMatrixTest.cpp +++ b/test/blast/math/simd/DynamicRegisterMatrixTest.cpp @@ -6,7 +6,9 @@ #include #include #include -#include +#include +#include +#include #include #include @@ -132,21 +134,22 @@ namespace blast :: testing { DynamicMatrix A(m, 1); DynamicMatrix B(1, n); - DynamicMatrix C(m, n); + DynamicMatrix C(m, n), D(m, n); randomize(A); randomize(B); randomize(C); ET alpha {}; - blaze::randomize(alpha); + randomize(alpha); TypeParam ker(m, n); ker.load(ptr(C, 0, 0)); ker.ger(alpha, ptr(A, 0, 0), ptr(B, 0, 0)); - BLAST_EXPECT_APPROX_EQ(ker, - evaluate(C + alpha * A * B), absTol(), relTol()); + reference::ger(m, n, alpha, column(ptr(A)), row(ptr(B)), ptr(C), ptr(D)); + + BLAST_EXPECT_APPROX_EQ(ker, D, absTol(), relTol()); } } @@ -161,21 +164,22 @@ namespace blast :: testing { DynamicMatrix A(m, 1); DynamicMatrix B(1, n); - DynamicMatrix C(m, n); + DynamicMatrix C(m, n), D(m, n); randomize(A); randomize(B); randomize(C); ET alpha {}; - blaze::randomize(alpha); + randomize(alpha); TypeParam ker(m, n); ker.load(ptr(C)); ker.ger(alpha, ~ptr(A), ~ptr(B)); - BLAST_EXPECT_APPROX_EQ(ker, - evaluate(C + alpha * A * B), absTol(), relTol()); + reference::ger(m, n, alpha, column(ptr(A)), row(ptr(B)), ptr(C), ptr(D)); + + BLAST_EXPECT_APPROX_EQ(ker, D, absTol(), relTol()); } }