Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/cfa_cor.cfa

    rdc33b5b rdfda49f  
    22#include <thread.hfa>
    33
    4 #include "bench.h"
     4#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 ) {
    14                 suspend();
     6coroutine C {};
     7void main( __attribute__((unused)) C & ) {
     8        for () {
     9                suspend;
    1510        }
    1611}
    17 
    18 int main(int argc, char* argv[]) {
    19         GreatSuspender s;
    20 
     12int main( int argc, char * argv[] ) {
     13        C c;
     14        BENCH_START()
    2115        BENCH(
    22                 for ( i; n ) {
    23                         resume( s );
     16                for ( times ) {
     17                        resume( c );
    2418                },
    2519                result
    2620        )
     21        printf( "%g\n", result );
     22}
    2723
    28         printf("%g\n", result);
    29 }
     24// Local Variables: //
     25// tab-width: 4 //
     26// End: //
Note: See TracChangeset for help on using the changeset viewer.