14fee23f9Smrg // -*- C++ -*- 24fee23f9Smrg 3*b1e83836Smrg // Copyright (C) 2007-2022 Free Software Foundation, Inc. 44fee23f9Smrg // 54fee23f9Smrg // This file is part of the GNU ISO C++ Library. This library is free 64fee23f9Smrg // software; you can redistribute it and/or modify it under the terms 74fee23f9Smrg // of the GNU General Public License as published by the Free Software 84fee23f9Smrg // Foundation; either version 3, or (at your option) any later 94fee23f9Smrg // version. 104fee23f9Smrg 114fee23f9Smrg // This library is distributed in the hope that it will be useful, but 124fee23f9Smrg // WITHOUT ANY WARRANTY; without even the implied warranty of 134fee23f9Smrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 144fee23f9Smrg // General Public License for more details. 154fee23f9Smrg 164fee23f9Smrg // Under Section 7 of GPL version 3, you are granted additional 174fee23f9Smrg // permissions described in the GCC Runtime Library Exception, version 184fee23f9Smrg // 3.1, as published by the Free Software Foundation. 194fee23f9Smrg 204fee23f9Smrg // You should have received a copy of the GNU General Public License and 214fee23f9Smrg // a copy of the GCC Runtime Library Exception along with this program; 224fee23f9Smrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 234fee23f9Smrg // <http://www.gnu.org/licenses/>. 244fee23f9Smrg 254fee23f9Smrg /** @file parallel/compiletime_settings.h 264fee23f9Smrg * @brief Defines on options concerning debugging and performance, at 274fee23f9Smrg * compile-time. 284fee23f9Smrg * This file is a GNU parallel extension to the Standard C++ Library. 294fee23f9Smrg */ 304fee23f9Smrg 314fee23f9Smrg // Written by Johannes Singler. 324fee23f9Smrg 334fee23f9Smrg #include <cstdio> 344fee23f9Smrg 354fee23f9Smrg /** @brief Determine verbosity level of the parallel mode. 364fee23f9Smrg * Level 1 prints a message each time a parallel-mode function is entered. */ 374fee23f9Smrg #define _GLIBCXX_VERBOSE_LEVEL 0 384fee23f9Smrg 394fee23f9Smrg /** @def _GLIBCXX_CALL 404fee23f9Smrg * @brief Macro to produce log message when entering a function. 414fee23f9Smrg * @param __n Input size. 424fee23f9Smrg * @see _GLIBCXX_VERBOSE_LEVEL */ 434fee23f9Smrg #if (_GLIBCXX_VERBOSE_LEVEL == 0) 444fee23f9Smrg #define _GLIBCXX_CALL(__n) 454fee23f9Smrg #endif 464fee23f9Smrg #if (_GLIBCXX_VERBOSE_LEVEL == 1) 474fee23f9Smrg #define _GLIBCXX_CALL(__n) \ 484fee23f9Smrg printf(" %__s:\niam = %d, __n = %ld, __num_threads = %d\n", \ 494fee23f9Smrg __PRETTY_FUNCTION__, omp_get_thread_num(), (__n), __get_max_threads()); 504fee23f9Smrg #endif 514fee23f9Smrg 524fee23f9Smrg #ifndef _GLIBCXX_SCALE_DOWN_FPU 534fee23f9Smrg /** @brief Use floating-point scaling instead of modulo for mapping 544fee23f9Smrg * random numbers to a range. This can be faster on certain CPUs. */ 554fee23f9Smrg #define _GLIBCXX_SCALE_DOWN_FPU 0 564fee23f9Smrg #endif 574fee23f9Smrg 58b17d1066Smrg #ifndef _GLIBCXX_PARALLEL_ASSERTIONS 59b17d1066Smrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 60b17d1066Smrg * Should be switched on only locally. */ 61b17d1066Smrg #define _GLIBCXX_PARALLEL_ASSERTIONS (_GLIBCXX_ASSERTIONS+0) 62b17d1066Smrg #endif 63b17d1066Smrg 644fee23f9Smrg #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 654fee23f9Smrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 664fee23f9Smrg * Consider the size of the L1 cache for 674fee23f9Smrg * gnu_parallel::__parallel_random_shuffle(). */ 684fee23f9Smrg #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_L1 0 694fee23f9Smrg #endif 704fee23f9Smrg #ifndef _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 714fee23f9Smrg /** @brief Switch on many _GLIBCXX_PARALLEL_ASSERTions in parallel code. 724fee23f9Smrg * Consider the size of the TLB for 734fee23f9Smrg * gnu_parallel::__parallel_random_shuffle(). */ 744fee23f9Smrg #define _GLIBCXX_RANDOM_SHUFFLE_CONSIDER_TLB 0 754fee23f9Smrg #endif 76