Answered step by step
Verified Expert Solution
Question
1 Approved Answer
this is my prompt Implement a matmul function that uses the ARM ADD and MUL ( or MLA ) instruction in the file named matmul
this is my prompt Implement a matmul function that uses the ARM ADD and MUL or MLA instruction in the file named matmulmul. Test to ensure that your outputs match the provided outputs for the matrices of size and I have implemented my code in armv based on the c code provided below but my code is not working properly and i am struggling to debig using gdb Please helP implement the code below in armv
You're implementing the following function in ARMV Assembly
C A B
@param C result matrix @param A matrix A
@param B matrix B
@param hA height of matrix A
@param wA width of matrix A height of matrix B
@param wB width of matrix B
Note that while A B and C represent twodimensional matrices,
they have all been allocated linearly. This means that the elements
in each row are sequential in memory, and that the first element
of the second row immedialely follows the last element in the first
row, etc.
void matmulint C const int A const int B unsigned int hA
unsigned int wA unsigned int wB
for unsigned int i ; i hA; iouterloopi
for unsigned int j ; j wB; jinner loopj
int sum ;
for unsigned int k ; k wA; k innerloop k
sum Ai wA k Bk wB j;
Ci wB j sum; innermost
NOTE: This version should use the MULMLA and ADD instructions
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