Ignore:
Timestamp:
Mar 4, 2023, 3:05:28 PM (16 months ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, master
Children:
e54b4e9
Parents:
858350a
Message:

added test case to types test and refactored to remove redundant ctor calls

Location:
tests/concurrent/actors
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/actors/dynamic.cfa

    r858350a r4933f18  
    77int Times = 1000000;                                                            // default values
    88
    9 struct derived_actor {
    10     inline actor;
    11 };
    12 void ?{}( derived_actor & this ) { ((actor &)this){}; }
    13 
     9struct derived_actor { inline actor; };
    1410struct derived_msg {
    1511    inline message;
     
    2218}
    2319void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    24 
    2520
    2621Allocation receive( derived_actor & receiver, derived_msg & msg ) {
  • tests/concurrent/actors/executor.cfa

    r858350a r4933f18  
    2424
    2525struct d_msg { inline message; } shared_msg;
    26 void ?{}( d_msg & this ) { ((message &) this){ Nodelete }; }
    2726
    2827Allocation receive( d_actor & this, d_msg & msg ) with( this ) {
     
    8584        } // switch
    8685
    87    
    8886    executor e{ Processors, Processors, Processors == 1 ? 1 : Processors * 512, true };
    8987
  • tests/concurrent/actors/matrix.cfa

    r858350a r4933f18  
    77unsigned int xr = 500, xc = 500, yc = 500, Processors = 1; // default values
    88
    9 struct derived_actor {
    10     inline actor;
    11 };
    12 void ?{}( derived_actor & this ) { ((actor &)this){}; }
     9struct derived_actor { inline actor; };
    1310
    1411struct derived_msg {
  • tests/concurrent/actors/pingpong.cfa

    r858350a r4933f18  
    66#include <actor.hfa>
    77
    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){}; }
     8struct ping { inline actor; };
     9struct pong { inline actor; };
    1710
    1811struct p_msg {
  • tests/concurrent/actors/static.cfa

    r858350a r4933f18  
    77int Times = 1000000;                                                            // default values
    88
    9 struct derived_actor {
    10     inline actor;
    11 };
    12 void ?{}( derived_actor & this ) { ((actor &)this){}; }
    13 
     9struct derived_actor { inline actor; };
    1410struct derived_msg {
    1511    inline message;
     
    2218}
    2319void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    24 
    2520
    2621Allocation receive( derived_actor & receiver, derived_msg & msg ) {
  • tests/concurrent/actors/types.cfa

    r858350a r4933f18  
    1818    int num;
    1919};
    20 static inline void ?{}( d_msg & this ) { ((message &)this){}; }
    2120
    2221// this isn't a valid receive routine since int is not a message type
     
    3635    inline actor;
    3736};
    38 static inline void ?{}( derived_actor2 & this ) { ((actor &)this){}; }
    3937
    4038Allocation receive( derived_actor2 & receiver, d_msg & msg ) {
     
    4341}
    4442
    45 struct derived_actor3 {
    46     inline actor;
    47 };
    48 static inline void ?{}( derived_actor3 & this ) { ((actor &)this){}; }
    49 
     43struct derived_actor3 { inline actor; };
     44struct derived_actor4 { inline derived_actor3; };
    5045struct d_msg2 {
    5146    inline message;
    5247    int num;
    5348};
    54 static inline void ?{}( d_msg2 & this ) { ((message &)this){}; }
    5549
    5650Allocation receive( derived_actor3 & receiver, d_msg & msg ) {
     
    117111    } // RAII to clean up executor
    118112
     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
    119126    printf("end\n");
    120127    return 0;
Note: See TracChangeset for help on using the changeset viewer.