source: libcfa/src/concurrency/cofor.hfa @ 11ab0b4a

Last change on this file since 11ab0b4a was 11ab0b4a, checked in by Peter A. Buhr <pabuhr@…>, 7 months ago

add corun/cofor statement, update old cofor

  • Property mode set to 100644
File size: 659 bytes
Line 
1#include <thread.hfa>
2
3//////////////////////////////////////////////////////////////////////////////////////////
4// cofor ( uC++ COFOR )
5typedef void (*__cofor_body_t)( ssize_t );
6
7void __Cofor__( ssize_t low, ssize_t high, __cofor_body_t loop_body );
8
9#define COFOR( lidname, low, high, loopbody ) \
10        { \
11                void __CFA_loopLambda__( ssize_t lidname ) { \
12                        loopbody \
13                } \
14                __Cofor__( low, high, __CFA_loopLambda__ ); \
15        }
16
17//////////////////////////////////////////////////////////////////////////////////////////
18// parallel (COBEGIN/COEND)
19typedef void (*parallel_stmt_t)( void * );
20
21void parallel( parallel_stmt_t * stmts, void ** args, size_t num );
Note: See TracBrowser for help on using the repository browser.