#include "utilities.h" /* 09/12/02-10/10/02, updated 02/21/08 and 02/25/09 by Matthias K. Gobbert */ double serial_dot (double *x, double *y, int n) { double dp; #ifndef BLAS int i; #endif #ifdef BLAS dp = ddot(n, x, 1, y, 1); #else dp = 0.0; for(i = 0; i < n; i++) dp += x[i] * y[i]; #endif return dp; }