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

Move `_Static_assert()` outside of function body in `fmpi_data.c`

parent a0588046
Branches
No related tags found
No related merge requests found
...@@ -57,11 +57,11 @@ struct fmpi_data fmpi_data_out_##T( \ ...@@ -57,11 +57,11 @@ struct fmpi_data fmpi_data_out_##T( \
FMPI_DEFINE_FUNCS_T(FMPI_DATA_FUNC_DEFINITION_T, FMPI_DATA_TYPES) FMPI_DEFINE_FUNCS_T(FMPI_DATA_FUNC_DEFINITION_T, FMPI_DATA_TYPES)
#define FMPI_DATA_FUNC_DEFINITION_DT(D, T) \ #define FMPI_DATA_FUNC_DEFINITION_DT(D, T) \
_Static_assert((D) > 0 && (D) <= FMPI_DIM_MAX, ""); \
struct fmpi_data fmpi_data_##D##d_in_##T( \ struct fmpi_data fmpi_data_##D##d_in_##T( \
const struct fmpi_ctx * const ctx, T * const data, \ const struct fmpi_ctx * const ctx, T * const data, \
const size_t x, const size_t y, const size_t z \ const size_t x, const size_t y, const size_t z \
){ \ ){ \
_Static_assert((D) <= FMPI_DIM_MAX, ""); \
assert(ctx != NULL); \ assert(ctx != NULL); \
assert(data != NULL); \ assert(data != NULL); \
const size_t cnt = (x * y * z); \ const size_t cnt = (x * y * z); \
...@@ -83,7 +83,6 @@ struct fmpi_data fmpi_data_##D##d_out_##T( \ ...@@ -83,7 +83,6 @@ struct fmpi_data fmpi_data_##D##d_out_##T( \
const struct fmpi_ctx * const ctx, T * const data, \ const struct fmpi_ctx * const ctx, T * const data, \
const size_t x, const size_t y, const size_t z \ const size_t x, const size_t y, const size_t z \
){ \ ){ \
_Static_assert((D) <= FMPI_DIM_MAX, ""); \
assert(ctx != NULL); \ assert(ctx != NULL); \
assert(data != NULL); \ assert(data != NULL); \
const size_t cnt = (x * y * z); \ const size_t cnt = (x * y * z); \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment