main page
modules
namespaces
classes
files
Gecode home
Generated on Wed Jan 24 2018 21:22:26 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: 2017-01-09 14:28:29 +0100 (Mon, 09 Jan 2017) $ by $Author: schulte $
11
* $Revision: 15362 $
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/thread.hpp
>
106
#include <
gecode/support/allocator.hpp
>
107
#include <
gecode/support/heap.hpp
>
108
#include <
gecode/support/marked-pointer.hpp
>
109
#include <
gecode/support/int-type.hpp
>
110
111
/*
112
* Common datastructures and algorithms
113
*
114
*/
115
116
#include <
gecode/support/bitset-base.hpp
>
117
#include <
gecode/support/bitset.hpp
>
118
#include <
gecode/support/bitset-offset.hpp
>
119
#include <
gecode/support/block-allocator.hpp
>
120
#include <
gecode/support/dynamic-array.hpp
>
121
#include <
gecode/support/dynamic-queue.hpp
>
122
#include <
gecode/support/dynamic-stack.hpp
>
123
#include <
gecode/support/random.hpp
>
124
#include <
gecode/support/sort.hpp
>
125
#include <
gecode/support/static-stack.hpp
>
126
127
128
/*
129
* Operating system support
130
*
131
*/
132
133
#ifdef GECODE_THREADS_WINDOWS
134
#include <
gecode/support/thread/windows.hpp
>
135
#endif
136
#ifdef GECODE_THREADS_PTHREADS
137
#include <
gecode/support/thread/pthreads.hpp
>
138
#endif
139
#ifndef GECODE_HAS_THREADS
140
#include <
gecode/support/thread/none.hpp
>
141
#endif
142
143
#include <
gecode/support/thread/thread.hpp
>
144
145
#include <
gecode/support/timer.hpp
>
146
#include <
gecode/support/hw-rnd.hpp
>
147
148
/*
149
* Miscellaneous
150
*
151
*/
152
153
#include <
gecode/support/run-jobs.hpp
>
154
155
#endif
156
157
// STATISTICS: support-any
macros.hpp
pthreads.hpp
windows.hpp
int-type.hpp
dynamic-stack.hpp
none.hpp
bitset.hpp
marked-pointer.hpp
config.hpp
bitset-base.hpp
run-jobs.hpp
hw-rnd.hpp
dynamic-array.hpp
auto-link.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
exception.hpp