toolbox.doxy 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 Centre National de la Recherche Scientifique
  5. * Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
  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 MAJ.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, this macro allows programmers to mark an expression as unlikely.
  17. \def STARPU_LIKELY
  18. \ingroup API_Toolbox
  19. When building with a GNU C Compiler, this macro allows programmers to mark an expression as likely.
  20. \def STARPU_ATTRIBUTE_UNUSED
  21. \ingroup API_Toolbox
  22. When building with a GNU C Compiler, this macro is defined to __attribute__((unused))
  23. \def STARPU_ATTRIBUTE_INTERNAL
  24. \ingroup API_Toolbox
  25. When building with a GNU C Compiler, this macro is defined to __attribute__((visibility ("internal")))
  26. \def STARPU_ATTRIBUTE_MALLOC
  27. \ingroup API_Toolbox
  28. When building with a GNU C Compiler, this macro is defined to __attribute__((malloc))
  29. \def STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
  30. \ingroup API_Toolbox
  31. When building with a GNU C Compiler, this macro is defined to __attribute__((warn_unused_result))
  32. \def STARPU_ATTRIBUTE_PURE
  33. \ingroup API_Toolbox
  34. When building with a GNU C Compiler, this macro is defined to __attribute__((pure))
  35. \def STARPU_ATTRIBUTE_ALIGNED
  36. \ingroup API_Toolbox
  37. When building with a GNU C Compiler, this macro is defined to__attribute__((aligned(size)))
  38. \def STARPU_WARN_UNUSED_RESULT
  39. \ingroup API_Toolbox
  40. When building with a GNU C Compiler, this macro is defined to__attribute__((__warn_unused_result__))
  41. \def STARPU_POISON_PTR
  42. \ingroup API_Toolbox
  43. This macro defines a value which can be used to mark pointers as
  44. invalid values.
  45. \def STARPU_MIN
  46. \ingroup API_Toolbox
  47. This macro returns the min of the two parameters.
  48. \def STARPU_MAX
  49. \ingroup API_Toolbox
  50. This macro returns the max of the two parameters.
  51. \def STARPU_ASSERT
  52. \ingroup API_Toolbox
  53. Unless StarPU has been configured with the option \ref enable-fast
  54. "--enable-fast", this macro will abort if the expression is false.
  55. \def STARPU_ASSERT_MSG
  56. \ingroup API_Toolbox
  57. Unless StarPU has been configured with the option \ref enable-fast
  58. "--enable-fast", this macro will abort if the expression is false. The
  59. given message will be displayed.
  60. \def STARPU_ABORT
  61. \ingroup API_Toolbox
  62. This macro aborts the program.
  63. \def STARPU_ABORT_MSG
  64. \ingroup API_Toolbox
  65. This macro aborts the program, and displays the given message.
  66. \def STARPU_CHECK_RETURN_VALUE
  67. \ingroup API_Toolbox
  68. If \p err has a value which is not 0, the given message is displayed
  69. before aborting.
  70. \def STARPU_CHECK_RETURN_VALUE_IS
  71. \ingroup API_Toolbox
  72. If \p err has a value which is not \p value, the given message is displayed
  73. before aborting.
  74. \def STARPU_RMB
  75. \ingroup API_Toolbox
  76. This macro can be used to do a synchronization.
  77. \def STARPU_WMB
  78. \ingroup API_Toolbox
  79. This macro can be used to do a synchronization.
  80. \fn int starpu_get_env_number(const char *str)
  81. \ingroup API_Toolbox
  82. If \p str is the name of a existing environment variable which is
  83. defined to an integer, the function returns the value of the integer.
  84. It returns 0 otherwise.
  85. */