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