Created
October 10, 2019 23:19
-
-
Save tuckerzp/c887836a9e0a4a0a735b3a644119cfd3 to your computer and use it in GitHub Desktop.
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
/* Compute prefix sum of vector a */ | |
void psum1(float a[], float p[], long n) { | |
float l_v, v; | |
l_v = p[0] = a[0]; | |
for (long i = 0; i < n; i++) { | |
v = l_v + a[i]; | |
p[i] = v; | |
l_v = v; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment