libstdc++
compiletime_settings.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
3
// Copyright (C) 2007-2020 Free Software Foundation, Inc.
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
8
// Foundation; either version 3, or (at your option) any later
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
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/>.
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.
36
* Level 1 prints a message each time a parallel-mode function is entered. */
37
#define _GLIBCXX_VERBOSE_LEVEL 0
38
39
/** @def _GLIBCXX_CALL
40
* @brief Macro to produce log message when entering a function.
41
* @param __n Input size.
42
* @see _GLIBCXX_VERBOSE_LEVEL */
43
#if (_GLIBCXX_VERBOSE_LEVEL == 0)
44
#define _GLIBCXX_CALL(__n)
45
#endif
46
#if (_GLIBCXX_VERBOSE_LEVEL == 1)
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());
50
#endif
51
52
#ifndef _GLIBCXX_SCALE_DOWN_FPU
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
56
#endif
57
58
#ifndef _GLIBCXX_PARALLEL_ASSERTIONS
59
/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
60
* Should be switched on only locally. */
61
#define _GLIBCXX_PARALLEL_ASSERTIONS (_GLIBCXX_ASSERTIONS+0)
62
#endif
63
64
#ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1
65
/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
66
* Consider the size of the L1 cache for
67
* gnu_parallel::__parallel_random_shuffle(). */
68
#define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 0
69
#endif
70
#ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB
71
/** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code.
72
* Consider the size of the TLB for
73
* gnu_parallel::__parallel_random_shuffle(). */
74
#define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 0
75
#endif
cstdio
include
parallel
compiletime_settings.h
Generated by
1.9.1