chundoong-lab-ta/SHPC2022/hw2/vectordot/vectordot.c

19 lines
294 B
C

#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;
}