Skip to content
Snippets Groups Projects
Verified Commit 607fd63d authored by raphael.bach's avatar raphael.bach
Browse files

Add `FMPI_REGISTER_SYNC_TASK()`

parent ccaad32b
No related branches found
No related tags found
No related merge requests found
...@@ -31,8 +31,8 @@ int main(int argc, char * argv[]) ...@@ -31,8 +31,8 @@ int main(int argc, char * argv[])
}; };
const size_t in_size = sizeof(in)/sizeof(T); const size_t in_size = sizeof(in)/sizeof(T);
T out = -1; T out = -1;
struct fmpi_task array_sum_task = FMPI_TASK_REGISTER( struct fmpi_task array_sum_task = FMPI_REGISTER_SYNC_TASK(
ctx, array_sum, FMPI_TASK_TYPE_SYNC, fmpi_no_stencil(), ctx, array_sum, fmpi_no_stencil(),
fmpi_data_out(ctx, &out), fmpi_data_out(ctx, &out),
fmpi_data_1d_in(ctx, in, in_size) fmpi_data_1d_in(ctx, in, in_size)
); );
......
...@@ -27,10 +27,11 @@ ...@@ -27,10 +27,11 @@
INCLUDE INCLUDE
==============================================================================*/ ==============================================================================*/
// Internal // Internal
#include "fmpi_task.h"
#include "internal/fmpi_ctx.h" #include "internal/fmpi_ctx.h"
/*============================================================================== /*==============================================================================
PUBLIC FUNCTION PUBLIC FUNCTION
==============================================================================*/ ===============================================================================*/
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
fmpi_init() fmpi_init()
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
...@@ -137,6 +138,11 @@ do { \ ...@@ -137,6 +138,11 @@ do { \
printf(__VA_ARGS__); \ printf(__VA_ARGS__); \
} \ } \
} while(0) } while(0)
/*------------------------------------------------------------------------------
FMPI_REGISTER_SYNC_TASK()
------------------------------------------------------------------------------*/
#define FMPI_REGISTER_SYNC_TASK(ctx, func, stencil, ...) \
FMPI_TASK_REGISTER(ctx, func, FMPI_TASK_TYPE_SYNC, stencil, __VA_ARGS__)
/*============================================================================== /*==============================================================================
GUARD GUARD
==============================================================================*/ ==============================================================================*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment