Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started