Last change
on this file since cf34e82 was
11ab0b4a,
checked in by Peter A. Buhr <pabuhr@…>, 13 months ago
|
add corun/cofor statement, update old cofor
|
-
Property mode set to
100644
|
File size:
659 bytes
|
Rev | Line | |
---|
[1ed5e9e] | 1 | #include <thread.hfa> |
---|
| 2 | |
---|
| 3 | ////////////////////////////////////////////////////////////////////////////////////////// |
---|
| 4 | // cofor ( uC++ COFOR ) |
---|
[e4c3819] | 5 | typedef void (*__cofor_body_t)( ssize_t ); |
---|
[1ed5e9e] | 6 | |
---|
[11ab0b4a] | 7 | void __Cofor__( ssize_t low, ssize_t high, __cofor_body_t loop_body ); |
---|
[1ed5e9e] | 8 | |
---|
[e4c3819] | 9 | #define COFOR( lidname, low, high, loopbody ) \ |
---|
| 10 | { \ |
---|
| 11 | void __CFA_loopLambda__( ssize_t lidname ) { \ |
---|
| 12 | loopbody \ |
---|
| 13 | } \ |
---|
[11ab0b4a] | 14 | __Cofor__( low, high, __CFA_loopLambda__ ); \ |
---|
[e4c3819] | 15 | } |
---|
[334e0cf2] | 16 | |
---|
[1ed5e9e] | 17 | ////////////////////////////////////////////////////////////////////////////////////////// |
---|
| 18 | // parallel (COBEGIN/COEND) |
---|
| 19 | typedef void (*parallel_stmt_t)( void * ); |
---|
| 20 | |
---|
[e4c3819] | 21 | void parallel( parallel_stmt_t * stmts, void ** args, size_t num ); |
---|
Note: See
TracBrowser
for help on using the repository browser.