diff options
author | Henry Cook <hcook@eecs.berkeley.edu> | 2014-09-24 18:11:42 -0700 |
---|---|---|
committer | Henry Cook <hcook@eecs.berkeley.edu> | 2014-09-24 18:34:50 -0700 |
commit | 9f7ed92e1aeb91593ceb8baf26ff4fe0a1a9efa6 (patch) | |
tree | 81654ff43e33b08a117cb9b199e60dbce8b32fe5 /mt/ab_vvadd/ab_vvadd.c | |
parent | dbde501592ce20c536cbc97e99d03f54f3e30294 (diff) | |
download | riscv-tests-9f7ed92e1aeb91593ceb8baf26ff4fe0a1a9efa6.zip riscv-tests-9f7ed92e1aeb91593ceb8baf26ff4fe0a1a9efa6.tar.gz riscv-tests-9f7ed92e1aeb91593ceb8baf26ff4fe0a1a9efa6.tar.bz2 |
Updated mt tests
Diffstat (limited to 'mt/ab_vvadd/ab_vvadd.c')
-rwxr-xr-x | mt/ab_vvadd/ab_vvadd.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/mt/ab_vvadd/ab_vvadd.c b/mt/ab_vvadd/ab_vvadd.c index 47f5e18..f2c8a65 100755 --- a/mt/ab_vvadd/ab_vvadd.c +++ b/mt/ab_vvadd/ab_vvadd.c @@ -51,7 +51,7 @@ unsigned long ncores; //-------------------------------------------------------------------------- // Helper functions -void printArray( char name[], int n, data_t arr[] ) +void printArrayMT( char name[], int n, data_t arr[] ) { int i; if (coreid != 0) @@ -63,7 +63,7 @@ void printArray( char name[], int n, data_t arr[] ) printf( "\n" ); } -void __attribute__((noinline)) verify(size_t n, const data_t* test, const data_t* correct) +void __attribute__((noinline)) verifyMT(size_t n, const data_t* test, const data_t* correct) { if (coreid != 0) return; @@ -138,12 +138,12 @@ void thread_entry(int cid, int nc) // Execute the provided, terrible vvadd - barrier(); - stats(vvadd(DATA_SIZE, results_data, input2_data); barrier()); + barrier(nc); + stats(vvadd(DATA_SIZE, results_data, input2_data); barrier(nc)); // verify - verify(DATA_SIZE, results_data, verify_data); + verifyMT(DATA_SIZE, results_data, verify_data); // reset results from the first trial if (coreid == 0) @@ -151,21 +151,21 @@ void thread_entry(int cid, int nc) for (i=0; i < DATA_SIZE; i++) results_data[i] = input1_data[i]; } - barrier(); + barrier(nc); // Execute your faster vvadd - barrier(); - stats(vvadd_opt(DATA_SIZE, results_data, input2_data); barrier()); + barrier(nc); + stats(vvadd_opt(DATA_SIZE, results_data, input2_data); barrier(nc)); #ifdef DEBUG - printArray("results: ", DATA_SIZE, results_data); - printArray("verify : ", DATA_SIZE, verify_data); + printArrayMT("results: ", DATA_SIZE, results_data); + printArrayMT("verify : ", DATA_SIZE, verify_data); #endif // verify - verify(DATA_SIZE, results_data, verify_data); - barrier(); + verifyMT(DATA_SIZE, results_data, verify_data); + barrier(nc); exit(0); } |