saxpy.c (149B)
1 #include <stddef.h> 2 void saxpy(float *x, float *y, float a, size_t n) 3 { 4 for (size_t i = 0; i < n; ++i) { 5 y[i] = a * x[i] + y[i]; 6 } 7 }
cs205-lecture-examplesExample codes used during Harvard CS205 lectures | |
| git clone https://git.0xfab.ch/cs205-lecture-examples.git | |
| Log | Files | Refs | README | LICENSE |