diff options
| author | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-20 13:35:52 -0400 |
|---|---|---|
| committer | Joshua Bakita <jbakita@cs.unc.edu> | 2020-10-20 13:41:49 -0400 |
| commit | 03412b9f841f140b9b7410a1890298e3ac2835db (patch) | |
| tree | 8417ed7fa548a571ab88f139da666787766740f3 /baseline/source/rijndael_enc | |
| parent | 47ced4e96bbb782b9e780e8f2cfc637b2c21ff44 (diff) | |
TACLe and DIS benchmark fixes
- Use consistent approach to prevent computations from being
optimized out in the DIS benchmarks
- Don't print results in the DIS benchmarks
- Fix a memory corruption in TACLe's "epic" benchmark reflect1()
- Fix return codes for all benchmarks
- Rename run_baseline.sh to run_bench.sh in preperation for this
being the main benchmarking script
Diffstat (limited to 'baseline/source/rijndael_enc')
| -rw-r--r-- | baseline/source/rijndael_enc/rijndael_enc.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/baseline/source/rijndael_enc/rijndael_enc.c b/baseline/source/rijndael_enc/rijndael_enc.c index 6c85eee..21d7e67 100644 --- a/baseline/source/rijndael_enc/rijndael_enc.c +++ b/baseline/source/rijndael_enc/rijndael_enc.c | |||
| @@ -68,6 +68,7 @@ void rijndael_enc_init( void ) | |||
| 68 | rijndael_enc_fin.data = rijndael_enc_data; | 68 | rijndael_enc_fin.data = rijndael_enc_data; |
| 69 | rijndael_enc_fin.size = 31369; | 69 | rijndael_enc_fin.size = 31369; |
| 70 | rijndael_enc_fin.cur_pos = 0; | 70 | rijndael_enc_fin.cur_pos = 0; |
| 71 | rijndael_enc_checksum = 0; | ||
| 71 | 72 | ||
| 72 | unsigned i; | 73 | unsigned i; |
| 73 | volatile int x = 0; | 74 | volatile int x = 0; |
| @@ -225,14 +226,19 @@ void _Pragma( "entrypoint" ) rijndael_enc_main( void ) | |||
| 225 | 226 | ||
| 226 | int main( int argc, char** argv ) | 227 | int main( int argc, char** argv ) |
| 227 | { | 228 | { |
| 228 | SET_UP | 229 | int exit_code = -1; |
| 229 | for (jobsComplete=0; jobsComplete<maxJobs; jobsComplete++){ | 230 | SET_UP |
| 230 | START_LOOP | 231 | for (jobsComplete=0; jobsComplete<maxJobs; jobsComplete++){ |
| 231 | rijndael_enc_init(); | 232 | START_LOOP |
| 232 | rijndael_enc_main(); | 233 | rijndael_enc_init(); |
| 233 | STOP_LOOP | 234 | rijndael_enc_main(); |
| 234 | } | 235 | // This checks the checksum is as expected. |
| 235 | WRITE_TO_FILE | 236 | // This is `&` as only the first job will match |
| 236 | return ( rijndael_enc_return() ); | 237 | // (PRNG state persists between jobs). |
| 238 | exit_code &= rijndael_enc_return(); | ||
| 239 | STOP_LOOP | ||
| 240 | } | ||
| 241 | WRITE_TO_FILE | ||
| 242 | return ( exit_code ); | ||
| 237 | } | 243 | } |
| 238 | 244 | ||
