選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

76 行
2.8KB

  1. // -*- C++ -*-
  2. // Copyright (C) 2007-2020 Free Software Foundation, Inc.
  3. //
  4. // This file is part of the GNU ISO C++ Library. This library is free
  5. // software; you can redistribute it and/or modify it under the terms
  6. // of the GNU General Public License as published by the Free Software
  7. // Foundation; either version 3, or (at your option) any later
  8. // version.
  9. // This library is distributed in the hope that it will be useful, but
  10. // WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. // General Public License for more details.
  13. // Under Section 7 of GPL version 3, you are granted additional
  14. // permissions described in the GCC Runtime Library Exception, version
  15. // 3.1, as published by the Free Software Foundation.
  16. // You should have received a copy of the GNU General Public License and
  17. // a copy of the GCC Runtime Library Exception along with this program;
  18. // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  19. // <http://www.gnu.org/licenses/>.
  20. /** @file parallel/compiletime_settings.h
  21. * @brief Defines on options concerning debugging and performance, at
  22. * compile-time.
  23. * This file is a GNU parallel extension to the Standard C++ Library.
  24. */
  25. // Written by Johannes Singler.
  26. #include <cstdio>
  27. /** @brief Determine verbosity level of the parallel mode.
  28. * Level 1 prints a message each time a parallel-mode function is entered. */
  29. #define _GLIBCXX_VERBOSE_LEVEL 0
  30. /** @def _GLIBCXX_CALL
  31. * @brief Macro to produce log message when entering a function.
  32. * @param __n Input size.
  33. * @see _GLIBCXX_VERBOSE_LEVEL */
  34. #if (_GLIBCXX_VERBOSE_LEVEL == 0)
  35. #define _GLIBCXX_CALL(__n)
  36. #endif
  37. #if (_GLIBCXX_VERBOSE_LEVEL == 1)
  38. #define _GLIBCXX_CALL(__n) \
  39. printf(" %__s:\niam = %d, __n = %ld, __num_threads = %d\n", \
  40. __PRETTY_FUNCTION__, omp_get_thread_num(), (__n), __get_max_threads());
  41. #endif
  42. #ifndef _GLIBCXX_SCALE_DOWN_FPU
  43. /** @brief Use floating-point scaling instead of modulo for mapping
  44. * random numbers to a range. This can be faster on certain CPUs. */
  45. #define _GLIBCXX_SCALE_DOWN_FPU 0
  46. #endif
  47. #ifndef _GLIBCXX_PARALLEL_ASSERTIONS
  48. /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
  49. * Should be switched on only locally. */
  50. #define _GLIBCXX_PARALLEL_ASSERTIONS (_GLIBCXX_ASSERTIONS+0)
  51. #endif
  52. #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
  53. /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
  54. * Consider the size of the L1 cache for
  55. * gnu_parallel::__parallel_random_shuffle(). */
  56. #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 0
  57. #endif
  58. #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
  59. /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
  60. * Consider the size of the TLB for
  61. * gnu_parallel::__parallel_random_shuffle(). */
  62. #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 0
  63. #endif