- Timestamp:
- Mar 4, 2023, 3:05:28 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- e54b4e9
- Parents:
- 858350a
- Location:
- tests/concurrent/actors
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/actors/dynamic.cfa
r858350a r4933f18 7 7 int Times = 1000000; // default values 8 8 9 struct derived_actor { 10 inline actor; 11 }; 12 void ?{}( derived_actor & this ) { ((actor &)this){}; } 13 9 struct derived_actor { inline actor; }; 14 10 struct derived_msg { 15 11 inline message; … … 22 18 } 23 19 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; } 24 25 20 26 21 Allocation receive( derived_actor & receiver, derived_msg & msg ) { -
tests/concurrent/actors/executor.cfa
r858350a r4933f18 24 24 25 25 struct d_msg { inline message; } shared_msg; 26 void ?{}( d_msg & this ) { ((message &) this){ Nodelete }; }27 26 28 27 Allocation receive( d_actor & this, d_msg & msg ) with( this ) { … … 85 84 } // switch 86 85 87 88 86 executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 512, true }; 89 87 -
tests/concurrent/actors/matrix.cfa
r858350a r4933f18 7 7 unsigned int xr = 500, xc = 500, yc = 500, Processors = 1; // default values 8 8 9 struct derived_actor { 10 inline actor; 11 }; 12 void ?{}( derived_actor & this ) { ((actor &)this){}; } 9 struct derived_actor { inline actor; }; 13 10 14 11 struct derived_msg { -
tests/concurrent/actors/pingpong.cfa
r858350a r4933f18 6 6 #include <actor.hfa> 7 7 8 struct ping { 9 inline actor; 10 }; 11 static inline void ?{}( ping & this ) { ((actor &)this){}; } 12 13 struct pong { 14 inline actor; 15 }; 16 static inline void ?{}( pong & this ) { ((actor &)this){}; } 8 struct ping { inline actor; }; 9 struct pong { inline actor; }; 17 10 18 11 struct p_msg { -
tests/concurrent/actors/static.cfa
r858350a r4933f18 7 7 int Times = 1000000; // default values 8 8 9 struct derived_actor { 10 inline actor; 11 }; 12 void ?{}( derived_actor & this ) { ((actor &)this){}; } 13 9 struct derived_actor { inline actor; }; 14 10 struct derived_msg { 15 11 inline message; … … 22 18 } 23 19 void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; } 24 25 20 26 21 Allocation receive( derived_actor & receiver, derived_msg & msg ) { -
tests/concurrent/actors/types.cfa
r858350a r4933f18 18 18 int num; 19 19 }; 20 static inline void ?{}( d_msg & this ) { ((message &)this){}; }21 20 22 21 // this isn't a valid receive routine since int is not a message type … … 36 35 inline actor; 37 36 }; 38 static inline void ?{}( derived_actor2 & this ) { ((actor &)this){}; }39 37 40 38 Allocation receive( derived_actor2 & receiver, d_msg & msg ) { … … 43 41 } 44 42 45 struct derived_actor3 { 46 inline actor; 47 }; 48 static inline void ?{}( derived_actor3 & this ) { ((actor &)this){}; } 49 43 struct derived_actor3 { inline actor; }; 44 struct derived_actor4 { inline derived_actor3; }; 50 45 struct d_msg2 { 51 46 inline message; 52 47 int num; 53 48 }; 54 static inline void ?{}( d_msg2 & this ) { ((message &)this){}; }55 49 56 50 Allocation receive( derived_actor3 & receiver, d_msg & msg ) { … … 117 111 } // RAII to clean up executor 118 112 113 { 114 printf("nested inheritance actor test\n"); 115 executor e{ 1, Processors, Processors == 1 ? 1 : Processors * 4, true }; 116 start_actor_system( Processors ); 117 derived_actor4 a4; 118 d_msg b1; 119 d_msg2 c2; 120 b1.num = -1; 121 c2.num = 5; 122 a4 << b1 << c2; 123 stop_actor_system(); 124 } // RAII to clean up executor 125 119 126 printf("end\n"); 120 127 return 0;
Note: See TracChangeset
for help on using the changeset viewer.