STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
compiletime_settings.h
Go to the documentation of this file.
1 /***************************************************************************
2  * include/stxxl/bits/parallel/compiletime_settings.h
3  *
4  * Defines on options concerning debugging and performance, at compile-time.
5  * Extracted from MCSTL - http://algo2.iti.uni-karlsruhe.de/singler/mcstl/
6  *
7  * Part of the STXXL. See http://stxxl.sourceforge.net
8  *
9  * Copyright (C) 2007 Johannes Singler <[email protected]>
10  * Copyright (C) 2014 Timo Bingmann <[email protected]>
11  *
12  * Distributed under the Boost Software License, Version 1.0.
13  * (See accompanying file LICENSE_1_0.txt or copy at
14  * http://www.boost.org/LICENSE_1_0.txt)
15  **************************************************************************/
16 
17 #ifndef STXXL_PARALLEL_COMPILETIME_SETTINGS_HEADER
18 #define STXXL_PARALLEL_COMPILETIME_SETTINGS_HEADER
19 
20 #include <stxxl/bits/namespace.h>
21 #include <stxxl/bits/config.h>
23 #include <cstdio>
24 
26 
27 namespace parallel {
28 
29 /** STXXL_PARALLEL_PCALL Macro to produce log message when entering a
30  * function.
31  * \param n Input size.
32  * \see STXXL_VERBOSE_LEVEL */
33 #if (STXXL_VERBOSE_LEVEL <= 0)
34 #define STXXL_PARALLEL_PCALL(n)
35 #endif
36 
37 #if (STXXL_VERBOSE_LEVEL >= 1)
38 #if STXXL_PARALLEL
39 #define STXXL_PARALLEL_PCALL(n) \
40  STXXL_MSG(" " << __FUNCTION__ << ":\n" \
41  "iam = " << omp_get_thread_num() << ", " \
42  "n = " << (n) << ", " \
43  "num_threads = " << SETTINGS::num_threads);
44 #else
45 #define STXXL_PARALLEL_PCALL(n) \
46  STXXL_MSG(" " << __FUNCTION__ << ":\n" \
47  "iam = single-threaded, " \
48  "n = " << (n) << ", " \
49  "num_threads = " << SETTINGS::num_threads);
50 #endif
51 #endif
52 
53 /** First copy the data, sort it locally, and merge it back (0); or copy it
54  * back after everyting is done (1).
55  *
56  * Recommendation: 0 */
57 #define STXXL_MULTIWAY_MERGESORT_COPY_LAST 0
58 
59 } // namespace parallel
60 
62 
63 #endif // !STXXL_PARALLEL_COMPILETIME_SETTINGS_HEADER
#define STXXL_BEGIN_NAMESPACE
Definition: namespace.h:16
#define STXXL_END_NAMESPACE
Definition: namespace.h:17