#include #include // for printf() #include // for malloc(), free(), rand(), srand() #include // for nan(), fabs() #include // for typedef bool #include // needed for walltime() #include // needed for walltime() //-- Functions 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 randDGeMatrix(size_t m, size_t n, bool withNan, double *A, ptrdiff_t incRowA, ptrdiff_t incColA) { for (size_t i=0; iincColB && incRowA>incColA) { dgecopy(n, m, A, incColA, incRowA, B, incColB, incRowB); return; } for (size_t j=0; jincColY && incRowX>incColX) { dgeaxpy(n, m, alpha, X, incColX, incRowX, Y, incColY, incRowY); return; } for (size_t j=0; jresult) { result = sum; } } return result; }