Ignore:
Timestamp:
Apr 21, 2023, 5:36:12 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
ADT, master
Children:
28f8f15, 6e4c44d
Parents:
2ed94a9 (diff), 699a97d (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

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

    r2ed94a9 rb110bcc  
    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 ) {
     
    7872    b.num = 1;
    7973    c.num = 2;
    80     a | b | c;
     74    a << b << c;
    8175    stop_actor_system();
    8276
     
    8680    d_msg d_ac2_msg;
    8781    d_ac2_msg.num = 3;
    88     d_ac2_0 | d_ac2_msg;
    89     d_ac2_1 | d_ac2_msg;
     82    d_ac2_0 << d_ac2_msg;
     83    d_ac2_1 << d_ac2_msg;
    9084    stop_actor_system();
    9185
     
    9993        d_msg d_ac23_msg;
    10094        d_ac23_msg.num = 4;
    101         d_ac3_0 | d_ac23_msg;
    102         d_ac2_2 | d_ac23_msg;
     95        d_ac3_0 << d_ac23_msg;
     96        d_ac2_2 << d_ac23_msg;
    10397        stop_actor_system();
    10498    } // RAII to clean up executor
     
    113107        b1.num = -1;
    114108        c2.num = 5;
    115         a3 | b1 | c2;
     109        a3 << b1 << c2;
     110        stop_actor_system();
     111    } // RAII to clean up executor
     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;
    116123        stop_actor_system();
    117124    } // RAII to clean up executor
Note: See TracChangeset for help on using the changeset viewer.