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