Changeset b7b3e41 for doc/theses/colby_parsons_MMAth/benchmarks
- Timestamp:
- Jun 19, 2023, 1:57:11 PM (21 months ago)
- Branches:
- master
- Children:
- adc73a5
- Parents:
- fa5e1aa5 (diff), 33d4bc8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- doc/theses/colby_parsons_MMAth/benchmarks
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/balance.cfa ¶
rfa5e1aa5 rb7b3e41 31 31 32 32 d_actor ** actor_arr; 33 Allocation receive( d_actor & this, start_msg & msg ) with( this ) {33 allocation receive( d_actor & this, start_msg & msg ) with( this ) { 34 34 for ( i; Set ) { 35 *actor_arr[i + gstart] <<shared_msg;35 *actor_arr[i + gstart] | shared_msg; 36 36 } 37 37 return Nodelete; 38 38 } 39 39 40 Allocation receive( d_actor & this, d_msg & msg ) with( this ) {40 allocation receive( d_actor & this, d_msg & msg ) with( this ) { 41 41 if ( recs == rounds ) return Delete; 42 42 if ( recs % Batch == 0 ) { 43 43 for ( i; Batch ) { 44 *actor_arr[gstart + sends % Set] <<shared_msg;44 *actor_arr[gstart + sends % Set] | shared_msg; 45 45 sends += 1; 46 46 } … … 50 50 } 51 51 52 Allocation receive( filler & this, d_msg & msg ) { return Delete; }52 allocation receive( filler & this, d_msg & msg ) { return Delete; } 53 53 54 54 int main( int argc, char * argv[] ) { … … 163 163 #ifndef MULTI 164 164 for ( i; qpw ) 165 *actors[i * ActorsPerQueue] <<start_send;165 *actors[i * ActorsPerQueue] | start_send; 166 166 #else 167 167 for ( i; qpw * ActorProcs ) { 168 *actors[i * ActorsPerQueue] <<start_send;168 *actors[i * ActorsPerQueue] | start_send; 169 169 } 170 170 #endif 171 171 172 172 for ( i; FillActors ) 173 *filler_actors[i] <<shared_msg;173 *filler_actors[i] | shared_msg; 174 174 175 175 stop_actor_system(); -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/dynamic.cfa ¶
rfa5e1aa5 rb7b3e41 24 24 25 25 uint64_t start_time; 26 Allocation receive( derived_actor & receiver, derived_msg & msg ) {26 allocation receive( derived_actor & receiver, derived_msg & msg ) { 27 27 if ( msg.cnt >= Times ) { 28 28 printf("%.2f\n", ((double)(bench_time() - start_time)) / ((double)Times) ); // ns … … 33 33 derived_actor * d_actor = malloc(); 34 34 (*d_actor){}; 35 *d_actor <<*d_msg;35 *d_actor | *d_msg; 36 36 return Delete; 37 37 } … … 62 62 derived_actor * d_actor = malloc(); 63 63 (*d_actor){}; 64 *d_actor <<*d_msg;64 *d_actor | *d_msg; 65 65 66 66 -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/executor.cfa ¶
rfa5e1aa5 rb7b3e41 25 25 struct d_msg { inline message; } shared_msg; 26 26 27 Allocation receive( d_actor & this, d_msg & msg ) with( this ) {27 allocation receive( d_actor & this, d_msg & msg ) with( this ) { 28 28 if ( recs == rounds ) return Finished; 29 29 if ( recs % Batch == 0 ) { 30 30 for ( i; Batch ) { 31 gstart[sends % Set] <<shared_msg;31 gstart[sends % Set] | shared_msg; 32 32 sends += 1; 33 33 } … … 94 94 95 95 for ( i; Actors ) { 96 actors[i] <<shared_msg;96 actors[i] | shared_msg; 97 97 } // for 98 98 -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/matrix.cfa ¶
rfa5e1aa5 rb7b3e41 24 24 } 25 25 26 Allocation receive( derived_actor & receiver, derived_msg & msg ) {26 allocation receive( derived_actor & receiver, derived_msg & msg ) { 27 27 for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products 28 28 msg.Z[i] = 0; … … 103 103 104 104 for ( unsigned int r = 0; r < xr; r += 1 ) { 105 actors[r] <<messages[r];105 actors[r] | messages[r]; 106 106 } // for 107 107 -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/repeat.cfa ¶
rfa5e1aa5 rb7b3e41 46 46 47 47 Client * cl; 48 Allocation receive( Server & this, IntMsg & msg ) { msg.val = 7; *cl <<msg; return Nodelete; }49 Allocation receive( Server & this, CharMsg & msg ) { msg.val = 'x'; *cl <<msg; return Nodelete; }50 Allocation receive( Server & this, StateMsg & msg ) { return Finished; }48 allocation receive( Server & this, IntMsg & msg ) { msg.val = 7; *cl | msg; return Nodelete; } 49 allocation receive( Server & this, CharMsg & msg ) { msg.val = 'x'; *cl | msg; return Nodelete; } 50 allocation receive( Server & this, StateMsg & msg ) { return Finished; } 51 51 52 52 void terminateServers( Client & this ) with(this) { 53 53 for ( i; Messages ) { 54 servers[i] <<stateMsg;54 servers[i] | stateMsg; 55 55 } // for 56 56 } 57 57 58 Allocation reset( Client & this ) with(this) {58 allocation reset( Client & this ) with(this) { 59 59 times += 1; 60 60 if ( times == Times ) { terminateServers( this ); return Finished; } 61 61 results = 0; 62 this <<stateMsg;62 this | stateMsg; 63 63 return Nodelete; 64 64 } 65 65 66 Allocation process( Client & this ) with(this) {66 allocation process( Client & this ) with(this) { 67 67 this.results++; 68 68 if ( results == 2 * Messages ) { return reset( this ); } … … 70 70 } 71 71 72 Allocation receive( Client & this, IntMsg & msg ) { return process( this ); }73 Allocation receive( Client & this, CharMsg & msg ) { return process( this ); }74 Allocation receive( Client & this, StateMsg & msg ) with(this) {72 allocation receive( Client & this, IntMsg & msg ) { return process( this ); } 73 allocation receive( Client & this, CharMsg & msg ) { return process( this ); } 74 allocation receive( Client & this, StateMsg & msg ) with(this) { 75 75 for ( i; Messages ) { 76 servers[i] <<intmsg[i];77 servers[i] <<charmsg[i];76 servers[i] | intmsg[i]; 77 servers[i] | charmsg[i]; 78 78 } 79 79 return Nodelete; … … 124 124 Client client; 125 125 cl = &client; 126 client <<stateMsg;126 client | stateMsg; 127 127 128 128 stop_actor_system(); -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/cfa/static.cfa ¶
rfa5e1aa5 rb7b3e41 23 23 24 24 uint64_t start_time; 25 Allocation receive( derived_actor & receiver, derived_msg & msg ) {25 allocation receive( derived_actor & receiver, derived_msg & msg ) { 26 26 if ( msg.cnt >= Times ) { 27 27 printf("%.2f\n", ((double)(bench_time() - start_time)) / ((double)Times) ); // ns … … 29 29 } 30 30 msg.cnt++; 31 receiver <<msg;31 receiver | msg; 32 32 return Nodelete; 33 33 } … … 58 58 derived_actor actor; 59 59 60 actor <<msg;60 actor | msg; 61 61 62 62 stop_actor_system(); -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/actors/plotData.py ¶
rfa5e1aa5 rb7b3e41 166 166 for idx, arr in enumerate(data): 167 167 plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker=next(marker) ) 168 marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 168 169 if currBench == Bench.Executor or currBench == Bench.Matrix or currBench == Bench.Balance_One or currBench == Bench.Repeat: 169 170 plt.yscale("log") -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/channels/plotData.py ¶
rfa5e1aa5 rb7b3e41 130 130 for idx, arr in enumerate(data): 131 131 plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker=next(marker) ) 132 132 marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 133 133 plt.yscale("log") 134 134 # plt.ylim(1, None) -
TabularUnified doc/theses/colby_parsons_MMAth/benchmarks/mutex_stmt/plotData.py ¶
rfa5e1aa5 rb7b3e41 103 103 for idx, arr in enumerate(data): 104 104 plt.errorbar( procs, arr, [bars[idx][0], bars[idx][1]], capsize=2, marker=next(marker) ) 105 marker = itertools.cycle(('o', 's', 'D', 'x', 'p', '^', 'h', '*', 'v' )) 105 106 plt.yscale("log") 106 107 plt.xticks(procs)
Note: See TracChangeset
for help on using the changeset viewer.