Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/cfa_cor.cfa

    rdc33b5b r2316525  
    44#include "bench.h"
    55
    6 coroutine GreatSuspender {};
    7 
    8 void ?{}( GreatSuspender & this ) {
    9         prime(this);
    10 }
    11 
    12 void main( __attribute__((unused)) GreatSuspender & this ) {
    13         while( true ) {
     6coroutine C {} c;
     7void main( __attribute__((unused)) C & ) {
     8        while () {
    149                suspend();
    1510        }
    1611}
    17 
    18 int main(int argc, char* argv[]) {
    19         GreatSuspender s;
    20 
     12int main( int argc, char * argv[] ) {
     13        BENCH_START()
    2114        BENCH(
    22                 for ( i; n ) {
    23                         resume( s );
     15                for ( times ) {
     16                        resume( c );
    2417                },
    2518                result
    2619        )
     20        printf( "%g\n", result );
     21}
    2722
    28         printf("%g\n", result);
    29 }
     23// Local Variables: //
     24// tab-width: 4 //
     25// End: //
Note: See TracChangeset for help on using the changeset viewer.