#include "headers.h" #include "template.h" #include "vector_defs.h" #define SIMD_ENGINE avx #define SIMD_ENGINE_AVX #define BATCH_SIZE 10000 #define RUN_HYBRID double getCurrClk(); int thread_level_parallelism_enabled = false ; int main() { testcase* tc = new testcase[BATCH_SIZE]; float result[BATCH_SIZE], result_avxf; double result_avxd; double lastClk = 0.0 ; double aggregateTimeRead = 0.0; double aggregateTimeCompute = 0.0; double aggregateTimeWrite = 0.0; // Need to call it once to initialize the static array ConvertChar::init() ; // char* ompEnvVar = getenv("OMP_NUM_THREADS") ; // if (ompEnvVar != NULL && ompEnvVar != "" && ompEnvVar != "1" ) { // thread_level_parallelism_enabled = true ; // } bool noMoreData = false; int count =0; while (!noMoreData) { int read_count = BATCH_SIZE; lastClk = getCurrClk() ; for (int b=0;b(&tc[b]); #ifdef RUN_HYBRID #define MIN_ACCEPTED 1e-28f if (result_avxf < MIN_ACCEPTED) { count++; result_avxd = CONCAT(CONCAT(compute_full_prob_,SIMD_ENGINE), d)(&tc[b]); result[b] = log10(result_avxd) - log10(ldexp(1.0, 1020.f)); } else result[b] = log10f(result_avxf) - log10f(ldexpf(1.f, 120.f)); #endif #ifndef RUN_HYBRID result[b] = log10f(result_avxf) - log10f(ldexpf(1.f, 120.f)); #endif } aggregateTimeCompute += (getCurrClk() - lastClk) ; lastClk = getCurrClk() ; for (int b=0;b