Untitled
unknown
plain_text
a year ago
338 B
0
Indexable
Never
#include <cblas.h> void baseline(unsigned n, const float a[n], float b[n], float x) { cblas_scopy(n/3, a, 1, b, 1); cblas_saxpy(n/3, x, b, 1, b, 1); cblas_scopy(n-(n/3), a+(n/3), 1, b+(n/3), 1); cblas_saxpy(n-(n/3), x, b+(n/3), 1, b+(n/3), 1); for(unsigned i=0; i<n; i++) { if (b[i] < 0.0) b[i] = 0.0; } }