home
about
news
download
doc
source
systems
tests
bugs
contact
IMP Reference Guide
2.12.0
The Integrative Modeling Platform
IMP Manual
Reference Guide
Tutorial Index
Modules
Classes
Examples
include
IMP
version 2.12.0
set_map_macros.h
Go to the documentation of this file.
1
/**
2
* \file IMP/set_map_macros.h
3
* \brief Macros to choose the best set or map for different purposes.
4
*
5
* Copyright 2007-2019 IMP Inventors. All rights reserved.
6
*
7
*/
8
9
#ifndef IMPKERNEL_SET_MAP_MACROS_H
10
#define IMPKERNEL_SET_MAP_MACROS_H
11
12
#ifdef IMP_DOXYGEN
13
//! Macro to support platform independent declaration of a small ordered set
14
/** Declare a small, ordered set like IMP_KERNEL_SMALL_ORDERED_SET<item>. */
15
#define IMP_KERNEL_SMALL_ORDERED_SET boost::container::flat_set
16
//! Macro to support platform independent declaration of a small ordered map
17
/** Declare a small, ordered set like IMP_KERNEL_SMALL_ORDERED_MAP<key, value>. */
18
#define IMP_KERNEL_SMALL_ORDERED_MAP boost::container::flat_map
19
//! Macro to support platform independent declaration of a small unordered set
20
/** Declare a small, ordered set like IMP_KERNEL_SMALL_UNORDERED_SET<item>. */
21
#define IMP_KERNEL_SMALL_UNORDERED_SET boost::container::flat_set
22
//! Macro to support platform independent declaration of a small unordered map
23
/** Declare a small, ordered set like IMP_KERNEL_SMALL_UNORDERED_MAP<key, value>.
24
*/
25
#define IMP_KERNEL_SMALL_UNORDERED_MAP boost::container::flat_map
26
//! Macro to support platform independent declaration of a large ordered set
27
/** Declare a small, ordered set like IMP_KERNEL_LARGE_ORDERED_SET<item>. */
28
#define IMP_KERNEL_LARGE_ORDERED_SET std::set
29
//! Macro to support platform independent declaration of a large ordered map
30
/** Declare a small, ordered set like IMP_KERNEL_LARGE_ORDERED_MAP<key, value>. */
31
#define IMP_KERNEL_LARGE_ORDERED_MAP std::map
32
//! Macro to support platform independent declaration of a large unordered set
33
/** Declare a small, ordered set like IMP_KERNEL_LARGE_UNORDERED_SET<item>. */
34
#define IMP_KERNEL_LARGE_UNORDERED_SET boost::unordered_set
35
//! Macro to support platform independent declaration of a large unordered map
36
/** Declare a small, ordered set like IMP_KERNEL_LARGE_UNORDERED_MAP<key, value>.
37
*/
38
#define IMP_KERNEL_LARGE_UNORDERED_MAP boost::unordered_map
39
40
#else
41
42
#include "IMP/kernel_config.h"
43
#include <boost/version.hpp>
44
#include <boost/functional/hash/hash.hpp>
// IWYU pragma: export
45
46
#include <boost/functional/hash/hash.hpp>
// IWYU pragma: export
47
#include <set>
// IWYU pragma: export
48
#include <map>
// IWYU pragma: export
49
#include <boost/unordered_set.hpp>
// IWYU pragma: export
50
#include <boost/unordered_map.hpp>
// IWYU pragma: export
51
52
#define IMP_KERNEL_LARGE_ORDERED_SET std::set
53
#define IMP_KERNEL_LARGE_ORDERED_MAP std::map
54
#define IMP_KERNEL_LARGE_UNORDERED_SET boost::unordered_set
55
#define IMP_KERNEL_LARGE_UNORDERED_MAP boost::unordered_map
56
57
#if BOOST_VERSION < 104900 || defined(_MSC_VER) && _MSC_VER <= 1500
58
#include <set>
// IWYU pragma: export
59
#include <map>
// IWYU pragma: export
60
#include <boost/unordered_set.hpp>
// IWYU pragma: export
61
#include <boost/unordered_map.hpp>
// IWYU pragma: export
62
63
#define IMP_KERNEL_SMALL_ORDERED_SET std::set
64
#define IMP_KERNEL_SMALL_ORDERED_MAP std::map
65
#define IMP_KERNEL_SMALL_UNORDERED_SET boost::unordered_set
66
#define IMP_KERNEL_SMALL_UNORDERED_MAP boost::unordered_map
67
#else
68
#include <boost/container/flat_set.hpp>
// IWYU pragma: export
69
#include <boost/container/flat_map.hpp>
// IWYU pragma: export
70
#define IMP_KERNEL_SMALL_ORDERED_SET boost::container::flat_set
71
#define IMP_KERNEL_SMALL_ORDERED_MAP boost::container::flat_map
72
#define IMP_KERNEL_SMALL_UNORDERED_SET boost::container::flat_set
73
#define IMP_KERNEL_SMALL_UNORDERED_MAP boost::container::flat_map
74
#endif
75
#endif
76
77
#endif
/* IMPKERNEL_SET_MAP_MACROS_H */