-
-
Save wchristian/c871df0c607b0b85a98b 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
int dot_product( int *a, int *b, size_t n ) { | |
int sum = 0; | |
size_t i; | |
for ( i = 0; i < n; i++ ) { | |
sum += a[i] * b[i]; | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's now an example on this branch of Inline::C - ingydotnet/inline-c-pm#39