Commit afbd9e49 authored by THIBAULT Samuel's avatar THIBAULT Samuel

Add do/while to fix usage in if blocks

parent d1f7a467
......@@ -208,21 +208,25 @@ inline static int morse_desc_islocal( const MORSE_desc_t *A, int m, int n )
unsigned __morse_need_submit = 0; \
RUNTIME_BEGIN_ACCESS_DECLARATION
#define MORSE_ACCESS_R(A, Am, An) \
#define MORSE_ACCESS_R(A, Am, An) do { \
if (morse_desc_islocal(A, Am, An)) __morse_need_submit = 1; \
RUNTIME_ACCESS_R(A, Am, An)
RUNTIME_ACCESS_R(A, Am, An) \
} while(0)
#define MORSE_ACCESS_W(A, Am, An) \
#define MORSE_ACCESS_W(A, Am, An) do { \
if (morse_desc_islocal(A, Am, An)) __morse_need_submit = 1; \
RUNTIME_ACCESS_W(A, Am, An)
RUNTIME_ACCESS_W(A, Am, An) \
} while(0)
#define MORSE_ACCESS_RW(A, Am, An) \
#define MORSE_ACCESS_RW(A, Am, An) do { \
if (morse_desc_islocal(A, Am, An)) __morse_need_submit = 1; \
RUNTIME_ACCESS_RW(A, Am, An)
RUNTIME_ACCESS_RW(A, Am, An) \
} while(0)
#define MORSE_RANK_CHANGED(rank) \
#define MORSE_RANK_CHANGED(rank) do {\
__morse_need_submit = 1; \
RUNTIME_RANK_CHANGED(rank)
RUNTIME_RANK_CHANGED(rank) \
} while (0)
#define MORSE_END_ACCESS_DECLARATION \
RUNTIME_END_ACCESS_DECLARATION \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment