The following macros allow to make GCC extensions portable, and to have a code which can be compiled with any C compiler.
More...
|
#define | STARPU_GNUC_PREREQ(maj, min) |
|
#define | STARPU_UNLIKELY(expr) |
|
#define | STARPU_LIKELY(expr) |
|
#define | STARPU_ATTRIBUTE_UNUSED |
|
#define | STARPU_ATTRIBUTE_INTERNAL |
|
#define | STARPU_ATTRIBUTE_MALLOC |
|
#define | STARPU_ATTRIBUTE_WARN_UNUSED_RESULT |
|
#define | STARPU_ATTRIBUTE_PURE |
|
#define | STARPU_ATTRIBUTE_ALIGNED(size) |
|
#define | STARPU_WARN_UNUSED_RESULT |
|
#define | STARPU_POISON_PTR |
|
#define | STARPU_MIN(a, b) |
|
#define | STARPU_MAX(a, b) |
|
#define | STARPU_ASSERT(x) |
|
#define | STARPU_ASSERT_MSG(x, msg, ...) |
|
#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_RMB() |
|
#define | STARPU_WMB() |
|
The following macros allow to make GCC extensions portable, and to have a code which can be compiled with any C compiler.
◆ STARPU_GNUC_PREREQ
#define STARPU_GNUC_PREREQ |
( |
|
maj, |
|
|
|
min |
|
) |
| |
Return true (non-zero) if GCC version MAJ.MIN or later is being used (macro taken from glibc.)
◆ STARPU_UNLIKELY
#define STARPU_UNLIKELY |
( |
|
expr | ) |
|
When building with a GNU C Compiler, this macro allows programmers to mark an expression as unlikely.
◆ STARPU_LIKELY
#define STARPU_LIKELY |
( |
|
expr | ) |
|
When building with a GNU C Compiler, this macro allows programmers to mark an expression as likely.
◆ STARPU_ATTRIBUTE_UNUSED
#define STARPU_ATTRIBUTE_UNUSED |
When building with a GNU C Compiler, this macro is defined to __attribute__((unused))
◆ STARPU_ATTRIBUTE_INTERNAL
#define STARPU_ATTRIBUTE_INTERNAL |
When building with a GNU C Compiler, this macro is defined to __attribute__((visibility ("internal")))
◆ STARPU_ATTRIBUTE_MALLOC
#define STARPU_ATTRIBUTE_MALLOC |
When building with a GNU C Compiler, this macro is defined to __attribute__((malloc))
◆ STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
#define STARPU_ATTRIBUTE_WARN_UNUSED_RESULT |
When building with a GNU C Compiler, this macro is defined to __attribute__((warn_unused_result))
◆ STARPU_ATTRIBUTE_PURE
#define STARPU_ATTRIBUTE_PURE |
When building with a GNU C Compiler, this macro is defined to __attribute__((pure))
◆ STARPU_ATTRIBUTE_ALIGNED
#define STARPU_ATTRIBUTE_ALIGNED |
( |
|
size | ) |
|
When building with a GNU C Compiler, this macro is defined to__attribute__((aligned(size)))
◆ STARPU_WARN_UNUSED_RESULT
#define STARPU_WARN_UNUSED_RESULT |
When building with a GNU C Compiler, this macro is defined to__attribute__((__warn_unused_result__))
◆ STARPU_POISON_PTR
#define STARPU_POISON_PTR |
This macro defines a value which can be used to mark pointers as invalid values.
◆ STARPU_MIN
#define STARPU_MIN |
( |
|
a, |
|
|
|
b |
|
) |
| |
This macro returns the min of the two parameters.
◆ STARPU_MAX
#define STARPU_MAX |
( |
|
a, |
|
|
|
b |
|
) |
| |
This macro returns the max of the two parameters.
◆ STARPU_ASSERT
#define STARPU_ASSERT |
( |
|
x | ) |
|
Unless StarPU has been configured with the option --enable-fast, this macro will abort if the expression is false.
◆ STARPU_ASSERT_MSG
#define STARPU_ASSERT_MSG |
( |
|
x, |
|
|
|
msg, |
|
|
|
... |
|
) |
| |
Unless StarPU has been configured with the option --enable-fast, this macro will abort if the expression is false. The given message will be displayed.
◆ STARPU_ABORT
This macro aborts the program.
◆ STARPU_ABORT_MSG
#define STARPU_ABORT_MSG |
( |
|
msg, |
|
|
|
... |
|
) |
| |
This macro aborts the program, and displays the given message.
◆ STARPU_CHECK_RETURN_VALUE
#define STARPU_CHECK_RETURN_VALUE |
( |
|
err, |
|
|
|
message, |
|
|
|
... |
|
) |
| |
If err
has a value which is not 0, the given message is displayed before aborting.
◆ STARPU_CHECK_RETURN_VALUE_IS
#define STARPU_CHECK_RETURN_VALUE_IS |
( |
|
err, |
|
|
|
value, |
|
|
|
message, |
|
|
|
... |
|
) |
| |
If err
has a value which is not value
, the given message is displayed before aborting.
◆ STARPU_RMB
This macro can be used to do a synchronization.
◆ STARPU_WMB
This macro can be used to do a synchronization.
◆ starpu_get_env_number()
int starpu_get_env_number |
( |
const char * |
str | ) |
|
|
static |
If str
is the name of a existing environment variable which is defined to an integer, the function returns the value of the integer. It returns 0 otherwise.