main page
modules
namespaces
classes
files
Gecode home
Generated on Thu Apr 5 2018 19:44:19 for Gecode by
doxygen
1.8.13
gecode
support.hh
Go to the documentation of this file.
1
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2
/*
3
* Main authors:
4
* Christian Schulte <schulte@gecode.org>
5
*
6
* Copyright:
7
* Christian Schulte, 2007
8
*
9
* Last modified:
10
* $Date$ by $Author$
11
* $Revision$
12
*
13
* This file is part of Gecode, the generic constraint
14
* development environment:
15
* http://www.gecode.org
16
*
17
* Permission is hereby granted, free of charge, to any person obtaining
18
* a copy of this software and associated documentation files (the
19
* "Software"), to deal in the Software without restriction, including
20
* without limitation the rights to use, copy, modify, merge, publish,
21
* distribute, sublicense, and/or sell copies of the Software, and to
22
* permit persons to whom the Software is furnished to do so, subject to
23
* the following conditions:
24
*
25
* The above copyright notice and this permission notice shall be
26
* included in all copies or substantial portions of the Software.
27
*
28
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
*
36
*/
37
38
#ifndef __GECODE_SUPPORT_HH__
39
#define __GECODE_SUPPORT_HH__
40
41
#include <cassert>
42
43
#include <
gecode/support/config.hpp
>
44
45
/*
46
* Linking and compiler workarounds
47
*
48
*/
49
#if !defined(GECODE_STATIC_LIBS) && \
50
(defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
51
58
#define GECODE_MSC_VIRTUAL virtual
59
60
#ifdef GECODE_BUILD_SUPPORT
61
#define GECODE_SUPPORT_EXPORT __declspec( dllexport )
62
#else
63
#define GECODE_SUPPORT_EXPORT __declspec( dllimport )
64
#endif
65
#define GECODE_VTABLE_EXPORT
66
67
#else
68
69
#define GECODE_MSC_VIRTUAL
70
71
#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
72
#define GECODE_SUPPORT_EXPORT __attribute__ ((visibility("default")))
73
#define GECODE_VTABLE_EXPORT __attribute__ ((visibility("default")))
74
#else
75
#define GECODE_SUPPORT_EXPORT
76
#define GECODE_VTABLE_EXPORT
77
#endif
78
79
#endif
80
81
// Configure auto-linking
82
#ifndef GECODE_BUILD_SUPPORT
83
#define GECODE_LIBRARY_NAME "Support"
84
#include <
gecode/support/auto-link.hpp
>
85
#endif
86
87
// Configure threads
88
#ifdef GECODE_THREADS_WINDOWS
89
#define GECODE_HAS_THREADS
90
#endif
91
92
#ifdef GECODE_THREADS_PTHREADS
93
#define GECODE_HAS_THREADS
94
#endif
95
96
97
/*
98
* Basic support needed everywhere
99
*
100
*/
101
102
#include <
gecode/support/macros.hpp
>
103
#include <
gecode/support/exception.hpp
>
104
#include <
gecode/support/cast.hpp
>
105
#include <
gecode/support/hash.hpp
>
106
#include <
gecode/support/thread.hpp
>
107
#include <
gecode/support/allocator.hpp
>
108
#include <
gecode/support/heap.hpp
>
109
#include <
gecode/support/marked-pointer.hpp
>
110
#include <
gecode/support/int-type.hpp
>
111
112
/*
113
* Common datastructures and algorithms
114
*
115
*/
116
117
#include <
gecode/support/bitset-base.hpp
>
118
#include <
gecode/support/bitset.hpp
>
119
#include <
gecode/support/bitset-offset.hpp
>
120
#include <
gecode/support/block-allocator.hpp
>
121
#include <
gecode/support/dynamic-array.hpp
>
122
#include <
gecode/support/dynamic-queue.hpp
>
123
#include <
gecode/support/dynamic-stack.hpp
>
124
#include <
gecode/support/random.hpp
>
125
#include <
gecode/support/sort.hpp
>
126
#include <
gecode/support/static-stack.hpp
>
127
128
129
/*
130
* Operating system support
131
*
132
*/
133
134
#ifdef GECODE_THREADS_WINDOWS
135
#include <
gecode/support/thread/windows.hpp
>
136
#endif
137
#ifdef GECODE_THREADS_PTHREADS
138
#include <
gecode/support/thread/pthreads.hpp
>
139
#endif
140
#ifndef GECODE_HAS_THREADS
141
#include <
gecode/support/thread/none.hpp
>
142
#endif
143
144
#include <
gecode/support/thread/thread.hpp
>
145
146
#include <
gecode/support/ref-count.hpp
>
147
148
#include <
gecode/support/timer.hpp
>
149
#include <
gecode/support/hw-rnd.hpp
>
150
151
/*
152
* Miscellaneous
153
*
154
*/
155
156
#include <
gecode/support/run-jobs.hpp
>
157
158
#endif
159
160
// STATISTICS: support-any
macros.hpp
pthreads.hpp
windows.hpp
int-type.hpp
dynamic-stack.hpp
none.hpp
bitset.hpp
marked-pointer.hpp
bitset-base.hpp
ref-count.hpp
run-jobs.hpp
hw-rnd.hpp
dynamic-array.hpp
auto-link.hpp
config.hpp
block-allocator.hpp
thread.hpp
heap.hpp
allocator.hpp
cast.hpp
timer.hpp
thread.hpp
sort.hpp
random.hpp
static-stack.hpp
dynamic-queue.hpp
bitset-offset.hpp
hash.hpp
exception.hpp