ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change
on this file since 09ee131 was
2316525,
checked in by Peter A. Buhr <pabuhr@…>, 5 years ago
|
update benchmarks for concurrency paper
|
-
Property mode set to
100644
|
File size:
427 bytes
|
Line | |
---|
1 | #include <kernel.hfa> |
---|
2 | #include <thread.hfa> |
---|
3 | |
---|
4 | #include "bench.h" |
---|
5 | |
---|
6 | void noOp(void) {} |
---|
7 | |
---|
8 | coroutine C {} c; |
---|
9 | |
---|
10 | void ?{}( C & this ) { |
---|
11 | prime(this); |
---|
12 | } |
---|
13 | |
---|
14 | void main( __attribute__((unused)) C & this ) { |
---|
15 | while () { |
---|
16 | suspend_then(noOp); |
---|
17 | } |
---|
18 | } |
---|
19 | |
---|
20 | int main( int argc, char * argv[] ) { |
---|
21 | BENCH_START() |
---|
22 | BENCH( |
---|
23 | for ( times ) { |
---|
24 | resume( c ); |
---|
25 | }, |
---|
26 | result |
---|
27 | ) |
---|
28 | printf( "%g\n", result ); |
---|
29 | } |
---|
30 | |
---|
31 | // Local Variables: // |
---|
32 | // tab-width: 4 // |
---|
33 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.