toolbox.doxy 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010-2013,2015,2017 CNRS
  4. * Copyright (C) 2009-2011,2014 Université de Bordeaux
  5. * Copyright (C) 2011,2012 Inria
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. /*! \defgroup API_Toolbox Toolbox
  19. \brief The following macros allow to make GCC extensions portable, and
  20. to have a code which can be compiled with any C compiler.
  21. \def STARPU_GNUC_PREREQ
  22. \ingroup API_Toolbox
  23. Return true (non-zero) if GCC version \p maj.\p min or later is being used (macro taken from glibc.)
  24. \def STARPU_UNLIKELY
  25. \ingroup API_Toolbox
  26. When building with a GNU C Compiler, allow programmers to mark an expression as unlikely.
  27. \def STARPU_LIKELY
  28. \ingroup API_Toolbox
  29. When building with a GNU C Compiler, allow programmers to mark an expression as likely.
  30. \def STARPU_ATTRIBUTE_UNUSED
  31. \ingroup API_Toolbox
  32. When building with a GNU C Compiler, defined to __attribute__((unused))
  33. \def STARPU_ATTRIBUTE_INTERNAL
  34. \ingroup API_Toolbox
  35. When building with a GNU C Compiler, defined to __attribute__((visibility ("internal")))
  36. \def STARPU_ATTRIBUTE_MALLOC
  37. \ingroup API_Toolbox
  38. When building with a GNU C Compiler, defined to __attribute__((malloc))
  39. \def STARPU_ATTRIBUTE_WARN_UNUSED_RESULT
  40. \ingroup API_Toolbox
  41. When building with a GNU C Compiler, defined to __attribute__((warn_unused_result))
  42. \def STARPU_ATTRIBUTE_PURE
  43. \ingroup API_Toolbox
  44. When building with a GNU C Compiler, defined to __attribute__((pure))
  45. \def STARPU_ATTRIBUTE_ALIGNED
  46. \ingroup API_Toolbox
  47. When building with a GNU C Compiler, defined to__attribute__((aligned(size)))
  48. \def STARPU_WARN_UNUSED_RESULT
  49. \ingroup API_Toolbox
  50. When building with a GNU C Compiler, defined to__attribute__((__warn_unused_result__))
  51. \def STARPU_POISON_PTR
  52. \ingroup API_Toolbox
  53. Define a value which can be used to mark pointers as invalid values.
  54. \def STARPU_MIN
  55. \ingroup API_Toolbox
  56. Return the min of the two parameters.
  57. \def STARPU_MAX
  58. \ingroup API_Toolbox
  59. Return the max of the two parameters.
  60. \def STARPU_ASSERT
  61. \ingroup API_Toolbox
  62. Unless StarPU has been configured with the option \ref enable-fast
  63. "--enable-fast", this macro will abort if the expression is false.
  64. \def STARPU_ASSERT_MSG
  65. \ingroup API_Toolbox
  66. Unless StarPU has been configured with the option \ref enable-fast
  67. "--enable-fast", this macro will abort if the expression is false. The
  68. given message will be displayed.
  69. \def STARPU_ABORT
  70. \ingroup API_Toolbox
  71. Abort the program.
  72. \def STARPU_ABORT_MSG
  73. \ingroup API_Toolbox
  74. Abort the program, and display the given message.
  75. \def STARPU_CHECK_RETURN_VALUE
  76. \ingroup API_Toolbox
  77. Abort the program (after displaying \p message) if \p err has a value which is not 0.
  78. \def STARPU_CHECK_RETURN_VALUE_IS
  79. \ingroup API_Toolbox
  80. Abort the program (after displaying \p message) if \p err is different from \p value.
  81. \def STARPU_RMB
  82. \ingroup API_Toolbox
  83. This macro can be used to do a synchronization.
  84. \def STARPU_WMB
  85. \ingroup API_Toolbox
  86. This macro can be used to do a synchronization.
  87. \fn int starpu_get_env_number(const char *str)
  88. \ingroup API_Toolbox
  89. Return the integer value of the environment variable named \p str.
  90. Return 0 otherwise (the variable does not exist or has a non-integer
  91. value).
  92. */