diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 21:55:11 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2020-10-20 21:55:11 -0400 |
| commit | e2d933df44b7b387b41c8c7805393ad3857c4448 (patch) | |
| tree | 35cbeee7b13ff92e3cb09e2bef5128a558ec39f1 /baseline/source/audiobeam | |
| parent | a32f220f06cc463e5b56e7fa0b1b1334d94d08f3 (diff) | |
| parent | e2b50015cebdfba68699abd6e8575e38230f5a78 (diff) | |
Merge branch 'sd-vbs' of ssh://rtsrv.cs.unc.edu/public/mc2-scripts-and-benchmarks into sd-vbs
Diffstat (limited to 'baseline/source/audiobeam')
| -rw-r--r-- | baseline/source/audiobeam/audiobeam.c | 20 | ||||
| -rw-r--r-- | baseline/source/audiobeam/audiobeamlibmalloc.c | 7 | ||||
| -rw-r--r-- | baseline/source/audiobeam/audiobeamlibmalloc.h | 2 |
3 files changed, 17 insertions, 12 deletions
diff --git a/baseline/source/audiobeam/audiobeam.c b/baseline/source/audiobeam/audiobeam.c index 50ebfff..5f23daf 100644 --- a/baseline/source/audiobeam/audiobeam.c +++ b/baseline/source/audiobeam/audiobeam.c | |||
| @@ -104,6 +104,8 @@ void audiobeam_init() | |||
| 104 | unsigned int i; | 104 | unsigned int i; |
| 105 | unsigned char *p; | 105 | unsigned char *p; |
| 106 | volatile char bitmask = 0; | 106 | volatile char bitmask = 0; |
| 107 | // Reset heap | ||
| 108 | audiobeam_free_all(); | ||
| 107 | 109 | ||
| 108 | /* | 110 | /* |
| 109 | Apply volatile XOR-bitmask to entire input array. | 111 | Apply volatile XOR-bitmask to entire input array. |
| @@ -577,17 +579,13 @@ void _Pragma( "entrypoint" ) audiobeam_main( void ) | |||
| 577 | 579 | ||
| 578 | 580 | ||
| 579 | int main( int argc, char **argv ) | 581 | int main( int argc, char **argv ) |
| 580 | { | 582 | { |
| 581 | //SET_UP | 583 | SET_UP |
| 582 | int jobsComplete; | 584 | for_each_job { |
| 583 | int maxJobs=100; | 585 | audiobeam_init(); |
| 584 | for (jobsComplete=0; jobsComplete<maxJobs; jobsComplete++){ | 586 | audiobeam_main(); |
| 585 | // START_LOOP | 587 | } |
| 586 | audiobeam_init(); | 588 | WRITE_TO_FILE |
| 587 | audiobeam_main(); | ||
| 588 | // STOP_LOOP | ||
| 589 | } | ||
| 590 | //WRITE_TO_FILE | ||
| 591 | 589 | ||
| 592 | return ( audiobeam_return() ); | 590 | return ( audiobeam_return() ); |
| 593 | } | 591 | } |
diff --git a/baseline/source/audiobeam/audiobeamlibmalloc.c b/baseline/source/audiobeam/audiobeamlibmalloc.c index 50c3073..a81b634 100644 --- a/baseline/source/audiobeam/audiobeamlibmalloc.c +++ b/baseline/source/audiobeam/audiobeamlibmalloc.c | |||
| @@ -11,4 +11,9 @@ void *audiobeam_malloc( unsigned int numberOfBytes ) | |||
| 11 | /* Get a 4-byte address for alignment purposes */ | 11 | /* Get a 4-byte address for alignment purposes */ |
| 12 | audiobeam_freeHeapPos += ( ( numberOfBytes + 4 ) & ( unsigned int )0xfffffffc ); | 12 | audiobeam_freeHeapPos += ( ( numberOfBytes + 4 ) & ( unsigned int )0xfffffffc ); |
| 13 | return currentPos; | 13 | return currentPos; |
| 14 | } \ No newline at end of file | 14 | } |
| 15 | |||
| 16 | void audiobeam_free_all( void ) | ||
| 17 | { | ||
| 18 | audiobeam_freeHeapPos = 0; | ||
| 19 | } | ||
diff --git a/baseline/source/audiobeam/audiobeamlibmalloc.h b/baseline/source/audiobeam/audiobeamlibmalloc.h index eccbdb9..354bf0e 100644 --- a/baseline/source/audiobeam/audiobeamlibmalloc.h +++ b/baseline/source/audiobeam/audiobeamlibmalloc.h | |||
| @@ -24,4 +24,6 @@ | |||
| 24 | 24 | ||
| 25 | void *audiobeam_malloc( unsigned int numberOfBytes ); | 25 | void *audiobeam_malloc( unsigned int numberOfBytes ); |
| 26 | 26 | ||
| 27 | void audiobeam_free_all( void ); | ||
| 28 | |||
| 27 | #endif | 29 | #endif |
