#include "util.h" #include #include #include #include #include #include double get_current_time() { struct timespec tv; clock_gettime(CLOCK_MONOTONIC, &tv); return tv.tv_sec + tv.tv_nsec * 1e-9; } void rand_vec(double *m, int N) { for (int j = 0; j < N; j++) { m[j] = (double) rand() / RAND_MAX - 0.5; } }