程序代写代做代考 assembly c++ algorithm c/c++ Practical Session Week-7 Assembly Programming

Practical Session Week-7 Assembly Programming
Using intrinsic functions in C/C++
Objectives.
1. To write C++ programs using Intel SSE intrinsics.
2. To write C++ programs using Intel AVX intrinsics
Tasks.
1. Download ¡®source.cpp¡¯ file from DLE. Open Visual studio in Windows and create an empty CPP project. Copy paste the code of source.cpp in your project. This code contains the implementation of matrix-vector multiplication (MVM) algorithm using a) normal C++ code, b) SSE instrinsics, c) AVX instrinsics.
a. Build and run just MVM_default() routine. Measure the execution time. It is important to note that for an accurate measurement, the execution time needs to be at least some seconds. Thus, given that the execution time of the current routine is lower than 1sec at all times, we run it ¡®t¡¯ times and then the overall execution time is divided to ¡®t¡¯ (the value of ¡®t¡¯ iterator needs to be appropriately defined).
b. Build and run just MVM_SSE() routine. Measure the execution time.
c. Build and run just MVM_AVX() routine. Measure the execution time.
d. Compare the results.
e. Using MVM_SSE() as a guidance (Matrix-Vector Multiplication algorithm),
implement Matrix-Matrix Multiplication algorithm (¡®MMM_default¡¯ routine) using SSE intrinsics. All the intrinsics needed are provided in MVM_SSE() routine.
f. Using MVM_AVX() as a guidance (Matrix-Vector Multiplication algorithm), implement Matrix-Matrix Multiplication algorithm (¡®MMM_default¡¯ routine) using AVX intrinsics. All the intrinsics needed are provided in MVM_AVX() routine.
g. Compare the results.
2. Implement FIR algorithm using SSE and AVX intrinsics. A code to start is given in ¡®FIR_default()¡¯ routine in ¡®source.cpp¡¯ file