Skip to content

Commit 0243fef

Browse files
committed
[NeoMLTest] Update CMathEngineVectorMultiplyAndAddTest
Signed-off-by: Kirill Golikov <[email protected]>
1 parent bbc3bf9 commit 0243fef

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

NeoMathEngine/test/src/inference/VectorMultiplyAndAddTest.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright © 2017-2020 ABBYY Production LLC
1+
/* Copyright © 2017-2024 ABBYY
22
33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.
@@ -38,6 +38,19 @@ static void vectorMultiplyAndAddImpl( const CTestParams& params, int seed )
3838
float expected = a[i] + mult * b[i];
3939
ASSERT_NEAR( expected, result[i], 1e-3 );
4040
}
41+
42+
{
43+
auto resultWrapper = CARRAY_FLOAT_WRAPPER( result );
44+
{
45+
float multTemp = mult;
46+
MathEngine().VectorMultiplyAndAdd( CARRAY_FLOAT_WRAPPER( a ), CARRAY_FLOAT_WRAPPER( b ), resultWrapper, vectorSize, multTemp );
47+
}
48+
}
49+
50+
for( int i = 0; i < vectorSize; i++ ) {
51+
float expected = a[i] + mult * b[i];
52+
ASSERT_NEAR( expected, result[i], 1e-3 );
53+
}
4154
}
4255

4356
//------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)