Question: 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 matmul-mul. Test to ensure that your outputs match the provided outputs for the matrices of size 16,64,256, and 1024. I have implemented my code in armv8 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 armv8
///////////////////////////////////////////////////////////////////////////////2// You're implementing the following function in ARMV8 Assembly
3//! C = A * B
4//! @param C result matrix 5//! @param A matrix A
6//! @param B matrix B
7//! @param hA height of matrix A
8//! @param wA width of matrix A, height of matrix B
9//! @param wB width of matrix B
10//
11// Note that while A, B, and C represent two-dimensional matrices,
12// they have all been allocated linearly. This means that the elements
13// in each row are sequential in memory, and that the first element
14// of the second row immedialely follows the last element in the first
15// row, etc.
16/
/17//void matmul(int* C, const int* A, const int* B, unsigned int hA,
18// unsigned int wA, unsigned int wB)19//{
20// for (unsigned int i =0; i < hA; ++i)//outer_loop_i
21// for (unsigned int j =0; j < wB; ++j){//inner loop_j
22// int sum =0;
23// for (unsigned int k =0; k < wA; ++k){ inner_loop k
24// sum += A[i * wA + k]* B[k * wB + j];
25//}
26// C[i * wB + j]= sum; //innermost
27// NOTE: This version should use the MUL/MLA and ADD instructions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!