#include // for malloc(), free(), rand(), srand() #include // for printf() #include // for size_t, ptrdiff_t #include // for nan(), fabs() #include // for DBL_EPSILON #include // for typedef bool #include // needed for walltime() #include // needed for walltime() //-- Function for benchmarking and testing ------------------------------------- double walltime() { struct tms ts; static double ClockTick=0.0; if (ClockTick==0.0) { ClockTick = 1.0 / ((double) sysconf(_SC_CLK_TCK)); } return ((double) times(&ts)) * ClockTick; } void initGeMatrix(size_t m, size_t n, double *A, ptrdiff_t incRowA, ptrdiff_t incColA) { for (size_t i=0; iresult) { result = sum; } } return result; } //-- BLAS Level 1 functions ---------------------------------------------------- void dcopy(size_t n, const double *x, ptrdiff_t incX, double *y, ptrdiff_t incY) { for (size_t i=0; i