Fix IntSimdMatrixTest.AVX2

Fixes: 872816897a
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-07-04 09:07:04 +02:00
parent e0af8d12e6
commit 915c29e3c8

View File

@ -71,15 +71,13 @@ protected:
if (IntSimdMatrix::intSimdMatrix) {
ro = IntSimdMatrix::intSimdMatrix->RoundOutputs(ro);
}
std::vector<double> base_result(ro);
base_result.resize(num_out);
std::vector<double> base_result(num_out);
IntSimdMatrix::MatrixDotVector(w, scales, u.data(), base_result.data());
std::vector<double> test_result(ro);
test_result.resize(num_out);
std::vector<int8_t> shaped_wi;
int32_t rounded_num_out;
matrix.Init(w, shaped_wi, rounded_num_out);
scales.reserve(rounded_num_out);
scales.resize(rounded_num_out);
if (matrix.matrixDotVectorFunction) {
matrix.matrixDotVectorFunction(w.dim1(), w.dim2(), &shaped_wi[0], &scales[0], &u[0],
&test_result[0]);