Habanero-UPC++ Overview
The different types of supported intra-place asynchronous tasks currenly supported are as following:
(1) Asynchronous parallel task
async([capture_list]() {
S1;
});
(2) Asynchronous parallel task depending on data driven futures (DDFs)
asyncAwait(ddf_1, ddf_2, ...., [capture_list]() {
S2;
});
(3) Asynchronous parallel for-loop iterations
// parallel for loop
// loop properties
loop_domain_t loop0 = {loopLowBound, loopHighBound, loopStride, tileSize};
// Loop iterations are recursively partitioned until the size of a block
// size specified by the "tile_size" is reached.
// This is similar to the TBB style.
int schedule_type = FORASYNC_MODE_RECURSIVE;
// Loop iterations are chunked into blocks of lengths
// specified by the "tile_size".
schedule_type = FORASYNC_MODE_FLAT;
// 1-Dimension for-loop
forasync1D(&loop0, [capture_list]() {
S3;
}, schedule_type);
// 2-Dimension for-loop
loop_domain_t loop[2] = {loop0, loop1};
forasync2D(loop, [capture_list]() {
S3;
}, schedule_type);
// 3-Dimension for-loop
loop_domain_t loop[3] = {loop0, loop1, loop2};
forasync3D(loop, [capture_list]() {
S3;
}, schedule_type);
The different types of supported inter-place asynchronous tasks currently supported are as following:
// asynchronous task invocation at remote place
asyncAt(place, [capture_list]() {
S5;
});
// asynchronous remote copy
asyncCopy(global_ptr src, global_ptr dst, size_t count, DDF* ddf=NULL);
// asynchronous task free to execute anywhere
// in the cluster through distributed work-stealing
asyncAny([capture_list]() {
S6;
});
Both intra-place and inter-place asynchronous tasks can be joined by using a special finish:
finish_spmd([capture_list]() {
async(....);
asyncAwait(...);
forasync(...);
asyncAt(...);
asyncCopy(...);
asyncAny(...);
});
A normal finish can be used for joining only intra-place asynchronous tasks. Tasks in this finish scope cannot spawn any inter-place asynchronous tasks.
finish([capture_list]() {
async(....);
asyncAwait(...);
forasync(...);
});