Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
void blasL1(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) {
double *Cmat = C->matrix;
double *Amat = A->matrix;
double *Bmat = B->matrix;
double *Arv, *Crv;
omp_set_num_threads(4);
#pragma omp parallel for
for (int i = 0; i < n; ++i) {
Arv = Amat + i * n;
Crv = Cmat + i * n;
for (int j = 0; j < n; j++)
*(Crv + j) = cblas_ddot(n, Arv, 1, &Bmat[j * n], 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment