Question: This is a continuation of a question from : https: / / www . chegg.com / homework - help / questions - and - answers
This is a continuation of a question from :
https:wwwchegg.comhomeworkhelpquestionsandanswerscompletecolmajorcolumnmajorcodesimdusingcvectcolsimdhifndefvectcolsimdhdefiqshareeeeccadc
I modified the code to look like below.
MatrixColSIMD.cpp
#include "VectColSIMD.h
#include "MatrixColSIMD.h
MatrixColSIMD::MatrixColSIMDconst VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV const VectColSIMD &tV
: vtV vtV vtV vtV
VectColSIMD MatrixColSIMD::operator const VectColSIMD &vb
m colmmloadps&vx;
m colmmloadps&vx;
m colmmloadps&vx;
m colmmloadps&vx;
m vec mmsetpsvbw vbz vby vbx;
m result mmaddps
mmaddps
mmmulpsmmshufflepsvec vec, x col
mmmulpsmmshufflepsvec vec, x col
mmaddps
mmmulpsmmshufflepsvec vec, xAA col
mmmulpsmmshufflepsvec vec, xFF col;
VectColSIMD res;
mmstoreps&res.x result;
return res;
MatrixColSIMD MatrixColSIMD::operator const MatrixColSIMD &mb
m mammloadps&vx;
m mammloadps&vx;
m mammloadps&vx;
m mammloadps&vx;
m mbmmloadps&mbvx;
m mbmmloadps&mbvx;
m mbmmloadps&mbvx;
m mbmmloadps&mbvx;
m mcmmaddps
mmaddps
mmmulpsmmshufflepsmb mbx ma
mmmulpsmmshufflepsmb mbx ma
mmaddps
mmmulpsmmshufflepsmb mbxAA ma
mmmulpsmmshufflepsmb mbxFF ma;
repeat mc mc mc
MatrixColSIMD result;
mmstoreps&result.vx mc;
mmstoreps&result.vx mc;
mmstoreps&result.vx mc;
mmstoreps&result.vx mc;
return result;
End of File
But when I run the test
MatrixColSIMD RxVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
VectColSIMDffff;
MatrixColSIMD RyVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
VectColSIMDffff;
MatrixColSIMD RzVectColSIMDffff
VectColSIMDffff
VectColSIMDffff
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
