* New tree configuration of the project:
.../
... + -- EO
| |
| |
+-- src ----- + -- EDO
| |
| |
+-- test + -- MO
| |
| |
+-- tutorial + -- MOEO
| |
| |
+-- doc + -- SMP
| |
| |
... + -- EOMPI
|
|
+ -- EOSERIAL
Question for current maintainers: ./README: new release?
Also:
* Moving out eompi & eoserial modules (issue #2).
* Correction of the errors when executing "make doc" command.
* Adding a solution for the conflicting headers problem (see the two CMake Cache
Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)
* Header inclusions:
** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')
* Moving out some scripts from EDO -> to the root
* Add a new script for compilation and installation (see build_gcc_linux_install)
* Compilation with uBLAS library or EDO module: now ok
* Minor modifications on README & INSTALL files
* Comment eompi failed tests with no end
*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
This commit is contained in:
parent
515bd5943d
commit
490e837f7a
2359 changed files with 7688 additions and 16329 deletions
44
src/eo/BuildConfig.cmake
Executable file
44
src/eo/BuildConfig.cmake
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
# the user should choose the build type on windows environments,excepted under cygwin (default=none)
|
||||
|
||||
#SET(CMAKE_DEFAULT_BUILD_TYPE "Release" CACHE STRING "Variable that stores the default CMake build type" FORCE)
|
||||
|
||||
#SET(CMAKE_BUILD_TYPE Debug) # allows to enable assert calls and -g flag
|
||||
|
||||
FIND_PROGRAM(MEMORYCHECK_COMMAND
|
||||
NAMES purify valgrind
|
||||
PATHS
|
||||
"/usr/local/bin /usr/bin [HKEY_LOCAL_MACHINE\\SOFTWARE\\Rational Software\\Purify\\Setup;InstallFolder]"
|
||||
DOC "Path to the memory checking command, used for memory error detection.")
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
SET( CMAKE_BUILD_TYPE
|
||||
${CMAKE_DEFAULT_BUILD_TYPE} CACHE STRING
|
||||
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel."
|
||||
FORCE)
|
||||
ENDIF(NOT CMAKE_BUILD_TYPE)
|
||||
|
||||
IF(WIN32 AND NOT CYGWIN)
|
||||
IF(CMAKE_CXX_COMPILER MATCHES cl)
|
||||
IF(NOT WITH_SHARED_LIBS)
|
||||
IF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
SET(CMAKE_CXX_FLAGS "/nologo /Gy")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "/W3 /MTd /Z7 /Od")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "/w /MT /O2 /wd4530")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MT /O2")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MTd /Z7 /Od")
|
||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE")
|
||||
ENDIF(CMAKE_GENERATOR STREQUAL "Visual Studio 8 2005" OR CMAKE_GENERATOR STREQUAL "Visual Studio 9 2008")
|
||||
ENDIF(NOT WITH_SHARED_LIBS)
|
||||
ENDIF(CMAKE_CXX_COMPILER MATCHES cl)
|
||||
ELSE(WIN32 AND NOT CYGWIN)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -fprofile-arcs -ftest-coverage -Wall -Wextra -Wno-unused-parameter")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g -Wall -Wextra -Wno-unused-parameter -Wunknown-pragmas")
|
||||
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -Wunknown-pragmas")
|
||||
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -O6 -Wunknown-pragmas")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ENDIF(WIN32 AND NOT CYGWIN)
|
||||
|
||||
IF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
ADD_DEFINITIONS(-DCMAKE_VERBOSE_MAKEFILE=ON)
|
||||
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug)
|
||||
9882
src/eo/CHANGELOG
Executable file
9882
src/eo/CHANGELOG
Executable file
File diff suppressed because it is too large
Load diff
225
src/eo/CMakeLists.txt
Executable file
225
src/eo/CMakeLists.txt
Executable file
|
|
@ -0,0 +1,225 @@
|
|||
#####################################################################################
|
||||
### 0) Configuration files
|
||||
#####################################################################################
|
||||
|
||||
# now create config headers
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# now create config install_symlink script file
|
||||
configure_file(install_symlink.py.cmake ${CMAKE_CURRENT_BINARY_DIR}/install_symlink.py)
|
||||
|
||||
#####################################################################################
|
||||
|
||||
######################################################################################
|
||||
### 1) Include the sources
|
||||
######################################################################################
|
||||
|
||||
#include_directories(${EOMPI_SRC_DIR})
|
||||
#include_directories(${EOSERIAL_SRC_DIR})
|
||||
#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
######################################################################################
|
||||
### 2) Define the eo target
|
||||
######################################################################################
|
||||
|
||||
set(EO_LIB_OUTPUT_PATH ${EO_BIN_DIR}/lib)
|
||||
set(LIBRARY_OUTPUT_PATH ${EO_LIB_OUTPUT_PATH})
|
||||
|
||||
set(EO_SOURCES
|
||||
eoFunctorStore.cpp
|
||||
eoPersistent.cpp
|
||||
eoPrintable.cpp
|
||||
eoCtrlCContinue.cpp
|
||||
eoScalarFitnessAssembled.cpp
|
||||
eoSIGContinue.cpp
|
||||
)
|
||||
|
||||
add_library(eo STATIC ${EO_SOURCES})
|
||||
|
||||
######################################################################################
|
||||
### 3) Optionnal: define your target(s)'s version: no effect for windows
|
||||
######################################################################################
|
||||
|
||||
set(EO_VERSION ${GLOBAL_VERSION})
|
||||
set_target_properties(eo PROPERTIES VERSION "${EO_VERSION}")
|
||||
|
||||
install(TARGETS eo ARCHIVE DESTINATION ${LIB} COMPONENT libraries)
|
||||
|
||||
#file(GLOB HDRS *[^eo].h eo)
|
||||
# Indication from CMake : "We do not recommend using GLOB to collect a list of
|
||||
# sources files from your source tree. If no
|
||||
# CMakeLists.txt file changes when a source is added or
|
||||
# removed then the generated build system cannot know
|
||||
# when to ask CMake to generate."
|
||||
|
||||
set(HDRS
|
||||
apply.h
|
||||
eoAlgo.h
|
||||
eoBinaryFlight.h
|
||||
eoBitParticle.h
|
||||
eoBreed.h
|
||||
eoCellularEasyEA.h
|
||||
eoCloneOps.h
|
||||
eoCombinedContinue.h
|
||||
eoCombinedInit.h
|
||||
eoConstrictedVariableWeightVelocity.h
|
||||
eoConstrictedVelocity.h
|
||||
eoContinue.h
|
||||
eoCounter.h
|
||||
eoCtrlCContinue.h
|
||||
eoDetSelect.h
|
||||
eoDetTournamentSelect.h
|
||||
eoDistribUpdater.h
|
||||
eoDistribution.h
|
||||
eoDualFitness.h
|
||||
eoEasyEA.h
|
||||
eoEasyPSO.h
|
||||
eoEDA.h
|
||||
eoEvalContinue.h
|
||||
eoEvalCounterThrowException.h
|
||||
eoEvalDump.h
|
||||
eoEvalFuncCounterBounder.h
|
||||
eoEvalFuncCounter.h
|
||||
eoEvalFunc.h
|
||||
eoEvalFuncPtr.h
|
||||
eoEvalKeepBest.h
|
||||
eoEvalTimeThrowException.h
|
||||
eoEvalUserTimeThrowException.h
|
||||
eoExceptions.h
|
||||
eoExtendedVelocity.h
|
||||
eoFactory.h
|
||||
eoFitContinue.h
|
||||
eoFitnessScalingSelect.h
|
||||
eoFixedInertiaWeightedVelocity.h
|
||||
eoFlight.h
|
||||
eoFlOrBinOp.h
|
||||
eoFlOrMonOp.h
|
||||
eoFlOrQuadOp.h
|
||||
eoFunctor.h
|
||||
eoFunctorStore.h
|
||||
eoG3Replacement.h
|
||||
eoGaussRealWeightUp.h
|
||||
eoGenContinue.h
|
||||
eoGeneralBreeder.h
|
||||
eoGenOp.h
|
||||
#eo.h
|
||||
EO.h
|
||||
eoInit.h
|
||||
eoInitializer.h
|
||||
eoIntegerVelocity.h
|
||||
eoInt.h
|
||||
eoInvalidateOps.h
|
||||
eoInvertedContinue.h
|
||||
eoLinearDecreasingWeightUp.h
|
||||
eoLinearFitScaling.h
|
||||
eoLinearTopology.h
|
||||
eoMerge.h
|
||||
eoMergeReduce.h
|
||||
eoMGGReplacement.h
|
||||
eoNDSorting.h
|
||||
eoNeighborhood.h
|
||||
eoObject.h
|
||||
eoOneToOneBreeder.h
|
||||
eoOpContainer.h
|
||||
eoOp.h
|
||||
eoOpSelMason.h
|
||||
eoOrderXover.h
|
||||
eoParticleBestInit.h
|
||||
eoParticleFullInitializer.h
|
||||
eoPerf2Worth.h
|
||||
eoPeriodicContinue.h
|
||||
eoPersistent.h
|
||||
eoPopEvalFunc.h
|
||||
eoPop.h
|
||||
eoPopulator.h
|
||||
eoPrintable.h
|
||||
eoPropGAGenOp.h
|
||||
eoProportionalCombinedOp.h
|
||||
eoProportionalSelect.h
|
||||
eoPSO.h
|
||||
eoRandomRealWeightUp.h
|
||||
eoRandomSelect.h
|
||||
eoRanking.h
|
||||
eoRankingSelect.h
|
||||
eoRankMuSelect.h
|
||||
eoRealBoundModifier.h
|
||||
eoRealParticle.h
|
||||
eoReduce.h
|
||||
eoReduceMerge.h
|
||||
eoReduceMergeReduce.h
|
||||
eoReduceSplit.h
|
||||
eoReplacement.h
|
||||
eoRingTopology.h
|
||||
eoScalarFitnessAssembled.h
|
||||
eoScalarFitness.h
|
||||
eoSecondsElapsedContinue.h
|
||||
eoSelectFactory.h
|
||||
eoSelectFromWorth.h
|
||||
eoSelect.h
|
||||
eoSelectMany.h
|
||||
eoSelectNumber.h
|
||||
eoSelectOne.h
|
||||
eoSelectPerc.h
|
||||
eoSequentialSelect.h
|
||||
eoSGAGenOp.h
|
||||
eoSGA.h
|
||||
eoSGATransform.h
|
||||
eoSharing.h
|
||||
eoSharingSelect.h
|
||||
eoShiftMutation.h
|
||||
eoSigBinaryFlight.h
|
||||
eoSIGContinue.h
|
||||
eoSimpleEDA.h
|
||||
eoSocialNeighborhood.h
|
||||
eoStandardFlight.h
|
||||
eoStandardVelocity.h
|
||||
eoStarTopology.h
|
||||
eoSteadyFitContinue.h
|
||||
eoSTLFunctor.h
|
||||
eoStochasticUniversalSelect.h
|
||||
eoStochTournamentSelect.h
|
||||
eoSurviveAndDie.h
|
||||
eoSwapMutation.h
|
||||
eoSyncEasyPSO.h
|
||||
eoTimeContinue.h
|
||||
eoTopology.h
|
||||
eoTransform.h
|
||||
eoTruncatedSelectMany.h
|
||||
eoTruncatedSelectOne.h
|
||||
eoTruncSelect.h
|
||||
eoTwoOptMutation.h
|
||||
eoVariableInertiaWeightedVelocity.h
|
||||
eoVariableLengthCrossover.h
|
||||
eoVariableLengthMutation.h
|
||||
eoVector.h
|
||||
eoVectorParticle.h
|
||||
eoVelocity.h
|
||||
eoVelocityInit.h
|
||||
eoWeightUpdater.h
|
||||
es.h
|
||||
ga.h
|
||||
PO.h
|
||||
)
|
||||
|
||||
install(FILES eo.h DESTINATION ${PROJECT_HDRS_INSTALL_SUBPATH}/${PROJECT_TAG} COMPONENT headers)
|
||||
install(FILES ${HDRS} DESTINATION ${PROJECT_HDRS_INSTALL_SUBPATH}/${PROJECT_TAG}/eo COMPONENT headers)
|
||||
install(DIRECTORY do es ga gp other utils
|
||||
DESTINATION ${PROJECT_HDRS_INSTALL_SUBPATH}/${PROJECT_TAG}/eo
|
||||
COMPONENT headers
|
||||
FILES_MATCHING PATTERN "*.h" PATTERN "checkpointing" PATTERN external_eo
|
||||
)
|
||||
|
||||
######################################################################################
|
||||
### 4) Where must cmake go now ?
|
||||
######################################################################################
|
||||
|
||||
add_subdirectory(es)
|
||||
add_subdirectory(ga)
|
||||
add_subdirectory(utils)
|
||||
#add_subdirectory(serial)
|
||||
|
||||
if(ENABLE_PYEO)
|
||||
add_subdirectory(pyeo)
|
||||
endif(ENABLE_PYEO)
|
||||
|
||||
######################################################################################
|
||||
502
src/eo/COPYING
Executable file
502
src/eo/COPYING
Executable file
|
|
@ -0,0 +1,502 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
29
src/eo/ConfigureChecks.cmake
Executable file
29
src/eo/ConfigureChecks.cmake
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
# NOTE: only add something here if it is really needed by EO
|
||||
|
||||
INCLUDE(CheckIncludeFile)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckSymbolExists)
|
||||
INCLUDE(CheckFunctionExists)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
|
||||
CHECK_LIBRARY_EXISTS(m cos "/usr/lib" HAVE_LIBM)
|
||||
|
||||
CHECK_INCLUDE_FILES(math.h "math.h" HAVE_MATH_H)
|
||||
CHECK_INCLUDE_FILES(stdio.h "stdio.h" HAVE_STDIO_H)
|
||||
CHECK_INCLUDE_FILES(stdlib.h "stdlib.h" HAVE_STDLIB_H)
|
||||
CHECK_INCLUDE_FILES(string.h "string.h" HAVE_STRING_H)
|
||||
CHECK_INCLUDE_FILES(strings.h "strings.h" HAVE_STRINGS_H)
|
||||
CHECK_INCLUDE_FILES(malloc.h "malloc.h" HAVE_MALLOC_H)
|
||||
CHECK_INCLUDE_FILES(limits.h "limits.h" HAVE_LIMITS_H)
|
||||
CHECK_INCLUDE_FILES(unistd.h "unistd.h" HAVE_UNISTD_H)
|
||||
CHECK_INCLUDE_FILES(stdint.h "stdint.h" HAVE_STDINT_H)
|
||||
|
||||
|
||||
# Use check_symbol_exists to check for symbols in a reliable
|
||||
# cross-platform manner. It accounts for different calling
|
||||
# conventions and the possibility that the symbol is defined as a
|
||||
# macro. Note that some symbols require multiple includes in a
|
||||
# specific order. Refer to the man page for each symbol for which a
|
||||
# check is to be added to get the proper set of headers. Example :
|
||||
|
||||
#check_symbol_exists(asymbol "symbole.h" HAVE_SYMBOLE)
|
||||
173
src/eo/EO.h
Executable file
173
src/eo/EO.h
Executable file
|
|
@ -0,0 +1,173 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EO.h
|
||||
// (c) GeNeura Team 1998
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef EO_H
|
||||
#define EO_H
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <stdexcept> // std::runtime_error
|
||||
#include "eoObject.h" // eoObject
|
||||
#include "eoPersistent.h" // eoPersistent
|
||||
|
||||
/**
|
||||
@defgroup Core Core components
|
||||
|
||||
This are the base classes from which useful objects inherits.
|
||||
|
||||
@{
|
||||
*/
|
||||
|
||||
/** EO is the base class for objects with a fitness.
|
||||
|
||||
Those evolvable objects are the subjects of
|
||||
evolution. EOs have only got a fitness, which at the same time needs to be
|
||||
only an object with the operation less than (<) defined. Fitness says how
|
||||
good is the object; evolution or change of these objects is left to the
|
||||
genetic operators.
|
||||
|
||||
A fitness less than another means a worse fitness, in
|
||||
whatever the context; thus, fitness is always maximized; although it can
|
||||
be minimized with a proper definition of the < operator.
|
||||
|
||||
A fitness can be invalid if undefined, trying to read an invalid fitness will raise an error.
|
||||
@ref Operators that effectively modify EO objects must invalidate them.
|
||||
|
||||
The fitness object must have, besides an void ctor, a copy ctor.
|
||||
|
||||
@example t-eo.cpp
|
||||
*/
|
||||
template<class F = double> class EO: public eoObject, public eoPersistent
|
||||
{
|
||||
public:
|
||||
typedef F Fitness;
|
||||
|
||||
/** Default constructor.
|
||||
*/
|
||||
EO(): repFitness(Fitness()), invalidFitness(true) { }
|
||||
|
||||
/// Virtual dtor
|
||||
virtual ~EO() {};
|
||||
|
||||
/// Return fitness value.
|
||||
const Fitness& fitness() const {
|
||||
if (invalid())
|
||||
throw std::runtime_error("invalid fitness");
|
||||
return repFitness;
|
||||
}
|
||||
|
||||
/// Get fitness as reference, useful when fitness is set in a multi-stage way, e.g., MOFitness gets performance information, is subsequently ranked
|
||||
Fitness& fitnessReference() {
|
||||
if (invalid()) throw std::runtime_error("invalid fitness");
|
||||
return repFitness;
|
||||
}
|
||||
|
||||
// Set fitness as invalid.
|
||||
void invalidate() { invalidFitness = true; repFitness = Fitness(); }
|
||||
|
||||
/** Set fitness. At the same time, validates it.
|
||||
* @param _fitness New fitness value.
|
||||
*/
|
||||
void fitness(const Fitness& _fitness)
|
||||
{
|
||||
repFitness = _fitness;
|
||||
invalidFitness = false;
|
||||
}
|
||||
|
||||
/** Return true If fitness value is invalid, false otherwise.
|
||||
* @return true If fitness is invalid.
|
||||
*/
|
||||
bool invalid() const { return invalidFitness; }
|
||||
|
||||
/** Returns true if
|
||||
@return true if the fitness is higher
|
||||
*/
|
||||
bool operator<(const EO& _eo2) const { return fitness() < _eo2.fitness(); }
|
||||
bool operator>(const EO& _eo2) const { return !(fitness() <= _eo2.fitness()); }
|
||||
|
||||
/// Methods inherited from eoObject
|
||||
//@{
|
||||
|
||||
/** Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
virtual std::string className() const { return "EO"; }
|
||||
|
||||
/**
|
||||
* Read object.\\
|
||||
* Calls base class, just in case that one had something to do.
|
||||
* The read and print methods should be compatible and have the same format.
|
||||
* In principle, format is "plain": they just print a number
|
||||
* @param _is a std::istream.
|
||||
* @throw runtime_std::exception If a valid object can't be read.
|
||||
*/
|
||||
virtual void readFrom(std::istream& _is) {
|
||||
|
||||
// the new version of the reafFrom function.
|
||||
// It can distinguish between valid and invalid fitness values.
|
||||
std::string fitness_str;
|
||||
int pos = _is.tellg();
|
||||
_is >> fitness_str;
|
||||
|
||||
if (fitness_str == "INVALID")
|
||||
{
|
||||
invalidFitness = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
invalidFitness = false;
|
||||
_is.seekg(pos); // rewind
|
||||
_is >> repFitness;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write object. Called printOn since it prints the object _on_ a stream.
|
||||
* @param _os A std::ostream.
|
||||
*/
|
||||
virtual void printOn(std::ostream& _os) const {
|
||||
|
||||
|
||||
// the latest version of the code. Very similar to the old code
|
||||
if (invalid()) {
|
||||
_os << "INVALID ";
|
||||
}
|
||||
else
|
||||
{
|
||||
_os << repFitness << ' ';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//@}
|
||||
|
||||
private:
|
||||
Fitness repFitness; // value of fitness for this chromosome
|
||||
bool invalidFitness; // true if the value of fitness is invalid
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
86
src/eo/INSTALL
Executable file
86
src/eo/INSTALL
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
The simplest way to compile the libraries or the provided softwares is to run
|
||||
one of the script beginnig with "build_". Each script permits to build different
|
||||
parts of the framework, with different options.
|
||||
|
||||
To compile EO you will need CMake and a compiler for your system.
|
||||
|
||||
So far the available scripts for posix systems using g++ are the following:
|
||||
* build_gcc_linux_release : the most usefull script, build the core libraries in release mode
|
||||
* build_gcc_linux_debug : build the core libraries with debugging informations in the binaries
|
||||
* build_gcc_linux_tutorial : build the core libraries and the tutorials
|
||||
* build_gcc_linux_unittest : build the core libraries and the tests executables
|
||||
* build_gcc_linux_stl_parallel : build the core libraries enabling STL parallel algorithms (like sorting)
|
||||
* build_gcc_linux_pyeo : build the core libraries and the python module
|
||||
* distclean : remove the "release/" and "debug/" directories where the build scripts put the binaries
|
||||
|
||||
For Windows systems using Visual Studio:
|
||||
* build_vs2008_release.bat
|
||||
You may need to adapt the ID to your version of Visual Studio, edit
|
||||
the "Visual Studio 9 2008" string accordingly.
|
||||
|
||||
The libraries are in the "release/lib/" or "debug/lib/" directories.
|
||||
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
The build scripts are really simple, take a look at them to see how to use the
|
||||
build system.
|
||||
|
||||
Basically, the steps are:
|
||||
0. remove any old build directory that's on the way:
|
||||
rm -rf build/
|
||||
1. create a directory in which to put build files:
|
||||
mkdir build/
|
||||
2. go in this directory:
|
||||
cd build/
|
||||
3. call cmake with the options you want, using the "-D" option and passing the
|
||||
EO directory as an argument, for example:
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_CMAKE_TESTING =1 ..
|
||||
4. now type your favorite "make" command, like:
|
||||
make -j # use several processors at once when possible
|
||||
5. enjoy:
|
||||
./debug/test/t-eofitness
|
||||
|
||||
Some of the available options are:
|
||||
* CMAKE_BUILD_TYPE :
|
||||
* "Debug" : embed debugging informations in the binaries) or
|
||||
* "Release" : no debugging info and some optimizations (the default)
|
||||
* ENABLE_EO_TUTORIAL : build the tutorial ("no" by default)
|
||||
* ENABLE_CMAKE_TESTING : build the tests executables ("no" by default)
|
||||
* ENABLE_PYEO : build the python module ("no" by default)
|
||||
|
||||
You can pass generic options to the compiler, like:
|
||||
* _GLIBCXX_PARALLEL : use the parallel version of the STL
|
||||
|
||||
|
||||
Installation using packages
|
||||
===========================
|
||||
|
||||
To construct a dummy template of the EO package you will need CPack. Be warned
|
||||
that those do not guarantee correct dependencies and version management.
|
||||
|
||||
Use the "package_*" scripts:
|
||||
* package_deb : for debian-like systems
|
||||
* package_rpm : for red-hat-like systems
|
||||
|
||||
Or go through the following steps:
|
||||
1. go in the build directory where your binaries are:
|
||||
cd build/
|
||||
2. call CPack specifying the desired package system:
|
||||
cpack -G DEB
|
||||
3. install the package:
|
||||
sudo dpkg -i EO-1.1.1-Linux.deb
|
||||
|
||||
|
||||
Basic installation
|
||||
==================
|
||||
|
||||
To install the framework system-wide, copy the "eo/" directory somewhere in your
|
||||
path. The "lib/" directory should be reachable for the linker and the "src/"
|
||||
directory must be in the compiler include path.
|
||||
|
||||
502
src/eo/LICENSE
Executable file
502
src/eo/LICENSE
Executable file
|
|
@ -0,0 +1,502 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
79
src/eo/NEWS
Executable file
79
src/eo/NEWS
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
* current release:
|
||||
|
||||
* release 1.3.1 (2012-07-27)
|
||||
- the eo::mpi modules is no longer dependent from boost::mpi
|
||||
- parallel multi-start example
|
||||
- bugfix: an error is now thrown when accessing best_element of an empty population
|
||||
|
||||
* release 1.3.0 (2012-07-24)
|
||||
- features:
|
||||
- delete the deprecated code parts (was marked as deprecated in the release 1.1)
|
||||
- eoSignal: a class to handle signal with eoCheckpoint instances
|
||||
- eoDetSingleBitFlip: bit flip mutation that changes exactly k bits while checking for duplicate
|
||||
- eoFunctorStat: a wrapper to turn any stand-alone function and into an eoStat
|
||||
- generilazed the output of an eoState: now you can change the format, comes with defaults formatting (latex and json)
|
||||
- eoWrongParamTypeException: a new exception to handle cases where a wrong template is given to eoParser::valueOf
|
||||
- added a getParam method to the eoParser, that raise an exception if the parameter has not been declared
|
||||
- eoParserLogger features are now included in the default eoParser
|
||||
- build system:
|
||||
- improvements of the build architecture
|
||||
- create PKGBUILD file for archlinux package manager
|
||||
- a FindEO module for CMake
|
||||
- bugfixes:
|
||||
- fixed regression with gcc 4.7
|
||||
- fixed compilation issues in Microsoft Visual C++, related to time measurement
|
||||
- added several asserts accross the framework (note: asserts are included only in debug mode)
|
||||
- lot of small bugfixes :-)
|
||||
|
||||
* release 1.2 (16. May. 2011)
|
||||
- fixed the incremental allocation issue in variation operators which were
|
||||
taking too much time for big population sizes
|
||||
- new class eoParallel enabling parallelization in EO using OpenMP. At this
|
||||
time, it only concerns the evaluation operator, for advanced details go to
|
||||
the file test/t-eoParallel.cpp. The default parallelization mode is off, to
|
||||
switch it on, see the parameters prefixed by --parallelize-*
|
||||
- pyeo compatible with the last version of Boost and Python libraries
|
||||
- script installing EO manually in using symbolic links
|
||||
- evaluators that throw an exception if a maximum time has been reached
|
||||
(wallclock and CPU user time for POSIX systems), independently of the number of generations
|
||||
- merged parser and parser-logger
|
||||
- some bugfixes for windows systems
|
||||
|
||||
* release 1.1 (8. Nov. 2010)
|
||||
- provide cmake build system, remove the old autotools one
|
||||
- package generation system
|
||||
- GCC 4.3 compatibility
|
||||
- new versatile log system with several nested verbose levels
|
||||
- classes using intern verbose parameters marked as deprecated, please update your code accordingly if you use one of the following files:
|
||||
eo/src/eoCombinedInit.h
|
||||
eo/src/eoGenContinue.h
|
||||
eo/src/eoProportionalCombinedOp.h
|
||||
eo/src/utils/eoData.h
|
||||
eo/src/utils/eoStdoutMonitor.h
|
||||
- an evaluator that throw an exception if a maximum eval numbers has been reached, independently of the number of generations
|
||||
- new monitor that can write on any ostream
|
||||
- new continuator that can catch POSIX system user signals
|
||||
- dual fitness class to handle feasibility of individual with guarantee that feasible fitness will always be better than unfeasible one
|
||||
- feasible fitness ratio stat
|
||||
- interquartile range stat
|
||||
- average size of individuals stat
|
||||
- uniform(min,max) random function
|
||||
- compatibility macros for compiling paradiseo with CUDACC
|
||||
- removed old multi-objective classes, deprecated by the Paradiseo-MOEO project
|
||||
- new website, switch from CVS to GIT, and a cool logo!
|
||||
|
||||
* release 1.0.1 (23. Jan. 2006)
|
||||
- Templates/ improvements
|
||||
|
||||
* release 1.0 (29. Dec. 2006)
|
||||
- Implement CMA-ES.
|
||||
- Update introductory pages of documentation and webpage.
|
||||
- Add Microsoft Visual C++ project support files (for Visual Studio 2003 and 2005)
|
||||
- Upgrade Teamplates/ script to create a complete standalone EO project (using autotools)
|
||||
- Remove support for pre-standard C++ compiler (i.e. gcc-2.x), which allows to
|
||||
clean up the code considerably.
|
||||
Assume availability of sstream and limits.
|
||||
|
||||
* release 0.9.3z.1 (1. Oct. 2005)
|
||||
- Support gcc-3.4 and gcc.4.x.
|
||||
- Provide full automake/autoconf/configure support.
|
||||
23
src/eo/PKGBUILD.cmake
Executable file
23
src/eo/PKGBUILD.cmake
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
|
||||
# Maintainer: Caner Candan <caner@candan.fr>
|
||||
pkgname=libeo
|
||||
pkgver=@PROJECT_VERSION@
|
||||
pkgrel=1
|
||||
pkgdesc="Evolving Objects is a template-based, ANSI-C++ evolutionary computation library which helps you to write your own stochastic optimization algorithms insanely fast."
|
||||
url=""
|
||||
arch=('i686' 'x86_64')
|
||||
license=('LGPL')
|
||||
depends=()
|
||||
makedepends=('make' 'cmake')
|
||||
conflicts=()
|
||||
replaces=()
|
||||
backup=()
|
||||
install=
|
||||
source=($pkgname-$pkgver.tar.gz)
|
||||
md5sums=()
|
||||
build() {
|
||||
cd $startdir/src/$pkgname-$pkgver
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr .
|
||||
make || return 1
|
||||
make DESTDIR=$startdir/pkg install
|
||||
}
|
||||
191
src/eo/PO.h
Executable file
191
src/eo/PO.h
Executable file
|
|
@ -0,0 +1,191 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// PO.h
|
||||
// (c) OPAC 2007
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: thomas.legrand@lifl.fr
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef PO_H
|
||||
#define PO_H
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
#include <stdexcept>
|
||||
#include "EO.h"
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** PO inheriting from EO is specially designed for particle swarm optimization particle.POs have got a fitness,
|
||||
which at the same time needs to be only an object with the operation less than (<)
|
||||
defined. A best fitness also belongs to the particle.Fitness says how
|
||||
good is the particle for a current iteration whereas the best fitness can be saved for
|
||||
many iterations.
|
||||
|
||||
@ingroup Core
|
||||
*/
|
||||
template < class F > class PO:public EO < F >
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
#if defined(__CUDACC__)
|
||||
typedef typename EO < F >::Fitness Fitness;
|
||||
#else
|
||||
typedef typename PO<F>::Fitness Fitness;
|
||||
#endif
|
||||
|
||||
/** Default constructor.
|
||||
Fitness must have a ctor which takes 0 as a value. Best fitness mush also have the same constructor.
|
||||
*/
|
||||
PO ():repFitness (Fitness ()), invalidFitness (true),
|
||||
bestFitness (Fitness()){}
|
||||
|
||||
|
||||
/// Return fitness value.
|
||||
Fitness fitness () const
|
||||
{
|
||||
if (invalid ())
|
||||
throw std::runtime_error ("invalid fitness in PO.h");
|
||||
return repFitness;
|
||||
}
|
||||
|
||||
|
||||
/** Set fitness. At the same time, validates it.
|
||||
* @param _fitness New fitness value.
|
||||
*/
|
||||
void fitness (const Fitness & _fitness)
|
||||
{
|
||||
repFitness = _fitness;
|
||||
invalidFitness = false;
|
||||
}
|
||||
|
||||
/** Return the best fitness.
|
||||
* @return bestFitness
|
||||
*/
|
||||
Fitness best () const
|
||||
{
|
||||
if (invalid ())
|
||||
throw std::runtime_error ("invalid best fitness in PO.h");
|
||||
return bestFitness;
|
||||
}
|
||||
|
||||
|
||||
/** Set the best fitness.
|
||||
* @param _bestFitness New best fitness found for the particle.
|
||||
*/
|
||||
void best (const Fitness & _bestFitness)
|
||||
{
|
||||
bestFitness = _bestFitness;
|
||||
invalidBestFitness = false;
|
||||
}
|
||||
|
||||
|
||||
/** Return true If fitness value is invalid, false otherwise.
|
||||
* @return true If fitness is invalid.
|
||||
*/
|
||||
bool invalid () const
|
||||
{
|
||||
return invalidFitness;
|
||||
}
|
||||
|
||||
/** Invalidate the fitness.
|
||||
* @return
|
||||
*/
|
||||
void invalidate ()
|
||||
{
|
||||
invalidFitness = true;
|
||||
}
|
||||
|
||||
/** Return true If the best fitness value is invalid, false otherwise.
|
||||
* @return true If the bestfitness is invalid.
|
||||
*/
|
||||
bool invalidBest () const
|
||||
{
|
||||
return invalidBestFitness;
|
||||
}
|
||||
|
||||
/** Invalidate the best fitness.
|
||||
* @return
|
||||
*/
|
||||
void invalidateBest ()
|
||||
{
|
||||
invalidBestFitness = true;
|
||||
}
|
||||
|
||||
/** Return the class id.
|
||||
* @return the class name as a std::string
|
||||
*/
|
||||
virtual std::string className () const
|
||||
{
|
||||
return "PO";
|
||||
}
|
||||
|
||||
/** Returns true if
|
||||
@return true if the fitness is higher
|
||||
*/
|
||||
bool operator< (const PO & _po2) const { return fitness () < _po2.fitness ();}
|
||||
bool operator> (const PO & _po2) const { return !(fitness () <= _po2.fitness ());}
|
||||
|
||||
|
||||
/**
|
||||
* Write object. Called printOn since it prints the object _on_ a stream.
|
||||
* @param _os A std::ostream.
|
||||
*/
|
||||
virtual void printOn(std::ostream& _os) const { _os << bestFitness << ' ' ;}
|
||||
|
||||
|
||||
/**
|
||||
* Read object.\\
|
||||
* Calls base class, just in case that one had something to do.
|
||||
* The read and print methods should be compatible and have the same format.
|
||||
* In principle, format is "plain": they just print a number
|
||||
* @param _is a std::istream.
|
||||
* @throw runtime_std::exception If a valid object can't be read.
|
||||
*/
|
||||
virtual void readFrom(std::istream& _is) {
|
||||
|
||||
// the new version of the reafFrom function.
|
||||
// It can distinguish between valid and invalid fitness values.
|
||||
std::string fitness_str;
|
||||
int pos = _is.tellg();
|
||||
_is >> fitness_str;
|
||||
|
||||
if (fitness_str == "INVALID")
|
||||
{
|
||||
invalidFitness = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
invalidFitness = false;
|
||||
_is.seekg(pos); // rewind
|
||||
_is >> repFitness;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
Fitness repFitness; // value of fitness for this particle
|
||||
bool invalidFitness; // true if the value of the fitness is invalid
|
||||
|
||||
Fitness bestFitness; // value of the best fitness found for the particle
|
||||
bool invalidBestFitness; // true if the value of the best fitness is invalid
|
||||
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif /*PO_H */
|
||||
89
src/eo/README
Executable file
89
src/eo/README
Executable file
|
|
@ -0,0 +1,89 @@
|
|||
EO README FILE
|
||||
|
||||
=======================================================================
|
||||
check latest news at http://eodev.sourceforge.net/
|
||||
=======================================================================
|
||||
|
||||
Welcome to EO, the Evolving Objects library.
|
||||
|
||||
The latest news about EO can be found on the sourceforge repository at
|
||||
http://eodev.sourceforge.net/
|
||||
|
||||
In case of any problem, please e-mail us at
|
||||
eodev-main@lists.sourceforge.net
|
||||
|
||||
To get started, take a look at the tutorial, starting with
|
||||
./tutorial/html/eoTutorial.html
|
||||
|
||||
The easiest way to start programming a new genome with all EO
|
||||
evolution engines handy is to create a new standalone EO project from
|
||||
the tutorial/Templates/ directory. Read Lesson 5 of the tutorial for
|
||||
an introduction ;)
|
||||
|
||||
|
||||
==================================================================
|
||||
BUILDING EO
|
||||
==================================================================
|
||||
The basic installation procedure goes the following:
|
||||
|
||||
Go to the "eo/" and run one of the "build_*" script.
|
||||
|
||||
Using the "build_gcc_linux_release" script is generally what you want. The
|
||||
binaries are then located in the "release/" directory.
|
||||
|
||||
Now you should probably go to the tutorial and start learning about EO
|
||||
features and programming.
|
||||
|
||||
In case of problems or if you want advanced options, you can read the INSTALL file.
|
||||
|
||||
===================================================================
|
||||
DIRECTORY STRUCTURE
|
||||
===================================================================
|
||||
After unpacking the archive file, you should end up with the following
|
||||
structure:
|
||||
|
||||
.../ the MAIN EO dir, created when unpacking
|
||||
|
|
||||
+-- src SOURCE dir. Contains most EO .h files
|
||||
| |
|
||||
| +- utils general utilities (e.g. RNG-related source files)
|
||||
| |
|
||||
| +- ga bistring-genotypes source files
|
||||
| |
|
||||
| +- es real-valued-genotypes source files
|
||||
| |
|
||||
| +- gp Genetic Programming source files
|
||||
| |
|
||||
| +- obsolete files from old versions - for upward compatibility
|
||||
|
|
||||
|
|
||||
|
|
||||
+-- tutorial TUTORIAL dir (indeed :-)
|
||||
| |
|
||||
| +- html all html files - start by browsing index.html
|
||||
| |
|
||||
| +- LessonX for X=1, 2, 3, ... : example of increasing complexity
|
||||
|
|
||||
|
|
||||
|
|
||||
+-- doc DOCUMENTATION dir (generated by Doxygen)
|
||||
| |
|
||||
| +- html HTML files - start at index.html (see also tutorial)
|
||||
| |
|
||||
| +- latex latex files - use to generate Poatscript doc.
|
||||
| |
|
||||
| +- man Unix man format documentation
|
||||
|
|
||||
|
|
||||
+-- test TEST files - for debugging purposes only
|
||||
|
|
||||
|
|
||||
+-- app APPLICATIONS - one dir per separate application
|
||||
| |
|
||||
| +- gprop GA/backpropagation for neural nets
|
||||
| |
|
||||
| +- mastermind the wellknown MasterMind game
|
||||
|
|
||||
|
|
||||
+-- win WINDOWS dir: project files for MS/VC5+
|
||||
|
||||
0
src/eo/THANKS
Executable file
0
src/eo/THANKS
Executable file
2
src/eo/ToDo
Executable file
2
src/eo/ToDo
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
See the code-documentation for details.
|
||||
General ToDos should be documented at the end of doc/index.h.
|
||||
134
src/eo/apply.h
Executable file
134
src/eo/apply.h
Executable file
|
|
@ -0,0 +1,134 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoApply.h
|
||||
// (c) Maarten Keijzer 2000
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _apply_h
|
||||
#define _apply_h
|
||||
|
||||
#include "utils/eoParallel.h"
|
||||
#include "utils/eoParser.h"
|
||||
#include "utils/eoLogger.h"
|
||||
#include "eoFunctor.h"
|
||||
#include <vector>
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
Applies a unary function to a std::vector of things.
|
||||
|
||||
@ingroup Utilities
|
||||
*/
|
||||
template <class EOT>
|
||||
void apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
||||
{
|
||||
size_t size = _pop.size();
|
||||
|
||||
#ifdef _OPENMP
|
||||
|
||||
double t1 = 0;
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
t1 = omp_get_wtime();
|
||||
}
|
||||
|
||||
if (!eo::parallel.isDynamic())
|
||||
{
|
||||
#pragma omp parallel for if(eo::parallel.isEnabled()) //default(none) shared(_proc, _pop, size)
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#pragma omp parallel for schedule(dynamic) if(eo::parallel.isEnabled())
|
||||
#ifdef _MSC_VER
|
||||
//Visual Studio supports only OpenMP version 2.0 in which
|
||||
//an index variable must be of a signed integral type
|
||||
for (long long i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#else // _MSC_VER
|
||||
//doesnot work with gcc 4.1.2
|
||||
//default(none) shared(_proc, _pop, size)
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( eo::parallel.enableResults() )
|
||||
{
|
||||
double t2 = omp_get_wtime();
|
||||
eoLogger log;
|
||||
log << eo::file(eo::parallel.prefix()) << t2 - t1 << ' ';
|
||||
}
|
||||
|
||||
#else // _OPENMP
|
||||
|
||||
for (size_t i = 0; i < size; ++i) { _proc(_pop[i]); }
|
||||
|
||||
#endif // !_OPENMP
|
||||
}
|
||||
|
||||
/**
|
||||
This is a variant of apply<EOT> which is called in parallel
|
||||
thanks to OpenMP.
|
||||
|
||||
@ingroup Utilities
|
||||
*/
|
||||
// template <class EOT>
|
||||
// void omp_apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
||||
// {
|
||||
// size_t size = _pop.size();
|
||||
// #pragma omp parallel for if(eo::parallel.isEnabled())
|
||||
// //doesnot work with gcc 4.1.2
|
||||
// //default(none) shared(_proc, _pop, size)
|
||||
// for (size_t i = 0; i < size; ++i)
|
||||
// {
|
||||
// _proc(_pop[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
And now we are using the dynamic scheduling.
|
||||
|
||||
@ingroup Utilities
|
||||
*/
|
||||
// template <class EOT>
|
||||
// void omp_dynamic_apply(eoUF<EOT&, void>& _proc, std::vector<EOT>& _pop)
|
||||
// {
|
||||
// size_t size = _pop.size();
|
||||
// #pragma omp parallel for if(eo::parallel.isEnabled()) schedule(dynamic)
|
||||
// //doesnot work with gcc 4.1.2
|
||||
// //default(none) shared(_proc, _pop, size)
|
||||
// for (size_t i = 0; i < size; ++i)
|
||||
// {
|
||||
// _proc(_pop[i]);
|
||||
// }
|
||||
// }
|
||||
|
||||
#endif
|
||||
73
src/eo/config.h.cmake
Executable file
73
src/eo/config.h.cmake
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
/* config.h.cmake */
|
||||
|
||||
/* Debugging flag */
|
||||
#cmakedefine DEBUG
|
||||
|
||||
/* gnuplot graphical display */
|
||||
#cmakedefine HAVE_GNUPLOT
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `m' library (-lm). */
|
||||
#cmakedefine HAVE_LIBM
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#cmakedefine HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#cmakedefine HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#cmakedefine HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#cmakedefine HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#cmakedefine HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#cmakedefine HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if the system has the type `uint32_t'. */
|
||||
#cmakedefine HAVE_UINT32_T
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#cmakedefine HAVE_UNISTD_H
|
||||
|
||||
/* no debugging */
|
||||
#cmakedefine NDEBUG
|
||||
|
||||
/* no debugging */
|
||||
#cmakedefine NODEBUG
|
||||
|
||||
/* Name of package */
|
||||
#cmakedefine PACKAGE "eo"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#cmakedefine PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#cmakedefine PACKAGE_NAME "@PACKAGE_NAME@"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#cmakedefine PACKAGE_STRING "@PACKAGE_STRING@"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#cmakedefine PACKAGE_TARNAME "@PACKAGE_TARNAME@"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#cmakedefine PACKAGE_VERSION "@PACKAGE_VERSION@"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#cmakedefine STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#cmakedefine "@VERSION VERSION@"
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#cmakedefine size_t
|
||||
11
src/eo/contrib/MGE/ChangeLog
Executable file
11
src/eo/contrib/MGE/ChangeLog
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
2006-12-02 Jochen Küpper <jochen@fhi-berlin.mpg.de>
|
||||
|
||||
* contrib/MGE/VirusOp.h (VirusShiftMutation::operator()): Fix test for
|
||||
i>1. This makes t-MGE1bit pass on x86_64 using GCC.
|
||||
|
||||
|
||||
* Local Variables:
|
||||
* coding: iso-8859-1
|
||||
* mode: flyspell
|
||||
* fill-column: 80
|
||||
* End:
|
||||
146
src/eo/contrib/MGE/VirusOp.h
Executable file
146
src/eo/contrib/MGE/VirusOp.h
Executable file
|
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
ViruOp.h
|
||||
(c) GeNeura Team 2001, Marc Schoenauer 2000
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: eodev-main@lists.sourceforge.net
|
||||
old contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
*/
|
||||
|
||||
#ifndef VirusOp_h
|
||||
#define VirusOp_h
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include <iostream> // ostream, istream
|
||||
#include <functional> // bind2nd
|
||||
#include <string> // std::string
|
||||
|
||||
#include "../../utils/eoRNG.h"
|
||||
|
||||
#include "eoVirus.h"
|
||||
|
||||
/** VirusBitFlip --> changes 1 bit
|
||||
*/
|
||||
|
||||
template<class FitT>
|
||||
class VirusBitFlip: public eoMonOp<eoVirus<FitT> > {
|
||||
public:
|
||||
/// The class name.
|
||||
virtual std::string className() const { return "VirusBitFlip"; };
|
||||
|
||||
/** Change one bit.
|
||||
|
||||
@param chrom The cromosome which one bit is going to be changed.
|
||||
*/
|
||||
bool operator()(eoVirus<FitT>& _chrom) {
|
||||
unsigned i = eo::rng.random(_chrom.size());
|
||||
_chrom.virusBitSet(i, _chrom.virusBit(i) ? false : true );
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<class FitT>
|
||||
class VirusMutation: public eoMonOp<eoVirus<FitT> > {
|
||||
public:
|
||||
/// The class name.
|
||||
virtual std::string className() const { return "VirusMutation"; };
|
||||
|
||||
/** Change one bit.
|
||||
|
||||
@param chrom The cromosome which one bit is going to be changed.
|
||||
*/
|
||||
bool operator()(eoVirus<FitT>& _chrom) {
|
||||
// Search for virus bits
|
||||
std::vector<unsigned> bitsSet;
|
||||
for ( unsigned i = 0; i < _chrom.size(); i ++ ) {
|
||||
if ( _chrom.virusBit(i) ) {
|
||||
bitsSet.push_back( i );
|
||||
}
|
||||
}
|
||||
if ( !bitsSet.size() ) {
|
||||
return false;
|
||||
}
|
||||
unsigned flipSite = eo::rng.random(bitsSet.size());
|
||||
unsigned flipValue = bitsSet[ flipSite ];
|
||||
_chrom[flipValue] = _chrom[flipValue] ? false : true;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/// Works for 1-bit virus; shifts the one to the right or left
|
||||
template<class FitT>
|
||||
class VirusShiftMutation: public eoMonOp<eoVirus<FitT> >
|
||||
{
|
||||
public:
|
||||
|
||||
/// Ctor
|
||||
VirusShiftMutation( ) {};
|
||||
|
||||
/// The class name.
|
||||
virtual std::string className() const { return "VirusShiftMutation"; };
|
||||
|
||||
/** Change one bit.
|
||||
|
||||
@param chrom The cromosome which one bit is going to be changed.
|
||||
*/
|
||||
bool operator()(eoVirus<FitT>& _chrom) {
|
||||
// Search for virus bits
|
||||
eoBooleanGenerator gen;
|
||||
for ( unsigned i = 0; i < _chrom.size(); i ++ ) {
|
||||
if ( _chrom.virusBit(i) ) {
|
||||
if ( gen() ) {
|
||||
if ( i + 1 < _chrom.size() ) {
|
||||
_chrom.virusBitSet(i+1,true);
|
||||
_chrom.virusBitSet(i, false);
|
||||
}
|
||||
} else {
|
||||
if ( i > 1 ) {
|
||||
_chrom.virusBitSet(i-1,true);
|
||||
_chrom.virusBitSet(i, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<class FitT>
|
||||
class VirusTransmission: public eoBinOp<eoVirus<FitT> > {
|
||||
public:
|
||||
/// The class name.
|
||||
virtual std::string className() const { return "VirusTransmission"; };
|
||||
|
||||
/**
|
||||
* Change one bit.
|
||||
* @param _chrom The "receptor" chromosome
|
||||
* @param _chrom2 The "donor" chromosome
|
||||
*/
|
||||
bool operator()(eoVirus<FitT>& _chrom,const eoVirus<FitT>& _chrom2) {
|
||||
// Search for virus bits
|
||||
for ( unsigned i = 0; i < _chrom.size(); i ++ ) {
|
||||
_chrom.virusBitSet(i, _chrom2.virusBit(i) );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //VirusOp_h
|
||||
86
src/eo/contrib/MGE/eoInitVirus.h
Executable file
86
src/eo/contrib/MGE/eoInitVirus.h
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*-
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// eoInit.h
|
||||
// (c) Maarten Keijzer 2000, GeNeura Team, 2000
|
||||
/*
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
mak@dhi.dk
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef _eoInitVirus_H
|
||||
#define _eoInitVirus_H
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "../../eoOp.h"
|
||||
#include "../../eoSTLFunctor.h"
|
||||
#include "../../utils/eoRndGenerators.h"
|
||||
#include "../../eoInit.h"
|
||||
|
||||
/**
|
||||
Initializer for binary chromosome with MGE
|
||||
*/
|
||||
template <class FitT>
|
||||
class eoInitVirus: public eoInit< eoVirus<FitT> > {
|
||||
public:
|
||||
|
||||
eoInitVirus(unsigned _combien, eoRndGenerator<bool>& _generator )
|
||||
: combien(_combien), generator(_generator) {}
|
||||
|
||||
virtual void operator()( eoVirus<FitT>& chrom)
|
||||
{
|
||||
chrom.resize(combien);
|
||||
chrom.virResize(combien);
|
||||
std::generate(chrom.begin(), chrom.end(), generator);
|
||||
for ( unsigned i = 0; i < combien; i ++ ) {
|
||||
chrom.virusBitSet(i, generator() );
|
||||
}
|
||||
chrom.invalidate();
|
||||
}
|
||||
|
||||
private :
|
||||
unsigned combien;
|
||||
/// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics
|
||||
eoSTLF<bool> generator;
|
||||
};
|
||||
|
||||
/// Inits the virus with one bit to the left set to one
|
||||
template <class FitT>
|
||||
class eoInitVirus1bit: public eoInit< eoVirus<FitT> > {
|
||||
public:
|
||||
|
||||
eoInitVirus1bit(unsigned _combien, eoRndGenerator<bool>& _generator )
|
||||
: combien(_combien), generator(_generator) {}
|
||||
|
||||
virtual void operator()( eoVirus<FitT>& chrom)
|
||||
{
|
||||
chrom.resize(combien);
|
||||
chrom.virResize(combien);
|
||||
std::generate(chrom.begin(), chrom.end(), generator);
|
||||
chrom.virusBitSet(0, true );
|
||||
chrom.invalidate();
|
||||
}
|
||||
|
||||
private :
|
||||
unsigned combien;
|
||||
/// generic wrapper for eoFunctor (s), to make them have the function-pointer style copy semantics
|
||||
eoSTLF<bool> generator;
|
||||
};
|
||||
#endif
|
||||
130
src/eo/contrib/MGE/eoVirus.h
Executable file
130
src/eo/contrib/MGE/eoVirus.h
Executable file
|
|
@ -0,0 +1,130 @@
|
|||
/* eoVirus.h
|
||||
|
||||
(c) GeNeura Team 2001, Marc Schoenauer 2000
|
||||
|
||||
This library is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
USA
|
||||
|
||||
Contact: todos@geneura.ugr.es, http://geneura.ugr.es
|
||||
Marc.Schoenauer@polytechnique.fr
|
||||
*/
|
||||
|
||||
|
||||
#ifndef eoVirus_h
|
||||
#define eoVirus_h
|
||||
|
||||
#include <iostream>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../../ga/eoBit.h"
|
||||
|
||||
/**
|
||||
\defgroup bitstring
|
||||
|
||||
Various functions for a bitstring representation
|
||||
*/
|
||||
|
||||
/** Implementation of bitstring chromosome.
|
||||
|
||||
@class eoBit eoBit.h ga/eoBit.h
|
||||
@ingroup bitstring
|
||||
|
||||
Based on STL's vector<bool> specialization.
|
||||
*/
|
||||
template <class FitT>
|
||||
class eoVirus : public eoBit<FitT>
|
||||
{
|
||||
public:
|
||||
|
||||
using eoBit<FitT>::begin;
|
||||
using eoBit<FitT>::end;
|
||||
using eoBit<FitT>::size;
|
||||
|
||||
|
||||
/** (Default) Constructor
|
||||
|
||||
@param size Size of the binary std::string.
|
||||
*/
|
||||
eoVirus(unsigned _size = 0, bool _value = false, bool _virValue = false):
|
||||
eoBit<FitT>(_size, _value), virus( _size, _virValue) {}
|
||||
|
||||
/// My class name
|
||||
virtual std::string className() const {
|
||||
return "eoVirus";
|
||||
}
|
||||
|
||||
/// Access to virus features
|
||||
void virResize( unsigned _i ) {
|
||||
virus.resize(_i );
|
||||
}
|
||||
|
||||
/// Access to virus features
|
||||
bool virusBit( unsigned _i ) const {
|
||||
return virus[_i];
|
||||
}
|
||||
|
||||
/// Change virus features
|
||||
void virusBitSet( unsigned _i, bool _bit ) {
|
||||
virus[_i ] = _bit;
|
||||
}
|
||||
|
||||
/** To print me on a stream.
|
||||
|
||||
@param os The ostream.
|
||||
*/
|
||||
virtual void printOn(std::ostream& os) const {
|
||||
EO<FitT>::printOn(os);
|
||||
os << ' ';
|
||||
os << size() << ' ';
|
||||
std::copy(begin(), end(), std::ostream_iterator<bool>(os));
|
||||
std::cout << std::endl;
|
||||
std::copy(virus.begin(), virus.end(), std::ostream_iterator<bool>(os));
|
||||
}
|
||||
|
||||
/** To read me from a stream.
|
||||
|
||||
@param is The istream.
|
||||
*/
|
||||
virtual void readFrom(std::istream& is){
|
||||
eoBit<FitT>::readFrom(is);
|
||||
unsigned s;
|
||||
is >> s;
|
||||
std::string bits;
|
||||
is >> bits;
|
||||
if (is) {
|
||||
virus.resize(bits.size());
|
||||
std::transform(bits.begin(), bits.end(), virus.begin(),
|
||||
std::bind2nd(std::equal_to<char>(), '1'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
std::vector<bool> virus;
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#endif //eoBit_h
|
||||
|
||||
|
||||
// Local Variables:
|
||||
// coding: iso-8859-1
|
||||
// mode: C++
|
||||
// c-file-style: "Stroustrup"
|
||||
// End:
|
||||
59
src/eo/contrib/boost/config.hpp
Executable file
59
src/eo/contrib/boost/config.hpp
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
// Boost config.hpp configuration header file ------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/config for most recent version.
|
||||
|
||||
// Boost config.hpp policy and rationale documentation has been moved to
|
||||
// http://www.boost.org/libs/config
|
||||
//
|
||||
// CAUTION: This file is intended to be completely stable -
|
||||
// DO NOT MODIFY THIS FILE!
|
||||
//
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#define BOOST_CONFIG_HPP
|
||||
|
||||
// if we don't have a user config, then use the default location:
|
||||
#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG)
|
||||
# define BOOST_USER_CONFIG <boost/config/user.hpp>
|
||||
#endif
|
||||
// include it first:
|
||||
#ifdef BOOST_USER_CONFIG
|
||||
# include BOOST_USER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a compiler config set, try and find one:
|
||||
#if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_compiler_config.hpp>
|
||||
#endif
|
||||
// if we have a compiler config, include it now:
|
||||
#ifdef BOOST_COMPILER_CONFIG
|
||||
# include BOOST_COMPILER_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a std library config set, try and find one:
|
||||
#if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_stdlib_config.hpp>
|
||||
#endif
|
||||
// if we have a std library config, include it now:
|
||||
#ifdef BOOST_STDLIB_CONFIG
|
||||
# include BOOST_STDLIB_CONFIG
|
||||
#endif
|
||||
|
||||
// if we don't have a platform config set, try and find one:
|
||||
#if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG)
|
||||
# include <boost/config/select_platform_config.hpp>
|
||||
#endif
|
||||
// if we have a platform config, include it now:
|
||||
#ifdef BOOST_PLATFORM_CONFIG
|
||||
# include BOOST_PLATFORM_CONFIG
|
||||
#endif
|
||||
|
||||
// get config suffix code:
|
||||
#include <boost/config/suffix.hpp>
|
||||
|
||||
#endif // BOOST_CONFIG_HPP
|
||||
20
src/eo/contrib/boost/config/abi_prefix.hpp
Executable file
20
src/eo/contrib/boost/config/abi_prefix.hpp
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
// abi_prefix header -------------------------------------------------------//
|
||||
|
||||
// © Copyright John Maddock 2003
|
||||
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
# define BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#else
|
||||
# error double inclusion of header boost/config/abi_prefix.hpp is an error
|
||||
#endif
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
// this must occur after all other includes and before any code appears:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_PREFIX
|
||||
#endif
|
||||
21
src/eo/contrib/boost/config/abi_suffix.hpp
Executable file
21
src/eo/contrib/boost/config/abi_suffix.hpp
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
// abi_sufffix header -------------------------------------------------------//
|
||||
|
||||
// © Copyright John Maddock 2003
|
||||
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
|
||||
// This header should be #included AFTER code that was preceded by a #include
|
||||
// <boost/config/abi_prefix.hpp>.
|
||||
|
||||
#ifndef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp
|
||||
#else
|
||||
# undef BOOST_CONFIG_ABI_PREFIX_HPP
|
||||
#endif
|
||||
|
||||
// the suffix header occurs after all of our code:
|
||||
#ifdef BOOST_HAS_ABI_HEADERS
|
||||
# include BOOST_ABI_SUFFIX
|
||||
#endif
|
||||
344
src/eo/contrib/boost/config/auto_link.hpp
Executable file
344
src/eo/contrib/boost/config/auto_link.hpp
Executable file
|
|
@ -0,0 +1,344 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
/*
|
||||
* LOCATION: see http://www.boost.org for most recent version.
|
||||
* FILE auto_link.hpp
|
||||
* VERSION see <boost/version.hpp>
|
||||
* DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|
||||
USAGE:
|
||||
~~~~~~
|
||||
|
||||
Before including this header you must define one or more of define the following macros:
|
||||
|
||||
BOOST_LIB_NAME: Required: A string containing the basename of the library,
|
||||
for example boost_regex.
|
||||
BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
|
||||
BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
|
||||
BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
|
||||
of the library selected (useful for debugging).
|
||||
BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
|
||||
rather than a mangled-name version.
|
||||
|
||||
These macros will be undef'ed at the end of the header, further this header
|
||||
has no include guards - so be sure to include it only once from your library!
|
||||
|
||||
Algorithm:
|
||||
~~~~~~~~~~
|
||||
|
||||
Libraries for Borland and Microsoft compilers are automatically
|
||||
selected here, the name of the lib is selected according to the following
|
||||
formula:
|
||||
|
||||
BOOST_LIB_PREFIX
|
||||
+ BOOST_LIB_NAME
|
||||
+ "_"
|
||||
+ BOOST_LIB_TOOLSET
|
||||
+ BOOST_LIB_THREAD_OPT
|
||||
+ BOOST_LIB_RT_OPT
|
||||
"-"
|
||||
+ BOOST_LIB_VERSION
|
||||
|
||||
These are defined as:
|
||||
|
||||
BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
|
||||
|
||||
BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).
|
||||
|
||||
BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
|
||||
|
||||
BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
|
||||
|
||||
BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
|
||||
contains one or more of the following letters after
|
||||
a hiphen:
|
||||
|
||||
s static runtime (dynamic if not present).
|
||||
d debug build (release if not present).
|
||||
g debug/diagnostic runtime (release if not present).
|
||||
p STLPort Build.
|
||||
|
||||
BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
|
||||
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
|
||||
//
|
||||
// C language compatability (no, honestly)
|
||||
//
|
||||
# define BOOST_MSVC _MSC_VER
|
||||
# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
# define BOOST_DO_STRINGIZE(X) #X
|
||||
#endif
|
||||
//
|
||||
// Only include what follows for known and supported compilers:
|
||||
//
|
||||
#if defined(BOOST_MSVC) \
|
||||
|| defined(__BORLANDC__) \
|
||||
|| (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
|
||||
|| (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
|
||||
|
||||
#ifndef BOOST_VERSION_HPP
|
||||
# include <boost/version.hpp>
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_LIB_NAME
|
||||
# error "Macro BOOST_LIB_NAME not set (internal error)"
|
||||
#endif
|
||||
|
||||
//
|
||||
// error check:
|
||||
//
|
||||
#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
|
||||
# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
|
||||
# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
|
||||
# error "Incompatible build options"
|
||||
#endif
|
||||
//
|
||||
// select toolset if not defined already:
|
||||
//
|
||||
#ifndef BOOST_LIB_TOOLSET
|
||||
#if defined(BOOST_MSVC) && (BOOST_MSVC == 1200)
|
||||
|
||||
// vc6:
|
||||
# define BOOST_LIB_TOOLSET "vc6"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1300)
|
||||
|
||||
// vc7:
|
||||
# define BOOST_LIB_TOOLSET "vc7"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
|
||||
|
||||
// vc71:
|
||||
# define BOOST_LIB_TOOLSET "vc71"
|
||||
|
||||
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
|
||||
|
||||
// vc80:
|
||||
# define BOOST_LIB_TOOLSET "vc80"
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
// CBuilder 6:
|
||||
# define BOOST_LIB_TOOLSET "bcb"
|
||||
|
||||
#elif defined(__ICL)
|
||||
|
||||
// Intel C++, no version number:
|
||||
# define BOOST_LIB_TOOLSET "iw"
|
||||
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
|
||||
|
||||
// Metrowerks CodeWarrior 8.x
|
||||
# define BOOST_LIB_TOOLSET "cw8"
|
||||
|
||||
#elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
|
||||
|
||||
// Metrowerks CodeWarrior 9.x
|
||||
# define BOOST_LIB_TOOLSET "cw9"
|
||||
|
||||
#endif
|
||||
#endif // BOOST_LIB_TOOLSET
|
||||
|
||||
//
|
||||
// select thread opt:
|
||||
//
|
||||
#if defined(_MT) || defined(__MT__)
|
||||
# define BOOST_LIB_THREAD_OPT "-mt"
|
||||
#else
|
||||
# define BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MWERKS__)
|
||||
|
||||
# ifdef _DLL
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdp"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-p"
|
||||
# endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gdpn"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-pn"
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-gd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdp"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-sp"
|
||||
# endif
|
||||
|
||||
# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
|
||||
# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# elif defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgdpn"
|
||||
# pragma message("warning: STLPort debug versions are built with /D_STLP_DEBUG=1")
|
||||
# error "Build options aren't compatible with pre-built libraries"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-spn"
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# if defined(_DEBUG)
|
||||
# define BOOST_LIB_RT_OPT "-sgd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
|
||||
//
|
||||
// figure out whether we want the debug builds or not:
|
||||
//
|
||||
#if __BORLANDC__ > 0x561
|
||||
#pragma defineonoption BOOST_BORLAND_DEBUG -v
|
||||
#endif
|
||||
//
|
||||
// sanity check:
|
||||
//
|
||||
#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
|
||||
#error "Pre-built versions of the Boost libraries are not provided in STLPort-debug form"
|
||||
#endif
|
||||
|
||||
# ifdef _RTLDLL
|
||||
|
||||
# ifdef BOOST_BORLAND_DEBUG
|
||||
# define BOOST_LIB_RT_OPT "-d"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT
|
||||
# endif
|
||||
|
||||
# else
|
||||
|
||||
# ifdef BOOST_BORLAND_DEBUG
|
||||
# define BOOST_LIB_RT_OPT "-sd"
|
||||
# else
|
||||
# define BOOST_LIB_RT_OPT "-s"
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// select linkage opt:
|
||||
//
|
||||
#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
|
||||
# define BOOST_LIB_PREFIX
|
||||
#elif defined(BOOST_DYN_LINK)
|
||||
# error "Mixing a dll boost library with a static runtime is a really bad idea..."
|
||||
#else
|
||||
# define BOOST_LIB_PREFIX "lib"
|
||||
#endif
|
||||
|
||||
//
|
||||
// now include the lib:
|
||||
//
|
||||
#if defined(BOOST_LIB_NAME) \
|
||||
&& defined(BOOST_LIB_PREFIX) \
|
||||
&& defined(BOOST_LIB_TOOLSET) \
|
||||
&& defined(BOOST_LIB_THREAD_OPT) \
|
||||
&& defined(BOOST_LIB_RT_OPT) \
|
||||
&& defined(BOOST_LIB_VERSION)
|
||||
|
||||
#ifndef BOOST_AUTO_LINK_NOMANGLE
|
||||
# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib")
|
||||
# endif
|
||||
#else
|
||||
# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# ifdef BOOST_LIB_DIAGNOSTIC
|
||||
# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
# error "some required macros where not defined (internal logic error)."
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _MSC_VER || __BORLANDC__
|
||||
|
||||
//
|
||||
// finally undef any macros we may have set:
|
||||
//
|
||||
#ifdef BOOST_LIB_PREFIX
|
||||
# undef BOOST_LIB_PREFIX
|
||||
#endif
|
||||
#if defined(BOOST_LIB_NAME)
|
||||
# undef BOOST_LIB_NAME
|
||||
#endif
|
||||
#if defined(BOOST_LIB_TOOLSET)
|
||||
# undef BOOST_LIB_TOOLSET
|
||||
#endif
|
||||
#if defined(BOOST_LIB_THREAD_OPT)
|
||||
# undef BOOST_LIB_THREAD_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_RT_OPT)
|
||||
# undef BOOST_LIB_RT_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_LINK_OPT)
|
||||
# undef BOOST_LIB_LINK_OPT
|
||||
#endif
|
||||
#if defined(BOOST_LIB_DEBUG_OPT)
|
||||
# undef BOOST_LIB_DEBUG_OPT
|
||||
#endif
|
||||
#if defined(BOOST_DYN_LINK)
|
||||
# undef BOOST_DYN_LINK
|
||||
#endif
|
||||
#if defined(BOOST_AUTO_LINK_NOMANGLE)
|
||||
# undef BOOST_AUTO_LINK_NOMANGLE
|
||||
#endif
|
||||
175
src/eo/contrib/boost/config/compiler/borland.hpp
Executable file
175
src/eo/contrib/boost/config/compiler/borland.hpp
Executable file
|
|
@ -0,0 +1,175 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Borland C++ compiler setup:
|
||||
|
||||
// Version 5.0 and below:
|
||||
# if __BORLANDC__ <= 0x0550
|
||||
// Borland C++Builder 4 and 5:
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# if __BORLANDC__ == 0x0550
|
||||
// Borland C++Builder 5, command-line compiler 5.5:
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// Version 5.51 and below:
|
||||
#if (__BORLANDC__ <= 0x551)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_DEDUCED_TYPENAME
|
||||
// workaround for missing WCHAR_MAX/WCHAR_MIN:
|
||||
#include <climits>
|
||||
#include <cwchar>
|
||||
#ifndef WCHAR_MAX
|
||||
# define WCHAR_MAX 0xffff
|
||||
#endif
|
||||
#ifndef WCHAR_MIN
|
||||
# define WCHAR_MIN 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Version 7.0 (Kylix) and below:
|
||||
#if (__BORLANDC__ <= 0x570)
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
// we shouldn't really need this - but too many things choke
|
||||
// without it, this needs more investigation:
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# ifdef NDEBUG
|
||||
// fix broken <cstring> so that Boost.test works:
|
||||
# include <cstring>
|
||||
# undef strcmp
|
||||
# endif
|
||||
|
||||
//
|
||||
// new bug in 5.61:
|
||||
#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x570)
|
||||
// this seems to be needed by the command line compiler, but not the IDE:
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
# ifdef _WIN32
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# elif defined(linux) || defined(__linux__) || defined(__linux)
|
||||
// we should really be able to do without this
|
||||
// but the wcs* functions aren't imported into std::
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
// _CPPUNWIND doesn't get automatically set for some reason:
|
||||
# pragma defineonoption BOOST_CPPUNWIND -x
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Post 0x561 we have long long and stdint.h:
|
||||
#if __BORLANDC__ >= 0x561
|
||||
# ifndef __NO_LONG_LONG
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# endif
|
||||
// On non-Win32 platforms let the platform config figure this out:
|
||||
# ifdef _WIN32
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
|
||||
// defined, then we have 0x560 or greater with the Rogue Wave implementation
|
||||
// which presumably has the std::DBL_MAX bug.
|
||||
#if ((__BORLANDC__ >= 0x550) && (__BORLANDC__ < 0x560)) || defined(_USE_OLD_RW_STL)
|
||||
// <climits> is partly broken, some macros define symbols that are really in
|
||||
// namespace std, so you end up having to use illegal constructs like
|
||||
// std::DBL_MAX, as a fix we'll just include float.h and have done with:
|
||||
#include <float.h>
|
||||
#endif
|
||||
//
|
||||
// __int64:
|
||||
//
|
||||
#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
//
|
||||
// check for exception handling support:
|
||||
//
|
||||
#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
//
|
||||
// all versions have a <dirent.h>:
|
||||
//
|
||||
#ifndef __STRICT_ANSI__
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#ifndef __STRICT_ANSI__
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
#endif
|
||||
//
|
||||
// ABI fixing headers:
|
||||
//
|
||||
#if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
// Disable Win32 support in ANSI mode:
|
||||
//
|
||||
#if __BORLANDC__ < 0x600
|
||||
# pragma defineonoption BOOST_DISABLE_WIN32 -A
|
||||
#elif defined(__STRICT_ANSI__)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
//
|
||||
// MSVC compatibility mode does some nasty things:
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Borland prior to version 5.4:
|
||||
#if __BORLANDC__ < 0x540
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 1536 (Builder X preview):
|
||||
#if (__BORLANDC__ > 1536)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
59
src/eo/contrib/boost/config/compiler/comeau.hpp
Executable file
59
src/eo/contrib/boost/config/compiler/comeau.hpp
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Douglas Gregor 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Comeau C++ compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#if (__COMO_VERSION__ <= 4245)
|
||||
|
||||
# if defined(_MSC_VER) && _MSC_VER <= 1300
|
||||
# if _MSC_VER > 100
|
||||
// only set this in non-strict mode:
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// Void returns don't work when emulating VC 6 (Peter Dimov)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER == 1200)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# endif
|
||||
|
||||
#endif // version 4245
|
||||
|
||||
//
|
||||
// enable __int64 support in VC emulation mode
|
||||
//
|
||||
# if defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
|
||||
#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't know Comeau prior to version 4245:
|
||||
#if __COMO_VERSION__ < 4245
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4245:
|
||||
#if (__COMO_VERSION__ > 4245)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
62
src/eo/contrib/boost/config/compiler/common_edg.hpp
Executable file
62
src/eo/contrib/boost/config/compiler/common_edg.hpp
Executable file
|
|
@ -0,0 +1,62 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright Markus Schoepflin 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
//
|
||||
// Options common to all edg based compilers.
|
||||
//
|
||||
// This is included from within the individual compiler mini-configs.
|
||||
|
||||
#ifndef __EDG_VERSION__
|
||||
# error This file requires that __EDG_VERSION__ be defined.
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 238)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_SFINAE
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 240)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT)
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
#endif
|
||||
|
||||
#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
// See also kai.hpp which checks a Kai-specific symbol for EH
|
||||
# if !defined(__KCC) && !defined(__EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
|
||||
# if !defined(__NO_LONG_LONG)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# endif
|
||||
|
||||
#ifdef c_plusplus
|
||||
// EDG has "long long" in non-strict mode
|
||||
// However, some libraries have insufficient "long long" support
|
||||
// #define BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
19
src/eo/contrib/boost/config/compiler/compaq_cxx.hpp
Executable file
19
src/eo/contrib/boost/config/compiler/compaq_cxx.hpp
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Dec Alpha True64 C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "Dec Alpha True64 " BOOST_STRINGIZE(__DECCXX_VER)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// Nothing to do here?
|
||||
|
||||
|
||||
|
||||
49
src/eo/contrib/boost/config/compiler/digitalmars.hpp
Executable file
49
src/eo/contrib/boost/config/compiler/digitalmars.hpp
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
// Copyright (C) Christof Meerwald 2003
|
||||
// Copyright (C) Dan Watkins 2003
|
||||
//
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Digital Mars C++ compiler setup:
|
||||
#define BOOST_COMPILER __DMC_VERSION_STRING__
|
||||
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
#define BOOST_HAS_PRAGMA_ONCE
|
||||
|
||||
#if (__DMC__ <= 0x833)
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING
|
||||
#define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#endif
|
||||
#if (__DMC__ <= 0x840) || !defined(BOOST_STRICT_CONFIG)
|
||||
#define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
#define BOOST_NO_SFINAE
|
||||
#define BOOST_NO_USING_TEMPLATE
|
||||
#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
//
|
||||
// has macros:
|
||||
#if (__DMC__ >= 0x840)
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#define BOOST_HAS_WINTHREADS
|
||||
#endif
|
||||
|
||||
|
||||
// check for exception handling support:
|
||||
#ifndef _CPPUNWIND
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if (__DMC__ < 0x840)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
105
src/eo/contrib/boost/config/compiler/gcc.hpp
Executable file
105
src/eo/contrib/boost/config/compiler/gcc.hpp
Executable file
|
|
@ -0,0 +1,105 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Synge Todo 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// GNU C++ compiler setup:
|
||||
|
||||
#if __GNUC__ < 3
|
||||
# if __GNUC_MINOR__ == 91
|
||||
// egcs 1.1 won't parse shared_ptr.hpp without this:
|
||||
# define BOOST_NO_AUTO_PTR
|
||||
# endif
|
||||
# if __GNUC_MINOR__ < 95
|
||||
//
|
||||
// Prior to gcc 2.95 member templates only partly
|
||||
// work - define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
// instead since inline member templates mostly work.
|
||||
//
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# if __GNUC_MINOR__ >= 9
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if __GNUC_MINOR__ < 96
|
||||
# define BOOST_NO_SFINAE
|
||||
# endif
|
||||
|
||||
# if __GNUC_MINOR__ <= 97
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# endif
|
||||
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
#elif __GNUC__ == 3
|
||||
//
|
||||
// gcc-3.x problems:
|
||||
//
|
||||
// Bug specific to gcc 3.1 and 3.2:
|
||||
//
|
||||
# if ((__GNUC_MINOR__ == 1) || (__GNUC_MINOR__ == 2))
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# endif
|
||||
# if __GNUC_MINOR__ < 4
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __EXCEPTIONS
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Threading support: Turn this on unconditionally here (except for
|
||||
// those platforms where we can know for sure). It will get turned off again
|
||||
// later if no threading API is detected.
|
||||
//
|
||||
#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc has "long long"
|
||||
//
|
||||
#define BOOST_HAS_LONG_LONG
|
||||
|
||||
//
|
||||
// gcc implements the named return value optimization since version 3.1
|
||||
//
|
||||
#if __GNUC__ > 3 || ( __GNUC__ == 3 && __GNUC_MINOR__ >= 1 )
|
||||
#define BOOST_HAS_NRVO
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "GNU C++ version " __VERSION__
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't know gcc prior to version 2.90:
|
||||
#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
|
||||
# error "Compiler not configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 4.0 (Pre-release):
|
||||
#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 0))
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
// we don't emit warnings here anymore since there are no defect macros defined for
|
||||
// gcc post 3.4, so any failures are gcc regressions...
|
||||
//# warning "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
28
src/eo/contrib/boost/config/compiler/greenhills.hpp
Executable file
28
src/eo/contrib/boost/config/compiler/greenhills.hpp
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Greenhills C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Greenhills prior to version 0:
|
||||
#if __ghs < 0
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0:
|
||||
#if (__ghs > 0)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
70
src/eo/contrib/boost/config/compiler/hp_acc.hpp
Executable file
70
src/eo/contrib/boost/config/compiler/hp_acc.hpp
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// HP aCC C++ compiler setup:
|
||||
|
||||
#if (__HP_aCC <= 33100)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_OPERATORS_IN_NAMESPACE
|
||||
# if !defined(_NAMESPACE_STD)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33300)
|
||||
// member templates are sufficiently broken that we disable them for now
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC <= 33900) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
// std lib config should set this one already:
|
||||
//# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
// optional features rather than defects:
|
||||
#if (__HP_aCC >= 33900)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
|
||||
#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support HP aCC prior to version 0:
|
||||
#if __HP_aCC < 33000
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0:
|
||||
#if (__HP_aCC > 53800)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
146
src/eo/contrib/boost/config/compiler/intel.hpp
Executable file
146
src/eo/contrib/boost/config/compiler/intel.hpp
Executable file
|
|
@ -0,0 +1,146 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Intel compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
#if defined(__INTEL_COMPILER)
|
||||
# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
|
||||
#elif defined(__ICL)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICL
|
||||
#elif defined(__ICC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ICC
|
||||
#elif defined(__ECC)
|
||||
# define BOOST_INTEL_CXX_VERSION __ECC
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
|
||||
#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
# define BOOST_INTEL_WIN BOOST_INTEL
|
||||
#else
|
||||
# define BOOST_INTEL_LINUX BOOST_INTEL
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER)
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 600)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
|
||||
|
||||
// Boost libraries assume strong standard conformance unless otherwise
|
||||
// indicated by a config macro. As configured by Intel, the EDG front-end
|
||||
// requires certain compiler options be set to achieve that strong conformance.
|
||||
// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
|
||||
// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
|
||||
// details as they apply to particular versions of the compiler. When the
|
||||
// compiler does not predefine a macro indicating if an option has been set,
|
||||
// this config file simply assumes the option has been set.
|
||||
// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
|
||||
// the compiler option is not enabled.
|
||||
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
|
||||
// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
|
||||
|
||||
# if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
#endif
|
||||
|
||||
// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
|
||||
#if BOOST_INTEL_CXX_VERSION < 600
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#else
|
||||
// We should test the macro _WCHAR_T_DEFINED to check if the compiler
|
||||
// supports wchar_t natively. *BUT* there is a problem here: the standard
|
||||
// headers define this macro if they typedef wchar_t. Anyway, we're lucky
|
||||
// because they define it without a value, while Intel C++ defines it
|
||||
// to 1. So we can check its value to see if the macro was defined natively
|
||||
// or not.
|
||||
// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
|
||||
// is used instead.
|
||||
# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// set correctly, if we don't do this now, we will get errors later
|
||||
// in type_traits code among other things, getting this correct
|
||||
// for the Intel compiler is actually remarkably fragile and tricky:
|
||||
//
|
||||
#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
|
||||
#include <cwchar>
|
||||
template< typename T > struct assert_no_intrinsic_wchar_t;
|
||||
template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
|
||||
// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
|
||||
// where it is defined above:
|
||||
typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
|
||||
#else
|
||||
template< typename T > struct assert_intrinsic_wchar_t;
|
||||
template<> struct assert_intrinsic_wchar_t<wchar_t> {};
|
||||
// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
|
||||
template<> struct assert_intrinsic_wchar_t<unsigned short> {};
|
||||
#endif
|
||||
|
||||
#if _MSC_VER+0 >= 1000
|
||||
# if _MSC_VER >= 1200
|
||||
# define BOOST_HAS_MS_INT64
|
||||
# endif
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#elif defined(_WIN32)
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
|
||||
// I checked version 6.0 build 020312Z, it implements the NRVO.
|
||||
// Correct this as you find out which version of the compiler
|
||||
// implemented the NRVO first. (Daniel Frey)
|
||||
#if (BOOST_INTEL_CXX_VERSION >= 600)
|
||||
# define BOOST_HAS_NRVO
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Intel prior to version 5.0:
|
||||
#if BOOST_INTEL_CXX_VERSION < 500
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (BOOST_INTEL_CXX_VERSION > 900)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# elif defined(_MSC_VER)
|
||||
# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
35
src/eo/contrib/boost/config/compiler/kai.hpp
Executable file
35
src/eo/contrib/boost/config/compiler/kai.hpp
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Kai C++ compiler setup:
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
|
||||
// at least on Sun, the contents of <cwchar> is not in namespace std
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
|
||||
// see also common_edg.hpp which needs a special check for __KCC
|
||||
# if !defined(_EXCEPTIONS)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
# endif
|
||||
|
||||
#define BOOST_COMPILER "Kai C++ version " BOOST_STRINGIZE(__KCC_VERSION)
|
||||
|
||||
//
|
||||
// last known and checked version is 4001:
|
||||
#if (__KCC_VERSION > 4001)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
104
src/eo/contrib/boost/config/compiler/metrowerks.hpp
Executable file
104
src/eo/contrib/boost/config/compiler/metrowerks.hpp
Executable file
|
|
@ -0,0 +1,104 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright David Abrahams 2001 - 2002.
|
||||
// (C) Copyright Beman Dawes 2001 - 2003.
|
||||
// (C) Copyright Stefan Slapeta 2004.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Metrowerks C++ compiler setup:
|
||||
|
||||
// locale support is disabled when linking with the dynamic runtime
|
||||
# ifdef _MSL_NO_LOCALE
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
|
||||
# if __MWERKS__ <= 0x2301 // 5.3
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_CONST
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
# endif
|
||||
|
||||
# if __MWERKS__ <= 0x2401 // 6.2
|
||||
//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
|
||||
# if(__MWERKS__ <= 0x2407) // 7.x
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# endif
|
||||
|
||||
# if(__MWERKS__ <= 0x3003) // 8.x
|
||||
# define BOOST_NO_SFINAE
|
||||
# endif
|
||||
|
||||
// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
|
||||
// tested version *only*:
|
||||
# if(__MWERKS__ <= 0x3206) || !defined(BOOST_STRICT_CONFIG) // 9.5
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
#if !__option(wchar_type)
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
#if !__option(exceptions)
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
|
||||
# if __MWERKS__ == 0x3000
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# elif __MWERKS__ == 0x3001
|
||||
# define BOOST_COMPILER_VERSION 8.1
|
||||
# elif __MWERKS__ == 0x3002
|
||||
# define BOOST_COMPILER_VERSION 8.2
|
||||
# elif __MWERKS__ == 0x3003
|
||||
# define BOOST_COMPILER_VERSION 8.3
|
||||
# elif __MWERKS__ == 0x3200
|
||||
# define BOOST_COMPILER_VERSION 9.0
|
||||
# elif __MWERKS__ == 0x3201
|
||||
# define BOOST_COMPILER_VERSION 9.1
|
||||
# elif __MWERKS__ == 0x3202
|
||||
# define BOOST_COMPILER_VERSION 9.2
|
||||
# elif __MWERKS__ == 0x3204
|
||||
# define BOOST_COMPILER_VERSION 9.3
|
||||
# elif __MWERKS__ == 0x3205
|
||||
# define BOOST_COMPILER_VERSION 9.4
|
||||
# elif __MWERKS__ == 0x3206
|
||||
# define BOOST_COMPILER_VERSION 9.5
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_COMPILER_VERSION __MWERKS__
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Metrowerks prior to version 5.3:
|
||||
#if __MWERKS__ < 0x2301
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version:
|
||||
#if (__MWERKS__ > 0x3205)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
51
src/eo/contrib/boost/config/compiler/mpw.hpp
Executable file
51
src/eo/contrib/boost/config/compiler/mpw.hpp
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// MPW C++ compilers setup:
|
||||
|
||||
# if defined(__SC__)
|
||||
# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
|
||||
# elif defined(__MRC__)
|
||||
# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
|
||||
# else
|
||||
# error "Using MPW compiler configuration by mistake. Please update."
|
||||
# endif
|
||||
|
||||
//
|
||||
// MPW 8.90:
|
||||
//
|
||||
#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_CV_SPECIALIZATIONS
|
||||
# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
|
||||
# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
|
||||
#endif
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support MPW prior to version 8.9:
|
||||
#if MPW_CPLUS < 0x890
|
||||
# error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0x890:
|
||||
#if (MPW_CPLUS > 0x890)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
24
src/eo/contrib/boost/config/compiler/sgi_mipspro.hpp
Executable file
24
src/eo/contrib/boost/config/compiler/sgi_mipspro.hpp
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// SGI C++ compiler setup:
|
||||
|
||||
#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION)
|
||||
|
||||
#include "boost/config/compiler/common_edg.hpp"
|
||||
|
||||
//
|
||||
// Threading support:
|
||||
// Turn this on unconditionally here, it will get turned off again later
|
||||
// if no threading API is detected.
|
||||
//
|
||||
#define BOOST_HAS_THREADS
|
||||
//
|
||||
// version check:
|
||||
// probably nothing to do here?
|
||||
|
||||
|
||||
90
src/eo/contrib/boost/config/compiler/sunpro_cc.hpp
Executable file
90
src/eo/contrib/boost/config/compiler/sunpro_cc.hpp
Executable file
|
|
@ -0,0 +1,90 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright Peter Dimov 2002.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Sun C++ compiler setup:
|
||||
|
||||
# if __SUNPRO_CC <= 0x500
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x520)
|
||||
//
|
||||
// Sunpro 5.2 and earler:
|
||||
//
|
||||
// although sunpro 5.2 supports the syntax for
|
||||
// inline initialization it often gets the value
|
||||
// wrong, especially where the value is computed
|
||||
// from other constants (J Maddock 6th May 2001)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// Although sunpro 5.2 supports the syntax for
|
||||
// partial specialization, it often seems to
|
||||
// bind to the wrong specialization. Better
|
||||
// to disable it until suppport becomes more stable
|
||||
// (J Maddock 6th May 2001).
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC <= 0x530)
|
||||
// Requesting debug info (-g) with Boost.Python results
|
||||
// in an internal compiler error for "static const"
|
||||
// initialized in-class.
|
||||
// >> Assertion: (../links/dbg_cstabs.cc, line 611)
|
||||
// while processing ../test.cpp at line 0.
|
||||
// (Jens Maurer according to Gottfried Ganßauge 04 Mar 2002)
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
|
||||
// SunPro 5.3 has better support for partial specialization,
|
||||
// but breaks when compiling std::less<shared_ptr<T> >
|
||||
// (Jens Maurer 4 Nov 2001).
|
||||
|
||||
// std::less specialization fixed as reported by George
|
||||
// Heintzelman; partial specialization re-enabled
|
||||
// (Peter Dimov 17 Jan 2002)
|
||||
|
||||
//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
// integral constant expressions with 64 bit numbers fail
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# endif
|
||||
|
||||
# if (__SUNPRO_CC < 0x570)
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
// see http://lists.boost.org/MailArchives/boost/msg47184.php
|
||||
// and http://lists.boost.org/MailArchives/boost/msg47220.php
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# endif
|
||||
|
||||
#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support sunpro prior to version 4:
|
||||
#if __SUNPRO_CC < 0x400
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 0x570:
|
||||
#if (__SUNPRO_CC > 0x570)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
58
src/eo/contrib/boost/config/compiler/vacpp.hpp
Executable file
58
src/eo/contrib/boost/config/compiler/vacpp.hpp
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Toon Knapen 2001 - 2003.
|
||||
// (C) Copyright Lie-Quan Lee 2001.
|
||||
// (C) Copyright Markus Schöpflin 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Visual Age (IBM) C++ compiler setup:
|
||||
|
||||
#if __IBMCPP__ <= 501
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
#endif
|
||||
|
||||
#if (__IBMCPP__ <= 502)
|
||||
// Actually the compiler supports inclass member initialization but it
|
||||
// requires a definition for the class member and it doesn't recognize
|
||||
// it as an integral constant expression when used as a template argument.
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
#endif
|
||||
|
||||
#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// On AIX thread support seems to be indicated by _THREAD_SAFE:
|
||||
//
|
||||
#ifdef _THREAD_SAFE
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Visual age prior to version 5:
|
||||
#if __IBMCPP__ < 500
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 600:
|
||||
#if (__IBMCPP__ > 600)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
147
src/eo/contrib/boost/config/compiler/visualc.hpp
Executable file
147
src/eo/contrib/boost/config/compiler/visualc.hpp
Executable file
|
|
@ -0,0 +1,147 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Microsoft Visual C++ compiler setup:
|
||||
|
||||
#define BOOST_MSVC _MSC_VER
|
||||
|
||||
// turn off the warnings before we #include anything
|
||||
#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
|
||||
|
||||
#if _MSC_VER < 1300 // 1200 == VC++ 6.0, 1201 == EVC4.2
|
||||
#pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
# define BOOST_NO_VOID_RETURNS
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
// disable min/max macro defines on vc6:
|
||||
//
|
||||
#endif
|
||||
|
||||
#if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
|
||||
|
||||
#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
|
||||
# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
|
||||
#endif
|
||||
|
||||
# define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_NO_PRIVATE_IN_AGGREGATE
|
||||
# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
# define BOOST_NO_DEDUCED_TYPENAME
|
||||
# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
||||
|
||||
// VC++ 6/7 has member templates but they have numerous problems including
|
||||
// cases of silent failure, so for safety we define:
|
||||
# define BOOST_NO_MEMBER_TEMPLATES
|
||||
// For VC++ experts wishing to attempt workarounds, we define:
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
|
||||
# define BOOST_NO_USING_TEMPLATE
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# define BOOST_NO_TEMPLATE_TEMPLATES
|
||||
# define BOOST_NO_SFINAE
|
||||
# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_IS_ABSTRACT
|
||||
# if (_MSC_VER > 1200)
|
||||
# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#if _MSC_VER < 1310 // 1310 == VC++ 7.1
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if _MSC_VER <= 1400 // 1400 == VC++ 8.0
|
||||
# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
#endif
|
||||
|
||||
#ifndef _NATIVE_WCHAR_T_DEFINED
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# define BOOST_NO_THREADEX
|
||||
# define BOOST_NO_GETSYSTEMTIMEASFILETIME
|
||||
#endif
|
||||
|
||||
//
|
||||
// check for exception handling support:
|
||||
#ifndef _CPPUNWIND
|
||||
# define BOOST_NO_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// __int64 support:
|
||||
//
|
||||
#if (_MSC_VER >= 1200)
|
||||
# define BOOST_HAS_MS_INT64
|
||||
#endif
|
||||
#if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
//
|
||||
// disable Win32 API's if compiler extentions are
|
||||
// turned off:
|
||||
//
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
# define BOOST_DISABLE_WIN32
|
||||
#endif
|
||||
|
||||
//
|
||||
// all versions support __declspec:
|
||||
//
|
||||
#define BOOST_HAS_DECLSPEC
|
||||
//
|
||||
// prefix and suffix headers:
|
||||
//
|
||||
#ifndef BOOST_ABI_PREFIX
|
||||
# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
|
||||
#endif
|
||||
#ifndef BOOST_ABI_SUFFIX
|
||||
# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
|
||||
#endif
|
||||
|
||||
# if _MSC_VER == 1200
|
||||
# define BOOST_COMPILER_VERSION 6.0
|
||||
# elif _MSC_VER == 1300
|
||||
# define BOOST_COMPILER_VERSION 7.0
|
||||
# elif _MSC_VER == 1310
|
||||
# define BOOST_COMPILER_VERSION 7.1
|
||||
# elif _MSC_VER == 1400
|
||||
# define BOOST_COMPILER_VERSION 8.0
|
||||
# else
|
||||
# define BOOST_COMPILER_VERSION _MSC_VER
|
||||
# endif
|
||||
|
||||
#define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
|
||||
|
||||
//
|
||||
// versions check:
|
||||
// we don't support Visual C++ prior to version 6:
|
||||
#if _MSC_VER < 1200
|
||||
#error "Compiler not supported or configured - please reconfigure"
|
||||
#endif
|
||||
//
|
||||
// last known and checked version is 1310:
|
||||
#if (_MSC_VER > 1400)
|
||||
# if defined(BOOST_ASSERT_CONFIG)
|
||||
# error "Unknown compiler version - please run the configure tests and report the results"
|
||||
# else
|
||||
# pragma message("Unknown compiler version - please run the configure tests and report the results")
|
||||
# endif
|
||||
#endif
|
||||
33
src/eo/contrib/boost/config/platform/aix.hpp
Executable file
33
src/eo/contrib/boost/config/platform/aix.hpp
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// IBM/Aix specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "IBM Aix"
|
||||
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#define BOOST_HAS_NL_TYPES_H
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
#define BOOST_HAS_CLOCK_GETTIME
|
||||
|
||||
// This needs support in "boost/cstdint.hpp" exactly like FreeBSD.
|
||||
// This platform has header named <inttypes.h> which includes all
|
||||
// the things needed.
|
||||
#define BOOST_HAS_STDINT_H
|
||||
|
||||
// Threading API's:
|
||||
#define BOOST_HAS_PTHREADS
|
||||
#define BOOST_HAS_PTHREAD_DELAY_NP
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
//#define BOOST_HAS_PTHREAD_YIELD
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
15
src/eo/contrib/boost/config/platform/amigaos.hpp
Executable file
15
src/eo/contrib/boost/config/platform/amigaos.hpp
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
// (C) Copyright John Maddock 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
#define BOOST_PLATFORM "AmigaOS"
|
||||
|
||||
#define BOOST_DISABLE_THREADS
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
|
||||
|
||||
26
src/eo/contrib/boost/config/platform/beos.hpp
Executable file
26
src/eo/contrib/boost/config/platform/beos.hpp
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// BeOS specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "BeOS"
|
||||
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
|
||||
#define BOOST_HAS_BETHREADS
|
||||
|
||||
#ifndef BOOST_DISABLE_THREADS
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
71
src/eo/contrib/boost/config/platform/bsd.hpp
Executable file
71
src/eo/contrib/boost/config/platform/bsd.hpp
Executable file
|
|
@ -0,0 +1,71 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Douglas Gregor 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// generic BSD config options:
|
||||
|
||||
#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
|
||||
#error "This platform is not BSD"
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__)
|
||||
#elif defined(__NetBSD__)
|
||||
#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__)
|
||||
#elif defined(__OpenBSD__)
|
||||
#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__)
|
||||
#endif
|
||||
|
||||
//
|
||||
// is this the correct version check?
|
||||
// FreeBSD has <nl_types.h> but does not
|
||||
// advertise the fact in <unistd.h>:
|
||||
//
|
||||
#if defined(__FreeBSD__) && (__FreeBSD__ >= 3)
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
#endif
|
||||
|
||||
//
|
||||
// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in <pthread.h>
|
||||
// and not in <unistd.h>
|
||||
//
|
||||
#if defined(__FreeBSD__) && (__FreeBSD__ <= 3)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No wide character support in the BSD header files:
|
||||
//
|
||||
#if !(defined(__FreeBSD__) && (__FreeBSD__ >= 5))
|
||||
# define BOOST_NO_CWCHAR
|
||||
#endif
|
||||
//
|
||||
// The BSD <ctype.h> has macros only, no functions:
|
||||
//
|
||||
#if !defined(__OpenBSD__)
|
||||
# define BOOST_NO_CTYPE_FUNCTIONS
|
||||
#endif
|
||||
|
||||
//
|
||||
// thread API's not auto detected:
|
||||
//
|
||||
#define BOOST_HAS_SCHED_YIELD
|
||||
#define BOOST_HAS_NANOSLEEP
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#define BOOST_HAS_SIGACTION
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
48
src/eo/contrib/boost/config/platform/cygwin.hpp
Executable file
48
src/eo/contrib/boost/config/platform/cygwin.hpp
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// cygwin specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Cygwin"
|
||||
#define BOOST_NO_CWCTYPE
|
||||
#define BOOST_NO_CWCHAR
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_HAS_DIRENT_H
|
||||
|
||||
//
|
||||
// Threading API:
|
||||
// See if we have POSIX threads, if we do use them, otherwise
|
||||
// revert to native Win threads.
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_SIGACTION
|
||||
#else
|
||||
# if !defined(BOOST_HAS_WINTHREADS)
|
||||
# define BOOST_HAS_WINTHREADS
|
||||
# endif
|
||||
# define BOOST_HAS_FTIME
|
||||
#endif
|
||||
|
||||
//
|
||||
// find out if we have a stdint.h, there should be a better way to do this:
|
||||
//
|
||||
#include <sys/types.h>
|
||||
#ifdef _STDINT_H
|
||||
#define BOOST_HAS_STDINT_H
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
68
src/eo/contrib/boost/config/platform/hpux.hpp
Executable file
68
src/eo/contrib/boost/config/platform/hpux.hpp
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Toon Knapen 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// hpux specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "HP-UX"
|
||||
|
||||
// In principle, HP-UX has a nice <stdint.h> under the name <inttypes.h>
|
||||
// However, it has the following problem:
|
||||
// Use of UINT32_C(0) results in "0u l" for the preprocessed source
|
||||
// (verifyable with gcc 2.95.3, assumed for HP aCC)
|
||||
// #define BOOST_HAS_STDINT_H
|
||||
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#define BOOST_NO_CWCTYPE
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))
|
||||
// GNU C on HP-UX does not support threads (checked up to gcc 3.3)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
# elif !defined(BOOST_DISABLE_THREADS)
|
||||
// threads supported from gcc-3.3 onwards:
|
||||
# define BOOST_HAS_THREADS
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
// the following are always available:
|
||||
#ifndef BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
#ifndef BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
#endif
|
||||
#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
#endif
|
||||
#ifndef BOOST_HAS_NL_TYPES_H
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
#endif
|
||||
#ifndef BOOST_HAS_NANOSLEEP
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
#endif
|
||||
#ifndef BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
#ifndef BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
#endif
|
||||
#ifndef BOOST_HAS_CLOCK_GETTIME
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
#endif
|
||||
#ifndef BOOST_HAS_SIGACTION
|
||||
# define BOOST_HAS_SIGACTION
|
||||
#endif
|
||||
|
||||
|
||||
31
src/eo/contrib/boost/config/platform/irix.hpp
Executable file
31
src/eo/contrib/boost/config/platform/irix.hpp
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// SGI Irix specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "SGI Irix"
|
||||
|
||||
#define BOOST_NO_SWPRINTF
|
||||
//
|
||||
// these are not auto detected by POSIX feature tests:
|
||||
//
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
|
||||
#ifdef __GNUC__
|
||||
// GNU C on IRIX does not support threads (checked up to gcc 3.3)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
98
src/eo/contrib/boost/config/platform/linux.hpp
Executable file
98
src/eo/contrib/boost/config/platform/linux.hpp
Executable file
|
|
@ -0,0 +1,98 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// linux specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "linux"
|
||||
|
||||
// make sure we have __GLIBC_PREREQ if available at all
|
||||
#include <cstdlib>
|
||||
|
||||
//
|
||||
// <stdint.h> added to glibc 2.1.1
|
||||
// We can only test for 2.1 though:
|
||||
//
|
||||
#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
|
||||
// <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
|
||||
// int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
|
||||
// only when using GCC.
|
||||
# if defined __GNUC__
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__LIBCOMO__)
|
||||
//
|
||||
// como on linux doesn't have std:: c functions:
|
||||
// NOTE: versions of libcomo prior to beta28 have octal version numbering,
|
||||
// e.g. version 25 is 21 (dec)
|
||||
//
|
||||
# if __LIBCOMO_VERSION__ <= 20
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
|
||||
# if __LIBCOMO_VERSION__ <= 21
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// If glibc is past version 2 then we definitely have
|
||||
// gettimeofday, earlier versions may or may not have it:
|
||||
//
|
||||
#if defined(__GLIBC__) && (__GLIBC__ >= 2)
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
|
||||
#ifdef __USE_POSIX199309
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
#endif
|
||||
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
// __GLIBC_PREREQ is available since 2.1.2
|
||||
|
||||
// swprintf is available since glibc 2.2.0
|
||||
# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
#ifndef __GNUC__
|
||||
//
|
||||
// if the compiler is not gcc we still need to be able to parse
|
||||
// the GNU system headers, some of which (mainly <stdint.h>)
|
||||
// use GNU specific extensions:
|
||||
//
|
||||
# ifndef __extension__
|
||||
# define __extension__
|
||||
# endif
|
||||
# ifndef __const__
|
||||
# define __const__ const
|
||||
# endif
|
||||
# ifndef __volatile__
|
||||
# define __volatile__ volatile
|
||||
# endif
|
||||
# ifndef __signed__
|
||||
# define __signed__ signed
|
||||
# endif
|
||||
# ifndef __typeof__
|
||||
# define __typeof__ typeof
|
||||
# endif
|
||||
# ifndef __inline__
|
||||
# define __inline__ inline
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
78
src/eo/contrib/boost/config/platform/macos.hpp
Executable file
78
src/eo/contrib/boost/config/platform/macos.hpp
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001 - 2002.
|
||||
// (C) Copyright Bill Kempf 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Mac OS specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Mac OS"
|
||||
|
||||
#if __MACH__ && !defined(_MSL_USING_MSL_C)
|
||||
|
||||
// Using the Mac OS X system BSD-style C library.
|
||||
|
||||
# ifndef BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
//
|
||||
// Begin by including our boilerplate code for POSIX
|
||||
// feature detection, this is safe even when using
|
||||
// the MSL as Metrowerks supply their own <unistd.h>
|
||||
// to replace the platform-native BSD one. G++ users
|
||||
// should also always be able to do this on MaxOS X.
|
||||
//
|
||||
# include <boost/config/posix_features.hpp>
|
||||
# ifndef BOOST_HAS_STDINT_H
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
|
||||
//
|
||||
// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday,
|
||||
// of these only pthreads are advertised in <unistd.h>, so set the
|
||||
// other options explicitly:
|
||||
//
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_SIGACTION
|
||||
|
||||
# if (__GNUC__ < 3) && !defined( __APPLE_CC__)
|
||||
|
||||
// GCC strange "ignore std" mode works better if you pretend everything
|
||||
// is in the std namespace, for the most part.
|
||||
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
// Using the MSL C library.
|
||||
|
||||
// We will eventually support threads in non-Carbon builds, but we do
|
||||
// not support this yet.
|
||||
# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON )
|
||||
|
||||
# if !defined(BOOST_HAS_PTHREADS)
|
||||
# define BOOST_HAS_MPTASKS
|
||||
# elif ( __dest_os == __mac_os_x )
|
||||
// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the
|
||||
// gettimeofday and no posix.
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# endif
|
||||
|
||||
// The MP task implementation of Boost Threads aims to replace MP-unsafe
|
||||
// parts of the MSL, so we turn on threads unconditionally.
|
||||
# define BOOST_HAS_THREADS
|
||||
|
||||
// The remote call manager depends on this.
|
||||
# define BOOST_BIND_ENABLE_PASCAL
|
||||
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
21
src/eo/contrib/boost/config/platform/solaris.hpp
Executable file
21
src/eo/contrib/boost/config/platform/solaris.hpp
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// sun specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Sun Solaris"
|
||||
|
||||
#define BOOST_HAS_GETTIMEOFDAY
|
||||
|
||||
// boilerplate code:
|
||||
#define BOOST_HAS_UNISTD_H
|
||||
#include <boost/config/posix_features.hpp>
|
||||
|
||||
|
||||
|
||||
|
||||
50
src/eo/contrib/boost/config/platform/win32.hpp
Executable file
50
src/eo/contrib/boost/config/platform/win32.hpp
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Bill Kempf 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Win32 specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Win32"
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if !defined(__GNUC__) && !defined(BOOST_HAS_DECLSPEC)
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 2)))
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# define __STDC_LIMIT_MACROS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Win32 will normally be using native Win32 threads,
|
||||
// but there is a pthread library avaliable as an option,
|
||||
// we used to disable this when BOOST_DISABLE_WIN32 was
|
||||
// defined but no longer - this should allow some
|
||||
// files to be compiled in strict mode - while maintaining
|
||||
// a consistent setting of BOOST_HAS_THREADS across
|
||||
// all translation units (needed for shared_ptr etc).
|
||||
//
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
# define BOOST_NO_ANSI_APIS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_WINTHREADS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_DISABLE_WIN32
|
||||
// WEK: Added
|
||||
#define BOOST_HAS_FTIME
|
||||
#define BOOST_WINDOWS 1
|
||||
|
||||
#endif
|
||||
87
src/eo/contrib/boost/config/posix_features.hpp
Executable file
87
src/eo/contrib/boost/config/posix_features.hpp
Executable file
|
|
@ -0,0 +1,87 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// All POSIX feature tests go in this file,
|
||||
// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well
|
||||
// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's
|
||||
// may be present but none-functional unless _POSIX_C_SOURCE and
|
||||
// _XOPEN_SOURCE have been defined to the right value (it's up
|
||||
// to the user to do this *before* including any header, although
|
||||
// in most cases the compiler will do this for you).
|
||||
|
||||
# if defined(BOOST_HAS_UNISTD_H)
|
||||
# include <unistd.h>
|
||||
|
||||
// XOpen has <nl_types.h>, but is this the correct version check?
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3)
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
# endif
|
||||
|
||||
// POSIX version 6 requires <stdint.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
|
||||
// POSIX version 2 requires <dirent.h>
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L)
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# endif
|
||||
|
||||
// POSIX version 3 requires <signal.h> to have sigaction:
|
||||
# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L)
|
||||
# define BOOST_HAS_SIGACTION
|
||||
# endif
|
||||
// POSIX defines _POSIX_THREADS > 0 for pthread support,
|
||||
// however some platforms define _POSIX_THREADS without
|
||||
// a value, hence the (_POSIX_THREADS+0 >= 0) check.
|
||||
// Strictly speaking this may catch platforms with a
|
||||
// non-functioning stub <pthreads.h>, but such occurrences should
|
||||
// occur very rarely if at all.
|
||||
# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS)
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_NANOSLEEP:
|
||||
// This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME:
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_CLOCK_GETTIME:
|
||||
// This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME
|
||||
// but at least one platform - linux - defines that flag without
|
||||
// defining clock_gettime):
|
||||
# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0))
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_SCHED_YIELD:
|
||||
// This is predicated on _POSIX_PRIORITY_SCHEDULING or
|
||||
// on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME.
|
||||
# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\
|
||||
|| (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\
|
||||
|| (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0))
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_GETTIMEOFDAY:
|
||||
// BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE:
|
||||
// These are predicated on _XOPEN_VERSION, and appears to be first released
|
||||
// in issue 4, version 2 (_XOPEN_VERSION > 500).
|
||||
# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500)
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500)
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# endif
|
||||
|
||||
|
||||
|
||||
92
src/eo/contrib/boost/config/requires_threads.hpp
Executable file
92
src/eo/contrib/boost/config/requires_threads.hpp
Executable file
|
|
@ -0,0 +1,92 @@
|
|||
// (C) Copyright John Maddock 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP
|
||||
#define BOOST_CONFIG_REQUIRES_THREADS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_DISABLE_THREADS)
|
||||
|
||||
//
|
||||
// special case to handle versions of gcc which don't currently support threads:
|
||||
//
|
||||
#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG))
|
||||
//
|
||||
// this is checked up to gcc 3.3:
|
||||
//
|
||||
#if defined(__sgi) || defined(__hpux)
|
||||
# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
|
||||
|
||||
#elif !defined(BOOST_HAS_THREADS)
|
||||
|
||||
# if defined __COMO__
|
||||
// Comeau C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
#ifdef _WIN32
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
#else
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp"
|
||||
#endif
|
||||
|
||||
# elif defined __GNUC__
|
||||
// GNU C++:
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age
|
||||
# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd"
|
||||
|
||||
#else
|
||||
|
||||
# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use"
|
||||
|
||||
#endif // compilers
|
||||
|
||||
#endif // BOOST_HAS_THREADS
|
||||
|
||||
#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP
|
||||
83
src/eo/contrib/boost/config/select_compiler_config.hpp
Executable file
83
src/eo/contrib/boost/config/select_compiler_config.hpp
Executable file
|
|
@ -0,0 +1,83 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// locate which compiler we are using and define
|
||||
// BOOST_COMPILER_CONFIG as needed:
|
||||
|
||||
# if defined __COMO__
|
||||
// Comeau C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
|
||||
|
||||
#elif defined __DMC__
|
||||
// Digital Mars C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
|
||||
|
||||
# elif defined __GNUC__
|
||||
// GNU C++:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
|
||||
|
||||
#elif defined __KCC
|
||||
// Kai C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
|
||||
|
||||
#elif defined __ghs
|
||||
// Greenhills C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
|
||||
|
||||
#elif defined(__MRC__) || defined(__SC__)
|
||||
// MPW MrCpp or SCpp
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the compiler:
|
||||
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
|
||||
|
||||
#endif
|
||||
86
src/eo/contrib/boost/config/select_platform_config.hpp
Executable file
86
src/eo/contrib/boost/config/select_platform_config.hpp
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed.
|
||||
// Note that we define the headers to include using "header_name" not
|
||||
// <header_name> in order to prevent macro expansion within the header
|
||||
// name (for example "linux" is a macro on linux systems).
|
||||
|
||||
#if defined(linux) || defined(__linux) || defined(__linux__)
|
||||
// linux:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
// BSD:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp"
|
||||
|
||||
#elif defined(sun) || defined(__sun)
|
||||
// solaris:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp"
|
||||
|
||||
#elif defined(__sgi)
|
||||
// SGI Irix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp"
|
||||
|
||||
#elif defined(__hpux)
|
||||
// hp unix:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
// cygwin is not win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
// win32:
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp"
|
||||
|
||||
#elif defined(__BEOS__)
|
||||
// BeOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp"
|
||||
|
||||
#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
// MacOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__) || defined(_AIX)
|
||||
// IBM
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp"
|
||||
|
||||
#elif defined(__amigaos__)
|
||||
// AmigaOS
|
||||
# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp"
|
||||
|
||||
#else
|
||||
|
||||
# if defined(unix) \
|
||||
|| defined(__unix) \
|
||||
|| defined(_XOPEN_SOURCE) \
|
||||
|| defined(_POSIX_SOURCE)
|
||||
|
||||
// generic unix platform:
|
||||
|
||||
# ifndef BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
|
||||
# include <boost/config/posix_features.hpp>
|
||||
|
||||
# endif
|
||||
|
||||
# if defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the platform:
|
||||
# error "Unknown platform - please configure and report the results to boost.org"
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
68
src/eo/contrib/boost/config/select_stdlib_config.hpp
Executable file
68
src/eo/contrib/boost/config/select_stdlib_config.hpp
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed:
|
||||
|
||||
// we need to include a std lib header here in order to detect which
|
||||
// library is in use, use <utility> as it's about the smallest
|
||||
// of the std lib headers - do not rely on this header being included -
|
||||
// users can short-circuit this header if they know whose std lib
|
||||
// they are using.
|
||||
|
||||
#include <utility>
|
||||
|
||||
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
|
||||
// STLPort library; this _must_ come first, otherwise since
|
||||
// STLport typically sits on top of some other library, we
|
||||
// can end up detecting that first rather than STLport:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp"
|
||||
|
||||
#elif defined(__LIBCOMO__)
|
||||
// Comeau STL:
|
||||
#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp"
|
||||
|
||||
#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
|
||||
// Rogue Wave library:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp"
|
||||
|
||||
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
// GNU libstdc++ 3
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp"
|
||||
|
||||
#elif defined(__STL_CONFIG_H)
|
||||
// generic SGI STL
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp"
|
||||
|
||||
#elif defined(__MSL_CPP__)
|
||||
// MSL standard lib:
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// take the default VACPP std lib
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp"
|
||||
|
||||
#elif defined(MSIPL_COMPILE_H)
|
||||
// Modena C++ standard library
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp"
|
||||
|
||||
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
|
||||
// Dinkumware Library (this has to appear after any possible replacement libraries):
|
||||
# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the library:
|
||||
# error "Unknown standard library - please configure and report the results to boost.org"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
106
src/eo/contrib/boost/config/stdlib/dinkumware.hpp
Executable file
106
src/eo/contrib/boost/config/stdlib/dinkumware.hpp
Executable file
|
|
@ -0,0 +1,106 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Guillaume Melquiond 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Dinkumware standard library config:
|
||||
|
||||
#if !defined(_YVALS) && !defined(_CPPLIB_VER)
|
||||
#include <utility>
|
||||
#if !defined(_YVALS) && !defined(_CPPLIB_VER)
|
||||
#error This is not the Dinkumware lib!
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306)
|
||||
// full dinkumware 3.06 and above
|
||||
// fully conforming provided the compiler supports it:
|
||||
# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# endif
|
||||
# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# endif
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
|
||||
// if this lib version is set up for vc6 then there is no std::use_facet:
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
// C lib functions aren't in namespace std either:
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
// and nor is <exception>
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
# endif
|
||||
// There's no numeric_limits<long long> support unless _LONGLONG is defined:
|
||||
# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310)
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# endif
|
||||
// 3.06 appears to have (non-sgi versions of) <hash_set> & <hash_map>,
|
||||
// and no <slist> at all
|
||||
#else
|
||||
# define BOOST_MSVC_STD_ITERATOR 1
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
# define BOOST_HAS_MACRO_USE_FACET
|
||||
# ifndef _CPPLIB_VER
|
||||
// Updated Dinkum library defines this, and provides
|
||||
// its own min and max definitions.
|
||||
# define BOOST_NO_STD_MIN_MAX
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// std extension namespace is stdext for vc7.1 and later,
|
||||
// the same applies to other compilers that sit on top
|
||||
// of vc7.1 (Intel and Comeau):
|
||||
//
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__)
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE stdext
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306)
|
||||
// if we're using a dinkum lib that's
|
||||
// been configured for VC6/7 then there is
|
||||
// no iterator traits (true even for icl)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310)
|
||||
// Intel C++ chokes over any non-trivial use of <locale>
|
||||
// this may be an overly restrictive define, but regex fails without it:
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
#ifdef _CPPLIB_VER
|
||||
# define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER
|
||||
#else
|
||||
# define BOOST_DINKUMWARE_STDLIB 1
|
||||
#endif
|
||||
|
||||
#ifdef _CPPLIB_VER
|
||||
# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER)
|
||||
#else
|
||||
# define BOOST_STDLIB "Dinkumware standard library version 1.x"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
46
src/eo/contrib/boost/config/stdlib/libcomo.hpp
Executable file
46
src/eo/contrib/boost/config/stdlib/libcomo.hpp
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
// (C) Copyright John Maddock 2002 - 2003.
|
||||
// (C) Copyright Jens Maurer 2002 - 2003.
|
||||
// (C) Copyright Beman Dawes 2002 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Comeau STL:
|
||||
|
||||
#if !defined(__LIBCOMO__)
|
||||
# include <utility>
|
||||
# if !defined(__LIBCOMO__)
|
||||
# error "This is not the Comeau STL!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// std::streambuf<wchar_t> is non-standard
|
||||
// NOTE: versions of libcomo prior to beta28 have octal version numbering,
|
||||
// e.g. version 25 is 21 (dec)
|
||||
#if __LIBCOMO_VERSION__ <= 22
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
|
||||
#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32)
|
||||
#define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
#if __LIBCOMO_VERSION__ >= 31
|
||||
# define BOOST_HAS_HASH
|
||||
# define BOOST_HAS_SLIST
|
||||
#endif
|
||||
|
||||
//
|
||||
// Intrinsic type_traits support.
|
||||
// The SGI STL has it's own __type_traits class, which
|
||||
// has intrinsic compiler support with SGI's compilers.
|
||||
// Whatever map SGI style type traits to boost equivalents:
|
||||
//
|
||||
#define BOOST_HAS_SGI_TYPE_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__)
|
||||
|
||||
|
||||
61
src/eo/contrib/boost/config/stdlib/libstdcpp3.hpp
Executable file
61
src/eo/contrib/boost/config/stdlib/libstdcpp3.hpp
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// config for libstdc++ v3
|
||||
// not much to go in here:
|
||||
|
||||
#ifdef __GLIBCXX__
|
||||
#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
|
||||
#else
|
||||
#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
|
||||
#endif
|
||||
|
||||
#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_CWCTYPE
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) && !defined(_REENTRANT) \
|
||||
&& ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
|
||||
// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
|
||||
// file is included, therefore for consistency we define it here as well.
|
||||
# define _REENTRANT
|
||||
#endif
|
||||
|
||||
#ifdef __GLIBCXX__ // gcc 3.4 and greater:
|
||||
# ifdef _GLIBCXX_HAVE_GTHR_DEFAULT
|
||||
//
|
||||
// If the std lib has thread support turned on, then turn it on in Boost
|
||||
// as well. We do this because some gcc-3.4 std lib headers define _REENTANT
|
||||
// while others do not...
|
||||
//
|
||||
# define BOOST_HAS_THREADS
|
||||
# else
|
||||
# define BOOST_DISABLE_THREADS
|
||||
# endif
|
||||
#elif defined(__GLIBCPP__) && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|
||||
// disable thread support if the std lib was built single threaded:
|
||||
# define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
|
||||
// linux on arm apparently doesn't define _REENTRANT
|
||||
// so just turn on threading support whenever the std lib is thread safe:
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(_GLIBCPP_USE_LONG_LONG) \
|
||||
&& !defined(_GLIBCXX_USE_LONG_LONG)\
|
||||
&& defined(BOOST_HAS_LONG_LONG)
|
||||
// May have been set by compiler/*.hpp, but "long long" without library
|
||||
// support is useless.
|
||||
# undef BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
30
src/eo/contrib/boost/config/stdlib/modena.hpp
Executable file
30
src/eo/contrib/boost/config/stdlib/modena.hpp
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Modena C++ standard library (comes with KAI C++)
|
||||
|
||||
#if !defined(MSIPL_COMPILE_H)
|
||||
# include <utility>
|
||||
# if !defined(__MSIPL_COMPILE_H)
|
||||
# error "This is not the Modena C++ library!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MSIPL_NL_TYPES
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
#ifndef MSIPL_WCHART
|
||||
#define BOOST_NO_STD_WSTRING
|
||||
#endif
|
||||
|
||||
#define BOOST_STDLIB "Modena C++ standard library"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
59
src/eo/contrib/boost/config/stdlib/msl.hpp
Executable file
59
src/eo/contrib/boost/config/stdlib/msl.hpp
Executable file
|
|
@ -0,0 +1,59 @@
|
|||
// (C) Copyright John Maddock 2001.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Metrowerks standard library:
|
||||
|
||||
#ifndef __MSL_CPP__
|
||||
# include <utility>
|
||||
# ifndef __MSL_CPP__
|
||||
# error This is not the MSL standard library!
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if __MSL_CPP__ >= 0x6000 // Pro 6
|
||||
# define BOOST_HAS_HASH
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks
|
||||
#endif
|
||||
#define BOOST_HAS_SLIST
|
||||
|
||||
#if __MSL_CPP__ < 0x6209
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
// check C lib version for <stdint.h>
|
||||
#include <cstddef>
|
||||
|
||||
#if defined(__MSL__) && (__MSL__ >= 0x5000)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# if !defined(__PALMOS_TRAPS__)
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# endif
|
||||
// boilerplate code:
|
||||
# include <boost/config/posix_features.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(_MWMT) || _MSL_THREADSAFE
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#endif
|
||||
|
||||
|
||||
#define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
127
src/eo/contrib/boost/config/stdlib/roguewave.hpp
Executable file
127
src/eo/contrib/boost/config/stdlib/roguewave.hpp
Executable file
|
|
@ -0,0 +1,127 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// (C) Copyright David Abrahams 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Rogue Wave std lib:
|
||||
|
||||
#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
|
||||
# include <utility>
|
||||
# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
|
||||
# error This is not the Rogue Wave standard library
|
||||
# endif
|
||||
#endif
|
||||
//
|
||||
// figure out a consistent version number:
|
||||
//
|
||||
#ifndef _RWSTD_VER
|
||||
# define BOOST_RWSTD_VER 0x010000
|
||||
#elif _RWSTD_VER < 0x010000
|
||||
# define BOOST_RWSTD_VER (_RWSTD_VER << 8)
|
||||
#else
|
||||
# define BOOST_RWSTD_VER _RWSTD_VER
|
||||
#endif
|
||||
|
||||
#ifndef _RWSTD_VER
|
||||
# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"
|
||||
#else
|
||||
# define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Prior to version 2.2.0 the primary template for std::numeric_limits
|
||||
// does not have compile time constants, even though specializations of that
|
||||
// template do:
|
||||
//
|
||||
#if BOOST_RWSTD_VER < 0x020200
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#endif
|
||||
|
||||
// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the
|
||||
// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817):
|
||||
#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550))
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
# endif
|
||||
|
||||
//
|
||||
// Borland version of numeric_limits lacks __int64 specialisation:
|
||||
//
|
||||
#ifdef __BORLANDC__
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::iterator if it can't figure out default template args:
|
||||
//
|
||||
#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000)
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// No iterator traits without partial specialization:
|
||||
//
|
||||
#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Prior to version 2.0, std::auto_ptr was buggy, and there were no
|
||||
// new-style iostreams, and no conformant std::allocator:
|
||||
//
|
||||
#if (BOOST_RWSTD_VER < 0x020000)
|
||||
# define BOOST_NO_AUTO_PTR
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// No template iterator constructors without member template support:
|
||||
//
|
||||
#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
#endif
|
||||
|
||||
//
|
||||
// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use
|
||||
// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR
|
||||
// on HP aCC systems even though the allocator is in fact broken):
|
||||
//
|
||||
#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// If we have a std::locale, we still may not have std::use_facet:
|
||||
//
|
||||
#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_TWO_ARG_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// There's no std::distance prior to version 2, or without
|
||||
// partial specialization support:
|
||||
//
|
||||
#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
#define BOOST_NO_STD_DISTANCE
|
||||
#endif
|
||||
|
||||
//
|
||||
// Some versions of the rogue wave library don't have assignable
|
||||
// OutputIterators:
|
||||
//
|
||||
#if BOOST_RWSTD_VER < 0x020100
|
||||
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
|
||||
#endif
|
||||
|
||||
//
|
||||
// Disable BOOST_HAS_LONG_LONG when the library has no support for it.
|
||||
//
|
||||
#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)
|
||||
# undef BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
111
src/eo/contrib/boost/config/stdlib/sgi.hpp
Executable file
111
src/eo/contrib/boost/config/stdlib/sgi.hpp
Executable file
|
|
@ -0,0 +1,111 @@
|
|||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001 - 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// generic SGI STL:
|
||||
|
||||
#if !defined(__STL_CONFIG_H)
|
||||
# include <utility>
|
||||
# if !defined(__STL_CONFIG_H)
|
||||
# error "This is not the SGI STL!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::iterator traits without partial specialisation:
|
||||
//
|
||||
#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No std::stringstream with gcc < 3
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3) && \
|
||||
((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \
|
||||
!defined(__STL_USE_NEW_IOSTREAMS) || \
|
||||
defined(__APPLE_CC__)
|
||||
// Note that we only set this for GNU C++ prior to 2.95 since the
|
||||
// latest patches for that release do contain a minimal <sstream>
|
||||
// If you are running a 2.95 release prior to 2.95.3 then this will need
|
||||
// setting, but there is no way to detect that automatically (other
|
||||
// than by running the configure script).
|
||||
// Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't
|
||||
// have <sstream>.
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// Assume no std::locale without own iostreams (this may be an
|
||||
// incorrect assumption in some cases):
|
||||
//
|
||||
#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// Original native SGI streams have non-standard std::messages facet:
|
||||
//
|
||||
#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
#endif
|
||||
|
||||
//
|
||||
// SGI's new iostreams have missing "const" in messages<>::open
|
||||
//
|
||||
#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
#endif
|
||||
|
||||
//
|
||||
// No template iterator constructors, or std::allocator
|
||||
// without member templates:
|
||||
//
|
||||
#if !defined(__STL_MEMBER_TEMPLATES)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// We always have SGI style hash_set, hash_map, and slist:
|
||||
//
|
||||
#define BOOST_HAS_HASH
|
||||
#define BOOST_HAS_SLIST
|
||||
|
||||
//
|
||||
// If this is GNU libstdc++2, then no <limits> and no std::wstring:
|
||||
//
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 3))
|
||||
# include <string>
|
||||
# if defined(__BASTRING__)
|
||||
# define BOOST_NO_LIMITS
|
||||
// Note: <boost/limits.hpp> will provide compile-time constants
|
||||
# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// There is no standard iterator unless we have namespace support:
|
||||
//
|
||||
#if !defined(__STL_USE_NAMESPACES)
|
||||
# define BOOST_NO_STD_ITERATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// Intrinsic type_traits support.
|
||||
// The SGI STL has it's own __type_traits class, which
|
||||
// has intrinsic compiler support with SGI's compilers.
|
||||
// Whatever map SGI style type traits to boost equivalents:
|
||||
//
|
||||
#define BOOST_HAS_SGI_TYPE_TRAITS
|
||||
|
||||
#define BOOST_STDLIB "SGI standard library"
|
||||
|
||||
|
||||
|
||||
201
src/eo/contrib/boost/config/stdlib/stlport.hpp
Executable file
201
src/eo/contrib/boost/config/stdlib/stlport.hpp
Executable file
|
|
@ -0,0 +1,201 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Jens Maurer 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// STLPort standard library config:
|
||||
|
||||
#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
# include <utility>
|
||||
# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
|
||||
# error "This is not STLPort!"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
// for versions prior to 4.1(beta)
|
||||
//
|
||||
#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400)
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
#endif
|
||||
|
||||
//
|
||||
// If STLport thinks that there is no partial specialisation, then there is no
|
||||
// std::iterator traits:
|
||||
//
|
||||
#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION))
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// No new style iostreams on GCC without STLport's iostreams enabled:
|
||||
//
|
||||
#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS))
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// No new iostreams implies no std::locale, and no std::stringstream:
|
||||
//
|
||||
#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# define BOOST_NO_STRINGSTREAM
|
||||
#endif
|
||||
|
||||
//
|
||||
// If the streams are not native, and we have a "using ::x" compiler bug
|
||||
// then the io stream facets are not available in namespace std::
|
||||
//
|
||||
#ifdef _STLPORT_VERSION
|
||||
# if !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
#else
|
||||
# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__)
|
||||
# define BOOST_NO_STD_LOCALE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Without member template support enabled, their are no template
|
||||
// iterate constructors, and no std::allocator:
|
||||
//
|
||||
#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES))
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
//
|
||||
// however we always have at least a partial allocator:
|
||||
//
|
||||
#define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
|
||||
#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// If STLport thinks there is no wchar_t at all, then we have to disable
|
||||
// the support for the relevant specilazations of std:: templates.
|
||||
//
|
||||
#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT)
|
||||
# ifndef BOOST_NO_STD_WSTRING
|
||||
# define BOOST_NO_STD_WSTRING
|
||||
# endif
|
||||
# ifndef BOOST_NO_STD_WSTREAMBUF
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// We always have SGI style hash_set, hash_map, and slist:
|
||||
//
|
||||
#define BOOST_HAS_HASH
|
||||
#define BOOST_HAS_SLIST
|
||||
|
||||
//
|
||||
// STLport does a good job of importing names into namespace std::,
|
||||
// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our
|
||||
// workaround does not conflict with STLports:
|
||||
//
|
||||
//
|
||||
// Harold Howe says:
|
||||
// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with
|
||||
// BCB6 does cause problems. If we detect C++ Builder, then don't define
|
||||
// BOOST_NO_STDC_NAMESPACE
|
||||
//
|
||||
#if !defined(__BORLANDC__) && !defined(__DMC__)
|
||||
//
|
||||
// If STLport is using it's own namespace, and the real names are in
|
||||
// the global namespace, then we duplicate STLport's using declarations
|
||||
// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't
|
||||
// necessarily import all the names we need into namespace std::
|
||||
//
|
||||
# if (defined(__STL_IMPORT_VENDOR_CSTD) \
|
||||
|| defined(__STL_USE_OWN_NAMESPACE) \
|
||||
|| defined(_STLP_IMPORT_VENDOR_CSTD) \
|
||||
|| defined(_STLP_USE_OWN_NAMESPACE)) \
|
||||
&& (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD))
|
||||
# define BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NO_EXCEPTION_STD_NAMESPACE
|
||||
# endif
|
||||
#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560
|
||||
// STLport doesn't import std::abs correctly:
|
||||
#include <stdlib.h>
|
||||
namespace std { using ::abs; }
|
||||
// and strcmp/strcpy don't get imported either ('cos they are macros)
|
||||
#include <string.h>
|
||||
#ifdef strcpy
|
||||
# undef strcpy
|
||||
#endif
|
||||
#ifdef strcmp
|
||||
# undef strcmp
|
||||
#endif
|
||||
#ifdef _STLP_VENDOR_CSTD
|
||||
namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// std::use_facet may be non-standard, uses a class instead:
|
||||
//
|
||||
#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# define BOOST_HAS_STLP_USE_FACET
|
||||
#endif
|
||||
|
||||
//
|
||||
// If STLport thinks there are no wide functions, <cwchar> etc. is not working; but
|
||||
// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import
|
||||
// into std:: ourselves).
|
||||
//
|
||||
#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE)
|
||||
# define BOOST_NO_CWCHAR
|
||||
# define BOOST_NO_CWCTYPE
|
||||
#endif
|
||||
|
||||
//
|
||||
// If STLport for some reason was configured so that it thinks that wchar_t
|
||||
// is not an intrinsic type, then we have to disable the support for it as
|
||||
// well (we would be missing required specializations otherwise).
|
||||
//
|
||||
#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT)
|
||||
# undef BOOST_NO_INTRINSIC_WCHAR_T
|
||||
# define BOOST_NO_INTRINSIC_WCHAR_T
|
||||
#endif
|
||||
|
||||
//
|
||||
// Borland ships a version of STLport with C++ Builder 6 that lacks
|
||||
// hashtables and the like:
|
||||
//
|
||||
#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560)
|
||||
# undef BOOST_HAS_HASH
|
||||
#endif
|
||||
|
||||
//
|
||||
// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max
|
||||
//
|
||||
#if defined(__GNUC__) && (__GNUC__ < 3)
|
||||
# include <algorithm> // for std::min and std::max
|
||||
# define BOOST_USING_STD_MIN() ((void)0)
|
||||
# define BOOST_USING_STD_MAX() ((void)0)
|
||||
namespace boost { using std::min; using std::max; }
|
||||
#endif
|
||||
|
||||
#define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
18
src/eo/contrib/boost/config/stdlib/vacpp.hpp
Executable file
18
src/eo/contrib/boost/config/stdlib/vacpp.hpp
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
#if __IBMCPP__ <= 501
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
|
||||
#define BOOST_STDLIB "Visual Age default standard library"
|
||||
|
||||
|
||||
|
||||
547
src/eo/contrib/boost/config/suffix.hpp
Executable file
547
src/eo/contrib/boost/config/suffix.hpp
Executable file
|
|
@ -0,0 +1,547 @@
|
|||
// Boost config.hpp configuration header file ------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Darin Adler 2001.
|
||||
// (C) Copyright Peter Dimov 2001.
|
||||
// (C) Copyright Bill Kempf 2002.
|
||||
// (C) Copyright Jens Maurer 2002.
|
||||
// (C) Copyright David Abrahams 2002 - 2003.
|
||||
// (C) Copyright Gennaro Prota 2003.
|
||||
// (C) Copyright Eric Friedman 2003.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Boost config.hpp policy and rationale documentation has been moved to
|
||||
// http://www.boost.org/libs/config
|
||||
//
|
||||
// This file is intended to be stable, and relatively unchanging.
|
||||
// It should contain boilerplate code only - no compiler specific
|
||||
// code unless it is unavoidable - no changes unless unavoidable.
|
||||
|
||||
#ifndef BOOST_CONFIG_SUFFIX_HPP
|
||||
#define BOOST_CONFIG_SUFFIX_HPP
|
||||
|
||||
//
|
||||
// look for long long by looking for the appropriate macros in <limits.h>.
|
||||
// Note that we use limits.h rather than climits for maximal portability,
|
||||
// remember that since these just declare a bunch of macros, there should be
|
||||
// no namespace issues from this.
|
||||
//
|
||||
#include <limits.h>
|
||||
# if !defined(BOOST_HAS_LONG_LONG) \
|
||||
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__) \
|
||||
&& (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
#endif
|
||||
|
||||
// TODO: Remove the following lines after the 1.33 release because the presence
|
||||
// of an integral 64 bit type has nothing to do with support for long long.
|
||||
|
||||
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_INTEGRAL_INT64_T) && !defined(__DECCXX_VER)
|
||||
# define BOOST_NO_INTEGRAL_INT64_T
|
||||
#endif
|
||||
|
||||
// GCC 3.x will clean up all of those nasty macro definitions that
|
||||
// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
|
||||
// it under GCC 3.x.
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
|
||||
# undef BOOST_NO_CTYPE_FUNCTIONS
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Assume any extensions are in namespace std:: unless stated otherwise:
|
||||
//
|
||||
# ifndef BOOST_STD_EXTENSION_NAMESPACE
|
||||
# define BOOST_STD_EXTENSION_NAMESPACE std
|
||||
# endif
|
||||
|
||||
//
|
||||
// If cv-qualified specializations are not allowed, then neither are cv-void ones:
|
||||
//
|
||||
# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
|
||||
&& !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
|
||||
# define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
||||
# endif
|
||||
|
||||
//
|
||||
// If there is no numeric_limits template, then it can't have any compile time
|
||||
// constants either!
|
||||
//
|
||||
# if defined(BOOST_NO_LIMITS) \
|
||||
&& !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
|
||||
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
# endif
|
||||
|
||||
//
|
||||
// if there is no long long then there is no specialisation
|
||||
// for numeric_limits<long long> either:
|
||||
//
|
||||
#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
|
||||
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// if there is no __int64 then there is no specialisation
|
||||
// for numeric_limits<__int64> either:
|
||||
//
|
||||
#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
#endif
|
||||
|
||||
//
|
||||
// if member templates are supported then so is the
|
||||
// VC6 subset of member templates:
|
||||
//
|
||||
# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# endif
|
||||
|
||||
//
|
||||
// Without partial specialization, can't test for partial specialisation bugs:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
|
||||
# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
||||
# endif
|
||||
|
||||
//
|
||||
// Without partial specialization, we can't have array-type partial specialisations:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
|
||||
# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
|
||||
# endif
|
||||
|
||||
//
|
||||
// Without partial specialization, std::iterator_traits can't work:
|
||||
//
|
||||
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
# define BOOST_NO_STD_ITERATOR_TRAITS
|
||||
# endif
|
||||
|
||||
//
|
||||
// Without member template support, we can't have template constructors
|
||||
// in the standard library either:
|
||||
//
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
|
||||
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
|
||||
# endif
|
||||
|
||||
//
|
||||
// Without member template support, we can't have a conforming
|
||||
// std::allocator template either:
|
||||
//
|
||||
# if defined(BOOST_NO_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
|
||||
&& !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
# endif
|
||||
|
||||
//
|
||||
// without ADL support then using declarations will break ADL as well:
|
||||
//
|
||||
#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
|
||||
# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
||||
#endif
|
||||
|
||||
//
|
||||
// If we have a standard allocator, then we have a partial one as well:
|
||||
//
|
||||
#if !defined(BOOST_NO_STD_ALLOCATOR)
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
//
|
||||
// We can't have a working std::use_facet if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
|
||||
# define BOOST_NO_STD_USE_FACET
|
||||
# endif
|
||||
|
||||
//
|
||||
// We can't have a std::messages facet if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
|
||||
# define BOOST_NO_STD_MESSAGES
|
||||
# endif
|
||||
|
||||
//
|
||||
// We can't have a working std::wstreambuf if there is no std::locale:
|
||||
//
|
||||
# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
|
||||
# define BOOST_NO_STD_WSTREAMBUF
|
||||
# endif
|
||||
|
||||
//
|
||||
// We can't have a <cwctype> if there is no <cwchar>:
|
||||
//
|
||||
# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
|
||||
# define BOOST_NO_CWCTYPE
|
||||
# endif
|
||||
|
||||
//
|
||||
// We can't have a swprintf if there is no <cwchar>:
|
||||
//
|
||||
# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
|
||||
# define BOOST_NO_SWPRINTF
|
||||
# endif
|
||||
|
||||
//
|
||||
// If Win32 support is turned off, then we must turn off
|
||||
// threading support also, unless there is some other
|
||||
// thread API enabled:
|
||||
//
|
||||
#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
|
||||
&& !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
|
||||
# define BOOST_DISABLE_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn on threading support if the compiler thinks that it's in
|
||||
// multithreaded mode. We put this here because there are only a
|
||||
// limited number of macros that identify this (if there's any missing
|
||||
// from here then add to the appropriate compiler section):
|
||||
//
|
||||
#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
|
||||
|| defined(_PTHREADS)) && !defined(BOOST_HAS_THREADS)
|
||||
# define BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading support off if BOOST_DISABLE_THREADS is defined:
|
||||
//
|
||||
#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
|
||||
# undef BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading support off if we don't recognise the threading API:
|
||||
//
|
||||
#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
|
||||
&& !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
|
||||
&& !defined(BOOST_HAS_MPTASKS)
|
||||
# undef BOOST_HAS_THREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// Turn threading detail macros off if we don't (want to) use threading
|
||||
//
|
||||
#ifndef BOOST_HAS_THREADS
|
||||
# undef BOOST_HAS_PTHREADS
|
||||
# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# undef BOOST_HAS_WINTHREADS
|
||||
# undef BOOST_HAS_BETHREADS
|
||||
# undef BOOST_HAS_MPTASKS
|
||||
#endif
|
||||
|
||||
//
|
||||
// If the compiler claims to be C99 conformant, then it had better
|
||||
// have a <stdint.h>:
|
||||
//
|
||||
# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# endif
|
||||
|
||||
//
|
||||
// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
|
||||
// Note that this is for backwards compatibility only.
|
||||
//
|
||||
# ifndef BOOST_HAS_SLIST
|
||||
# define BOOST_NO_SLIST
|
||||
# endif
|
||||
|
||||
# ifndef BOOST_HAS_HASH
|
||||
# define BOOST_NO_HASH
|
||||
# endif
|
||||
|
||||
// BOOST_HAS_ABI_HEADERS
|
||||
// This macro gets set if we have headers that fix the ABI,
|
||||
// and prevent ODR violations when linking to external libraries:
|
||||
#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
|
||||
# define BOOST_HAS_ABI_HEADERS
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
|
||||
# undef BOOST_HAS_ABI_HEADERS
|
||||
#endif
|
||||
|
||||
// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
|
||||
// Because std::size_t usage is so common, even in boost headers which do not
|
||||
// otherwise use the C library, the <cstddef> workaround is included here so
|
||||
// that ugly workaround code need not appear in many other boost headers.
|
||||
// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
|
||||
// must still be #included in the usual places so that <cstddef> inclusion
|
||||
// works as expected with standard conforming compilers. The resulting
|
||||
// double inclusion of <cstddef> is harmless.
|
||||
|
||||
# ifdef BOOST_NO_STDC_NAMESPACE
|
||||
# include <cstddef>
|
||||
namespace std { using ::ptrdiff_t; using ::size_t; }
|
||||
# endif
|
||||
|
||||
// Workaround for the unfortunate min/max macros defined by some platform headers
|
||||
|
||||
#define BOOST_PREVENT_MACRO_SUBSTITUTION
|
||||
|
||||
#ifndef BOOST_USING_STD_MIN
|
||||
# define BOOST_USING_STD_MIN() using std::min
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_USING_STD_MAX
|
||||
# define BOOST_USING_STD_MAX() using std::max
|
||||
#endif
|
||||
|
||||
// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
|
||||
|
||||
# ifdef BOOST_NO_STD_MIN_MAX
|
||||
|
||||
namespace std {
|
||||
template <class _Tp>
|
||||
inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
|
||||
return __b < __a ? __b : __a;
|
||||
}
|
||||
template <class _Tp>
|
||||
inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
|
||||
return __a < __b ? __b : __a;
|
||||
}
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
|
||||
// On compilers which don't allow in-class initialization of static integral
|
||||
// constant members, we must use enums as a workaround if we want the constants
|
||||
// to be available at compile-time. This macro gives us a convenient way to
|
||||
// declare such constants.
|
||||
|
||||
# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
|
||||
# else
|
||||
# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
|
||||
# endif
|
||||
|
||||
// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
|
||||
// When the standard library does not have a conforming std::use_facet there
|
||||
// are various workarounds available, but they differ from library to library.
|
||||
// The same problem occurs with has_facet.
|
||||
// These macros provide a consistent way to access a locale's facets.
|
||||
// Usage:
|
||||
// replace
|
||||
// std::use_facet<Type>(loc);
|
||||
// with
|
||||
// BOOST_USE_FACET(Type, loc);
|
||||
// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
|
||||
// Use for BOOST_HAS_FACET is analagous.
|
||||
|
||||
#if defined(BOOST_NO_STD_USE_FACET)
|
||||
# ifdef BOOST_HAS_TWO_ARG_USE_FACET
|
||||
# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
|
||||
# elif defined(BOOST_HAS_MACRO_USE_FACET)
|
||||
# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
|
||||
# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
|
||||
# elif defined(BOOST_HAS_STLP_USE_FACET)
|
||||
# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
|
||||
# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
|
||||
#endif
|
||||
|
||||
// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
|
||||
// Member templates are supported by some compilers even though they can't use
|
||||
// the A::template member<U> syntax, as a workaround replace:
|
||||
//
|
||||
// typedef typename A::template rebind<U> binder;
|
||||
//
|
||||
// with:
|
||||
//
|
||||
// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
|
||||
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
|
||||
# define BOOST_NESTED_TEMPLATE template
|
||||
#else
|
||||
# define BOOST_NESTED_TEMPLATE
|
||||
#endif
|
||||
|
||||
// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
|
||||
// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
// is defined, in which case it evaluates to return x; Use when you have a return
|
||||
// statement that can never be reached.
|
||||
|
||||
#ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
|
||||
# define BOOST_UNREACHABLE_RETURN(x) return x;
|
||||
#else
|
||||
# define BOOST_UNREACHABLE_RETURN(x)
|
||||
#endif
|
||||
|
||||
// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
|
||||
//
|
||||
// Some compilers don't support the use of `typename' for dependent
|
||||
// types in deduced contexts, e.g.
|
||||
//
|
||||
// template <class T> void f(T, typename T::type);
|
||||
// ^^^^^^^^
|
||||
// Replace these declarations with:
|
||||
//
|
||||
// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
|
||||
|
||||
#ifndef BOOST_NO_DEDUCED_TYPENAME
|
||||
# define BOOST_DEDUCED_TYPENAME typename
|
||||
#else
|
||||
# define BOOST_DEDUCED_TYPENAME
|
||||
#endif
|
||||
|
||||
// long long workaround ------------------------------------------//
|
||||
// On gcc (and maybe other compilers?) long long is alway supported
|
||||
// but it's use may generate either warnings (with -ansi), or errors
|
||||
// (with -pedantic -ansi) unless it's use is prefixed by __extension__
|
||||
//
|
||||
#if defined(BOOST_HAS_LONG_LONG)
|
||||
namespace boost{
|
||||
# ifdef __GNUC__
|
||||
__extension__ typedef long long long_long_type;
|
||||
__extension__ typedef unsigned long long ulong_long_type;
|
||||
# else
|
||||
typedef long long long_long_type;
|
||||
typedef unsigned long long ulong_long_type;
|
||||
# endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
|
||||
//
|
||||
// Some compilers have problems with function templates whose
|
||||
// template parameters don't appear in the function parameter
|
||||
// list (basically they just link one instantiation of the
|
||||
// template in the final executable). These macros provide a
|
||||
// uniform way to cope with the problem with no effects on the
|
||||
// calling syntax.
|
||||
|
||||
// Example:
|
||||
//
|
||||
// #include <iostream>
|
||||
// #include <ostream>
|
||||
// #include <typeinfo>
|
||||
//
|
||||
// template <int n>
|
||||
// void f() { std::cout << n << ' '; }
|
||||
//
|
||||
// template <typename T>
|
||||
// void g() { std::cout << typeid(T).name() << ' '; }
|
||||
//
|
||||
// int main() {
|
||||
// f<1>();
|
||||
// f<2>();
|
||||
//
|
||||
// g<int>();
|
||||
// g<double>();
|
||||
// }
|
||||
//
|
||||
// With VC++ 6.0 the output is:
|
||||
//
|
||||
// 2 2 double double
|
||||
//
|
||||
// To fix it, write
|
||||
//
|
||||
// template <int n>
|
||||
// void f(BOOST_EXPLICIT_TEMPLATE_NON_TYPE(int, n)) { ... }
|
||||
//
|
||||
// template <typename T>
|
||||
// void g(BOOST_EXPLICIT_TEMPLATE_TYPE(T)) { ... }
|
||||
//
|
||||
|
||||
|
||||
#if defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
|
||||
# include "boost/type.hpp"
|
||||
# include "boost/non_type.hpp"
|
||||
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) boost::type<t>* = 0
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) boost::type<t>*
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) boost::non_type<t, v>* = 0
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) boost::non_type<t, v>*
|
||||
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) \
|
||||
, BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
#else
|
||||
|
||||
// no workaround needed: expand to nothing
|
||||
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
|
||||
# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
|
||||
|
||||
|
||||
#endif // defined BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------//
|
||||
|
||||
//
|
||||
// Helper macro BOOST_STRINGIZE:
|
||||
// Converts the parameter X to a string after macro replacement
|
||||
// on X has been performed.
|
||||
//
|
||||
#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
|
||||
#define BOOST_DO_STRINGIZE(X) #X
|
||||
|
||||
//
|
||||
// Helper macro BOOST_JOIN:
|
||||
// The following piece of macro magic joins the two
|
||||
// arguments together, even when one of the arguments is
|
||||
// itself a macro (see 16.3.1 in C++ standard). The key
|
||||
// is that macro expansion of macro arguments does not
|
||||
// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
|
||||
//
|
||||
#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y )
|
||||
#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y)
|
||||
#define BOOST_DO_JOIN2( X, Y ) X##Y
|
||||
|
||||
//
|
||||
// Set some default values for compiler/library/platform names.
|
||||
// These are for debugging config setup only:
|
||||
//
|
||||
# ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "Unknown ISO C++ Compiler"
|
||||
# endif
|
||||
# ifndef BOOST_STDLIB
|
||||
# define BOOST_STDLIB "Unknown ISO standard library"
|
||||
# endif
|
||||
# ifndef BOOST_PLATFORM
|
||||
# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
|
||||
|| defined(_POSIX_SOURCE)
|
||||
# define BOOST_PLATFORM "Generic Unix"
|
||||
# else
|
||||
# define BOOST_PLATFORM "Unknown"
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
124
src/eo/contrib/boost/config/user.hpp
Executable file
124
src/eo/contrib/boost/config/user.hpp
Executable file
|
|
@ -0,0 +1,124 @@
|
|||
// boost/config/user.hpp ---------------------------------------------------//
|
||||
|
||||
// (C) Copyright John Maddock 2001.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Do not check in modified versions of this file,
|
||||
// This file may be customized by the end user, but not by boost.
|
||||
|
||||
//
|
||||
// Use this file to define a site and compiler specific
|
||||
// configuration policy:
|
||||
//
|
||||
|
||||
// define this to locate a compiler config file:
|
||||
// #define BOOST_COMPILER_CONFIG <myheader>
|
||||
|
||||
// define this to locate a stdlib config file:
|
||||
// #define BOOST_STDLIB_CONFIG <myheader>
|
||||
|
||||
// define this to locate a platform config file:
|
||||
// #define BOOST_PLATFORM_CONFIG <myheader>
|
||||
|
||||
// define this to disable compiler config,
|
||||
// use if your compiler config has nothing to set:
|
||||
// #define BOOST_NO_COMPILER_CONFIG
|
||||
|
||||
// define this to disable stdlib config,
|
||||
// use if your stdlib config has nothing to set:
|
||||
// #define BOOST_NO_STDLIB_CONFIG
|
||||
|
||||
// define this to disable platform config,
|
||||
// use if your platform config has nothing to set:
|
||||
// #define BOOST_NO_PLATFORM_CONFIG
|
||||
|
||||
// define this to disable all config options,
|
||||
// excluding the user config. Use if your
|
||||
// setup is fully ISO compliant, and has no
|
||||
// useful extensions, or for autoconf generated
|
||||
// setups:
|
||||
// #define BOOST_NO_CONFIG
|
||||
|
||||
// define this to make the config "optimistic"
|
||||
// about unknown compiler versions. Normally
|
||||
// unknown compiler versions are assumed to have
|
||||
// all the defects of the last known version, however
|
||||
// setting this flag, causes the config to assume
|
||||
// that unknown compiler versions are fully conformant
|
||||
// with the standard:
|
||||
// #define BOOST_STRICT_CONFIG
|
||||
|
||||
// define this to cause the config to halt compilation
|
||||
// with an #error if it encounters anything unknown --
|
||||
// either an unknown compiler version or an unknown
|
||||
// compiler/platform/library:
|
||||
// #define BOOST_ASSERT_CONFIG
|
||||
|
||||
|
||||
// define if you want to disable threading support, even
|
||||
// when available:
|
||||
// #define BOOST_DISABLE_THREADS
|
||||
|
||||
// define when you want to disable Win32 specific features
|
||||
// even when available:
|
||||
// #define BOOST_DISABLE_WIN32
|
||||
|
||||
// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any
|
||||
// prefix/suffix headers that normally control things like struct
|
||||
// packing and alignment.
|
||||
// #define BOOST_DISABLE_ABI_HEADERS
|
||||
|
||||
// BOOST_ABI_PREFIX: A prefix header to include in place of whatever
|
||||
// boost.config would normally select, any replacement should set up
|
||||
// struct packing and alignment options as required.
|
||||
// #define BOOST_ABI_PREFIX my-header-name
|
||||
|
||||
// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever
|
||||
// boost.config would normally select, any replacement should undo
|
||||
// the effects of the prefix header.
|
||||
// #define BOOST_ABI_SUFFIX my-header-name
|
||||
|
||||
// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source,
|
||||
// to be linked as dll's rather than static libraries on Microsoft Windows
|
||||
// (this macro is used to turn on __declspec(dllimport) modifiers, so that
|
||||
// the compiler knows which symbols to look for in a dll rather than in a
|
||||
// static library). Note that there may be some libraries that can only
|
||||
// be statically linked (Boost.Test for example) and others which may only
|
||||
// be dynamically linked (Boost.Threads for example), in these cases this
|
||||
// macro has no effect.
|
||||
// #define BOOST_ALL_DYN_LINK
|
||||
|
||||
// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll
|
||||
// rather than a static library on Microsoft Windows: replace the WHATEVER
|
||||
// part of the macro name with the name of the library that you want to
|
||||
// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or
|
||||
// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport)
|
||||
// modifiers, so that the compiler knows which symbols to look for in a dll
|
||||
// rather than in a static library).
|
||||
// Note that there may be some libraries that can only be statically linked
|
||||
// (Boost.Test for example) and others which may only be dynamically linked
|
||||
// (Boost.Threads for example), in these cases this macro is unsupported.
|
||||
// #define BOOST_WHATEVER_DYN_LINK
|
||||
|
||||
// BOOST_ALL_NO_LIB: Tells the config system not to automatically select
|
||||
// which libraries to link against.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against,
|
||||
// simply by the act of including one of that library's headers.
|
||||
// This macro turns that feature off.
|
||||
// #define BOOST_ALL_NO_LIB
|
||||
|
||||
// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically
|
||||
// select which library to link against for library "whatever",
|
||||
// replace WHATEVER in the macro name with the name of the library;
|
||||
// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB.
|
||||
// Normally if a compiler supports #pragma lib, then the correct library
|
||||
// build variant will be automatically selected and linked against, simply
|
||||
// by the act of including one of that library's headers. This macro turns
|
||||
// that feature off.
|
||||
// #define BOOST_WHATEVER_NO_LIB
|
||||
|
||||
|
||||
|
||||
142
src/eo/contrib/boost/limits.hpp
Executable file
142
src/eo/contrib/boost/limits.hpp
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
// (C) Copyright John maddock 1999.
|
||||
// (C) David Abrahams 2002. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// use this header as a workaround for missing <limits>
|
||||
|
||||
// See http://www.boost.org/libs/utility/limits.html for documentation.
|
||||
|
||||
#ifndef BOOST_LIMITS
|
||||
#define BOOST_LIMITS
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#ifdef BOOST_NO_LIMITS
|
||||
# include <boost/detail/limits.hpp>
|
||||
#else
|
||||
# include <limits>
|
||||
#endif
|
||||
|
||||
#if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \
|
||||
|| (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS))
|
||||
// Add missing specializations for numeric_limits:
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
# define BOOST_LLT __int64
|
||||
# define BOOST_ULLT unsigned __int64
|
||||
#else
|
||||
# define BOOST_LLT ::boost::long_long_type
|
||||
# define BOOST_ULLT ::boost::ulong_long_type
|
||||
#endif
|
||||
|
||||
namespace std
|
||||
{
|
||||
template<>
|
||||
class numeric_limits<BOOST_LLT>
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; }
|
||||
#elif defined(LLONG_MAX)
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; }
|
||||
#elif defined(LONGLONG_MAX)
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; }
|
||||
#else
|
||||
static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); }
|
||||
static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); }
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_LLT epsilon() throw() { return 0; };
|
||||
static BOOST_LLT round_error() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_LLT infinity() throw() { return 0; };
|
||||
static BOOST_LLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_LLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_LLT denorm_min() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = false);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
|
||||
};
|
||||
|
||||
template<>
|
||||
class numeric_limits<BOOST_ULLT>
|
||||
{
|
||||
public:
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_specialized = true);
|
||||
#ifdef BOOST_HAS_MS_INT64
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; }
|
||||
#elif defined(ULLONG_MAX) && defined(ULLONG_MIN)
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; }
|
||||
#elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN)
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; }
|
||||
#else
|
||||
static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; }
|
||||
static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; }
|
||||
#endif
|
||||
BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT);
|
||||
BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000);
|
||||
BOOST_STATIC_CONSTANT(bool, is_signed = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_integer = true);
|
||||
BOOST_STATIC_CONSTANT(bool, is_exact = true);
|
||||
BOOST_STATIC_CONSTANT(int, radix = 2);
|
||||
static BOOST_ULLT epsilon() throw() { return 0; };
|
||||
static BOOST_ULLT round_error() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent10 = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = 0);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent10 = 0);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, has_infinity = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm = false);
|
||||
BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false);
|
||||
static BOOST_ULLT infinity() throw() { return 0; };
|
||||
static BOOST_ULLT quiet_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT signaling_NaN() throw() { return 0; };
|
||||
static BOOST_ULLT denorm_min() throw() { return 0; };
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_bounded = false);
|
||||
BOOST_STATIC_CONSTANT(bool, is_modulo = false);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, traps = false);
|
||||
BOOST_STATIC_CONSTANT(bool, tinyness_before = false);
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero);
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
32
src/eo/contrib/boost/numeric/interval.hpp
Executable file
32
src/eo/contrib/boost/numeric/interval.hpp
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
/* Boost interval.hpp header file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_HPP
|
||||
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/policies.hpp>
|
||||
|
||||
#include <boost/numeric/interval/hw_rounding.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <boost/numeric/interval/rounded_transc.hpp>
|
||||
#include <boost/numeric/interval/constants.hpp>
|
||||
|
||||
#include <boost/numeric/interval/checking.hpp>
|
||||
#include <boost/numeric/interval/compare.hpp>
|
||||
#include <boost/numeric/interval/utility.hpp>
|
||||
|
||||
#include <boost/numeric/interval/arith.hpp>
|
||||
#include <boost/numeric/interval/arith2.hpp>
|
||||
#include <boost/numeric/interval/arith3.hpp>
|
||||
#include <boost/numeric/interval/transc.hpp>
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_HPP
|
||||
305
src/eo/contrib/boost/numeric/interval/arith.hpp
Executable file
305
src/eo/contrib/boost/numeric/interval/arith.hpp
Executable file
|
|
@ -0,0 +1,305 @@
|
|||
/* Boost interval/arith.hpp template implementation file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ARITH_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ARITH_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/detail/division.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
/*
|
||||
* Basic arithmetic operators
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const interval<T, Policies>& operator+(const interval<T, Policies>& x)
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return interval<T, Policies>::empty();
|
||||
return interval<T, Policies>(-x.upper(), -x.lower(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator+=(const interval<T, Policies>& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r.low), rnd.add_up(up, r.up));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator+=(const T& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.add_down(low, r), rnd.add_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator-=(const interval<T, Policies>& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r.up), rnd.sub_up(up, r.low));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator-=(const T& r)
|
||||
{
|
||||
if (interval_lib::detail::test_input(*this, r))
|
||||
set_empty();
|
||||
else {
|
||||
typename Policies::rounding rnd;
|
||||
set(rnd.sub_down(low, r), rnd.sub_up(up, r));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator*=(const interval<T, Policies>& r)
|
||||
{
|
||||
return *this = *this * r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator*=(const T& r)
|
||||
{
|
||||
return *this = r * *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator/=(const interval<T, Policies>& r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>& interval<T, Policies>::operator/=(const T& r)
|
||||
{
|
||||
return *this = *this / r;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.add_down(x.lower(), y.lower()),
|
||||
rnd.add_up (x.upper(), y.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.add_down(x, y.lower()),
|
||||
rnd.add_up (x, y.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+(const interval<T, Policies>& x, const T& y)
|
||||
{ return y + x; }
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x.lower(), y.upper()),
|
||||
rnd.sub_up (x.upper(), y.lower()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x, y.upper()),
|
||||
rnd.sub_up (x, y.lower()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator-(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return interval<T,Policies>(rnd.sub_down(x.lower(), y),
|
||||
rnd.sub_up (x.upper(), y), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
BOOST_USING_STD_MIN();
|
||||
BOOST_USING_STD_MAX();
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
|
||||
if (interval_lib::user::is_neg(xl))
|
||||
if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // M * M
|
||||
return I(min BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_down(xl, yu), rnd.mul_down(xu, yl)),
|
||||
max BOOST_PREVENT_MACRO_SUBSTITUTION(rnd.mul_up (xl, yl), rnd.mul_up (xu, yu)), true);
|
||||
else // M * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yl), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // M * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yu), true);
|
||||
else // M * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // N * M
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xl, yl), true);
|
||||
else // N * N
|
||||
return I(rnd.mul_down(xu, yu), rnd.mul_up(xl, yl), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // N * P
|
||||
return I(rnd.mul_down(xl, yu), rnd.mul_up(xu, yl), true);
|
||||
else // N * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(xu))
|
||||
if (interval_lib::user::is_neg(yl))
|
||||
if (interval_lib::user::is_pos(yu)) // P * M
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * N
|
||||
return I(rnd.mul_down(xu, yl), rnd.mul_up(xl, yu), true);
|
||||
else
|
||||
if (interval_lib::user::is_pos(yu)) // P * P
|
||||
return I(rnd.mul_down(xl, yl), rnd.mul_up(xu, yu), true);
|
||||
else // P * Z
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else // Z * ?
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
// x is supposed not to be infinite
|
||||
if (interval_lib::user::is_neg(x))
|
||||
return I(rnd.mul_down(x, yu), rnd.mul_up(x, yl), true);
|
||||
else if (interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else
|
||||
return I(rnd.mul_down(x, yl), rnd.mul_up(x, yu), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator*(const interval<T, Policies>& x, const T& y)
|
||||
{ return y * x; }
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (in_zero(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative(x, y.lower());
|
||||
else
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive(x, y.upper());
|
||||
else
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
if (in_zero(y))
|
||||
if (!interval_lib::user::is_zero(y.lower()))
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_zero<T, Policies>(x);
|
||||
else
|
||||
return interval_lib::detail::div_negative<T, Policies>(x, y.lower());
|
||||
else
|
||||
if (!interval_lib::user::is_zero(y.upper()))
|
||||
return interval_lib::detail::div_positive<T, Policies>(x, y.upper());
|
||||
else
|
||||
return interval<T, Policies>::empty();
|
||||
else
|
||||
return interval_lib::detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y) || interval_lib::user::is_zero(y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
if (interval_lib::user::is_neg(y))
|
||||
return interval<T, Policies>(rnd.div_down(xu, y), rnd.div_up(xl, y), true);
|
||||
else
|
||||
return interval<T, Policies>(rnd.div_down(xl, y), rnd.div_up(xu, y), true);
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_ARITH_HPP
|
||||
212
src/eo/contrib/boost/numeric/interval/arith2.hpp
Executable file
212
src/eo/contrib/boost/numeric/interval/arith2.hpp
Executable file
|
|
@ -0,0 +1,212 @@
|
|||
/* Boost interval/arith2.hpp template implementation file
|
||||
*
|
||||
* This header provides some auxiliary arithmetic
|
||||
* functions: fmod, sqrt, square, pov, inverse and
|
||||
* a multi-interval division.
|
||||
*
|
||||
* Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ARITH2_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ARITH2_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/division.hpp>
|
||||
#include <boost/numeric/interval/arith.hpp>
|
||||
#include <boost/numeric/interval/policies.hpp>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x.lower()) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), yb));
|
||||
return (const I&)x - n * (const I&)y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T n = rnd.int_down(rnd.div_down(x.lower(), y));
|
||||
return (const I&)x - n * I(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> fmod(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
if (interval_lib::detail::test_input(x, y))
|
||||
return interval<T, Policies>::empty();
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename interval_lib::unprotect<interval<T, Policies> >::type I;
|
||||
T const &yb = interval_lib::user::is_neg(x) ? y.lower() : y.upper();
|
||||
T n = rnd.int_down(rnd.div_down(x, yb));
|
||||
return x - n * (const I&)y;
|
||||
}
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> division_part1(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool& b)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
b = false;
|
||||
if (detail::test_input(x, y))
|
||||
return I::empty();
|
||||
if (in_zero(y))
|
||||
if (!user::is_zero(y.lower()))
|
||||
if (!user::is_zero(y.upper()))
|
||||
return detail::div_zero_part1(x, y, b);
|
||||
else
|
||||
return detail::div_negative(x, y.lower());
|
||||
else
|
||||
if (!user::is_zero(y.upper()))
|
||||
return detail::div_positive(x, y.upper());
|
||||
else
|
||||
return I::empty();
|
||||
else
|
||||
return detail::div_non_zero(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> division_part2(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool b = true)
|
||||
{
|
||||
if (!b) return interval<T, Policies>::empty();
|
||||
return detail::div_zero_part2(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> multiplicative_inverse(const interval<T, Policies>& x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (detail::test_input(x))
|
||||
return I::empty();
|
||||
T one = static_cast<T>(1);
|
||||
typename Policies::rounding rnd;
|
||||
if (in_zero(x)) {
|
||||
typedef typename Policies::checking checking;
|
||||
if (!user::is_zero(x.lower()))
|
||||
if (!user::is_zero(x.upper()))
|
||||
return I::whole();
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(one, x.lower()), true);
|
||||
else
|
||||
if (!user::is_zero(x.upper()))
|
||||
return I(rnd.div_down(one, x.upper()), checking::pos_inf(), true);
|
||||
else
|
||||
return I::empty();
|
||||
} else
|
||||
return I(rnd.div_down(one, x.upper()), rnd.div_up(one, x.lower()), true);
|
||||
}
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Rounding> inline
|
||||
T pow_aux(const T& x_, int pwr, Rounding& rnd) // x and pwr are positive
|
||||
{
|
||||
T x = x_;
|
||||
T y = (pwr & 1) ? x_ : static_cast<T>(1);
|
||||
pwr >>= 1;
|
||||
while (pwr > 0) {
|
||||
x = rnd.mul_up(x, x);
|
||||
if (pwr & 1) y = rnd.mul_up(x, y);
|
||||
pwr >>= 1;
|
||||
}
|
||||
return y;
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> pow(const interval<T, Policies>& x, int pwr)
|
||||
{
|
||||
BOOST_USING_STD_MAX();
|
||||
using interval_lib::detail::pow_aux;
|
||||
typedef interval<T, Policies> I;
|
||||
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
|
||||
if (pwr == 0)
|
||||
if (interval_lib::user::is_zero(x.lower())
|
||||
&& interval_lib::user::is_zero(x.upper()))
|
||||
return I::empty();
|
||||
else
|
||||
return I(static_cast<T>(1));
|
||||
else if (pwr < 0)
|
||||
return interval_lib::multiplicative_inverse(pow(x, -pwr));
|
||||
|
||||
typename Policies::rounding rnd;
|
||||
|
||||
if (interval_lib::user::is_neg(x.upper())) { // [-2,-1]
|
||||
T yl = pow_aux(-x.upper(), pwr, rnd);
|
||||
T yu = pow_aux(-x.lower(), pwr, rnd);
|
||||
if (pwr & 1) // [-2,-1]^1
|
||||
return I(-yu, -yl, true);
|
||||
else // [-2,-1]^2
|
||||
return I(yl, yu, true);
|
||||
} else if (interval_lib::user::is_neg(x.lower())) { // [-1,1]
|
||||
if (pwr & 1) { // [-1,1]^1
|
||||
return I(-pow_aux(-x.lower(), pwr, rnd), pow_aux(x.upper(), pwr, rnd), true);
|
||||
} else { // [-1,1]^2
|
||||
return I(static_cast<T>(0), pow_aux(max BOOST_PREVENT_MACRO_SUBSTITUTION(-x.lower(), x.upper()), pwr, rnd), true);
|
||||
}
|
||||
} else { // [1,2]
|
||||
return I(pow_aux(x.lower(), pwr, rnd), pow_aux(x.upper(), pwr, rnd), true);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> sqrt(const interval<T, Policies>& x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x) || interval_lib::user::is_neg(x.upper()))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
T l = !interval_lib::user::is_pos(x.lower()) ? static_cast<T>(0) : rnd.sqrt_down(x.lower());
|
||||
return I(l, rnd.sqrt_up(x.upper()), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> square(const interval<T, Policies>& x)
|
||||
{
|
||||
typedef interval<T, Policies> I;
|
||||
if (interval_lib::detail::test_input(x))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
if (interval_lib::user::is_neg(xu))
|
||||
return I(rnd.mul_down(xu, xu), rnd.mul_up(xl, xl), true);
|
||||
else if (interval_lib::user::is_pos(x.lower()))
|
||||
return I(rnd.mul_down(xl, xl), rnd.mul_up(xu, xu), true);
|
||||
else
|
||||
return I(static_cast<T>(0), (-xl > xu ? rnd.mul_up(xl, xl) : rnd.mul_up(xu, xu)), true);
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_ARITH2_HPP
|
||||
69
src/eo/contrib/boost/numeric/interval/arith3.hpp
Executable file
69
src/eo/contrib/boost/numeric/interval/arith3.hpp
Executable file
|
|
@ -0,0 +1,69 @@
|
|||
/* Boost interval/arith3.hpp template implementation file
|
||||
*
|
||||
* This headers provides arithmetical functions
|
||||
* which compute an interval given some base
|
||||
* numbers. The resulting interval encloses the
|
||||
* real result of the arithmetic operation.
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_ARITH3_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_ARITH3_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
template<class I> inline
|
||||
I add(const typename I::base_type& x, const typename I::base_type& y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.add_down(x, y), rnd.add_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I sub(const typename I::base_type& x, const typename I::base_type& y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.sub_down(x, y), rnd.sub_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I mul(const typename I::base_type& x, const typename I::base_type& y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.mul_down(x, y), rnd.mul_up(x, y), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I div(const typename I::base_type& x, const typename I::base_type& y)
|
||||
{
|
||||
typedef typename I::traits_type Policies;
|
||||
if (detail::test_input<typename I::base_type, Policies>(x, y) || user::is_zero(y))
|
||||
return I::empty();
|
||||
typename Policies::rounding rnd;
|
||||
return I(rnd.div_down(x, y), rnd.div_up(x, y), true);
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_ARITH3_HPP
|
||||
130
src/eo/contrib/boost/numeric/interval/checking.hpp
Executable file
130
src/eo/contrib/boost/numeric/interval/checking.hpp
Executable file
|
|
@ -0,0 +1,130 @@
|
|||
/* Boost interval/checking.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
struct exception_create_empty
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::runtime_error("boost::interval: empty interval created");
|
||||
}
|
||||
};
|
||||
|
||||
struct exception_invalid_number
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::invalid_argument("boost::interval: invalid number");
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_base
|
||||
{
|
||||
static T pos_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T neg_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return -std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T nan()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_quiet_NaN);
|
||||
return std::numeric_limits<T>::quiet_NaN();
|
||||
}
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
return std::numeric_limits<T>::has_quiet_NaN && (x != x);
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(1));
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(0));
|
||||
}
|
||||
static bool is_empty(const T& l, const T& u)
|
||||
{
|
||||
return !(l <= u); // safety for partial orders
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_create_empty>
|
||||
struct checking_no_empty: Checking
|
||||
{
|
||||
static T nan()
|
||||
{
|
||||
assert(false);
|
||||
return Checking::nan();
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_lower();
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_upper();
|
||||
}
|
||||
static bool is_empty(const T&, const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T> >
|
||||
struct checking_no_nan: Checking
|
||||
{
|
||||
static bool is_nan(const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_invalid_number>
|
||||
struct checking_catch_nan: Checking
|
||||
{
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
if (Checking::is_nan(x)) Exception()();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_strict:
|
||||
checking_no_nan<T, checking_no_empty<T> >
|
||||
{};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
19
src/eo/contrib/boost/numeric/interval/compare.hpp
Executable file
19
src/eo/contrib/boost/numeric/interval/compare.hpp
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
/* Boost interval/compare.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_HPP
|
||||
|
||||
#include <boost/numeric/interval/compare/certain.hpp>
|
||||
#include <boost/numeric/interval/compare/possible.hpp>
|
||||
#include <boost/numeric/interval/compare/explicit.hpp>
|
||||
#include <boost/numeric/interval/compare/lexicographic.hpp>
|
||||
#include <boost/numeric/interval/compare/set.hpp>
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_HPP
|
||||
113
src/eo/contrib/boost/numeric/interval/compare/certain.hpp
Executable file
113
src/eo/contrib/boost/numeric/interval/compare/certain.hpp
Executable file
|
|
@ -0,0 +1,113 @@
|
|||
/* Boost interval/compare/certain.hpp template implementation file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace certain {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() == y.lower() && x.lower() == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() == y && x.lower() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y.lower() || x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() < y || x.lower() > y;
|
||||
}
|
||||
|
||||
} // namespace certain
|
||||
} // namespace compare
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_CERTAIN_HPP
|
||||
248
src/eo/contrib/boost/numeric/interval/compare/explicit.hpp
Executable file
248
src/eo/contrib/boost/numeric/interval/compare/explicit.hpp
Executable file
|
|
@ -0,0 +1,248 @@
|
|||
/* Boost interval/compare/explicit.hpp template implementation file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
/*
|
||||
* Certainly... operations
|
||||
*/
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerlt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerlt(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerlt(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x < y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerle(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerle(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x <= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cergt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.lower() > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cergt(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.lower() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cergt(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x > y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.lower() >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerge(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerge(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x >= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cereq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.lower() == y.upper() && y.lower() == x.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cereq(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.lower() == y && x.upper() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cereq(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x == y.lower() && x == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool cerne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() < y.lower() || y.upper() < x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerne(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() < y || y < x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool cerne(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x < y.lower() || y.upper() < x;
|
||||
}
|
||||
|
||||
/*
|
||||
* Possibly... comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool poslt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.lower() < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poslt(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poslt(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.lower() <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posle(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.lower() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posle(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posgt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posgt(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posgt(const T& x, const interval<T, Policies> & y)
|
||||
{
|
||||
return x > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posge(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posge(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool poseq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() >= y.lower() && y.upper() >= x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poseq(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() >= y && y >= x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool poseq(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x >= y.lower() && y.upper() >= x;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool posne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return x.upper() != y.lower() || y.upper() != x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posne(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
return x.upper() != y || y != x.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool posne(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
return x != y.lower() || y.upper() != x;
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} //namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|
||||
122
src/eo/contrib/boost/numeric/interval/compare/lexicographic.hpp
Executable file
122
src/eo/contrib/boost/numeric/interval/compare/lexicographic.hpp
Executable file
|
|
@ -0,0 +1,122 @@
|
|||
/* Boost interval/compare/lexicographic.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002-2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace lexicographic {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() < y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl < yl || (xl == yl && x.upper() <= y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
return xl < y || (xl == y && x.upper() <= y);
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() > y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
return xl > y || (xl == y && x.upper() > y);
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
const T& xl = x.lower();
|
||||
const T& yl = y.lower();
|
||||
return xl > yl || (xl == yl && x.upper() >= y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() == y.lower() && x.upper() == y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() == y && x.upper() == y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y.lower() || x.upper() != y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
}
|
||||
|
||||
} // namespace lexicographic
|
||||
} // namespace compare
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_LEXICOGRAPHIC_HPP
|
||||
113
src/eo/contrib/boost/numeric/interval/compare/possible.hpp
Executable file
113
src/eo/contrib/boost/numeric/interval/compare/possible.hpp
Executable file
|
|
@ -0,0 +1,113 @@
|
|||
/* Boost interval/compare/possible.hpp template implementation file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace possible {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() < y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y.upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() > y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() > y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y.upper() && x.upper() >= y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() <= y && x.upper() >= y;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y.upper() || x.upper() != y.lower();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
return x.lower() != y || x.upper() != y;
|
||||
}
|
||||
|
||||
} // namespace possible
|
||||
} // namespace compare
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_POSSIBLE_HPP
|
||||
101
src/eo/contrib/boost/numeric/interval/compare/set.hpp
Executable file
101
src/eo/contrib/boost/numeric/interval/compare/set.hpp
Executable file
|
|
@ -0,0 +1,101 @@
|
|||
/* Boost interval/compare/set.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002-2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/utility.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace set {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return proper_subset(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return subset(x, y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return proper_subset(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return subset(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return equal(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator==(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
return !equal(y, x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
throw comparison_error();
|
||||
}
|
||||
|
||||
} // namespace set
|
||||
} // namespace compare
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_SET_HPP
|
||||
138
src/eo/contrib/boost/numeric/interval/compare/tribool.hpp
Executable file
138
src/eo/contrib/boost/numeric/interval/compare/tribool.hpp
Executable file
|
|
@ -0,0 +1,138 @@
|
|||
/* Boost interval/compare/tribool.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002-2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/logic/tribool.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace compare {
|
||||
namespace tribool {
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator<(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y.lower()) return true;
|
||||
if (x.lower() >= y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator<(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y) return true;
|
||||
if (x.lower() >= y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator<=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() <= y.lower()) return true;
|
||||
if (x.lower() > y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator<=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() <= y) return true;
|
||||
if (x.lower() > y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator>(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() > y.upper()) return true;
|
||||
if (x.upper() <= y.lower()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator>(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() > y) return true;
|
||||
if (x.upper() <= y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator>=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() >= y.upper()) return true;
|
||||
if (x.upper() < y.lower()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator>=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.lower() >= y) return true;
|
||||
if (x.upper() < y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator==(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper()) return true;
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator==(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() == y && x.lower() == y) return true;
|
||||
if (x.upper() < y || x.lower() > y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
logic::tribool operator!=(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y.lower() || x.lower() > y.upper()) return true;
|
||||
if (x.upper() == y.lower() && x.lower() == y.upper()) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
logic::tribool operator!=(const interval<T, Policies>& x, const T& y)
|
||||
{
|
||||
if (detail::test_input(x, y)) throw comparison_error();
|
||||
if (x.upper() < y || x.lower() > y) return true;
|
||||
if (x.upper() == y && x.lower() == y) return false;
|
||||
return logic::indeterminate;
|
||||
}
|
||||
|
||||
} // namespace tribool
|
||||
} // namespace compare
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_TRIBOOL_HPP
|
||||
85
src/eo/contrib/boost/numeric/interval/constants.hpp
Executable file
85
src/eo/contrib/boost/numeric/interval/constants.hpp
Executable file
|
|
@ -0,0 +1,85 @@
|
|||
/* Boost interval/constants.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace constants {
|
||||
|
||||
// These constants should be exactly computed.
|
||||
// Decimal representations wouldn't do it since the standard doesn't
|
||||
// specify the rounding (even nearest) that should be used.
|
||||
|
||||
static const float pi_f_l = 13176794.0f/(1<<22);
|
||||
static const float pi_f_u = 13176795.0f/(1<<22);
|
||||
static const double pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30);
|
||||
static const double pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30);
|
||||
|
||||
template<class T> inline T pi_lower() { return 3; }
|
||||
template<class T> inline T pi_upper() { return 4; }
|
||||
template<class T> inline T pi_half_lower() { return 1; }
|
||||
template<class T> inline T pi_half_upper() { return 2; }
|
||||
template<class T> inline T pi_twice_lower() { return 6; }
|
||||
template<class T> inline T pi_twice_upper() { return 7; }
|
||||
|
||||
template<> inline float pi_lower<float>() { return pi_f_l; }
|
||||
template<> inline float pi_upper<float>() { return pi_f_u; }
|
||||
template<> inline float pi_half_lower<float>() { return pi_f_l / 2; }
|
||||
template<> inline float pi_half_upper<float>() { return pi_f_u / 2; }
|
||||
template<> inline float pi_twice_lower<float>() { return pi_f_l * 2; }
|
||||
template<> inline float pi_twice_upper<float>() { return pi_f_u * 2; }
|
||||
|
||||
template<> inline double pi_lower<double>() { return pi_d_l; }
|
||||
template<> inline double pi_upper<double>() { return pi_d_u; }
|
||||
template<> inline double pi_half_lower<double>() { return pi_d_l / 2; }
|
||||
template<> inline double pi_half_upper<double>() { return pi_d_u / 2; }
|
||||
template<> inline double pi_twice_lower<double>() { return pi_d_l * 2; }
|
||||
template<> inline double pi_twice_upper<double>() { return pi_d_u * 2; }
|
||||
|
||||
template<> inline long double pi_lower<long double>() { return pi_d_l; }
|
||||
template<> inline long double pi_upper<long double>() { return pi_d_u; }
|
||||
template<> inline long double pi_half_lower<long double>() { return pi_d_l / 2; }
|
||||
template<> inline long double pi_half_upper<long double>() { return pi_d_u / 2; }
|
||||
template<> inline long double pi_twice_lower<long double>() { return pi_d_l * 2; }
|
||||
template<> inline long double pi_twice_upper<long double>() { return pi_d_u * 2; }
|
||||
|
||||
} // namespace constants
|
||||
|
||||
template<class I> inline
|
||||
I pi()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_lower<T>(),
|
||||
constants::pi_upper<T>(), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I pi_half()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_half_lower<T>(),
|
||||
constants::pi_half_upper<T>(), true);
|
||||
}
|
||||
|
||||
template<class I> inline
|
||||
I pi_twice()
|
||||
{
|
||||
typedef typename I::base_type T;
|
||||
return I(constants::pi_twice_lower<T>(),
|
||||
constants::pi_twice_upper<T>(), true);
|
||||
}
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_CONSTANTS_HPP
|
||||
57
src/eo/contrib/boost/numeric/interval/detail/bcc_rounding_control.hpp
Executable file
57
src/eo/contrib/boost/numeric/interval/detail/bcc_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,57 @@
|
|||
/* Boost interval/detail/bcc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
# error This header is only intended for Borland C++.
|
||||
#endif
|
||||
|
||||
#ifndef _M_IX86
|
||||
# error This header only works on x86 CPUs.
|
||||
#endif
|
||||
|
||||
#include <float.h> // Borland C++ rounding control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
extern "C" { unsigned int _RTLENTRY _fm_init(void); }
|
||||
|
||||
struct borland_workaround {
|
||||
borland_workaround() { _fm_init(); }
|
||||
};
|
||||
|
||||
static borland_workaround borland_workaround_exec;
|
||||
#endif // BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
|
||||
__inline double rint(double)
|
||||
{ __emit__(0xD9); __emit__(0xFC); /* asm FRNDINT */ }
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ mode = _control87(0, 0); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ _control87(mode, 0xffff); }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP */
|
||||
79
src/eo/contrib/boost/numeric/interval/detail/bugs.hpp
Executable file
79
src/eo/contrib/boost/numeric/interval/detail/bugs.hpp
Executable file
|
|
@ -0,0 +1,79 @@
|
|||
/* Boost interval/detail/bugs.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined(__GLIBC__) && (defined(__USE_MISC) || defined(__USE_XOPEN_EXTENDED) || defined(__USE_ISOC99)) && !defined(__ICC)
|
||||
# define BOOST_HAS_INV_HYPERBOLIC
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_STDC_NAMESPACE
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a) using ::a
|
||||
# ifdef BOOST_HAS_INV_HYPERBOLIC
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a) using std::a
|
||||
# if defined(BOOST_HAS_INV_HYPERBOLIC)
|
||||
# if defined(__GLIBCPP__) || defined(__GLIBCXX__)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using ::a
|
||||
# else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a) using std::a
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__COMO__) || defined(BOOST_INTEL)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#elif defined(BOOST_NO_STDC_NAMESPACE)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using ::a
|
||||
#else
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a) using std::a
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_using_ahyp
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ <= 2)
|
||||
// cf PR c++/1981 for a description of the bug
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
using std::min;
|
||||
using std::max;
|
||||
using std::sqrt;
|
||||
using std::exp;
|
||||
using std::log;
|
||||
using std::cos;
|
||||
using std::tan;
|
||||
using std::asin;
|
||||
using std::acos;
|
||||
using std::atan;
|
||||
using std::ceil;
|
||||
using std::floor;
|
||||
using std::sinh;
|
||||
using std::cosh;
|
||||
using std::tanh;
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_max
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_math
|
||||
# define BOOST_NUMERIC_INTERVAL_using_max(a)
|
||||
# define BOOST_NUMERIC_INTERVAL_using_math(a)
|
||||
# undef BOOST_NUMERIC_INTERVAL_using_ahyp
|
||||
# define BOOST_NUMERIC_INTERVAL_using_ahyp(a)
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_BUGS
|
||||
47
src/eo/contrib/boost/numeric/interval/detail/c99_rounding_control.hpp
Executable file
47
src/eo/contrib/boost/numeric/interval/detail/c99_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
/* Boost interval/detail/c99_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
struct c99_rounding_control: c99_rounding
|
||||
{
|
||||
template<class T>
|
||||
static T force_rounding(const T& r) { volatile T r_ = r; return r_; }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::c99_rounding_control { };
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::c99_rounding_control { };
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::c99_rounding_control { };
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99_ROUNDING_CONTROL_HPP
|
||||
43
src/eo/contrib/boost/numeric/interval/detail/c99sub_rounding_control.hpp
Executable file
43
src/eo/contrib/boost/numeric/interval/detail/c99sub_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
/* Boost interval/detail/c99sub_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUNDING_CONTROL_HPP
|
||||
|
||||
#include <fenv.h> // ISO C 99 rounding mode control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
extern "C" { double rint(double); }
|
||||
|
||||
struct c99_rounding
|
||||
{
|
||||
typedef int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode mode) { fesetround(mode); }
|
||||
static void get_rounding_mode(rounding_mode &mode) { mode = fegetround(); }
|
||||
static void downward() { set_rounding_mode(FE_DOWNWARD); }
|
||||
static void upward() { set_rounding_mode(FE_UPWARD); }
|
||||
static void to_nearest() { set_rounding_mode(FE_TONEAREST); }
|
||||
static void toward_zero() { set_rounding_mode(FE_TOWARDZERO); }
|
||||
|
||||
template<class T>
|
||||
static T to_int(const T& r) { return rint(r); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_C99SUB_ROUBDING_CONTROL_HPP
|
||||
194
src/eo/contrib/boost/numeric/interval/detail/division.hpp
Executable file
194
src/eo/contrib/boost/numeric/interval/detail/division.hpp
Executable file
|
|
@ -0,0 +1,194 @@
|
|||
/* Boost interval/detail/division.hpp file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/bugs.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_non_zero(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yl), rnd.div_up(xl, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yl), rnd.div_up(xu, yl), true);
|
||||
else
|
||||
if (::boost::numeric::interval_lib::user::is_neg(yu))
|
||||
return I(rnd.div_down(xu, yu), rnd.div_up(xl, yl), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yu), rnd.div_up(xu, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_non_zero(const T& x, const interval<T, Policies>& y)
|
||||
{
|
||||
// assert(!in_zero(y));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(x, yu), rnd.div_up(x, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_positive(const interval<T, Policies>& x, const T& yu)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(checking::neg_inf(), rnd.div_up(xu, yu), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(xl, yu), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_positive(const T& x, const T& yu)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_pos(yu));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yu), true);
|
||||
else
|
||||
return I(rnd.div_down(x, yu), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_negative(const interval<T, Policies>& x, const T& yl)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
return I(rnd.div_down(xu, yl), checking::pos_inf(), true);
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
return I(checking::neg_inf(), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(xl, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_negative(const T& x, const T& yl)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(yl));
|
||||
typedef interval<T, Policies> I;
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return I(static_cast<T>(0), static_cast<T>(0), true);
|
||||
typename Policies::rounding rnd;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x))
|
||||
return I(rnd.div_down(x, yl), checking::pos_inf(), true);
|
||||
else
|
||||
return I(checking::neg_inf(), rnd.div_up(x, yl), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero(const interval<T, Policies>& x)
|
||||
{
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) &&
|
||||
::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
return x;
|
||||
else return interval<T, Policies>::whole();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero(const T& x)
|
||||
{
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x))
|
||||
return interval<T, Policies>(static_cast<T>(0), static_cast<T>(0), true);
|
||||
else return interval<T, Policies>::whole();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero_part1(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y, bool& b)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper()));
|
||||
if (::boost::numeric::interval_lib::user::is_zero(x.lower()) && ::boost::numeric::interval_lib::user::is_zero(x.upper()))
|
||||
{ b = false; return x; }
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
const T& xl = x.lower();
|
||||
const T& xu = x.upper();
|
||||
const T& yl = y.lower();
|
||||
const T& yu = y.upper();
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(xu))
|
||||
{ b = true; return I(checking::neg_inf(), rnd.div_up(xu, yu), true); }
|
||||
else if (::boost::numeric::interval_lib::user::is_neg(xl))
|
||||
{ b = false; return I(checking::neg_inf(), checking::pos_inf(), true); }
|
||||
else
|
||||
{ b = true; return I(checking::neg_inf(), rnd.div_up(xl, yl), true); }
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> div_zero_part2(const interval<T, Policies>& x,
|
||||
const interval<T, Policies>& y)
|
||||
{
|
||||
// assert(::boost::numeric::interval_lib::user::is_neg(y.lower()) && ::boost::numeric::interval_lib::user::is_pos(y.upper()) && (div_zero_part1(x, y, b), b));
|
||||
typename Policies::rounding rnd;
|
||||
typedef interval<T, Policies> I;
|
||||
typedef typename Policies::checking checking;
|
||||
if (::boost::numeric::interval_lib::user::is_neg(x.upper()))
|
||||
return I(rnd.div_down(x.upper(), y.lower()), checking::pos_inf(), true);
|
||||
else
|
||||
return I(rnd.div_down(x.lower(), y.upper()), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_DIVISION_HPP
|
||||
41
src/eo/contrib/boost/numeric/interval/detail/interval_prototype.hpp
Executable file
41
src/eo/contrib/boost/numeric/interval/detail/interval_prototype.hpp
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
/* Boost interval/detail/interval_prototype.hpp file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
template<class T> struct rounded_math;
|
||||
template<class T> struct checking_strict;
|
||||
class comparison_error;
|
||||
template<class Rounding, class Checking> struct policies;
|
||||
|
||||
/*
|
||||
* default policies class
|
||||
*/
|
||||
|
||||
template<class T>
|
||||
struct default_policies
|
||||
{
|
||||
typedef policies<rounded_math<T>, checking_strict<T> > type;
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
template<class T, class Policies = typename interval_lib::default_policies<T>::type >
|
||||
class interval;
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_INTERVAL_PROTOTYPE_HPP
|
||||
88
src/eo/contrib/boost/numeric/interval/detail/msvc_rounding_control.hpp
Executable file
88
src/eo/contrib/boost/numeric/interval/detail/msvc_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,88 @@
|
|||
/* Boost interval/detail/msvc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Maarten Keijzer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef _MSC_VER
|
||||
# error This header is only intended for MSVC, but might work for Borland as well
|
||||
#endif
|
||||
|
||||
#include <float.h> // MSVC rounding control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
extern "C" { double rint(double); }
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
static unsigned int hard2msvc(unsigned short m) {
|
||||
unsigned int n = 0;
|
||||
if (m & 0x01) n |= _EM_INVALID;
|
||||
if (m & 0x02) n |= _EM_DENORMAL;
|
||||
if (m & 0x04) n |= _EM_ZERODIVIDE;
|
||||
if (m & 0x08) n |= _EM_OVERFLOW;
|
||||
if (m & 0x10) n |= _EM_UNDERFLOW;
|
||||
if (m & 0x20) n |= _EM_INEXACT;
|
||||
switch (m & 0x300) {
|
||||
case 0x000: n |= _PC_24; break;
|
||||
case 0x200: n |= _PC_53; break;
|
||||
case 0x300: n |= _PC_64; break;
|
||||
}
|
||||
switch (m & 0xC00) {
|
||||
case 0x000: n |= _RC_NEAR; break;
|
||||
case 0x400: n |= _RC_DOWN; break;
|
||||
case 0x800: n |= _RC_UP; break;
|
||||
case 0xC00: n |= _RC_CHOP; break;
|
||||
}
|
||||
if (m & 0x1000) n |= _IC_AFFINE; // only useful on 287
|
||||
return n;
|
||||
}
|
||||
|
||||
static unsigned short msvc2hard(unsigned int n) {
|
||||
unsigned short m = 0;
|
||||
if (n & _EM_INVALID) m |= 0x01;
|
||||
if (n & _EM_DENORMAL) m |= 0x02;
|
||||
if (n & _EM_ZERODIVIDE) m |= 0x04;
|
||||
if (n & _EM_OVERFLOW) m |= 0x08;
|
||||
if (n & _EM_UNDERFLOW) m |= 0x10;
|
||||
if (n & _EM_INEXACT) m |= 0x20;
|
||||
switch (n & _MCW_RC) {
|
||||
case _RC_NEAR: m |= 0x000; break;
|
||||
case _RC_DOWN: m |= 0x400; break;
|
||||
case _RC_UP: m |= 0x800; break;
|
||||
case _RC_CHOP: m |= 0xC00; break;
|
||||
}
|
||||
switch (n & _MCW_PC) {
|
||||
case _PC_24: m |= 0x000; break;
|
||||
case _PC_53: m |= 0x200; break;
|
||||
case _PC_64: m |= 0x300; break;
|
||||
}
|
||||
if ((n & _MCW_IC) == _IC_AFFINE) m |= 0x1000;
|
||||
return m;
|
||||
}
|
||||
|
||||
typedef unsigned short rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ mode = msvc2hard(_control87(0, 0)); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ _control87(hard2msvc(mode), _MCW_EM | _MCW_RC | _MCW_PC | _MCW_IC); }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_MSVC_ROUNDING_CONTROL_HPP */
|
||||
95
src/eo/contrib/boost/numeric/interval/detail/ppc_rounding_control.hpp
Executable file
95
src/eo/contrib/boost/numeric/interval/detail/ppc_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
/* Boost interval/detail/ppc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
* Copyright 2005 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#if !defined(powerpc) && !defined(__powerpc__) && !defined(__ppc__)
|
||||
#error This header only works on PPC CPUs.
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__ ) || (__IBMCPP__ >= 700)
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
typedef union {
|
||||
::boost::long_long_type imode;
|
||||
double dmode;
|
||||
} rounding_mode_struct;
|
||||
|
||||
static const rounding_mode_struct mode_upward = { 0xFFF8000000000002LL };
|
||||
static const rounding_mode_struct mode_downward = { 0xFFF8000000000003LL };
|
||||
static const rounding_mode_struct mode_to_nearest = { 0xFFF8000000000001LL };
|
||||
static const rounding_mode_struct mode_toward_zero = { 0xFFF8000000000000LL };
|
||||
|
||||
struct ppc_rounding_control
|
||||
{
|
||||
typedef double rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ __asm__ __volatile__ ("mtfsf 255,%0" : : "f"(mode)); }
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("mffs %0" : "=f"(mode)); }
|
||||
|
||||
static void downward() { set_rounding_mode(mode_downward.dmode); }
|
||||
static void upward() { set_rounding_mode(mode_upward.dmode); }
|
||||
static void to_nearest() { set_rounding_mode(mode_to_nearest.dmode); }
|
||||
static void toward_zero() { set_rounding_mode(mode_toward_zero.dmode); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::ppc_rounding_control
|
||||
{
|
||||
static float force_rounding(const float r)
|
||||
{
|
||||
float tmp;
|
||||
__asm__ __volatile__ ("frsp %0, %1" : "=f" (tmp) : "f" (r));
|
||||
return tmp;
|
||||
}
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::ppc_rounding_control
|
||||
{
|
||||
static const double & force_rounding(const double& r) { return r; }
|
||||
static double to_int(const double& r) { return rint(r); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::ppc_rounding_control
|
||||
{
|
||||
static const long double & force_rounding(const long double& r) { return r; }
|
||||
static long double to_int(const long double& r) { return rint(r); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
#endif
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_PPC_ROUNDING_CONTROL_HPP */
|
||||
112
src/eo/contrib/boost/numeric/interval/detail/sparc_rounding_control.hpp
Executable file
112
src/eo/contrib/boost/numeric/interval/detail/sparc_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,112 @@
|
|||
/* Boost interval/detail/sparc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* The basic code in this file was kindly provided by Jeremy Siek.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#if !defined(sparc) && !defined(__sparc__)
|
||||
# error This header is only intended for SPARC CPUs.
|
||||
#endif
|
||||
|
||||
#ifdef __SUNPRO_CC
|
||||
# include <ieeefp.h>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
struct sparc_rounding_control
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode)
|
||||
{
|
||||
# if defined(__GNUC__)
|
||||
__asm__ __volatile__("ld %0, %%fsr" : : "m"(mode));
|
||||
# elif defined (__SUNPRO_CC)
|
||||
fpsetround(fp_rnd(mode));
|
||||
# elif defined(__KCC)
|
||||
asm("sethi %hi(mode), %o1");
|
||||
asm("ld [%o1+%lo(mode)], %fsr");
|
||||
# else
|
||||
# error Unsupported compiler for Sparc rounding control.
|
||||
# endif
|
||||
}
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{
|
||||
# if defined(__GNUC__)
|
||||
__asm__ __volatile__("st %%fsr, %0" : "=m"(mode));
|
||||
# elif defined (__SUNPRO_CC)
|
||||
mode = fpgetround();
|
||||
# elif defined(__KCC)
|
||||
# error KCC on Sun SPARC get_round_mode: please fix me
|
||||
asm("st %fsr, [mode]");
|
||||
# else
|
||||
# error Unsupported compiler for Sparc rounding control.
|
||||
# endif
|
||||
}
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
static void downward() { set_rounding_mode(FP_RM); }
|
||||
static void upward() { set_rounding_mode(FP_RP); }
|
||||
static void to_nearest() { set_rounding_mode(FP_RN); }
|
||||
static void toward_zero() { set_rounding_mode(FP_RZ); }
|
||||
#else
|
||||
static void downward() { set_rounding_mode(0xc0000000); }
|
||||
static void upward() { set_rounding_mode(0x80000000); }
|
||||
static void to_nearest() { set_rounding_mode(0x00000000); }
|
||||
static void toward_zero() { set_rounding_mode(0x40000000); }
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
extern "C" {
|
||||
float rintf(float);
|
||||
double rint(double);
|
||||
}
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>:
|
||||
detail::sparc_rounding_control
|
||||
{
|
||||
static const float& force_rounding(const float& x) { return x; }
|
||||
static float to_int(const float& x) { return rintf(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>:
|
||||
detail::sparc_rounding_control
|
||||
{
|
||||
static const double& force_rounding(const double& x) { return x; }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::sparc_rounding_control
|
||||
{
|
||||
static const long double& force_rounding(const long double& x) { return x; }
|
||||
static long double to_int(const long double& x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_SPARC_ROUNDING_CONTROL_HPP */
|
||||
76
src/eo/contrib/boost/numeric/interval/detail/test_input.hpp
Executable file
76
src/eo/contrib/boost/numeric/interval/detail/test_input.hpp
Executable file
|
|
@ -0,0 +1,76 @@
|
|||
/* Boost interval/detail/test_input.hpp file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace user {
|
||||
|
||||
template<class T> inline
|
||||
bool is_zero(T const &v) { return v == static_cast<T>(0); }
|
||||
|
||||
template<class T> inline
|
||||
bool is_neg (T const &v) { return v < static_cast<T>(0); }
|
||||
|
||||
template<class T> inline
|
||||
bool is_pos (T const &v) { return v > static_cast<T>(0); }
|
||||
|
||||
} // namespace user
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const interval<T, Policies>& x) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies1, class Policies2> inline
|
||||
bool test_input(const interval<T, Policies1>& x, const interval<T, Policies2>& y) {
|
||||
typedef typename Policies1::checking checking1;
|
||||
typedef typename Policies2::checking checking2;
|
||||
return checking1::is_empty(x.lower(), x.upper()) ||
|
||||
checking2::is_empty(y.lower(), y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x, const interval<T, Policies>& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_empty(y.lower(), y.upper());
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const interval<T, Policies>& x, const T& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_empty(x.lower(), x.upper()) || checking::is_nan(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool test_input(const T& x, const T& y) {
|
||||
typedef typename Policies::checking checking;
|
||||
return checking::is_nan(x) || checking::is_nan(y);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_DETAIL_TEST_INPUT_HPP
|
||||
108
src/eo/contrib/boost/numeric/interval/detail/x86_rounding_control.hpp
Executable file
108
src/eo/contrib/boost/numeric/interval/detail/x86_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,108 @@
|
|||
/* Boost interval/detail/x86_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifdef __GNUC__
|
||||
# include <boost/numeric/interval/detail/x86gcc_rounding_control.hpp>
|
||||
#elif defined(__BORLANDC__)
|
||||
# include <boost/numeric/interval/detail/bcc_rounding_control.hpp>
|
||||
#elif defined(_MSC_VER)
|
||||
# include <boost/numeric/interval/detail/msvc_rounding_control.hpp>
|
||||
#elif defined(__MWERKS__) || defined(__ICC)
|
||||
# define BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
# include <boost/numeric/interval/detail/c99sub_rounding_control.hpp>
|
||||
#else
|
||||
# error Unsupported C++ compiler.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifdef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
typedef c99_rounding x86_rounding_control;
|
||||
#undef BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
#else
|
||||
struct fpu_rounding_modes
|
||||
{
|
||||
unsigned short to_nearest;
|
||||
unsigned short downward;
|
||||
unsigned short upward;
|
||||
unsigned short toward_zero;
|
||||
};
|
||||
|
||||
// exceptions masked, extended precision
|
||||
// hardware default is 0x037f (0x1000 only has a meaning on 287)
|
||||
static const fpu_rounding_modes rnd_mode = { 0x137f, 0x177f, 0x1b7f, 0x1f7f };
|
||||
|
||||
struct x86_rounding_control: x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(rnd_mode.to_nearest); }
|
||||
static void downward() { set_rounding_mode(rnd_mode.downward); }
|
||||
static void upward() { set_rounding_mode(rnd_mode.upward); }
|
||||
static void toward_zero() { set_rounding_mode(rnd_mode.toward_zero); }
|
||||
};
|
||||
#endif // BOOST_NUMERIC_INTERVAL_USE_C99_SUBSYSTEM
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<float>: detail::x86_rounding_control
|
||||
{
|
||||
static float force_rounding(const float& r)
|
||||
{ volatile float r_ = r; return r_; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct rounding_control<double>: detail::x86_rounding_control
|
||||
{
|
||||
/*static double force_rounding(double r)
|
||||
{ asm volatile ("" : "+m"(r) : ); return r; }*/
|
||||
static double force_rounding(const double& r)
|
||||
{ volatile double r_ = r; return r_; }
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
|
||||
template<bool>
|
||||
struct x86_rounding_control_long_double;
|
||||
|
||||
template<>
|
||||
struct x86_rounding_control_long_double<false>: x86_rounding_control
|
||||
{
|
||||
static long double force_rounding(long double const &r)
|
||||
{ volatile long double r_ = r; return r_; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_rounding_control_long_double<true>: x86_rounding_control
|
||||
{
|
||||
static long double const &force_rounding(long double const &r)
|
||||
{ return r; }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<>
|
||||
struct rounding_control<long double>:
|
||||
detail::x86_rounding_control_long_double< (sizeof(long double) >= 10) >
|
||||
{};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_X86_ROUNDING_CONTROL_HPP */
|
||||
51
src/eo/contrib/boost/numeric/interval/detail/x86gcc_rounding_control.hpp
Executable file
51
src/eo/contrib/boost/numeric/interval/detail/x86gcc_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
/* Boost interval/detail/x86gcc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef __GNUC__
|
||||
# error This header only works with GNU CC.
|
||||
#endif
|
||||
|
||||
#ifndef __i386__
|
||||
# error This header only works on x86 CPUs.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
typedef unsigned short rounding_mode;
|
||||
|
||||
static void set_rounding_mode(const rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("fldcw %0" : : "m"(mode)); }
|
||||
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ __asm__ __volatile__ ("fnstcw %0" : "=m"(mode)); }
|
||||
|
||||
template<class T>
|
||||
static T to_int(T r)
|
||||
{
|
||||
T r_;
|
||||
__asm__ ("frndint" : "=&t"(r_) : "0"(r));
|
||||
return r_;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_X86GCC_ROUNDING_CONTROL_HPP */
|
||||
70
src/eo/contrib/boost/numeric/interval/ext/integer.hpp
Executable file
70
src/eo/contrib/boost/numeric/interval/ext/integer.hpp
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
/* Boost interval/ext/integer.hpp template implementation file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP
|
||||
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
#include <boost/numeric/interval/detail/test_input.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+ (const interval<T, Policies>& x, int y)
|
||||
{
|
||||
return x + static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator+ (int x, const interval<T, Policies>& y)
|
||||
{
|
||||
return static_cast<T>(x) + y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator- (const interval<T, Policies>& x, int y)
|
||||
{
|
||||
return x - static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator- (int x, const interval<T, Policies>& y)
|
||||
{
|
||||
return static_cast<T>(x) - y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator* (const interval<T, Policies>& x, int y)
|
||||
{
|
||||
return x * static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator* (int x, const interval<T, Policies>& y)
|
||||
{
|
||||
return static_cast<T>(x) * y;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/ (const interval<T, Policies>& x, int y)
|
||||
{
|
||||
return x / static_cast<T>(y);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> operator/ (int x, const interval<T, Policies>& y)
|
||||
{
|
||||
return static_cast<T>(x) / y;
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_EXT_INTEGER_HPP
|
||||
70
src/eo/contrib/boost/numeric/interval/ext/x86_fast_rounding_control.hpp
Executable file
70
src/eo/contrib/boost/numeric/interval/ext/x86_fast_rounding_control.hpp
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
/* Boost interval/detail/x86gcc_rounding_control.hpp file
|
||||
*
|
||||
* This header provides a rounding control policy
|
||||
* that avoids flushing results to memory. In
|
||||
* order for this optimization to be reliable, it
|
||||
* should be used only when no underflow or
|
||||
* overflow would happen without it. Indeed, only
|
||||
* values in range are correctly rounded.
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// exceptions masked, expected precision (the mask is 0x0300)
|
||||
static const fpu_rounding_modes rnd_mode_f = { 0x107f, 0x147f, 0x187f, 0x1c7f };
|
||||
static const fpu_rounding_modes rnd_mode_d = { 0x127f, 0x167f, 0x1a7f, 0x1e7f };
|
||||
static const fpu_rounding_modes rnd_mode_l = { 0x137f, 0x177f, 0x1b7f, 0x1f7f };
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<class T>
|
||||
struct x86_fast_rounding_control;
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<float>: detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_f.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_f.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_f.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_f.toward_zero); }
|
||||
static const float& force_rounding(const float& r) { return r; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<double>: detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_d.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_d.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_d.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_d.toward_zero); }
|
||||
static const double& force_rounding(const double& r) { return r; }
|
||||
};
|
||||
|
||||
template<>
|
||||
struct x86_fast_rounding_control<long double>: detail::x86_rounding
|
||||
{
|
||||
static void to_nearest() { set_rounding_mode(detail::rnd_mode_l.to_nearest); }
|
||||
static void downward() { set_rounding_mode(detail::rnd_mode_l.downward); }
|
||||
static void upward() { set_rounding_mode(detail::rnd_mode_l.upward); }
|
||||
static void toward_zero() { set_rounding_mode(detail::rnd_mode_l.toward_zero); }
|
||||
static const long double& force_rounding(const long double& r) { return r; }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_EXT_X86_FAST_ROUNDING_CONTROL_HPP
|
||||
64
src/eo/contrib/boost/numeric/interval/hw_rounding.hpp
Executable file
64
src/eo/contrib/boost/numeric/interval/hw_rounding.hpp
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
/* Boost interval/hw_rounding.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
* Copyright 2005 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
|
||||
|
||||
#include <boost/numeric/interval/rounding.hpp>
|
||||
#include <boost/numeric/interval/rounded_arith.hpp>
|
||||
|
||||
#define BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
|
||||
// define appropriate specialization of rounding_control for built-in types
|
||||
#if defined(__i386__) || defined(_M_IX86) || defined(__BORLANDC__)
|
||||
# include <boost/numeric/interval/detail/x86_rounding_control.hpp>
|
||||
#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
|
||||
# include <boost/numeric/interval/detail/ppc_rounding_control.hpp>
|
||||
#elif defined(sparc) || defined(__sparc__)
|
||||
# include <boost/numeric/interval/detail/sparc_rounding_control.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE) && (defined(__USE_ISOC99) || defined(__MSL__))
|
||||
# include <boost/numeric/interval/detail/c99_rounding_control.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NUMERIC_INTERVAL_NO_HARDWARE)
|
||||
# undef BOOST_NUMERIC_INTERVAL_NO_HARDWARE
|
||||
# error Boost.Numeric.Interval: Please specify rounding control mechanism.
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
/*
|
||||
* Three specializations of rounded_math<T>
|
||||
*/
|
||||
|
||||
template<>
|
||||
struct rounded_math<float>
|
||||
: save_state<rounded_arith_opp<float> >
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct rounded_math<double>
|
||||
: save_state<rounded_arith_opp<double> >
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct rounded_math<long double>
|
||||
: save_state<rounded_arith_opp<long double> >
|
||||
{};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_HW_ROUNDING_HPP
|
||||
450
src/eo/contrib/boost/numeric/interval/interval.hpp
Executable file
450
src/eo/contrib/boost/numeric/interval/interval.hpp
Executable file
|
|
@ -0,0 +1,450 @@
|
|||
/* Boost interval/interval.hpp header file
|
||||
*
|
||||
* Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_INTERVAL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_INTERVAL_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
namespace interval_lib {
|
||||
|
||||
class comparison_error
|
||||
: public std::runtime_error
|
||||
{
|
||||
public:
|
||||
comparison_error()
|
||||
: std::runtime_error("boost::interval: uncertain comparison")
|
||||
{ }
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
|
||||
/*
|
||||
* interval class
|
||||
*/
|
||||
|
||||
template<class T, class Policies>
|
||||
class interval
|
||||
{
|
||||
private:
|
||||
struct interval_holder;
|
||||
struct number_holder;
|
||||
public:
|
||||
typedef T base_type;
|
||||
typedef Policies traits_type;
|
||||
|
||||
T const &lower() const;
|
||||
T const &upper() const;
|
||||
|
||||
interval();
|
||||
interval(T const &v);
|
||||
template<class T1> interval(T1 const &v);
|
||||
interval(T const &l, T const &u);
|
||||
template<class T1, class T2> interval(T1 const &l, T2 const &u);
|
||||
interval(interval<T, Policies> const &r);
|
||||
template<class Policies1> interval(interval<T, Policies1> const &r);
|
||||
template<class T1, class Policies1> interval(interval<T1, Policies1> const &r);
|
||||
|
||||
interval &operator=(T const &v);
|
||||
template<class T1> interval &operator=(T1 const &v);
|
||||
interval &operator=(interval<T, Policies> const &r);
|
||||
template<class Policies1> interval &operator=(interval<T, Policies1> const &r);
|
||||
template<class T1, class Policies1> interval &operator=(interval<T1, Policies1> const &r);
|
||||
|
||||
void assign(const T& l, const T& u);
|
||||
|
||||
static interval empty();
|
||||
static interval whole();
|
||||
static interval hull(const T& x, const T& y);
|
||||
|
||||
interval& operator+= (const T& r);
|
||||
interval& operator+= (const interval& r);
|
||||
interval& operator-= (const T& r);
|
||||
interval& operator-= (const interval& r);
|
||||
interval& operator*= (const T& r);
|
||||
interval& operator*= (const interval& r);
|
||||
interval& operator/= (const T& r);
|
||||
interval& operator/= (const interval& r);
|
||||
|
||||
bool operator< (const interval_holder& r) const;
|
||||
bool operator> (const interval_holder& r) const;
|
||||
bool operator<= (const interval_holder& r) const;
|
||||
bool operator>= (const interval_holder& r) const;
|
||||
bool operator== (const interval_holder& r) const;
|
||||
bool operator!= (const interval_holder& r) const;
|
||||
|
||||
bool operator< (const number_holder& r) const;
|
||||
bool operator> (const number_holder& r) const;
|
||||
bool operator<= (const number_holder& r) const;
|
||||
bool operator>= (const number_holder& r) const;
|
||||
bool operator== (const number_holder& r) const;
|
||||
bool operator!= (const number_holder& r) const;
|
||||
|
||||
// the following is for internal use only, it is not a published interface
|
||||
// nevertheless, it's public because friends don't always work correctly.
|
||||
interval(const T& l, const T& u, bool): low(l), up(u) {}
|
||||
void set_empty();
|
||||
void set_whole();
|
||||
void set(const T& l, const T& u);
|
||||
|
||||
private:
|
||||
struct interval_holder {
|
||||
template<class Policies2>
|
||||
interval_holder(const interval<T, Policies2>& r)
|
||||
: low(r.lower()), up(r.upper())
|
||||
{
|
||||
typedef typename Policies2::checking checking2;
|
||||
if (checking2::is_empty(low, up))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
const T& low;
|
||||
const T& up;
|
||||
};
|
||||
|
||||
struct number_holder {
|
||||
number_holder(const T& r) : val(r)
|
||||
{
|
||||
typedef typename Policies::checking checking;
|
||||
if (checking::is_nan(r))
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
const T& val;
|
||||
};
|
||||
|
||||
typedef typename Policies::checking checking;
|
||||
typedef typename Policies::rounding rounding;
|
||||
|
||||
T low;
|
||||
T up;
|
||||
};
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval():
|
||||
low(static_cast<T>(0)), up(static_cast<T>(0))
|
||||
{}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(T const &v): low(v), up(v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1> inline
|
||||
interval<T, Policies>::interval(T1 const &v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up (v);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class T2> inline
|
||||
interval<T, Policies>::interval(T1 const &l, T2 const &u)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(l);
|
||||
up = rnd.conv_up (u);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(T const &l, T const &u): low(l), up(u)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
}
|
||||
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies>::interval(interval<T, Policies> const &r): low(r.lower()), up(r.upper())
|
||||
{}
|
||||
|
||||
template<class T, class Policies> template<class Policies1> inline
|
||||
interval<T, Policies>::interval(interval<T, Policies1> const &r): low(r.lower()), up(r.upper())
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class Policies1> inline
|
||||
interval<T, Policies>::interval(interval<T1, Policies1> const &r)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up (r.upper());
|
||||
}
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(T const &v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else low = up = v;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(T1 const &v)
|
||||
{
|
||||
if (checking::is_nan(v)) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(v);
|
||||
up = rnd.conv_up (v);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies> const &r)
|
||||
{
|
||||
low = r.lower();
|
||||
up = r.upper();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class Policies1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T, Policies1> const &r)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
low = r.lower();
|
||||
up = r.upper();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> template<class T1, class Policies1> inline
|
||||
interval<T, Policies> &interval<T, Policies>::operator=(interval<T1, Policies1> const &r)
|
||||
{
|
||||
typedef typename Policies1::checking checking1;
|
||||
if (checking1::is_empty(r.lower(), r.upper())) set_empty();
|
||||
else {
|
||||
rounding rnd;
|
||||
low = rnd.conv_down(r.lower());
|
||||
up = rnd.conv_up (r.upper());
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::assign(const T& l, const T& u)
|
||||
{
|
||||
if (checking::is_nan(l) || checking::is_nan(u) || !(l <= u))
|
||||
set_empty();
|
||||
else set(l, u);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set(const T& l, const T& u)
|
||||
{
|
||||
low = l;
|
||||
up = u;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set_empty()
|
||||
{
|
||||
low = checking::empty_lower();
|
||||
up = checking::empty_upper();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
void interval<T, Policies>::set_whole()
|
||||
{
|
||||
low = checking::neg_inf();
|
||||
up = checking::pos_inf();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::hull(const T& x, const T& y)
|
||||
{
|
||||
bool bad_x = checking::is_nan(x);
|
||||
bool bad_y = checking::is_nan(y);
|
||||
if (bad_x)
|
||||
if (bad_y) return interval::empty();
|
||||
else return interval(y, y, true);
|
||||
else
|
||||
if (bad_y) return interval(x, x, true);
|
||||
if (x <= y) return interval(x, y, true);
|
||||
else return interval(y, x, true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::empty()
|
||||
{
|
||||
return interval<T, Policies>(checking::empty_lower(),
|
||||
checking::empty_upper(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
interval<T, Policies> interval<T, Policies>::whole()
|
||||
{
|
||||
return interval<T, Policies>(checking::neg_inf(), checking::pos_inf(), true);
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const T& interval<T, Policies>::lower() const
|
||||
{
|
||||
return low;
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
const T& interval<T, Policies>::upper() const
|
||||
{
|
||||
return up;
|
||||
}
|
||||
|
||||
/*
|
||||
* interval/interval comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator< (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low) return true;
|
||||
else if (low >= r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator> (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.up) return true;
|
||||
else if (up <= r.low) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator<= (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.low) return true;
|
||||
else if (low > r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator>= (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.up) return true;
|
||||
else if (up < r.low) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator== (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.low && low == r.up) return true;
|
||||
else if (up < r.low || low > r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator!= (const interval_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.low || low > r.up) return true;
|
||||
else if (up == r.low && low == r.up) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
/*
|
||||
* interval/number comparisons
|
||||
*/
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator< (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val) return true;
|
||||
else if (low >= r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator> (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low > r.val) return true;
|
||||
else if (up <= r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator<= (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up <= r.val) return true;
|
||||
else if (low > r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator>= (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (low >= r.val) return true;
|
||||
else if (up < r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator== (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up == r.val && low == r.val) return true;
|
||||
else if (up < r.val || low > r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
template<class T, class Policies> inline
|
||||
bool interval<T, Policies>::operator!= (const number_holder& r) const
|
||||
{
|
||||
if (!checking::is_empty(low, up)) {
|
||||
if (up < r.val || low > r.val) return true;
|
||||
else if (up == r.val && low == r.val) return false;
|
||||
}
|
||||
throw interval_lib::comparison_error();
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_INTERVAL_HPP
|
||||
41
src/eo/contrib/boost/numeric/interval/io.hpp
Executable file
41
src/eo/contrib/boost/numeric/interval/io.hpp
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
/* Boost interval/io.hpp header file
|
||||
*
|
||||
* This file is only meant to provide a quick
|
||||
* implementation of the output operator. It is
|
||||
* provided for test programs that aren't even
|
||||
* interested in the precision of the results.
|
||||
* A real progam should define its own operators
|
||||
* and never include this header.
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_IO_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_IO_HPP
|
||||
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
#include <boost/numeric/interval/utility.hpp>
|
||||
#include <ostream>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
|
||||
template<class CharType, class CharTraits, class T, class Policies>
|
||||
std::basic_ostream<CharType, CharTraits> &operator<<
|
||||
(std::basic_ostream<CharType, CharTraits> &stream,
|
||||
interval<T, Policies> const &value)
|
||||
{
|
||||
if (empty(value))
|
||||
return stream << "[]";
|
||||
else
|
||||
return stream << '[' << lower(value) << ',' << upper(value) << ']';
|
||||
}
|
||||
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_IO_HPP
|
||||
51
src/eo/contrib/boost/numeric/interval/limits.hpp
Executable file
51
src/eo/contrib/boost/numeric/interval/limits.hpp
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
/* Boost interval/limits.hpp template implementation file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002-2003 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_LIMITS_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_LIMITS_HPP
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
||||
|
||||
namespace std {
|
||||
|
||||
template<class T, class Policies>
|
||||
class numeric_limits<boost::numeric::interval<T, Policies> >
|
||||
: public numeric_limits<T>
|
||||
{
|
||||
private:
|
||||
typedef boost::numeric::interval<T, Policies> I;
|
||||
typedef numeric_limits<T> bl;
|
||||
public:
|
||||
static I min BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::min)(), (bl::min)()); }
|
||||
static I max BOOST_PREVENT_MACRO_SUBSTITUTION () throw() { return I((bl::max)(), (bl::max)()); }
|
||||
static I epsilon() throw() { return I(bl::epsilon(), bl::epsilon()); }
|
||||
|
||||
BOOST_STATIC_CONSTANT(float_round_style, round_style = round_indeterminate);
|
||||
BOOST_STATIC_CONSTANT(bool, is_iec559 = false);
|
||||
|
||||
static I infinity () throw() { return I::whole(); }
|
||||
static I quiet_NaN() throw() { return I::empty(); }
|
||||
static I signaling_NaN() throw()
|
||||
{ return I(bl::signaling_NaN(), bl::signaling_Nan()); }
|
||||
static I denorm_min() throw()
|
||||
{ return I(bl::denorm_min(), bl::denorm_min()); }
|
||||
private:
|
||||
static I round_error(); // hide this on purpose, not yet implemented
|
||||
};
|
||||
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_LIMITS_HPP
|
||||
75
src/eo/contrib/boost/numeric/interval/policies.hpp
Executable file
75
src/eo/contrib/boost/numeric/interval/policies.hpp
Executable file
|
|
@ -0,0 +1,75 @@
|
|||
/* Boost interval/policies.hpp template implementation file
|
||||
*
|
||||
* Copyright 2003 Guillaume Melquiond
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or
|
||||
* copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
|
||||
#include <boost/numeric/interval/interval.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
/*
|
||||
* policies class
|
||||
*/
|
||||
|
||||
template<class Rounding, class Checking>
|
||||
struct policies
|
||||
{
|
||||
typedef Rounding rounding;
|
||||
typedef Checking checking;
|
||||
};
|
||||
|
||||
/*
|
||||
* policies switching classes
|
||||
*/
|
||||
|
||||
template<class OldInterval, class NewRounding>
|
||||
class change_rounding
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::checking checking;
|
||||
public:
|
||||
typedef interval<T, policies<NewRounding, checking> > type;
|
||||
};
|
||||
|
||||
template<class OldInterval, class NewChecking>
|
||||
class change_checking
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding rounding;
|
||||
public:
|
||||
typedef interval<T, policies<rounding, NewChecking> > type;
|
||||
};
|
||||
|
||||
/*
|
||||
* Protect / unprotect: control whether the rounding mode is set/reset
|
||||
* at each operation, rather than once and for all.
|
||||
*/
|
||||
|
||||
template<class OldInterval>
|
||||
class unprotect
|
||||
{
|
||||
typedef typename OldInterval::base_type T;
|
||||
typedef typename OldInterval::traits_type p;
|
||||
typedef typename p::rounding r;
|
||||
typedef typename r::unprotected_rounding newRounding;
|
||||
public:
|
||||
typedef typename change_rounding<OldInterval, newRounding>::type type;
|
||||
};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_POLICIES_HPP
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue