Created
May 25, 2021 21:46
-
-
Save rdisipio/c99e0e4c0dd6c9ce6e66577149a17a8b to your computer and use it in GitHub Desktop.
Matrix-vector multiplication with CSR matrix
This file contains hidden or 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
y = [0 for _ in range(n)] | |
for i in range(n): | |
for k in range(Ap[i], Ap[i+1]): | |
j = Aj[k] | |
y[i] += Ax[k] * v[j] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment