Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

config.hpp
Go to the documentation of this file.
1 //
2 // immer: immutable data structures for C++
3 // Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
4 //
5 // This software is distributed under the Boost Software License, Version 1.0.
6 // See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
7 //
8 
9 #pragma once
10 
11 #ifndef IMMER_DEBUG_TRACES
12 #define IMMER_DEBUG_TRACES 0
13 #endif
14 
15 #ifndef IMMER_DEBUG_PRINT
16 #define IMMER_DEBUG_PRINT 0
17 #endif
18 
19 #ifndef IMMER_DEBUG_DEEP_CHECK
20 #define IMMER_DEBUG_DEEP_CHECK 0
21 #endif
22 
23 #if IMMER_DEBUG_TRACES || IMMER_DEBUG_PRINT
24 #include <iostream>
25 #include <prettyprint.hpp>
26 #endif
27 
28 #if IMMER_DEBUG_TRACES
29 #define IMMER_TRACE(...) std::cout << __VA_ARGS__ << std::endl
30 #else
31 #define IMMER_TRACE(...)
32 #endif
33 #define IMMER_TRACE_F(...) \
34  IMMER_TRACE(__FILE__ << ":" << __LINE__ << ": " << __VA_ARGS__)
35 #define IMMER_TRACE_E(expr) \
36  IMMER_TRACE(" " << #expr << " = " << (expr))
37 
38 #if defined(_MSC_VER)
39 #define IMMER_UNREACHABLE __assume(false)
40 #define IMMER_LIKELY(cond) cond
41 #define IMMER_UNLIKELY(cond) cond
42 #define IMMER_FORCEINLINE __forceinline
43 #define IMMER_PREFETCH(p)
44 #else
45 #define IMMER_UNREACHABLE __builtin_unreachable()
46 #define IMMER_LIKELY(cond) __builtin_expect(!!(cond), 1)
47 #define IMMER_UNLIKELY(cond) __builtin_expect(!!(cond), 0)
48 #define IMMER_FORCEINLINE inline __attribute__ ((always_inline))
49 #define IMMER_PREFETCH(p)
50 // #define IMMER_PREFETCH(p) __builtin_prefetch(p)
51 #endif
52 
53 #define IMMER_DESCENT_DEEP 0
54 
55 #ifdef NDEBUG
56 #define IMMER_ENABLE_DEBUG_SIZE_HEAP 0
57 #else
58 #define IMMER_ENABLE_DEBUG_SIZE_HEAP 1
59 #endif
60 
61 namespace immer {
62 
63 const auto default_bits = 5;
64 const auto default_free_list_size = 1 << 10;
65 
66 } // namespace immer
const auto default_bits
Definition: config.hpp:63
const auto default_free_list_size
Definition: config.hpp:64
Released under the MIT license