diff --git a/include/fmpi_core.h b/include/fmpi_core.h index 81fc2f63acad2d323af37e901a660d404eb566a5..25ea8a0330d38e5d3c139d6b5a56350b8bca59bf 100644 --- a/include/fmpi_core.h +++ b/include/fmpi_core.h @@ -77,7 +77,7 @@ struct fmpi_ctx * fmpi_init(int * argc, char ** argv[]); * } * } */ -int fmpi_exit(struct fmpi_ctx ** const ctx); +int fmpi_exit(struct fmpi_ctx ** ctx); /*------------------------------------------------------------------------------ fmpi_abort() ------------------------------------------------------------------------------*/ diff --git a/include/fmpi_task.h b/include/fmpi_task.h index 98ae4391448909621d5c807be3b720454a336e51..39d9f887ad93c6c691999707276f531f466d010d 100644 --- a/include/fmpi_task.h +++ b/include/fmpi_task.h @@ -80,7 +80,7 @@ typedef struct fmpi_task_args { * TODO * } */ -typedef void (*fmpi_task_func)( +typedef void (* fmpi_task_func)( const struct fmpi_ctx * ctx, const struct fmpi_task_args * args ); /*------------------------------------------------------------------------------ @@ -120,7 +120,7 @@ typedef struct fmpi_task { * } */ struct fmpi_task fmpi_task_register( - struct fmpi_ctx * ctx, const fmpi_task_func func, + struct fmpi_ctx * ctx, fmpi_task_func func, struct fmpi_stencil stencil, const struct fmpi_task_args * args ); /*------------------------------------------------------------------------------ diff --git a/include/internal/fmpi_mpi.h b/include/internal/fmpi_mpi.h index adbd6b0b6b09ca5ffe8b774c22f7b4a17dbf5c8f..7cf6395a69c7efc8c611a4f6410a2b381628e9b6 100644 --- a/include/internal/fmpi_mpi.h +++ b/include/internal/fmpi_mpi.h @@ -116,7 +116,7 @@ int fmpi_mpi_exit(struct fmpi_mpi_ctx ** ctx); * TODO * } */ -_Bool fmpi_mpi_is_root(const struct fmpi_mpi_ctx * const ctx); +_Bool fmpi_mpi_is_root(const struct fmpi_mpi_ctx * ctx); /*------------------------------------------------------------------------------ fmpi_mpi_check_error() ------------------------------------------------------------------------------*/ diff --git a/src/fmpi_core.c b/src/fmpi_core.c index 3988c6f6dbe7753156299ba8563d94d0fb5bbaac..37cbe3e7f32edc941244b9514c2382e745238046 100644 --- a/src/fmpi_core.c +++ b/src/fmpi_core.c @@ -37,7 +37,7 @@ /*------------------------------------------------------------------------------ fmpi_init() ------------------------------------------------------------------------------*/ -struct fmpi_ctx * fmpi_init(int * const argc, char *** const argv) +struct fmpi_ctx * fmpi_init(int * const argc, char ** argv[]) { struct fmpi_ctx * ctx = fmpi_ctx_create(argc, argv); if(ctx == NULL) { @@ -66,7 +66,7 @@ _Noreturn void fmpi_abort(const struct fmpi_ctx * const ctx) /*------------------------------------------------------------------------------ fmpi_is_root() ------------------------------------------------------------------------------*/ -_Bool fmpi_is_root(const struct fmpi_ctx * ctx) +_Bool fmpi_is_root(const struct fmpi_ctx * const ctx) { assert(ctx != NULL); return fmpi_mpi_is_root(ctx->mpi); diff --git a/src/fmpi_ctx.c b/src/fmpi_ctx.c index c8afbfc9c6a50a4d1f1a00c9f07cf3c1a3ff32b1..e265efe1c7881e64dd09bd46b29f4cb354ce28b7 100644 --- a/src/fmpi_ctx.c +++ b/src/fmpi_ctx.c @@ -52,7 +52,7 @@ static void fmpi_ctx_print_error( /*------------------------------------------------------------------------------ fmpi_ctx_create() ------------------------------------------------------------------------------*/ -struct fmpi_ctx * fmpi_ctx_create(int * argc, char ** argv[]) +struct fmpi_ctx * fmpi_ctx_create(int * const argc, char ** argv[]) { struct fmpi_ctx * ctx = malloc(sizeof(*ctx)); struct fmpi_error_handler err_handler = { diff --git a/src/fmpi_futhark.c b/src/fmpi_futhark.c index 173119c6de5cb57de9770430a5dff55c68ffc7db..2bd00423bd427b820edefe2082c04a7c83bcae8a 100644 --- a/src/fmpi_futhark.c +++ b/src/fmpi_futhark.c @@ -140,7 +140,7 @@ _Bool fmpi_futhark_check_error( fmpi_futhark_new_data() ------------------------------------------------------------------------------*/ void * fmpi_futhark_new_data( - const struct fmpi_futhark_ctx * ctx, const void * const data, + const struct fmpi_futhark_ctx * const ctx, const void * const data, const enum fmpi_type type, const size_t dim_cnt, const size_t x, const size_t y, const size_t z ){ diff --git a/src/fmpi_mpi.c b/src/fmpi_mpi.c index 1609ec47813c7385d8be136b39d4a4829d13e84f..5df12e6fd7da9df0c3a1fa6af551ee808e1fbee1 100644 --- a/src/fmpi_mpi.c +++ b/src/fmpi_mpi.c @@ -52,7 +52,7 @@ do { \ fmpi_mpi_init() ------------------------------------------------------------------------------*/ struct fmpi_mpi_ctx * fmpi_mpi_init( - int * const argc, char *** const argv, + int * const argc, char ** argv[], const struct fmpi_error_handler err_handler ){ struct fmpi_mpi_ctx * ctx = malloc(sizeof(*ctx)); diff --git a/src/fmpi_stencil.c b/src/fmpi_stencil.c index 825bc5046005914d9e3ae81b9238c981b22de943..9197e22cf95870fa4bd87ff6977f3dfc62ecc601 100644 --- a/src/fmpi_stencil.c +++ b/src/fmpi_stencil.c @@ -42,7 +42,7 @@ struct fmpi_stencil fmpi_no_stencil(void) /*------------------------------------------------------------------------------ fmpi_stencil_1d() ------------------------------------------------------------------------------*/ -struct fmpi_stencil fmpi_stencil_1d(size_t length) +struct fmpi_stencil fmpi_stencil_1d(const size_t length) { return (struct fmpi_stencil){ .type = FMPI_STENCIL_SQUARE, @@ -53,7 +53,7 @@ struct fmpi_stencil fmpi_stencil_1d(size_t length) /*------------------------------------------------------------------------------ fmpi_stencil_2d() ------------------------------------------------------------------------------*/ -struct fmpi_stencil fmpi_stencil_2d(size_t length) +struct fmpi_stencil fmpi_stencil_2d(const size_t length) { return (struct fmpi_stencil){ .type = FMPI_STENCIL_SQUARE, diff --git a/src/fmpi_task.c b/src/fmpi_task.c index b4efc4ed3d19d38d2059c87868d578df2a2e828d..f3554e8aedb014125af42bec20545841399cefe0 100644 --- a/src/fmpi_task.c +++ b/src/fmpi_task.c @@ -40,8 +40,8 @@ fmpi_task_register() ------------------------------------------------------------------------------*/ struct fmpi_task fmpi_task_register( - struct fmpi_ctx * ctx, const fmpi_task_func func, - const struct fmpi_stencil stencil, const struct fmpi_task_args * args + struct fmpi_ctx * const ctx, const fmpi_task_func func, + const struct fmpi_stencil stencil, const struct fmpi_task_args * const args ){ assert(ctx != NULL); assert(ctx->task_cnt < FMPI_TASK_MAX);