toolbox.doxy 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2009--2011 Universit@'e de Bordeaux
  4. * Copyright (C) 2010, 2011, 2012, 2013, 2017 CNRS
  5. * Copyright (C) 2011, 2012 INRIA
  6. * See the file version.doxy for copying conditions.
  7. */
  8. /*! \defgroup API_Toolbox Toolbox
  9. \brief The following macros allow to make GCC extensions portable, and
  10. to have a code which can be compiled with any C compiler.
  11. \def STARPU_GNUC_PREREQ
  12. \ingroup API_Toolbox
  13. Return true (non-zero) if GCC version \p maj.\p min or later is being used (macro taken from glibc.)
  14. \def STARPU_UNLIKELY
  15. \ingroup API_Toolbox
  16. When building with a GNU C Compiler, allow programmers to mark an expression as unlikely.
  17. \def STARPU_LIKELY
  18. \ingroup API_Toolbox
  19. When building with a GNU C Compiler, allow programmers to mark an expression as likely.
  20. \def STARPU_ATTRIBUTE_UNUSED
  21. \ingroup API_Toolbox
  22. When building with a GNU C Compiler, defined to __attribute__((unused))
  23. \def STARPU_ATTRIBUTE_INTERNAL
  24. \ingroup API_Toolbox
  25. When building with a GNU C Compiler, defined to __attribute__((visibility ("internal")))
  26. \def STARPU_ATTRIBUTE_MALLOC
  27. \ingroup API_Toolbox
  28. When building with a GNU C Compiler, defined to __attribute__((malloc))
  29. \def STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
  30. \ingroup API_Toolbox
  31. When building with a GNU C Compiler, defined to __attribute__((warn_unused_result))
  32. \def STARPU_ATTRIBUTE_PURE
  33. \ingroup API_Toolbox
  34. When building with a GNU C Compiler, defined to __attribute__((pure))
  35. \def STARPU_ATTRIBUTE_ALIGNED
  36. \ingroup API_Toolbox
  37. When building with a GNU C Compiler, defined to__attribute__((aligned(size)))
  38. \def STARPU_WARN_UNUSED_RESULT
  39. \ingroup API_Toolbox
  40. When building with a GNU C Compiler, defined to__attribute__((__warn_unused_result__))
  41. \def STARPU_POISON_PTR
  42. \ingroup API_Toolbox
  43. Define a value which can be used to mark pointers as invalid values.
  44. \def STARPU_MIN
  45. \ingroup API_Toolbox
  46. Return the min of the two parameters.
  47. \def STARPU_MAX
  48. \ingroup API_Toolbox
  49. Return the max of the two parameters.
  50. \def STARPU_ASSERT
  51. \ingroup API_Toolbox
  52. Unless StarPU has been configured with the option \ref enable-fast
  53. "--enable-fast", this macro will abort if the expression is false.
  54. \def STARPU_ASSERT_MSG
  55. \ingroup API_Toolbox
  56. Unless StarPU has been configured with the option \ref enable-fast
  57. "--enable-fast", this macro will abort if the expression is false. The
  58. given message will be displayed.
  59. \def STARPU_ABORT
  60. \ingroup API_Toolbox
  61. Abort the program.
  62. \def STARPU_ABORT_MSG
  63. \ingroup API_Toolbox
  64. Abort the program, and display the given message.
  65. \def STARPU_CHECK_RETURN_VALUE
  66. \ingroup API_Toolbox
  67. Abort the program (after displaying \p message) if \p err has a value which is not 0.
  68. \def STARPU_CHECK_RETURN_VALUE_IS
  69. \ingroup API_Toolbox
  70. Abort the program (after displaying \p message) if \p err is different from \p value.
  71. \def STARPU_RMB
  72. \ingroup API_Toolbox
  73. This macro can be used to do a synchronization.
  74. \def STARPU_WMB
  75. \ingroup API_Toolbox
  76. This macro can be used to do a synchronization.
  77. \fn int starpu_get_env_number(const char *str)
  78. \ingroup API_Toolbox
  79. Return the integer value of the environment variable named \p str.
  80. Return 0 otherwise (the variable does not exist or has a non-integer
  81. value).
  82. */