StarPU Handbook - StarPU Basics
|
The following macros allow to make GCC extensions portable, and to have a code which can be compiled with any C compiler. More...
Macros | |
#define | STARPU_GNUC_PREREQ(maj, min) |
#define | STARPU_UNLIKELY(expr) |
#define | STARPU_LIKELY(expr) |
#define | STARPU_ATTRIBUTE_UNUSED |
#define | STARPU_ATTRIBUTE_NORETURN |
#define | STARPU_ATTRIBUTE_VISIBILITY_DEFAULT |
#define | STARPU_VISIBILITY_PUSH_HIDDEN |
#define | STARPU_VISIBILITY_POP |
#define | STARPU_ATTRIBUTE_MALLOC |
#define | STARPU_ATTRIBUTE_WARN_UNUSED_RESULT |
#define | STARPU_ATTRIBUTE_PURE |
#define | STARPU_ATTRIBUTE_ALIGNED(size) |
#define | STARPU_ATTRIBUTE_FORMAT(type, string, first) |
#define | STARPU_INLINE |
#define | STARPU_ATTRIBUTE_CALLOC_SIZE(num, size) |
#define | STARPU_ATTRIBUTE_ALLOC_SIZE(size) |
#define | STARPU_BACKTRACE_LENGTH |
#define | STARPU_DUMP_BACKTRACE() |
#define | STARPU_SIMGRID_ASSERT(x) |
#define | STARPU_ASSERT(x) |
#define | STARPU_ASSERT_ACCESSIBLE(ptr) |
#define | STARPU_STATIC_ASSERT(x) |
#define | STARPU_ASSERT_MSG(x, msg, ...) |
#define | _starpu_abort() |
#define | STARPU_ABORT() |
#define | STARPU_ABORT_MSG(msg, ...) |
#define | STARPU_CHECK_RETURN_VALUE(err, message, ...) |
#define | STARPU_CHECK_RETURN_VALUE_IS(err, value, message, ...) |
#define | STARPU_ATOMIC_SOMETHING(name, expr) |
#define | STARPU_ATOMIC_SOMETHINGL(name, expr) |
#define | STARPU_ATOMIC_SOMETHING64(name, expr) |
#define | STARPU_BOOL_COMPARE_AND_SWAP_PTR(ptr, old, value) |
#define | STARPU_VAL_COMPARE_AND_SWAP_PTR(ptr, old, value) |
#define | STARPU_RMB() |
#define | STARPU_WMB() |
#define | STARPU_CACHELINE_SIZE |
The following macros allow to make GCC extensions portable, and to have a code which can be compiled with any C compiler.
#define STARPU_GNUC_PREREQ | ( | maj, | |
min | |||
) |
Return true (non-zero) if GCC version maj
.min
or later is being used (macro taken from glibc.)
#define STARPU_UNLIKELY | ( | expr | ) |
When building with a GNU C Compiler, allow programmers to mark an expression as unlikely.
#define STARPU_LIKELY | ( | expr | ) |
When building with a GNU C Compiler, allow programmers to mark an expression as likely.
#define STARPU_ATTRIBUTE_UNUSED |
When building with a GNU C Compiler, defined to attribute((unused))
#define STARPU_ATTRIBUTE_NORETURN |
When building with a GNU C Compiler, defined to attribute((noreturn))
#define STARPU_ATTRIBUTE_VISIBILITY_DEFAULT |
When building with a GNU C Compiler, defined to attribute((visibility ("default")))
#define STARPU_VISIBILITY_PUSH_HIDDEN |
When building with a GNU C Compiler, defined to #pragma GCC visibility push(hidden)
#define STARPU_VISIBILITY_POP |
When building with a GNU C Compiler, defined to #pragma GCC visibility pop
#define STARPU_ATTRIBUTE_MALLOC |
When building with a GNU C Compiler, defined to attribute((malloc))
#define STARPU_ATTRIBUTE_WARN_UNUSED_RESULT |
When building with a GNU C Compiler, defined to attribute((warn_unused_result))
#define STARPU_ATTRIBUTE_PURE |
When building with a GNU C Compiler, defined to attribute((pure))
#define STARPU_ATTRIBUTE_ALIGNED | ( | size | ) |
When building with a GNU C Compiler, defined to__attribute__((aligned(size)))
#define STARPU_ASSERT | ( | x | ) |
Unless StarPU has been configured with the option --enable-fast, this macro will abort if the expression x
is false.
#define STARPU_ASSERT_ACCESSIBLE | ( | ptr | ) |
Unless StarPU has been configured with the option --enable-fast, this macro will abort if the pointer x
is not pointing to valid memory.
#define STARPU_STATIC_ASSERT | ( | x | ) |
This macro will abort compilation if the expression x
is false.
#define STARPU_ASSERT_MSG | ( | x, | |
msg, | |||
... | |||
) |
Unless StarPU has been configured with the option --enable-fast, this macro will abort if the expression x
is false. The string msg
will be displayed.
#define STARPU_ABORT | ( | ) |
Abort the program.
#define STARPU_ABORT_MSG | ( | msg, | |
... | |||
) |
Print the string '[starpu][abort][name of the calling function:name of the file:line in the file]' followed by the given string msg
and abort the program
#define STARPU_CHECK_RETURN_VALUE | ( | err, | |
message, | |||
... | |||
) |
Abort the program (after displaying message
) if err
has a value which is not 0.
#define STARPU_CHECK_RETURN_VALUE_IS | ( | err, | |
value, | |||
message, | |||
... | |||
) |
Abort the program (after displaying message
) if err
is different from value
.
#define STARPU_RMB | ( | ) |
This macro can be used to do a synchronization.
#define STARPU_WMB | ( | ) |
This macro can be used to do a synchronization.