Created
November 10, 2016 22:06
-
-
Save pubudu91/280231248d3cc4e1b8a3e583cb9d8168 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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