Question: Benchmarking ( 3 0 points ) [ 5 Points ] Write a C code for addition of two 1 D matrices with the Number of
Benchmarking points
Points Write a C code for addition of two D matrices with the Number of elements in an array N equal to You will be rewriting this C code.
Hint: You may need to use dynamic memory allocation function malloc
Allocate host memory
a floatmallocsizeoffloat N;
Points Write an equivalent python code.
Points Compile the C code and Compare the performance between C and python codes. Which code performs better and why? Also, without dynamic allocation, report the error if any while running the C code. Whats the eason behind that error?
Points Apply Numba JIT Just in Time decorator in Python Code scriptand compare the performance between two python codes. Benchmarking Contd
Points Employ OpenACC pragma to optimize the C code matrixvector addition you wrote earlier and compare its performance with serial implementation.
Points Implement the C code matrix addition in CUDA using single and multiple cudaGPU threads and compare the performance.
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
