Loading...
Searching...
No Matches
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_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

## 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_VISIBILITY_DEFAULT

#define STARPU_ATTRIBUTE_VISIBILITY_DEFAULT

When building with a GNU C Compiler, defined to attribute((visibility ("default")))

## STARPU_VISIBILITY_PUSH_HIDDEN

#define STARPU_VISIBILITY_PUSH_HIDDEN

When building with a GNU C Compiler, defined to #pragma GCC visibility push(hidden)

## STARPU_VISIBILITY_POP

#define STARPU_VISIBILITY_POP

When building with a GNU C Compiler, defined to #pragma GCC visibility pop

## 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_ACCESSIBLE

#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.

## STARPU_STATIC_ASSERT

#define STARPU_STATIC_ASSERT | ( |  | x | ) |

This macro will abort compilation 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.