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

Add `fmpi_futhark_get_data_async()`

parent f9ec2437
Branches
No related tags found
No related merge requests found
...@@ -139,6 +139,13 @@ void * fmpi_futhark_get_data_sync( ...@@ -139,6 +139,13 @@ void * fmpi_futhark_get_data_sync(
const struct fmpi_futhark_ctx * ctx, void * in, void * out, const struct fmpi_futhark_ctx * ctx, void * in, void * out,
enum fmpi_type_base type, size_t dim_cnt enum fmpi_type_base type, size_t dim_cnt
); );
/*------------------------------------------------------------------------------
fmpi_futhark_get_data_async()
------------------------------------------------------------------------------*/
void * fmpi_futhark_get_data_async(
const struct fmpi_futhark_ctx * ctx, void * in, void * out,
enum fmpi_type_base type, size_t dim_cnt
);
/*============================================================================== /*==============================================================================
MACRO MACRO
==============================================================================*/ ==============================================================================*/
......
...@@ -161,7 +161,7 @@ void * fmpi_futhark_new_data( ...@@ -161,7 +161,7 @@ void * fmpi_futhark_new_data(
return fmpi_futhark_new_data_func_list[idx](ctx, data, x, y, z); return fmpi_futhark_new_data_func_list[idx](ctx, data, x, y, z);
} }
/*------------------------------------------------------------------------------ /*------------------------------------------------------------------------------
fmpi_futhark_get_data() fmpi_futhark_get_data_sync()
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
void * fmpi_futhark_get_data_sync( void * fmpi_futhark_get_data_sync(
const struct fmpi_futhark_ctx * const ctx, void * const in, void * const out, const struct fmpi_futhark_ctx * const ctx, void * const in, void * const out,
...@@ -183,6 +183,25 @@ void * fmpi_futhark_get_data_sync( ...@@ -183,6 +183,25 @@ void * fmpi_futhark_get_data_sync(
} }
return out; return out;
} }
/*------------------------------------------------------------------------------
fmpi_futhark_get_data_async()
------------------------------------------------------------------------------*/
void * fmpi_futhark_get_data_async(
const struct fmpi_futhark_ctx * const ctx, void * const in, void * const out,
const enum fmpi_type_base type, const size_t dim_cnt
){
assert(ctx != NULL);
assert(in != NULL);
assert(out != NULL);
assert(dim_cnt <= FMPI_DIM_MAX);
const size_t idx = FMPI_PRIV_FUTHARK_FUNC_IDX(dim_cnt, type);
const int err = fmpi_futhark_get_data_func_list[idx](ctx, in, out);
if(err != FUTHARK_SUCCESS) {
FMPI_RAISE_FUTHARK_ERROR(ctx, "futhark_values_##T##_##D##d() failed!");
return NULL;
}
return out;
}
#define FMPI_FUTHARK_DEFINITION(D, T) \ #define FMPI_FUTHARK_DEFINITION(D, T) \
void * fmpi_futhark_new_##D##d_##T( \ void * fmpi_futhark_new_##D##d_##T( \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment