Changeset cd477ca


Ignore:
Timestamp:
Mar 19, 2023, 1:52:19 PM (20 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
eac318a
Parents:
5f648fb3
Message:

renamed baseline bench and added separate cluster to cfa benchmark to avoid main thread starvation issue

Location:
doc/theses/colby_parsons_MMAth/benchmarks/mutex_stmt
Files:
2 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/colby_parsons_MMAth/benchmarks/mutex_stmt/cfa/order.cfa

    r5f648fb3 rcd477ca  
    1010uint64_t total = 0;
    1111thread worker {};
     12static inline void ?{}( worker & this, cluster & clu ) {
     13    ((thread &)this){ clu };
     14}
    1215void main( worker & w ) {
    1316    BENCH( mutex ( LOCKS ) { }, total, done )
     
    1619int main( int argc, char * argv[] ) {
    1720        BENCH_START()
    18     processor p[threads]; // one extra for main thread
    19     {
    20         worker w[threads];
    21         sleep( 10`s );
    22         done = true;
    23     }
     21    cluster clus;
     22    processor * proc[threads];
     23    for ( i; threads ) // create procs
     24        (*(proc[i] = alloc())){clus};
     25
     26    worker * w[threads];
     27    for ( i; threads ) // create threads
     28        (*(w[i] = alloc())){ clus };
     29   
     30    sleep( 10`s );
     31    done = true;
     32
     33    for ( i; threads ) // delete threads
     34        delete(w[i]);
     35
     36    for ( i; threads ) // delete procs
     37        delete(proc[i]);
    2438        printf( "%lu\n", total );
    2539}
Note: See TracChangeset for help on using the changeset viewer.