Created
November 10, 2016 21:52
-
-
Save pubudu91/4270f85f8416a48c36bbaa7e8b91841e 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 multiply1DMatrixIKJ(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) { | |
for (int i = 0; i < n; ++i) { | |
double *Arow = &A->matrix[i * n]; | |
double *Crow = &C->matrix[i * n]; | |
for (int k = 0; k < n; ++k) { | |
double temp = *(Arow + k); | |
double *Brow = &B->matrix[k * n]; | |
for (int j = 0; j < n; ++j) | |
*(Crow + j) += temp * *(Brow + j); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment