source: libcfa/src/concurrency/cofor.hfa @ 1ee0a4da

Last change on this file since 1ee0a4da was e4c3819, checked in by Peter A. Buhr <pabuhr@…>, 8 months ago

refactor cofor.hfa into cofor.cfa, adjust Makefile.am to handle cofor.cfa

  • Property mode set to 100644
File size: 651 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.