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

Add static assertions on `FMPI_DIM_MAX` in `fmpi_futhark.c`

parent 28254866
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,7 @@ void * fmpi_futhark_new_##D##d_##T( \
const struct fmpi_futhark_ctx * const ctx, const void * const array, \
const size_t x, const size_t y, const size_t z \
){ \
_Static_assert((D) <= FMPI_DIM_MAX, ""); \
assert(ctx != NULL); \
assert(array != NULL); \
struct futhark_##T##_##D##d * data = FMPI_FUTHARK_NEW_##D(T, ctx->ctx, array, x, y, z); \
......@@ -169,6 +170,7 @@ void * fmpi_futhark_new_##D##d_##T( \
void fmpi_futhark_free_##D##d_##T( \
const struct fmpi_futhark_ctx * const ctx, void * const array \
){ \
_Static_assert((D) <= FMPI_DIM_MAX, ""); \
assert(ctx != NULL); \
assert(array != NULL); \
fmpi_futhark_sync(ctx);\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment