kernel.hh
Go to the documentation of this file.00001 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 00002 /* 00003 * Main authors: 00004 * Christian Schulte <schulte@gecode.org> 00005 * 00006 * Contributing authors: 00007 * Guido Tack <tack@gecode.org> 00008 * 00009 * Copyright: 00010 * Christian Schulte, 2004 00011 * Guido Tack, 2004 00012 * 00013 * Last modified: 00014 * $Date: 2013-11-14 14:35:45 +0100 (Thu, 14 Nov 2013) $ by $Author: schulte $ 00015 * $Revision: 14073 $ 00016 * 00017 * This file is part of Gecode, the generic constraint 00018 * development environment: 00019 * http://www.gecode.org 00020 * 00021 * Permission is hereby granted, free of charge, to any person obtaining 00022 * a copy of this software and associated documentation files (the 00023 * "Software"), to deal in the Software without restriction, including 00024 * without limitation the rights to use, copy, modify, merge, publish, 00025 * distribute, sublicense, and/or sell copies of the Software, and to 00026 * permit persons to whom the Software is furnished to do so, subject to 00027 * the following conditions: 00028 * 00029 * The above copyright notice and this permission notice shall be 00030 * included in all copies or substantial portions of the Software. 00031 * 00032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00033 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00034 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00035 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 00036 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 00037 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00038 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00039 * 00040 */ 00041 00042 #ifndef __GECODE_KERNEL_HH__ 00043 #define __GECODE_KERNEL_HH__ 00044 00045 #include <cstddef> 00046 #include <cstdlib> 00047 #include <cstring> 00048 #include <cassert> 00049 00050 #include <gecode/support.hh> 00051 00052 /* 00053 * Configure linking 00054 * 00055 */ 00056 #if !defined(GECODE_STATIC_LIBS) && \ 00057 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER)) 00058 00059 #ifdef GECODE_BUILD_KERNEL 00060 #define GECODE_KERNEL_EXPORT __declspec( dllexport ) 00061 #else 00062 #define GECODE_KERNEL_EXPORT __declspec( dllimport ) 00063 #endif 00064 00065 #else 00066 00067 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY 00068 #define GECODE_KERNEL_EXPORT __attribute__ ((visibility("default"))) 00069 #else 00070 #define GECODE_KERNEL_EXPORT 00071 #endif 00072 00073 #endif 00074 00075 // Configure auto-linking 00076 #ifndef GECODE_BUILD_KERNEL 00077 #define GECODE_LIBRARY_NAME "Kernel" 00078 #include <gecode/support/auto-link.hpp> 00079 #endif 00080 00094 /* 00095 * General exceptions and kernel exceptions 00096 * 00097 */ 00098 00099 #include <gecode/kernel/exception.hpp> 00100 00101 00102 00103 /* 00104 * Basic kernel services 00105 * 00106 */ 00107 00108 #include <gecode/kernel/memory-config.hpp> 00109 #include <gecode/kernel/memory-manager.hpp> 00110 00111 00112 /* 00113 * Macros for checking failure 00114 * 00115 */ 00116 00117 #include <gecode/kernel/macros.hpp> 00118 00119 00120 /* 00121 * Gecode kernel 00122 * 00123 */ 00124 00125 #include <gecode/kernel/archive.hpp> 00126 #include <gecode/kernel/global-afc.hpp> 00127 #include <gecode/kernel/core.hpp> 00128 #include <gecode/kernel/modevent.hpp> 00129 #include <gecode/kernel/range-list.hpp> 00130 00131 /* 00132 * Region memory management 00133 * 00134 */ 00135 00136 #include <gecode/kernel/region.hpp> 00137 00138 00139 /* 00140 * Variables and testing for shared variables 00141 * 00142 */ 00143 00144 #include <gecode/kernel/var.hpp> 00145 00146 00147 /* 00148 * Views 00149 * 00150 */ 00151 00152 #include <gecode/kernel/view.hpp> 00153 00154 00155 /* 00156 * Arrays 00157 * 00158 */ 00159 00160 #include <gecode/kernel/array.hpp> 00161 #include <gecode/kernel/shared-array.hpp> 00162 00163 00164 /* 00165 * Random number generator (for branching) 00166 * 00167 */ 00168 00169 #include <gecode/kernel/rnd.hpp> 00170 00171 00172 /* 00173 * Common propagator and branching patterns 00174 * 00175 */ 00176 00177 namespace Gecode { 00178 00199 00200 GECODE_KERNEL_EXPORT BrancherHandle 00201 branch(Home home, void (*f)(Space& home)); 00203 00204 } 00205 00206 #include <gecode/kernel/propagator.hpp> 00207 #include <gecode/kernel/advisor.hpp> 00208 #include <gecode/kernel/afc.hpp> 00209 #include <gecode/kernel/branch-traits.hpp> 00210 #include <gecode/kernel/activity.hpp> 00211 #include <gecode/kernel/branch-var.hpp> 00212 #include <gecode/kernel/branch-tiebreak.hpp> 00213 #include <gecode/kernel/branch-val.hpp> 00214 #include <gecode/kernel/brancher-merit.hpp> 00215 #include <gecode/kernel/brancher-view-sel.hpp> 00216 #include <gecode/kernel/brancher-view.hpp> 00217 #include <gecode/kernel/brancher-val-sel.hpp> 00218 #include <gecode/kernel/brancher-val-commit.hpp> 00219 #include <gecode/kernel/brancher-val-sel-commit.hpp> 00220 #include <gecode/kernel/brancher-view-val.hpp> 00221 00222 00223 /* 00224 * Automatically generated variable implementations 00225 * 00226 */ 00227 00228 #include <gecode/kernel/var-imp.hpp> 00229 00230 /* 00231 * Allocator support 00232 * 00233 */ 00234 00235 #include <gecode/kernel/allocators.hpp> 00236 00237 #endif 00238 00239 // STATISTICS: kernel-other