_dotproduct.c 256 B

1234567891011
  1. #include <stdint.h>
  2. void dp_int32(int32_t *a, int32_t *b, int32_t *len, int32_t *res) {
  3. int32_t N = *len;
  4. int32_t reslocal = 0;
  5. for(int32_t i = 0; i < N; i++) {
  6. reslocal = reslocal + a[i]*b[i];
  7. }
  8. *res = reslocal;
  9. return ;
  10. }