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

Add `fmpi_root_printf()`

parent 397e948c
No related branches found
No related tags found
No related merge requests found
...@@ -108,6 +108,15 @@ _Noreturn void fmpi_abort(void); ...@@ -108,6 +108,15 @@ _Noreturn void fmpi_abort(void);
* } * }
*/ */
_Bool fmpi_is_root(const struct fmpi_ctx * ctx); _Bool fmpi_is_root(const struct fmpi_ctx * ctx);
/*------------------------------------------------------------------------------
fmpi_root_printf()
------------------------------------------------------------------------------*/
#define fmpi_root_printf(ctx, ...) \
do { \
if(fmpi_is_root((ctx))) { \
printf(__VA_ARGS__); \
} \
} while(0)
/*============================================================================== /*==============================================================================
GUARD GUARD
==============================================================================*/ ==============================================================================*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment