Changeset 0d41b2e


Ignore:
Timestamp:
Nov 6, 2023, 2:20:29 PM (14 months ago)
Author:
caparson <caparson@…>
Branches:
master
Children:
c649d2c, fe293bf
Parents:
ba0e1bc
Message:

switched test to use new cofor syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/cofor.cfa

    rba0e1bc r0d41b2e  
    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.