#ifndef COMMON_H #define COMMON_H #include #include #define MATRIX_SIZE 100 static inline void init_matrices(intptr_t *A, intptr_t *B) { int counter = 0; for (size_t i = 0; i < MATRIX_SIZE; ++i) for (size_t j = 0; j < MATRIX_SIZE; ++j) { A[i * MATRIX_SIZE + j] = counter; B[i * MATRIX_SIZE + j] = counter; counter++; } } static inline size_t hash(intptr_t *C) { size_t h = 0; for (size_t i = 0; i < MATRIX_SIZE; ++i) for (size_t j = 0; j < MATRIX_SIZE; ++j) { h += C[i * MATRIX_SIZE + j]; } return h; } #endif /* COMMON_H */