Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
@@ -0,0 +1,24 @@
subroutine chkcrc12a(decoded,nbadcrc)
use crc
integer*1 decoded(87)
integer*1, target:: i1Dec8BitBytes(11)
character*87 cbits
! Write decoded bits into cbits: 75-bit message plus 12-bit CRC
write(cbits,1000) decoded
1000 format(87i1)
read(cbits,1001) i1Dec8BitBytes
1001 format(11b8)
read(cbits,1002) ncrc12 !Received CRC12
1002 format(75x,b12)
i1Dec8BitBytes(10)=iand(i1Dec8BitBytes(10),128+64+32)
i1Dec8BitBytes(11)=0
icrc12=crc12(c_loc(i1Dec8BitBytes),11) !CRC12 computed from 75 msg bits
nbadcrc=1
if(ncrc12.eq.icrc12) nbadcrc=0
return
end subroutine chkcrc12a
@@ -0,0 +1,136 @@
/*=============================================================================
Copyright (c) 1998-2003 Joel de Guzman
http://spirit.sourceforge.net/
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_SPIRIT_ACTIONS_HPP
#define BOOST_SPIRIT_ACTIONS_HPP
#include <boost/spirit/home/classic/namespace.hpp>
#include <boost/spirit/home/classic/core/parser.hpp>
#include <boost/spirit/home/classic/core/composite/composite.hpp>
namespace boost { namespace spirit {
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
#pragma warning(push)
#pragma warning(disable:4512) //assignment operator could not be generated
#endif
///////////////////////////////////////////////////////////////////////////
//
// action class
//
// The action class binds a parser with a user defined semantic
// action. Instances of action are never created manually. Instead,
// action objects are typically created indirectly through
// expression templates of the form:
//
// p[f]
//
// where p is a parser and f is a function or functor. The semantic
// action may be a function or a functor. When the parser is
// successful, the actor calls the scanner's action_policy policy
// (see scanner.hpp):
//
// scan.do_action(actor, attribute, first, last);
//
// passing in these information:
//
// actor: The action's function or functor
// attribute: The match (returned by the parser) object's
// attribute (see match.hpp)
// first: Iterator pointing to the start of the matching
// portion of the input
// last: Iterator pointing to one past the end of the
// matching portion of the input
//
// It is the responsibility of the scanner's action_policy policy to
// dispatch the function or functor as it sees fit. The expected
// function or functor signature depends on the parser being
// wrapped. In general, if the attribute type of the parser being
// wrapped is a nil_t, the function or functor expect the signature:
//
// void func(Iterator first, Iterator last); // functions
//
// struct ftor // functors
// {
// void func(Iterator first, Iterator last) const;
// };
//
// where Iterator is the type of the iterator that is being used and
// first and last are the iterators pointing to the matching portion
// of the input.
//
// If the attribute type of the parser being wrapped is not a nil_t,
// the function or functor usually expect the signature:
//
// void func(T val); // functions
//
// struct ftor // functors
// {
// void func(T val) const;
// };
//
// where T is the attribute type and val is the attribute value
// returned by the parser being wrapped.
//
///////////////////////////////////////////////////////////////////////////
template <typename ParserT, typename ActionT>
class action : public unary<ParserT, parser<action<ParserT, ActionT> > >
{
public:
typedef action<ParserT, ActionT> self_t;
typedef action_parser_category parser_category_t;
typedef unary<ParserT, parser<self_t> > base_t;
typedef ActionT predicate_t;
template <typename ScannerT>
struct result
{
typedef typename parser_result<ParserT, ScannerT>::type type;
};
action(ParserT const& p, ActionT const& a)
: base_t(p)
, actor(a) {}
template <typename ScannerT>
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
{
typedef typename ScannerT::iterator_t iterator_t;
typedef typename parser_result<self_t, ScannerT>::type result_t;
scan.at_end(); // allow skipper to take effect
iterator_t save = scan.first;
result_t hit = this->subject().parse(scan);
if (hit)
{
typename result_t::return_t val = hit.value();
scan.do_action(actor, val, save, scan.first);
}
return hit;
}
ActionT const& predicate() const { return actor; }
private:
ActionT actor;
};
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
#pragma warning(pop)
#endif
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
}} // namespace BOOST_SPIRIT_CLASSIC_NS
#endif
@@ -0,0 +1,71 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
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)
==============================================================================*/
#if !defined(BOOST_FUSION_SEGMENTED_FOLD_UNTIL_HPP_INCLUDED)
#define BOOST_FUSION_SEGMENTED_FOLD_UNTIL_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/fusion/support/detail/segmented_fold_until_impl.hpp>
namespace boost { namespace fusion
{
//auto segmented_fold_until(seq, state, fun)
//{
// return first(segmented_fold_until_impl(seq, state, nil_, fun));
//}
namespace result_of
{
template <typename Sequence, typename State, typename Fun>
struct segmented_fold_until
{
typedef
detail::segmented_fold_until_impl<
Sequence
, State
, fusion::nil_
, Fun
>
filter;
typedef
typename filter::type
type;
};
}
template <typename Sequence, typename State, typename Fun>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
lazy_disable_if<
is_const<Sequence>
, result_of::segmented_fold_until<Sequence, State, Fun>
>::type
segmented_fold_until(Sequence& seq, State const& state, Fun const& fun)
{
typedef
typename result_of::segmented_fold_until<Sequence, State, Fun>::filter
filter;
return filter::call(seq, state, fusion::nil_(), fun);
}
template <typename Sequence, typename State, typename Fun>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::segmented_fold_until<Sequence const, State, Fun>::type
segmented_fold_until(Sequence const& seq, State const& state, Fun const& fun)
{
typedef
typename result_of::segmented_fold_until<Sequence const, State, Fun>::filter
filter;
return filter::call(seq, state, fusion::nil_(), fun);
}
}}
#endif
@@ -0,0 +1,207 @@
/*
*
* Copyright (c) 1998-2002
* John Maddock
*
* 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 boost/regex/config/cwchar.hpp
* VERSION see <boost/version.hpp>
* DESCRIPTION: regex wide character string fixes.
*/
#ifndef BOOST_REGEX_CONFIG_CWCHAR_HPP
#define BOOST_REGEX_CONFIG_CWCHAR_HPP
#include <cwchar>
#include <cwctype>
#include <boost/config.hpp>
#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER)
// apparently this is required for the RW STL on Linux:
#undef iswalnum
#undef iswalpha
#undef iswblank
#undef iswcntrl
#undef iswdigit
#undef iswgraph
#undef iswlower
#undef iswprint
#undef iswprint
#undef iswpunct
#undef iswspace
#undef iswupper
#undef iswxdigit
#undef iswctype
#undef towlower
#undef towupper
#undef towctrans
#undef wctrans
#undef wctype
#endif
namespace std{
#ifndef BOOST_NO_STDC_NAMESPACE
extern "C"{
#endif
#ifdef iswalnum
inline int (iswalnum)(wint_t i)
{ return iswalnum(i); }
#undef iswalnum
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswalnum;
#endif
#ifdef iswalpha
inline int (iswalpha)(wint_t i)
{ return iswalpha(i); }
#undef iswalpha
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswalpha;
#endif
#ifdef iswcntrl
inline int (iswcntrl)(wint_t i)
{ return iswcntrl(i); }
#undef iswcntrl
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswcntrl;
#endif
#ifdef iswdigit
inline int (iswdigit)(wint_t i)
{ return iswdigit(i); }
#undef iswdigit
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswdigit;
#endif
#ifdef iswgraph
inline int (iswgraph)(wint_t i)
{ return iswgraph(i); }
#undef iswgraph
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswgraph;
#endif
#ifdef iswlower
inline int (iswlower)(wint_t i)
{ return iswlower(i); }
#undef iswlower
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswlower;
#endif
#ifdef iswprint
inline int (iswprint)(wint_t i)
{ return iswprint(i); }
#undef iswprint
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswprint;
#endif
#ifdef iswpunct
inline int (iswpunct)(wint_t i)
{ return iswpunct(i); }
#undef iswpunct
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswpunct;
#endif
#ifdef iswspace
inline int (iswspace)(wint_t i)
{ return iswspace(i); }
#undef iswspace
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswspace;
#endif
#ifdef iswupper
inline int (iswupper)(wint_t i)
{ return iswupper(i); }
#undef iswupper
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswupper;
#endif
#ifdef iswxdigit
inline int (iswxdigit)(wint_t i)
{ return iswxdigit(i); }
#undef iswxdigit
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::iswxdigit;
#endif
#ifdef towlower
inline wint_t (towlower)(wint_t i)
{ return towlower(i); }
#undef towlower
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::towlower;
#endif
#ifdef towupper
inline wint_t (towupper)(wint_t i)
{ return towupper(i); }
#undef towupper
#elif defined(BOOST_NO_STDC_NAMESPACE)
using :: towupper;
#endif
#ifdef wcscmp
inline int (wcscmp)(const wchar_t *p1, const wchar_t *p2)
{ return wcscmp(p1,p2); }
#undef wcscmp
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::wcscmp;
#endif
#ifdef wcscoll
inline int (wcscoll)(const wchar_t *p1, const wchar_t *p2)
{ return wcscoll(p1,p2); }
#undef wcscoll
#elif defined(BOOST_NO_STDC_NAMESPACE) && !defined(UNDER_CE)
using ::wcscoll;
#endif
#ifdef wcscpy
inline wchar_t *(wcscpy)(wchar_t *p1, const wchar_t *p2)
{ return wcscpy(p1,p2); }
#undef wcscpy
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::wcscpy;
#endif
#ifdef wcslen
inline size_t (wcslen)(const wchar_t *p)
{ return wcslen(p); }
#undef wcslen
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::wcslen;
#endif
#ifdef wcsxfrm
size_t wcsxfrm(wchar_t *p1, const wchar_t *p2, size_t s)
{ return wcsxfrm(p1,p2,s); }
#undef wcsxfrm
#elif defined(BOOST_NO_STDC_NAMESPACE)
using ::wcsxfrm;
#endif
#ifndef BOOST_NO_STDC_NAMESPACE
} // extern "C"
#endif
} // namespace std
#endif
@@ -0,0 +1,86 @@
// (C) Copyright John Maddock 2007.
// 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 file is machine generated, do not edit by hand
// Polynomial evaluation using second order Horners rule
#ifndef BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
#define BOOST_MATH_TOOLS_RAT_EVAL_5_HPP
namespace boost{ namespace math{ namespace tools{ namespace detail{
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(0);
}
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(a[0]) / static_cast<V>(b[0]);
}
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
}
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
}
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*) BOOST_MATH_NOEXCEPT(V)
{
return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
}
template <class T, class U, class V>
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*) BOOST_MATH_NOEXCEPT(V)
{
if(x <= 1)
{
V x2 = x * x;
V t[4];
t[0] = a[4] * x2 + a[2];
t[1] = a[3] * x2 + a[1];
t[2] = b[4] * x2 + b[2];
t[3] = b[3] * x2 + b[1];
t[0] *= x2;
t[2] *= x2;
t[0] += static_cast<V>(a[0]);
t[2] += static_cast<V>(b[0]);
t[1] *= x;
t[3] *= x;
return (t[0] + t[1]) / (t[2] + t[3]);
}
else
{
V z = 1 / x;
V z2 = 1 / (x * x);
V t[4];
t[0] = a[0] * z2 + a[2];
t[1] = a[1] * z2 + a[3];
t[2] = b[0] * z2 + b[2];
t[3] = b[1] * z2 + b[3];
t[0] *= z2;
t[2] *= z2;
t[0] += static_cast<V>(a[4]);
t[2] += static_cast<V>(b[4]);
t[1] *= z;
t[3] *= z;
return (t[0] + t[1]) / (t[2] + t[3]);
}
}
}}}} // namespaces
#endif // include guard
@@ -0,0 +1,34 @@
#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
//
// 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)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/empty_fwd.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct empty_impl< aux::set_tag >
{
template< typename Set > struct apply
: not_< typename Set::size >
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED
@@ -0,0 +1,95 @@
//-----------------------------------------------------------------------------
// boost variant/static_visitor.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002-2003
// Eric Friedman
//
// 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_VARIANT_STATIC_VISITOR_HPP
#define BOOST_VARIANT_STATIC_VISITOR_HPP
#include <boost/config.hpp>
#include <boost/detail/workaround.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_base_and_derived.hpp>
#include <boost/type_traits/integral_constant.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost {
//////////////////////////////////////////////////////////////////////////
// class template static_visitor
//
// An empty base class that typedefs the return type of a deriving static
// visitor. The class is analogous to std::unary_function in this role.
//
namespace detail {
struct is_static_visitor_tag { };
typedef void static_visitor_default_return;
} // namespace detail
template <typename R = ::boost::detail::static_visitor_default_return>
class static_visitor
: public detail::is_static_visitor_tag
{
public: // typedefs
typedef R result_type;
protected: // for use as base class only
#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
static_visitor() = default;
~static_visitor() = default;
#else
static_visitor() BOOST_NOEXCEPT { }
~static_visitor() BOOST_NOEXCEPT { }
#endif
};
//////////////////////////////////////////////////////////////////////////
// metafunction is_static_visitor
//
// Value metafunction indicates whether the specified type derives from
// static_visitor<...>.
//
// NOTE #1: This metafunction does NOT check whether the specified type
// fulfills the requirements of the StaticVisitor concept.
//
// NOTE #2: This template never needs to be specialized!
//
namespace detail {
template <typename T>
struct is_static_visitor_impl
{
BOOST_STATIC_CONSTANT(bool, value =
(::boost::is_base_and_derived<
detail::is_static_visitor_tag,
T
>::value));
};
} // namespace detail
template< typename T > struct is_static_visitor
: public ::boost::integral_constant<bool,(::boost::detail::is_static_visitor_impl<T>::value)>
{
public:
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_static_visitor,(T))
};
} // namespace boost
#endif // BOOST_VARIANT_STATIC_VISITOR_HPP
@@ -0,0 +1,29 @@
/*=============================================================================
Copyright (c) 2014 Kohei Takahashi
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 FUSION_VECTOR10_11052014_2316
#define FUSION_VECTOR10_11052014_2316
#include <boost/config.hpp>
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/vector/detail/config.hpp>
///////////////////////////////////////////////////////////////////////////////
// Without variadics, we will use the PP version
///////////////////////////////////////////////////////////////////////////////
#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
# include <boost/fusion/container/vector/detail/cpp03/vector10.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/container/vector/vector_fwd.hpp>
#include <boost/fusion/container/vector/vector.hpp>
#endif
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,256 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2007-2014
//
// 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)
//
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTRUSIVE_OPTIONS_HPP
#define BOOST_INTRUSIVE_OPTIONS_HPP
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
#include <boost/intrusive/link_mode.hpp>
#include <boost/intrusive/pack_options.hpp>
#include <boost/intrusive/detail/mpl.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
namespace boost {
namespace intrusive {
#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
struct empty
{};
template<class Functor>
struct fhtraits;
template<class T, class Hook, Hook T::* P>
struct mhtraits;
struct dft_tag;
struct member_tag;
template<class SupposedValueTraits>
struct is_default_hook_tag;
#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
//!This option setter specifies if the intrusive
//!container stores its size as a member to
//!obtain constant-time size() member.
BOOST_INTRUSIVE_OPTION_CONSTANT(constant_time_size, bool, Enabled, constant_time_size)
//!This option setter specifies a container header holder type
BOOST_INTRUSIVE_OPTION_TYPE(header_holder_type, HeaderHolder, HeaderHolder, header_holder_type)
//!This option setter specifies the type that
//!the container will use to store its size.
BOOST_INTRUSIVE_OPTION_TYPE(size_type, SizeType, SizeType, size_type)
//!This option setter specifies the strict weak ordering
//!comparison functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(compare, Compare, Compare, compare)
//!This option setter specifies a function object
//!that specifies the type of the key of an associative
//!container and an operator to obtain it from a value type.
//!
//!This function object must the define a `type` member typedef and
//!a member with signature `type [const&] operator()(const value_type &) const`
//!that will return the key from a value_type of an associative container
BOOST_INTRUSIVE_OPTION_TYPE(key_of_value, KeyOfValue, KeyOfValue, key_of_value)
//!This option setter for scapegoat containers specifies if
//!the intrusive scapegoat container should use a non-variable
//!alpha value that does not need floating-point operations.
//!
//!If activated, the fixed alpha value is 1/sqrt(2). This
//!option also saves some space in the container since
//!the alpha value and some additional data does not need
//!to be stored in the container.
//!
//!If the user only needs an alpha value near 1/sqrt(2), this
//!option also improves performance since avoids logarithm
//!and division operations when rebalancing the tree.
BOOST_INTRUSIVE_OPTION_CONSTANT(floating_point, bool, Enabled, floating_point)
//!This option setter specifies the equality
//!functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(equal, Equal, Equal, equal)
//!This option setter specifies the priority comparison
//!functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(priority, Priority, Priority, priority)
//!This option setter specifies the hash
//!functor for the value type
BOOST_INTRUSIVE_OPTION_TYPE(hash, Hash, Hash, hash)
//!This option setter specifies the relationship between the type
//!to be managed by the container (the value type) and the node to be
//!used in the node algorithms. It also specifies the linking policy.
BOOST_INTRUSIVE_OPTION_TYPE(value_traits, ValueTraits, ValueTraits, proto_value_traits)
//#define BOOST_INTRUSIVE_COMMA ,
//#define BOOST_INTRUSIVE_LESS <
//#define BOOST_INTRUSIVE_MORE >
//BOOST_INTRUSIVE_OPTION_TYPE (member_hook, Parent BOOST_INTRUSIVE_COMMA class MemberHook BOOST_INTRUSIVE_COMMA MemberHook Parent::* PtrToMember , mhtraits BOOST_INTRUSIVE_LESS Parent BOOST_INTRUSIVE_COMMA MemberHook BOOST_INTRUSIVE_COMMA PtrToMember BOOST_INTRUSIVE_MORE , proto_value_traits)
//template< class Parent , class MemberHook , MemberHook Parent::* PtrToMember>
//struct member_hook {
// template<class Base> struct pack : Base {
// typedef mhtraits < Parent , MemberHook , PtrToMember > proto_value_traits;
// };
//};
//
//#undef BOOST_INTRUSIVE_COMMA
//#undef BOOST_INTRUSIVE_LESS
//#undef BOOST_INTRUSIVE_MORE
//!This option setter specifies the member hook the
//!container must use.
template< typename Parent
, typename MemberHook
, MemberHook Parent::* PtrToMember>
struct member_hook
{
// @cond
// typedef typename MemberHook::hooktags::node_traits node_traits;
// typedef typename node_traits::node node_type;
// typedef node_type Parent::* Ptr2MemNode;
// typedef mhtraits
// < Parent
// , node_traits
// //This cast is really ugly but necessary to reduce template bloat.
// //Since we control the layout between the hook and the node, and there is
// //always single inheritance, the offset of the node is exactly the offset of
// //the hook. Since the node type is shared between all member hooks, this saves
// //quite a lot of symbol stuff.
// , (Ptr2MemNode)PtrToMember
// , MemberHook::hooktags::link_mode> member_value_traits;
typedef mhtraits <Parent, MemberHook, PtrToMember> member_value_traits;
template<class Base>
struct pack : Base
{
typedef member_value_traits proto_value_traits;
};
/// @endcond
};
//!This option setter specifies the function object that will
//!be used to convert between values to be inserted in a container
//!and the hook to be used for that purpose.
BOOST_INTRUSIVE_OPTION_TYPE(function_hook, Functor, fhtraits<Functor>, proto_value_traits)
//!This option setter specifies that the container
//!must use the specified base hook
BOOST_INTRUSIVE_OPTION_TYPE(base_hook, BaseHook, BaseHook, proto_value_traits)
//!This option setter specifies the type of
//!a void pointer. This will instruct the hook
//!to use this type of pointer instead of the
//!default one
BOOST_INTRUSIVE_OPTION_TYPE(void_pointer, VoidPointer, VoidPointer, void_pointer)
//!This option setter specifies the type of
//!the tag of a base hook. A type cannot have two
//!base hooks of the same type, so a tag can be used
//!to differentiate two base hooks with otherwise same type
BOOST_INTRUSIVE_OPTION_TYPE(tag, Tag, Tag, tag)
//!This option setter specifies the link mode
//!(normal_link, safe_link or auto_unlink)
BOOST_INTRUSIVE_OPTION_CONSTANT(link_mode, link_mode_type, LinkType, link_mode)
//!This option setter specifies if the hook
//!should be optimized for size instead of for speed.
BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size)
//!This option setter specifies if the slist container should
//!use a linear implementation instead of a circular one.
BOOST_INTRUSIVE_OPTION_CONSTANT(linear, bool, Enabled, linear)
//!If true, slist also stores a pointer to the last element of the singly linked list.
//!This allows O(1) swap and splice_after(iterator, slist &) for circular slists and makes
//!possible new functions like push_back(reference) and back().
BOOST_INTRUSIVE_OPTION_CONSTANT(cache_last, bool, Enabled, cache_last)
//!This option setter specifies the bucket traits
//!class for unordered associative containers. When this option is specified,
//!instead of using the default bucket traits, a user defined holder will be defined
BOOST_INTRUSIVE_OPTION_TYPE(bucket_traits, BucketTraits, BucketTraits, bucket_traits)
//!This option setter specifies if the unordered hook
//!should offer room to store the hash value.
//!Storing the hash in the hook will speed up rehashing
//!processes in applications where rehashing is frequent,
//!rehashing might throw or the value is heavy to hash.
BOOST_INTRUSIVE_OPTION_CONSTANT(store_hash, bool, Enabled, store_hash)
//!This option setter specifies if the unordered hook
//!should offer room to store another link to another node
//!with the same key.
//!Storing this link will speed up lookups and insertions on
//!unordered_multiset containers with a great number of elements
//!with the same key.
BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_multikey, bool, Enabled, optimize_multikey)
//!This option setter specifies if the bucket array will be always power of two.
//!This allows using masks instead of the default modulo operation to determine
//!the bucket number from the hash value, leading to better performance.
//!In debug mode, if power of two buckets mode is activated, the bucket length
//!will be checked with assertions.
BOOST_INTRUSIVE_OPTION_CONSTANT(power_2_buckets, bool, Enabled, power_2_buckets)
//!This option setter specifies if the container will cache a pointer to the first
//!non-empty bucket so that begin() is always constant-time.
//!This is specially helpful when we can have containers with a few elements
//!but with big bucket arrays (that is, hashtables with low load factors).
BOOST_INTRUSIVE_OPTION_CONSTANT(cache_begin, bool, Enabled, cache_begin)
//!This option setter specifies if the container will compare the hash value
//!before comparing objects. This option can't be specified if store_hash<>
//!is not true.
//!This is specially helpful when we have containers with a high load factor.
//!and the comparison function is much more expensive that comparing already
//!stored hash values.
BOOST_INTRUSIVE_OPTION_CONSTANT(compare_hash, bool, Enabled, compare_hash)
//!This option setter specifies if the hash container will use incremental
//!hashing. With incremental hashing the cost of hash table expansion is spread
//!out across each hash table insertion operation, as opposed to be incurred all at once.
//!Therefore linear hashing is well suited for interactive applications or real-time
//!appplications where the worst-case insertion time of non-incremental hash containers
//!(rehashing the whole bucket array) is not admisible.
BOOST_INTRUSIVE_OPTION_CONSTANT(incremental, bool, Enabled, incremental)
/// @cond
struct hook_defaults
{
typedef void* void_pointer;
static const link_mode_type link_mode = safe_link;
typedef dft_tag tag;
static const bool optimize_size = false;
static const bool store_hash = false;
static const bool linear = false;
static const bool optimize_multikey = false;
};
/// @endcond
} //namespace intrusive {
} //namespace boost {
#include <boost/intrusive/detail/config_end.hpp>
#endif //#ifndef BOOST_INTRUSIVE_OPTIONS_HPP
@@ -0,0 +1,169 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2011-2013. 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)
//
// See http://www.boost.org/libs/container for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONTAINER_USES_ALLOCATOR_HPP
#define BOOST_CONTAINER_USES_ALLOCATOR_HPP
#include <boost/container/uses_allocator_fwd.hpp>
#include <boost/container/detail/type_traits.hpp>
namespace boost {
namespace container {
//! <b>Remark</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, indicates that T may be constructed
//! with an allocator as its last constructor argument. Ideally, all constructors of T (including the
//! copy and move constructors) should have a variant that accepts a final argument of
//! allocator_type.
//!
//! <b>Requires</b>: if a specialization constructible_with_allocator_suffix<X>::value is true, T must have a nested type,
//! allocator_type and at least one constructor for which allocator_type is the last
//! parameter. If not all constructors of T can be called with a final allocator_type argument,
//! and if T is used in a context where a container must call such a constructor, then the program is
//! ill-formed.
//!
//! <code>
//! template <class T, class Allocator = allocator<T> >
//! class Z {
//! public:
//! typedef Allocator allocator_type;
//!
//! // Default constructor with optional allocator suffix
//! Z(const allocator_type& a = allocator_type());
//!
//! // Copy constructor and allocator-extended copy constructor
//! Z(const Z& zz);
//! Z(const Z& zz, const allocator_type& a);
//! };
//!
//! // Specialize trait for class template Z
//! template <class T, class Allocator = allocator<T> >
//! struct constructible_with_allocator_suffix<Z<T,Allocator> >
//! { static const bool value = true; };
//! </code>
//!
//! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped A Model (Rev 2)"
//! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
//! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
//! Applications aiming portability with several compilers should always define this trait.
//!
//! In conforming C++11 compilers or compilers supporting SFINAE expressions
//! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
template <class T>
struct constructible_with_allocator_suffix
{ static const bool value = false; };
//! <b>Remark</b>: if a specialization constructible_with_allocator_prefix<X>::value is true, indicates that T may be constructed
//! with allocator_arg and T::allocator_type as its first two constructor arguments.
//! Ideally, all constructors of T (including the copy and move constructors) should have a variant
//! that accepts these two initial arguments.
//!
//! <b>Requires</b>: specialization constructible_with_allocator_prefix<X>::value is true, T must have a nested type,
//! allocator_type and at least one constructor for which allocator_arg_t is the first
//! parameter and allocator_type is the second parameter. If not all constructors of T can be
//! called with these initial arguments, and if T is used in a context where a container must call such
//! a constructor, then the program is ill-formed.
//!
//! <code>
//! template <class T, class Allocator = allocator<T> >
//! class Y {
//! public:
//! typedef Allocator allocator_type;
//!
//! // Default constructor with and allocator-extended default constructor
//! Y();
//! Y(allocator_arg_t, const allocator_type& a);
//!
//! // Copy constructor and allocator-extended copy constructor
//! Y(const Y& yy);
//! Y(allocator_arg_t, const allocator_type& a, const Y& yy);
//!
//! // Variadic constructor and allocator-extended variadic constructor
//! template<class ...Args> Y(Args&& args...);
//! template<class ...Args>
//! Y(allocator_arg_t, const allocator_type& a, BOOST_FWD_REF(Args)... args);
//! };
//!
//! // Specialize trait for class template Y
//! template <class T, class Allocator = allocator<T> >
//! struct constructible_with_allocator_prefix<Y<T,Allocator> >
//! { static const bool value = true; };
//!
//! </code>
//!
//! <b>Note</b>: This trait is a workaround inspired by "N2554: The Scoped Allocator Model (Rev 2)"
//! (Pablo Halpern, 2008-02-29) to backport the scoped allocator model to C++03, as
//! in C++03 there is no mechanism to detect if a type can be constructed from arbitrary arguments.
//! Applications aiming portability with several compilers should always define this trait.
//!
//! In conforming C++11 compilers or compilers supporting SFINAE expressions
//! (when BOOST_NO_SFINAE_EXPR is NOT defined), this trait is ignored and C++11 rules will be used
//! to detect if a type should be constructed with suffix or prefix allocator arguments.
template <class T>
struct constructible_with_allocator_prefix
{ static const bool value = false; };
#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
namespace container_detail {
template<typename T, typename Allocator>
struct uses_allocator_imp
{
// Use SFINAE (Substitution Failure Is Not An Error) to detect the
// presence of an 'allocator_type' nested type convertilble from Allocator.
private:
typedef char yes_type;
struct no_type{ char dummy[2]; };
// Match this function if T::allocator_type exists and is
// implicitly convertible from Allocator
template <class U>
static yes_type test(typename U::allocator_type);
// Match this function if T::allocator_type exists and it's type is `erased_type`.
template <class U, class V>
static typename container_detail::enable_if
< container_detail::is_same<typename U::allocator_type, erased_type>
, yes_type
>::type test(const V&);
// Match this function if TypeT::allocator_type does not exist or is
// not convertible from Allocator.
template <typename U>
static no_type test(...);
static Allocator alloc; // Declared but not defined
public:
static const bool value = sizeof(test<T>(alloc)) == sizeof(yes_type);
};
} //namespace container_detail {
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
//! <b>Remark</b>: Automatically detects whether T has a nested allocator_type that is convertible from
//! Allocator. Meets the BinaryTypeTrait requirements ([meta.rqmts] 20.4.1). A program may
//! specialize this type to define uses_allocator<X>::value as true for a T of user-defined type if T does not
//! have a nested allocator_type but is nonetheless constructible using the specified Allocator where either:
//! the first argument of a constructor has type allocator_arg_t and the second argument has type Alloc or
//! the last argument of a constructor has type Alloc.
//!
//! <b>Result</b>: uses_allocator<T, Allocator>::value== true if a type T::allocator_type
//! exists and either is_convertible<Alloc, T::allocator_type>::value != false or T::allocator_type
//! is an alias `erased_type`. False otherwise.
template <typename T, typename Allocator>
struct uses_allocator
: container_detail::uses_allocator_imp<T, Allocator>
{};
}} //namespace boost::container
#endif //BOOST_CONTAINER_USES_ALLOCATOR_HPP
@@ -0,0 +1,32 @@
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 2002-2011. *
# * (C) Copyright Edward Diener 2011. *
# * 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) *
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_ARRAY_HPP
# define BOOST_PREPROCESSOR_ARRAY_HPP
#
# include <boost/preprocessor/array/data.hpp>
# include <boost/preprocessor/array/elem.hpp>
# include <boost/preprocessor/array/enum.hpp>
# include <boost/preprocessor/array/insert.hpp>
# include <boost/preprocessor/array/pop_back.hpp>
# include <boost/preprocessor/array/pop_front.hpp>
# include <boost/preprocessor/array/push_back.hpp>
# include <boost/preprocessor/array/push_front.hpp>
# include <boost/preprocessor/array/remove.hpp>
# include <boost/preprocessor/array/replace.hpp>
# include <boost/preprocessor/array/reverse.hpp>
# include <boost/preprocessor/array/size.hpp>
# include <boost/preprocessor/array/to_list.hpp>
# include <boost/preprocessor/array/to_seq.hpp>
# include <boost/preprocessor/array/to_tuple.hpp>
#
# endif
@@ -0,0 +1,87 @@
#ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
#define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/O1_size_fwd.hpp>
#include <boost/mpl/long.hpp>
#include <boost/mpl/if.hpp>
#include <boost/mpl/aux_/has_size.hpp>
#include <boost/mpl/aux_/config/forwarding.hpp>
#include <boost/mpl/aux_/config/static_constant.hpp>
#include <boost/mpl/aux_/config/msvc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
namespace boost { namespace mpl {
// default implementation - returns 'Sequence::size' if sequence has a 'size'
// member, and -1 otherwise; conrete sequences might override it by
// specializing either the 'O1_size_impl' or the primary 'O1_size' template
# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \
&& !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
namespace aux {
template< typename Sequence > struct O1_size_impl
: Sequence::size
{
};
}
template< typename Tag >
struct O1_size_impl
{
template< typename Sequence > struct apply
#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
: if_<
aux::has_size<Sequence>
, aux::O1_size_impl<Sequence>
, long_<-1>
>::type
{
#else
{
typedef typename if_<
aux::has_size<Sequence>
, aux::O1_size_impl<Sequence>
, long_<-1>
>::type type;
BOOST_STATIC_CONSTANT(long, value =
(if_<
aux::has_size<Sequence>
, aux::O1_size_impl<Sequence>
, long_<-1>
>::type::value)
);
#endif
};
};
# else // BOOST_MSVC
template< typename Tag >
struct O1_size_impl
{
template< typename Sequence > struct apply
: long_<-1>
{
};
};
# endif
}}
#endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED
@@ -0,0 +1,267 @@
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 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)
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# include <boost/preprocessor/slot/detail/shared.hpp>
#
# undef BOOST_PP_SLOT_1
#
# undef BOOST_PP_SLOT_1_DIGIT_1
# undef BOOST_PP_SLOT_1_DIGIT_2
# undef BOOST_PP_SLOT_1_DIGIT_3
# undef BOOST_PP_SLOT_1_DIGIT_4
# undef BOOST_PP_SLOT_1_DIGIT_5
# undef BOOST_PP_SLOT_1_DIGIT_6
# undef BOOST_PP_SLOT_1_DIGIT_7
# undef BOOST_PP_SLOT_1_DIGIT_8
# undef BOOST_PP_SLOT_1_DIGIT_9
# undef BOOST_PP_SLOT_1_DIGIT_10
#
# if BOOST_PP_SLOT_TEMP_10 == 0
# define BOOST_PP_SLOT_1_DIGIT_10 0
# elif BOOST_PP_SLOT_TEMP_10 == 1
# define BOOST_PP_SLOT_1_DIGIT_10 1
# elif BOOST_PP_SLOT_TEMP_10 == 2
# define BOOST_PP_SLOT_1_DIGIT_10 2
# elif BOOST_PP_SLOT_TEMP_10 == 3
# define BOOST_PP_SLOT_1_DIGIT_10 3
# elif BOOST_PP_SLOT_TEMP_10 == 4
# define BOOST_PP_SLOT_1_DIGIT_10 4
# elif BOOST_PP_SLOT_TEMP_10 == 5
# define BOOST_PP_SLOT_1_DIGIT_10 5
# elif BOOST_PP_SLOT_TEMP_10 == 6
# define BOOST_PP_SLOT_1_DIGIT_10 6
# elif BOOST_PP_SLOT_TEMP_10 == 7
# define BOOST_PP_SLOT_1_DIGIT_10 7
# elif BOOST_PP_SLOT_TEMP_10 == 8
# define BOOST_PP_SLOT_1_DIGIT_10 8
# elif BOOST_PP_SLOT_TEMP_10 == 9
# define BOOST_PP_SLOT_1_DIGIT_10 9
# endif
#
# if BOOST_PP_SLOT_TEMP_9 == 0
# define BOOST_PP_SLOT_1_DIGIT_9 0
# elif BOOST_PP_SLOT_TEMP_9 == 1
# define BOOST_PP_SLOT_1_DIGIT_9 1
# elif BOOST_PP_SLOT_TEMP_9 == 2
# define BOOST_PP_SLOT_1_DIGIT_9 2
# elif BOOST_PP_SLOT_TEMP_9 == 3
# define BOOST_PP_SLOT_1_DIGIT_9 3
# elif BOOST_PP_SLOT_TEMP_9 == 4
# define BOOST_PP_SLOT_1_DIGIT_9 4
# elif BOOST_PP_SLOT_TEMP_9 == 5
# define BOOST_PP_SLOT_1_DIGIT_9 5
# elif BOOST_PP_SLOT_TEMP_9 == 6
# define BOOST_PP_SLOT_1_DIGIT_9 6
# elif BOOST_PP_SLOT_TEMP_9 == 7
# define BOOST_PP_SLOT_1_DIGIT_9 7
# elif BOOST_PP_SLOT_TEMP_9 == 8
# define BOOST_PP_SLOT_1_DIGIT_9 8
# elif BOOST_PP_SLOT_TEMP_9 == 9
# define BOOST_PP_SLOT_1_DIGIT_9 9
# endif
#
# if BOOST_PP_SLOT_TEMP_8 == 0
# define BOOST_PP_SLOT_1_DIGIT_8 0
# elif BOOST_PP_SLOT_TEMP_8 == 1
# define BOOST_PP_SLOT_1_DIGIT_8 1
# elif BOOST_PP_SLOT_TEMP_8 == 2
# define BOOST_PP_SLOT_1_DIGIT_8 2
# elif BOOST_PP_SLOT_TEMP_8 == 3
# define BOOST_PP_SLOT_1_DIGIT_8 3
# elif BOOST_PP_SLOT_TEMP_8 == 4
# define BOOST_PP_SLOT_1_DIGIT_8 4
# elif BOOST_PP_SLOT_TEMP_8 == 5
# define BOOST_PP_SLOT_1_DIGIT_8 5
# elif BOOST_PP_SLOT_TEMP_8 == 6
# define BOOST_PP_SLOT_1_DIGIT_8 6
# elif BOOST_PP_SLOT_TEMP_8 == 7
# define BOOST_PP_SLOT_1_DIGIT_8 7
# elif BOOST_PP_SLOT_TEMP_8 == 8
# define BOOST_PP_SLOT_1_DIGIT_8 8
# elif BOOST_PP_SLOT_TEMP_8 == 9
# define BOOST_PP_SLOT_1_DIGIT_8 9
# endif
#
# if BOOST_PP_SLOT_TEMP_7 == 0
# define BOOST_PP_SLOT_1_DIGIT_7 0
# elif BOOST_PP_SLOT_TEMP_7 == 1
# define BOOST_PP_SLOT_1_DIGIT_7 1
# elif BOOST_PP_SLOT_TEMP_7 == 2
# define BOOST_PP_SLOT_1_DIGIT_7 2
# elif BOOST_PP_SLOT_TEMP_7 == 3
# define BOOST_PP_SLOT_1_DIGIT_7 3
# elif BOOST_PP_SLOT_TEMP_7 == 4
# define BOOST_PP_SLOT_1_DIGIT_7 4
# elif BOOST_PP_SLOT_TEMP_7 == 5
# define BOOST_PP_SLOT_1_DIGIT_7 5
# elif BOOST_PP_SLOT_TEMP_7 == 6
# define BOOST_PP_SLOT_1_DIGIT_7 6
# elif BOOST_PP_SLOT_TEMP_7 == 7
# define BOOST_PP_SLOT_1_DIGIT_7 7
# elif BOOST_PP_SLOT_TEMP_7 == 8
# define BOOST_PP_SLOT_1_DIGIT_7 8
# elif BOOST_PP_SLOT_TEMP_7 == 9
# define BOOST_PP_SLOT_1_DIGIT_7 9
# endif
#
# if BOOST_PP_SLOT_TEMP_6 == 0
# define BOOST_PP_SLOT_1_DIGIT_6 0
# elif BOOST_PP_SLOT_TEMP_6 == 1
# define BOOST_PP_SLOT_1_DIGIT_6 1
# elif BOOST_PP_SLOT_TEMP_6 == 2
# define BOOST_PP_SLOT_1_DIGIT_6 2
# elif BOOST_PP_SLOT_TEMP_6 == 3
# define BOOST_PP_SLOT_1_DIGIT_6 3
# elif BOOST_PP_SLOT_TEMP_6 == 4
# define BOOST_PP_SLOT_1_DIGIT_6 4
# elif BOOST_PP_SLOT_TEMP_6 == 5
# define BOOST_PP_SLOT_1_DIGIT_6 5
# elif BOOST_PP_SLOT_TEMP_6 == 6
# define BOOST_PP_SLOT_1_DIGIT_6 6
# elif BOOST_PP_SLOT_TEMP_6 == 7
# define BOOST_PP_SLOT_1_DIGIT_6 7
# elif BOOST_PP_SLOT_TEMP_6 == 8
# define BOOST_PP_SLOT_1_DIGIT_6 8
# elif BOOST_PP_SLOT_TEMP_6 == 9
# define BOOST_PP_SLOT_1_DIGIT_6 9
# endif
#
# if BOOST_PP_SLOT_TEMP_5 == 0
# define BOOST_PP_SLOT_1_DIGIT_5 0
# elif BOOST_PP_SLOT_TEMP_5 == 1
# define BOOST_PP_SLOT_1_DIGIT_5 1
# elif BOOST_PP_SLOT_TEMP_5 == 2
# define BOOST_PP_SLOT_1_DIGIT_5 2
# elif BOOST_PP_SLOT_TEMP_5 == 3
# define BOOST_PP_SLOT_1_DIGIT_5 3
# elif BOOST_PP_SLOT_TEMP_5 == 4
# define BOOST_PP_SLOT_1_DIGIT_5 4
# elif BOOST_PP_SLOT_TEMP_5 == 5
# define BOOST_PP_SLOT_1_DIGIT_5 5
# elif BOOST_PP_SLOT_TEMP_5 == 6
# define BOOST_PP_SLOT_1_DIGIT_5 6
# elif BOOST_PP_SLOT_TEMP_5 == 7
# define BOOST_PP_SLOT_1_DIGIT_5 7
# elif BOOST_PP_SLOT_TEMP_5 == 8
# define BOOST_PP_SLOT_1_DIGIT_5 8
# elif BOOST_PP_SLOT_TEMP_5 == 9
# define BOOST_PP_SLOT_1_DIGIT_5 9
# endif
#
# if BOOST_PP_SLOT_TEMP_4 == 0
# define BOOST_PP_SLOT_1_DIGIT_4 0
# elif BOOST_PP_SLOT_TEMP_4 == 1
# define BOOST_PP_SLOT_1_DIGIT_4 1
# elif BOOST_PP_SLOT_TEMP_4 == 2
# define BOOST_PP_SLOT_1_DIGIT_4 2
# elif BOOST_PP_SLOT_TEMP_4 == 3
# define BOOST_PP_SLOT_1_DIGIT_4 3
# elif BOOST_PP_SLOT_TEMP_4 == 4
# define BOOST_PP_SLOT_1_DIGIT_4 4
# elif BOOST_PP_SLOT_TEMP_4 == 5
# define BOOST_PP_SLOT_1_DIGIT_4 5
# elif BOOST_PP_SLOT_TEMP_4 == 6
# define BOOST_PP_SLOT_1_DIGIT_4 6
# elif BOOST_PP_SLOT_TEMP_4 == 7
# define BOOST_PP_SLOT_1_DIGIT_4 7
# elif BOOST_PP_SLOT_TEMP_4 == 8
# define BOOST_PP_SLOT_1_DIGIT_4 8
# elif BOOST_PP_SLOT_TEMP_4 == 9
# define BOOST_PP_SLOT_1_DIGIT_4 9
# endif
#
# if BOOST_PP_SLOT_TEMP_3 == 0
# define BOOST_PP_SLOT_1_DIGIT_3 0
# elif BOOST_PP_SLOT_TEMP_3 == 1
# define BOOST_PP_SLOT_1_DIGIT_3 1
# elif BOOST_PP_SLOT_TEMP_3 == 2
# define BOOST_PP_SLOT_1_DIGIT_3 2
# elif BOOST_PP_SLOT_TEMP_3 == 3
# define BOOST_PP_SLOT_1_DIGIT_3 3
# elif BOOST_PP_SLOT_TEMP_3 == 4
# define BOOST_PP_SLOT_1_DIGIT_3 4
# elif BOOST_PP_SLOT_TEMP_3 == 5
# define BOOST_PP_SLOT_1_DIGIT_3 5
# elif BOOST_PP_SLOT_TEMP_3 == 6
# define BOOST_PP_SLOT_1_DIGIT_3 6
# elif BOOST_PP_SLOT_TEMP_3 == 7
# define BOOST_PP_SLOT_1_DIGIT_3 7
# elif BOOST_PP_SLOT_TEMP_3 == 8
# define BOOST_PP_SLOT_1_DIGIT_3 8
# elif BOOST_PP_SLOT_TEMP_3 == 9
# define BOOST_PP_SLOT_1_DIGIT_3 9
# endif
#
# if BOOST_PP_SLOT_TEMP_2 == 0
# define BOOST_PP_SLOT_1_DIGIT_2 0
# elif BOOST_PP_SLOT_TEMP_2 == 1
# define BOOST_PP_SLOT_1_DIGIT_2 1
# elif BOOST_PP_SLOT_TEMP_2 == 2
# define BOOST_PP_SLOT_1_DIGIT_2 2
# elif BOOST_PP_SLOT_TEMP_2 == 3
# define BOOST_PP_SLOT_1_DIGIT_2 3
# elif BOOST_PP_SLOT_TEMP_2 == 4
# define BOOST_PP_SLOT_1_DIGIT_2 4
# elif BOOST_PP_SLOT_TEMP_2 == 5
# define BOOST_PP_SLOT_1_DIGIT_2 5
# elif BOOST_PP_SLOT_TEMP_2 == 6
# define BOOST_PP_SLOT_1_DIGIT_2 6
# elif BOOST_PP_SLOT_TEMP_2 == 7
# define BOOST_PP_SLOT_1_DIGIT_2 7
# elif BOOST_PP_SLOT_TEMP_2 == 8
# define BOOST_PP_SLOT_1_DIGIT_2 8
# elif BOOST_PP_SLOT_TEMP_2 == 9
# define BOOST_PP_SLOT_1_DIGIT_2 9
# endif
#
# if BOOST_PP_SLOT_TEMP_1 == 0
# define BOOST_PP_SLOT_1_DIGIT_1 0
# elif BOOST_PP_SLOT_TEMP_1 == 1
# define BOOST_PP_SLOT_1_DIGIT_1 1
# elif BOOST_PP_SLOT_TEMP_1 == 2
# define BOOST_PP_SLOT_1_DIGIT_1 2
# elif BOOST_PP_SLOT_TEMP_1 == 3
# define BOOST_PP_SLOT_1_DIGIT_1 3
# elif BOOST_PP_SLOT_TEMP_1 == 4
# define BOOST_PP_SLOT_1_DIGIT_1 4
# elif BOOST_PP_SLOT_TEMP_1 == 5
# define BOOST_PP_SLOT_1_DIGIT_1 5
# elif BOOST_PP_SLOT_TEMP_1 == 6
# define BOOST_PP_SLOT_1_DIGIT_1 6
# elif BOOST_PP_SLOT_TEMP_1 == 7
# define BOOST_PP_SLOT_1_DIGIT_1 7
# elif BOOST_PP_SLOT_TEMP_1 == 8
# define BOOST_PP_SLOT_1_DIGIT_1 8
# elif BOOST_PP_SLOT_TEMP_1 == 9
# define BOOST_PP_SLOT_1_DIGIT_1 9
# endif
#
# if BOOST_PP_SLOT_1_DIGIT_10
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_1_DIGIT_10, BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_9
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_8
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_7
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_6
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_5
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_4
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_3
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# elif BOOST_PP_SLOT_1_DIGIT_2
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1)
# else
# define BOOST_PP_SLOT_1() BOOST_PP_SLOT_1_DIGIT_1
# endif
@@ -0,0 +1,58 @@
// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
// Use, modification, and distribution is 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 library home page at http://www.boost.org/libs/numeric/conversion
//
// Contact the author at: fernando_cacciola@hotmail.com
//
#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP
#include "boost/limits.hpp"
#include "boost/config.hpp"
#include "boost/mpl/if.hpp"
namespace boost { namespace numeric { namespace boundsdetail
{
template<class N>
class Integral
{
typedef std::numeric_limits<N> limits ;
public :
static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
static N smallest() { return static_cast<N>(1); }
} ;
template<class N>
class Float
{
typedef std::numeric_limits<N> limits ;
public :
static N lowest () { return static_cast<N>(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; }
static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); }
static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); }
} ;
template<class N>
struct get_impl
{
typedef mpl::bool_< ::std::numeric_limits<N>::is_integer > is_int ;
typedef Integral<N> impl_int ;
typedef Float <N> impl_float ;
typedef typename mpl::if_<is_int,impl_int,impl_float>::type type ;
} ;
} } } // namespace boost::numeric::boundsdetail.
#endif
//
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -0,0 +1,17 @@
#ifndef BOOST_MAKE_SHARED_HPP_INCLUDED
#define BOOST_MAKE_SHARED_HPP_INCLUDED
// make_shared.hpp
//
// Copyright (c) 2007, 2008 Peter Dimov
//
// 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
//
// See http://www.boost.org/libs/smart_ptr/make_shared.html
// for documentation.
#include <boost/smart_ptr/make_shared.hpp>
#endif // #ifndef BOOST_MAKE_SHARED_HPP_INCLUDED
@@ -0,0 +1,26 @@
// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
// Use, modification, and distribution is 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 library home page at http://www.boost.org/libs/numeric/conversion
//
// Contact the author at: fernando_cacciola@hotmail.com
//
#ifndef BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
#define BOOST_NUMERIC_CONVERSION_UDT_BUILTIN_MIXTURE_ENUM_FLC_12NOV2002_HPP
namespace boost { namespace numeric
{
enum udt_builtin_mixture_enum
{
builtin_to_builtin
,builtin_to_udt
,udt_to_builtin
,udt_to_udt
} ;
} } // namespace boost::numeric
#endif
File diff suppressed because one or more lines are too long
@@ -0,0 +1,41 @@
#ifndef BOOST_SERIALIZATION_TRACKING_ENUM_HPP
#define BOOST_SERIALIZATION_TRACKING_ENUM_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// tracking_enum.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Use, modification and distribution is 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 updates, documentation, and revision history.
namespace boost {
namespace serialization {
// addresses of serialized objects may be tracked to avoid saving/loading
// redundant copies. This header defines a class trait that can be used
// to specify when objects should be tracked
// names for each tracking level
enum tracking_type
{
// never track this type
track_never = 0,
// track objects of this type if the object is serialized through a
// pointer.
track_selectively = 1,
// always track this type
track_always = 2
};
} // namespace serialization
} // namespace boost
#endif // BOOST_SERIALIZATION_TRACKING_ENUM_HPP
@@ -0,0 +1,41 @@
#ifndef BOOST_BIND_HPP_INCLUDED
#define BOOST_BIND_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// bind.hpp - binds function objects to arguments
//
// Copyright (c) 2009, 2015 Peter Dimov
//
// 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
//
// See http://www.boost.org/libs/bind/bind.html for documentation.
//
#include <boost/bind/bind.hpp>
#ifndef BOOST_BIND_NO_PLACEHOLDERS
#if defined(BOOST_CLANG)
# pragma clang diagnostic push
# if __has_warning("-Wheader-hygiene")
# pragma clang diagnostic ignored "-Wheader-hygiene"
# endif
#endif
using namespace boost::placeholders;
#if defined(BOOST_CLANG)
# pragma clang diagnostic pop
#endif
#endif // #ifndef BOOST_BIND_NO_PLACEHOLDERS
#endif // #ifndef BOOST_BIND_HPP_INCLUDED
@@ -0,0 +1,62 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// 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
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
#define BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
#include <boost/compute/command_queue.hpp>
#include <boost/compute/detail/meta_kernel.hpp>
#include <boost/compute/detail/iterator_range_size.hpp>
#include <boost/compute/type_traits/result_of.hpp>
namespace boost {
namespace compute {
namespace detail {
template<class InputIterator, class OutputIterator, class BinaryFunction>
inline void serial_reduce(InputIterator first,
InputIterator last,
OutputIterator result,
BinaryFunction function,
command_queue &queue)
{
typedef typename
std::iterator_traits<InputIterator>::value_type T;
typedef typename
::boost::compute::result_of<BinaryFunction(T, T)>::type result_type;
const context &context = queue.get_context();
size_t count = detail::iterator_range_size(first, last);
if(count == 0){
return;
}
meta_kernel k("serial_reduce");
size_t count_arg = k.add_arg<cl_uint>("count");
k <<
k.decl<result_type>("result") << " = " << first[0] << ";\n" <<
"for(uint i = 1; i < count; i++)\n" <<
" result = " << function(k.var<T>("result"),
first[k.var<uint_>("i")]) << ";\n" <<
result[0] << " = result;\n";
kernel kernel = k.compile(context);
kernel.set_arg(count_arg, static_cast<uint_>(count));
queue.enqueue_task(kernel);
}
} // end detail namespace
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_SERIAL_REDUCE_HPP
@@ -0,0 +1,22 @@
// Copyright Stefan Seefeld 2005.
// 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 IMPORT_SS20050624_HPP
# define IMPORT_SS20050624_HPP
# include <boost/python/object.hpp>
# include <boost/python/str.hpp>
namespace boost
{
namespace python
{
// Import the named module and return a reference to it.
object BOOST_PYTHON_DECL import(str name);
}
}
#endif
@@ -0,0 +1,171 @@
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC
//
// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
// Copyright 2004-2005 Peter Dimov
//
// 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)
//
//
// Lock-free algorithm by Alexander Terekhov
//
// Thanks to Ben Hitchings for the #weak + (#shared != 0)
// formulation
//
#include <boost/detail/sp_typeinfo.hpp>
namespace boost
{
namespace detail
{
inline void atomic_increment( register long * pw )
{
register int a;
asm
{
loop:
lwarx a, 0, pw
addi a, a, 1
stwcx. a, 0, pw
bne- loop
}
}
inline long atomic_decrement( register long * pw )
{
register int a;
asm
{
sync
loop:
lwarx a, 0, pw
addi a, a, -1
stwcx. a, 0, pw
bne- loop
isync
}
return a;
}
inline long atomic_conditional_increment( register long * pw )
{
register int a;
asm
{
loop:
lwarx a, 0, pw
cmpwi a, 0
beq store
addi a, a, 1
store:
stwcx. a, 0, pw
bne- loop
}
return a;
}
class sp_counted_base
{
private:
sp_counted_base( sp_counted_base const & );
sp_counted_base & operator= ( sp_counted_base const & );
long use_count_; // #shared
long weak_count_; // #weak + (#shared != 0)
public:
sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
{
}
virtual ~sp_counted_base() // nothrow
{
}
// dispose() is called when use_count_ drops to zero, to release
// the resources managed by *this.
virtual void dispose() = 0; // nothrow
// destroy() is called when weak_count_ drops to zero.
virtual void destroy() // nothrow
{
delete this;
}
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
virtual void * get_untyped_deleter() = 0;
void add_ref_copy()
{
atomic_increment( &use_count_ );
}
bool add_ref_lock() // true on success
{
return atomic_conditional_increment( &use_count_ ) != 0;
}
void release() // nothrow
{
if( atomic_decrement( &use_count_ ) == 0 )
{
dispose();
weak_release();
}
}
void weak_add_ref() // nothrow
{
atomic_increment( &weak_count_ );
}
void weak_release() // nothrow
{
if( atomic_decrement( &weak_count_ ) == 0 )
{
destroy();
}
}
long use_count() const // nothrow
{
return static_cast<long const volatile &>( use_count_ );
}
};
} // namespace detail
} // namespace boost
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED