From 984abbe6e67503c93dbb13d9a305960f11c4ba7b Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 12 Dec 2014 18:17:31 -0800 Subject: Add more entropy to matrix multiplication input This will exercise the floating-point units more thoroughly. --- benchmarks/common/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'benchmarks/common/util.h') diff --git a/benchmarks/common/util.h b/benchmarks/common/util.h index 638f024..24a1cad 100644 --- a/benchmarks/common/util.h +++ b/benchmarks/common/util.h @@ -31,6 +31,8 @@ static void setStats(int enable) {} extern void setStats(int enable); #endif +#include + extern int have_vec; #define static_assert(cond) switch(0) { case 0: case !!(long)(cond): ; } @@ -109,6 +111,12 @@ static void __attribute__((noinline)) barrier(int ncores) __sync_synchronize(); } +static uint64_t lfsr(uint64_t x) +{ + uint64_t bit = (x ^ (x >> 1)) & 1; + return (x >> 1) | (bit << 62); +} + #ifdef __riscv #include "encoding.h" #endif -- cgit v1.1