136ac495dSmrg // -*- C++ -*- 236ac495dSmrg 3*8feb0f0bSmrg // Copyright (C) 2007-2020 Free Software Foundation, Inc. 436ac495dSmrg // 536ac495dSmrg // This file is part of the GNU ISO C++ Library. This library is free 636ac495dSmrg // software; you can redistribute it and/or modify it under the terms 736ac495dSmrg // of the GNU General Public License as published by the Free Software 836ac495dSmrg // Foundation; either version 3, or (at your option) any later 936ac495dSmrg // version. 1036ac495dSmrg 1136ac495dSmrg // This library is distributed in the hope that it will be useful, but 1236ac495dSmrg // WITHOUT ANY WARRANTY; without even the implied warranty of 1336ac495dSmrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1436ac495dSmrg // General Public License for more details. 1536ac495dSmrg 1636ac495dSmrg // Under Section 7 of GPL version 3, you are granted additional 1736ac495dSmrg // permissions described in the GCC Runtime Library Exception, version 1836ac495dSmrg // 3.1, as published by the Free Software Foundation. 1936ac495dSmrg 2036ac495dSmrg // You should have received a copy of the GNU General Public License and 2136ac495dSmrg // a copy of the GCC Runtime Library Exception along with this program; 2236ac495dSmrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 2336ac495dSmrg // <http://www.gnu.org/licenses/>. 2436ac495dSmrg 2536ac495dSmrg /** @file parallel/compiletime_settings.h 2636ac495dSmrg * @brief Defines on options concerning debugging and performance, at 2736ac495dSmrg * compile-time. 2836ac495dSmrg * This file is a GNU parallel extension to the Standard C++ Library. 2936ac495dSmrg */ 3036ac495dSmrg 3136ac495dSmrg // Written by Johannes Singler. 3236ac495dSmrg 3336ac495dSmrg #include <cstdio> 3436ac495dSmrg 3536ac495dSmrg /** @brief Determine verbosity level of the parallel mode. 3636ac495dSmrg * Level 1 prints a message each time a parallel-mode function is entered. */ 3736ac495dSmrg #define _GLIBCXX_VERBOSE_LEVEL 0 3836ac495dSmrg 3936ac495dSmrg /** @def _GLIBCXX_CALL 4036ac495dSmrg * @brief Macro to produce log message when entering a function. 4136ac495dSmrg * @param __n Input size. 4236ac495dSmrg * @see _GLIBCXX_VERBOSE_LEVEL */ 4336ac495dSmrg #if (_GLIBCXX_VERBOSE_LEVEL == 0) 4436ac495dSmrg #define _GLIBCXX_CALL(__n) 4536ac495dSmrg #endif 4636ac495dSmrg #if (_GLIBCXX_VERBOSE_LEVEL == 1) 4736ac495dSmrg #define _GLIBCXX_CALL(__n) \ 4836ac495dSmrg printf(" %__s:\niam = %d, __n = %ld, __num_threads = %d\n", \ 4936ac495dSmrg __PRETTY_FUNCTION__, omp_get_thread_num(), (__n), __get_max_threads()); 5036ac495dSmrg #endif 5136ac495dSmrg 5236ac495dSmrg #ifndef _GLIBCXX_SCALE_DOWN_FPU 5336ac495dSmrg /** @brief Use floating-point scaling instead of modulo for mapping 5436ac495dSmrg * random numbers to a range. This can be faster on certain CPUs. */ 5536ac495dSmrg #define _GLIBCXX_SCALE_DOWN_FPU 0 5636ac495dSmrg #endif 5736ac495dSmrg 5836ac495dSmrg #ifndef _GLIBCXX_PARALLEL_ASSERTIONS 5936ac495dSmrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 6036ac495dSmrg * Should be switched on only locally. */ 6136ac495dSmrg #define _GLIBCXX_PARALLEL_ASSERTIONS (_GLIBCXX_ASSERTIONS+0) 6236ac495dSmrg #endif 6336ac495dSmrg 6436ac495dSmrg #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 6536ac495dSmrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 6636ac495dSmrg * Consider the size of the L1 cache for 6736ac495dSmrg * gnu_parallel::__parallel_random_shuffle(). */ 6836ac495dSmrg #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 0 6936ac495dSmrg #endif 7036ac495dSmrg #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 7136ac495dSmrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 7236ac495dSmrg * Consider the size of the TLB for 7336ac495dSmrg * gnu_parallel::__parallel_random_shuffle(). */ 7436ac495dSmrg #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 0 7536ac495dSmrg #endif 76