Generated on Tue Apr 18 10:22:11 2017 for Gecode by doxygen 1.6.3

support.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  *  Copyright:
00007  *     Christian Schulte, 2007
00008  *
00009  *  Last modified:
00010  *     $Date: 2017-01-09 14:28:29 +0100 (Mon, 09 Jan 2017) $ by $Author: schulte $
00011  *     $Revision: 15362 $
00012  *
00013  *  This file is part of Gecode, the generic constraint
00014  *  development environment:
00015  *     http://www.gecode.org
00016  *
00017  *  Permission is hereby granted, free of charge, to any person obtaining
00018  *  a copy of this software and associated documentation files (the
00019  *  "Software"), to deal in the Software without restriction, including
00020  *  without limitation the rights to use, copy, modify, merge, publish,
00021  *  distribute, sublicense, and/or sell copies of the Software, and to
00022  *  permit persons to whom the Software is furnished to do so, subject to
00023  *  the following conditions:
00024  *
00025  *  The above copyright notice and this permission notice shall be
00026  *  included in all copies or substantial portions of the Software.
00027  *
00028  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00029  *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00030  *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00031  *  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
00032  *  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
00033  *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
00034  *  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00035  *
00036  */
00037 
00038 #ifndef __GECODE_SUPPORT_HH__
00039 #define __GECODE_SUPPORT_HH__
00040 
00041 #include <cassert>
00042 
00043 #include <gecode/support/config.hpp>
00044 
00045 /*
00046  * Linking and compiler workarounds
00047  *
00048  */
00049 #if !defined(GECODE_STATIC_LIBS) && \
00050     (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
00051 
00058 #define GECODE_MSC_VIRTUAL virtual
00059 
00060 #ifdef GECODE_BUILD_SUPPORT
00061 #define GECODE_SUPPORT_EXPORT __declspec( dllexport )
00062 #else
00063 #define GECODE_SUPPORT_EXPORT __declspec( dllimport )
00064 #endif
00065 #define GECODE_VTABLE_EXPORT
00066 
00067 #else
00068 
00069 #define GECODE_MSC_VIRTUAL
00070 
00071 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
00072 #define GECODE_SUPPORT_EXPORT __attribute__ ((visibility("default")))
00073 #define GECODE_VTABLE_EXPORT __attribute__ ((visibility("default")))
00074 #else
00075 #define GECODE_SUPPORT_EXPORT
00076 #define GECODE_VTABLE_EXPORT
00077 #endif
00078 
00079 #endif
00080 
00081 // Configure auto-linking
00082 #ifndef GECODE_BUILD_SUPPORT
00083 #define GECODE_LIBRARY_NAME "Support"
00084 #include <gecode/support/auto-link.hpp>
00085 #endif
00086 
00087 // Configure threads
00088 #ifdef GECODE_THREADS_WINDOWS
00089 #define GECODE_HAS_THREADS
00090 #endif
00091 
00092 #ifdef GECODE_THREADS_PTHREADS
00093 #define GECODE_HAS_THREADS
00094 #endif
00095 
00096 
00097 /*
00098  * Basic support needed everywhere
00099  *
00100  */
00101 
00102 #include <gecode/support/macros.hpp>
00103 #include <gecode/support/exception.hpp>
00104 #include <gecode/support/cast.hpp>
00105 #include <gecode/support/thread.hpp>
00106 #include <gecode/support/allocator.hpp>
00107 #include <gecode/support/heap.hpp>
00108 #include <gecode/support/marked-pointer.hpp>
00109 #include <gecode/support/int-type.hpp>
00110 
00111 /*
00112  * Common datastructures and algorithms
00113  *
00114  */
00115 
00116 #include <gecode/support/bitset-base.hpp>
00117 #include <gecode/support/bitset.hpp>
00118 #include <gecode/support/bitset-offset.hpp>
00119 #include <gecode/support/block-allocator.hpp>
00120 #include <gecode/support/dynamic-array.hpp>
00121 #include <gecode/support/dynamic-queue.hpp>
00122 #include <gecode/support/dynamic-stack.hpp>
00123 #include <gecode/support/random.hpp>
00124 #include <gecode/support/sort.hpp>
00125 #include <gecode/support/static-stack.hpp>
00126 
00127 
00128 /*
00129  * Operating system support
00130  *
00131  */
00132 
00133 #ifdef GECODE_THREADS_WINDOWS
00134 #include <gecode/support/thread/windows.hpp>
00135 #endif
00136 #ifdef GECODE_THREADS_PTHREADS
00137 #include <gecode/support/thread/pthreads.hpp>
00138 #endif
00139 #ifndef GECODE_HAS_THREADS
00140 #include <gecode/support/thread/none.hpp>
00141 #endif
00142 
00143 #include <gecode/support/thread/thread.hpp>
00144 
00145 #include <gecode/support/timer.hpp>
00146 #include <gecode/support/hw-rnd.hpp>
00147 
00148 /*
00149  * Miscellaneous
00150  *
00151  */
00152 
00153 #include <gecode/support/run-jobs.hpp>
00154 
00155 #endif
00156 
00157 // STATISTICS: support-any