|
#include <immintrin.h>
|
|
#include <math.h>
|
|
|
|
float vectordot_naive(float *A, float *B, int N) {
|
|
float c = 0.f;
|
|
for (int i = 0; i < N; ++i) {
|
|
c += A[i] * B[i];
|
|
}
|
|
return c;
|
|
}
|
|
|
|
float vectordot_fma(float *A, float *B, int N) {
|
|
float c = 0.f;
|
|
/*
|
|
TODO: FILL IN HERE
|
|
*/
|
|
return c;
|
|
}
|