StarPU Handbook
Toolbox

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_INTERNAL
 
#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_WARN_UNUSED_RESULT
 
#define STARPU_BACKTRACE_LENGTH
 
#define STARPU_DUMP_BACKTRACE()
 
#define STARPU_SIMGRID_ASSERT(x)
 
#define STARPU_ASSERT(x)
 
#define STARPU_ASSERT_ACCESSIBLE(ptr)
 
#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_RMB()
 
#define STARPU_WMB()
 

Detailed Description

The following macros allow to make GCC extensions portable, and to have a code which can be compiled with any C compiler.

Macro Definition Documentation

◆ 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, allow programmers to mark an expression as unlikely.

◆ STARPU_LIKELY

#define STARPU_LIKELY (   expr)

When building with a GNU C Compiler, allow programmers to mark an expression as likely.

◆ STARPU_ATTRIBUTE_UNUSED

#define STARPU_ATTRIBUTE_UNUSED

When building with a GNU C Compiler, defined to __attribute__((unused))

◆ STARPU_ATTRIBUTE_NORETURN

#define STARPU_ATTRIBUTE_NORETURN

When building with a GNU C Compiler, defined to __attribute__((noreturn))

◆ STARPU_ATTRIBUTE_INTERNAL

#define STARPU_ATTRIBUTE_INTERNAL

When building with a GNU C Compiler, defined to __attribute__((visibility ("internal")))

◆ STARPU_ATTRIBUTE_MALLOC

#define STARPU_ATTRIBUTE_MALLOC

When building with a GNU C Compiler, defined to __attribute__((malloc))

◆ STARPU_ATTRIBUTE_WARN_UNUSED_RESULT

#define STARPU_ATTRIBUTE_WARN_UNUSED_RESULT

When building with a GNU C Compiler, defined to __attribute__((warn_unused_result))

◆ STARPU_ATTRIBUTE_PURE

#define STARPU_ATTRIBUTE_PURE

When building with a GNU C Compiler, defined to __attribute__((pure))

◆ STARPU_ATTRIBUTE_ALIGNED

#define STARPU_ATTRIBUTE_ALIGNED (   size)

When building with a GNU C Compiler, defined to__attribute__((aligned(size)))

◆ STARPU_ASSERT

#define STARPU_ASSERT (   x)

Unless StarPU has been configured with the option --enable-fast, this macro will abort if the expression x 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 x is false. The string msg will be displayed.

◆ STARPU_ABORT

#define STARPU_ABORT ( )

Abort the program.

◆ STARPU_ABORT_MSG

#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

◆ STARPU_CHECK_RETURN_VALUE

#define STARPU_CHECK_RETURN_VALUE (   err,
  message,
  ... 
)

Abort the program (after displaying message) if err has a value which is not 0.

◆ STARPU_CHECK_RETURN_VALUE_IS

#define STARPU_CHECK_RETURN_VALUE_IS (   err,
  value,
  message,
  ... 
)

Abort the program (after displaying message) if err is different from value.

◆ STARPU_RMB

#define STARPU_RMB ( )

This macro can be used to do a synchronization.

◆ STARPU_WMB

#define STARPU_WMB ( )

This macro can be used to do a synchronization.