Ignore:
Timestamp:
Nov 13, 2023, 3:43:43 AM (23 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
25f2798
Parents:
0030b508 (diff), 2174191 (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/concurrency/cofor.cfa

    r0030b508 rfc12f05  
    11#include <cofor.hfa>
    2 
    32
    43void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); }
     
    87    processor p[4];
    98    long total = 0;
    10     COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); );
     9    cofor( i; 10 ) {
     10        __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST );
     11    }
    1112    {
    1213        corun;      // does nothing
Note: See TracChangeset for help on using the changeset viewer.