The question my professor asked me is :
Using SIMD instructions and pure assembly, make a function to add efficiently any size of integer vectors. Compare the results obtained with the C++ code. The max evaluation for this work is16 values.
I already have the C++ code i just now need help in making the assembly part.
#include <iostream>
using namespace std;
extern "C" {
void conta ( int*, int*, int*, int);
}
int main()
{
int arrayA[] = { 2, 2, 2, 2 };
int arrayB[] = { 3, 3, 3, 3 };
int elementos = sizeof(arrayA) / sizeof(arrayB[0]);
unsigned int* Finalarray = (unsigned int*)malloc(elementos * sizeof(int));
for (int i = 0; i < elementos; i++) {
Finalarray[i] = arrayA[i] + arrayB[i];
cout << Finalarray[i];
}