source: benchmark/schedext/upp.cc @ 6a33e40

ADTast-experimentalenumforall-pointer-decaypthread-emulationqualifiedEnum
Last change on this file since 6a33e40 was 26fd986, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

update benchmarks for concurrency paper

  • Property mode set to 100644
File size: 486 bytes
RevLine 
[9f0b975]1#include <cstdio>
2
3#include "bench.h"
4
5_Monitor M {
6public:
7        void __attribute__((noinline)) call() {}
[26fd986]8        void __attribute__((noinline)) wait() {
[2316525]9                for ( size_t i = 0; i < times; i++ ) {
[b4107c8]10                        _Accept(call);
11                }
[9f0b975]12        }
[2316525]13} m;
[9f0b975]14
15_Task T {
16        void main() {
[b4107c8]17                BENCH(
[26fd986]18                        for ( size_t i = 0; i < times; i++ ) {
19                                m.call();
20                        },
[b4107c8]21                        result
22                )
23                printf( "%g\n", result );
[9f0b975]24        }
25};
26
[b4107c8]27int main( int argc, char * argv[] ) {
28        BENCH_START()
[9f0b975]29        T t;
[26fd986]30        m.wait();
[dc33b5b]31}
[b4107c8]32
33// Local Variables: //
34// tab-width: 4 //
35// End: //
Note: See TracBrowser for help on using the repository browser.