Initial Commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
/* boost random/random_number_generator.hpp header file
|
||||
*
|
||||
* Copyright Jens Maurer 2000-2001
|
||||
* 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 including documentation.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Revision history
|
||||
* 2001-02-18 moved to individual header files
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RANDOM_RANDOM_NUMBER_GENERATOR_HPP
|
||||
#define BOOST_RANDOM_RANDOM_NUMBER_GENERATOR_HPP
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/random/uniform_int_distribution.hpp>
|
||||
|
||||
#include <boost/random/detail/disable_warnings.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace random {
|
||||
|
||||
/**
|
||||
* Instantiations of class template random_number_generator model a
|
||||
* RandomNumberGenerator (std:25.2.11 [lib.alg.random.shuffle]). On
|
||||
* each invocation, it returns a uniformly distributed integer in
|
||||
* the range [0..n).
|
||||
*
|
||||
* The template parameter IntType shall denote some integer-like value type.
|
||||
*/
|
||||
template<class URNG, class IntType = long>
|
||||
class random_number_generator
|
||||
{
|
||||
public:
|
||||
typedef URNG base_type;
|
||||
typedef IntType argument_type;
|
||||
typedef IntType result_type;
|
||||
/**
|
||||
* Constructs a random_number_generator functor with the given
|
||||
* \uniform_random_number_generator as the underlying source of
|
||||
* random numbers.
|
||||
*/
|
||||
random_number_generator(base_type& rng) : _rng(rng) {}
|
||||
|
||||
// compiler-generated copy ctor is fine
|
||||
// assignment is disallowed because there is a reference member
|
||||
|
||||
/**
|
||||
* Returns a value in the range [0, n)
|
||||
*/
|
||||
result_type operator()(argument_type n)
|
||||
{
|
||||
BOOST_ASSERT(n > 0);
|
||||
return uniform_int_distribution<IntType>(0, n-1)(_rng);
|
||||
}
|
||||
|
||||
private:
|
||||
base_type& _rng;
|
||||
};
|
||||
|
||||
} // namespace random
|
||||
|
||||
using random::random_number_generator;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/random/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_RANDOM_RANDOM_NUMBER_GENERATOR_HPP
|
||||
@@ -0,0 +1,96 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Thorsten Ottosen, Neil Groves 2006 - 2008. 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)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
|
||||
#ifndef BOOST_RANGE_ADAPTOR_SLICED_HPP
|
||||
#define BOOST_RANGE_ADAPTOR_SLICED_HPP
|
||||
|
||||
#include <boost/range/adaptor/argument_fwd.hpp>
|
||||
#include <boost/range/size_type.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace adaptors
|
||||
{
|
||||
struct sliced
|
||||
{
|
||||
sliced(std::size_t t_, std::size_t u_)
|
||||
: t(t_), u(u_) {}
|
||||
std::size_t t;
|
||||
std::size_t u;
|
||||
};
|
||||
|
||||
template< class RandomAccessRange >
|
||||
class sliced_range : public boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type >
|
||||
{
|
||||
typedef boost::iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<RandomAccessRange>::type > base_t;
|
||||
public:
|
||||
template<typename Rng, typename T, typename U>
|
||||
sliced_range(Rng& rng, T t, U u)
|
||||
: base_t(boost::next(boost::begin(rng), t),
|
||||
boost::next(boost::begin(rng), u))
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline sliced_range<RandomAccessRange>
|
||||
slice( RandomAccessRange& rng, std::size_t t, std::size_t u )
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((
|
||||
RandomAccessRangeConcept<RandomAccessRange>));
|
||||
|
||||
BOOST_ASSERT( t <= u && "error in slice indices" );
|
||||
BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
|
||||
"second slice index out of bounds" );
|
||||
|
||||
return sliced_range<RandomAccessRange>(rng, t, u);
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator<const RandomAccessRange>::type >
|
||||
slice( const RandomAccessRange& rng, std::size_t t, std::size_t u )
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((
|
||||
RandomAccessRangeConcept<const RandomAccessRange>));
|
||||
|
||||
BOOST_ASSERT( t <= u && "error in slice indices" );
|
||||
BOOST_ASSERT( static_cast<std::size_t>(boost::size(rng)) >= u &&
|
||||
"second slice index out of bounds" );
|
||||
|
||||
return sliced_range<const RandomAccessRange>(rng, t, u);
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline sliced_range<RandomAccessRange>
|
||||
operator|( RandomAccessRange& r, const sliced& f )
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((
|
||||
RandomAccessRangeConcept<RandomAccessRange>));
|
||||
|
||||
return sliced_range<RandomAccessRange>( r, f.t, f.u );
|
||||
}
|
||||
|
||||
template< class RandomAccessRange >
|
||||
inline sliced_range<const RandomAccessRange>
|
||||
operator|( const RandomAccessRange& r, const sliced& f )
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((
|
||||
RandomAccessRangeConcept<const RandomAccessRange>));
|
||||
|
||||
return sliced_range<const RandomAccessRange>( r, f.t, f.u );
|
||||
}
|
||||
|
||||
} // namespace adaptors
|
||||
using adaptors::sliced_range;
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,707 @@
|
||||
// Boost rational.hpp header file ------------------------------------------//
|
||||
|
||||
// (C) Copyright Paul Moore 1999. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or
|
||||
// implied warranty, and with no claim as to its suitability for any purpose.
|
||||
|
||||
// boostinspect:nolicense (don't complain about the lack of a Boost license)
|
||||
// (Paul Moore hasn't been in contact for years, so there's no way to change the
|
||||
// license.)
|
||||
|
||||
// See http://www.boost.org/libs/rational for documentation.
|
||||
|
||||
// Credits:
|
||||
// Thanks to the boost mailing list in general for useful comments.
|
||||
// Particular contributions included:
|
||||
// Andrew D Jewell, for reminding me to take care to avoid overflow
|
||||
// Ed Brey, for many comments, including picking up on some dreadful typos
|
||||
// Stephen Silver contributed the test suite and comments on user-defined
|
||||
// IntType
|
||||
// Nickolay Mladenov, for the implementation of operator+=
|
||||
|
||||
// Revision History
|
||||
// 02 Sep 13 Remove unneeded forward declarations; tweak private helper
|
||||
// function (Daryle Walker)
|
||||
// 30 Aug 13 Improve exception safety of "assign"; start modernizing I/O code
|
||||
// (Daryle Walker)
|
||||
// 27 Aug 13 Add cross-version constructor template, plus some private helper
|
||||
// functions; add constructor to exception class to take custom
|
||||
// messages (Daryle Walker)
|
||||
// 25 Aug 13 Add constexpr qualification wherever possible (Daryle Walker)
|
||||
// 05 May 12 Reduced use of implicit gcd (Mario Lang)
|
||||
// 05 Nov 06 Change rational_cast to not depend on division between different
|
||||
// types (Daryle Walker)
|
||||
// 04 Nov 06 Off-load GCD and LCM to Boost.Math; add some invariant checks;
|
||||
// add std::numeric_limits<> requirement to help GCD (Daryle Walker)
|
||||
// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity
|
||||
// divisions; the rational-value version now uses continued fraction
|
||||
// expansion to avoid overflows, for bug #798357 (Daryle Walker)
|
||||
// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz)
|
||||
// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config
|
||||
// (Joaquín M López Muñoz)
|
||||
// 27 Dec 05 Add Boolean conversion operator (Daryle Walker)
|
||||
// 28 Sep 02 Use _left versions of operators from operators.hpp
|
||||
// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel)
|
||||
// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams)
|
||||
// 05 Feb 01 Update operator>> to tighten up input syntax
|
||||
// 05 Feb 01 Final tidy up of gcd code prior to the new release
|
||||
// 27 Jan 01 Recode abs() without relying on abs(IntType)
|
||||
// 21 Jan 01 Include Nickolay Mladenov's operator+= algorithm,
|
||||
// tidy up a number of areas, use newer features of operators.hpp
|
||||
// (reduces space overhead to zero), add operator!,
|
||||
// introduce explicit mixed-mode arithmetic operations
|
||||
// 12 Jan 01 Include fixes to handle a user-defined IntType better
|
||||
// 19 Nov 00 Throw on divide by zero in operator /= (John (EBo) David)
|
||||
// 23 Jun 00 Incorporate changes from Mark Rodgers for Borland C++
|
||||
// 22 Jun 00 Change _MSC_VER to BOOST_MSVC so other compilers are not
|
||||
// affected (Beman Dawes)
|
||||
// 6 Mar 00 Fix operator-= normalization, #include <string> (Jens Maurer)
|
||||
// 14 Dec 99 Modifications based on comments from the boost list
|
||||
// 09 Dec 99 Initial Version (Paul Moore)
|
||||
|
||||
#ifndef BOOST_RATIONAL_HPP
|
||||
#define BOOST_RATIONAL_HPP
|
||||
|
||||
#include <boost/config.hpp> // for BOOST_NO_STDC_NAMESPACE, BOOST_MSVC, etc
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
#include <iomanip> // for std::setw
|
||||
#include <ios> // for std::noskipws, streamsize
|
||||
#include <istream> // for std::istream
|
||||
#include <ostream> // for std::ostream
|
||||
#include <sstream> // for std::ostringstream
|
||||
#endif
|
||||
#include <cstddef> // for NULL
|
||||
#include <stdexcept> // for std::domain_error
|
||||
#include <string> // for std::string implicit constructor
|
||||
#include <boost/operators.hpp> // for boost::addable etc
|
||||
#include <cstdlib> // for std::abs
|
||||
#include <boost/call_traits.hpp> // for boost::call_traits
|
||||
#include <boost/detail/workaround.hpp> // for BOOST_WORKAROUND
|
||||
#include <boost/assert.hpp> // for BOOST_ASSERT
|
||||
#include <boost/integer/common_factor_rt.hpp> // for boost::integer::gcd, lcm
|
||||
#include <limits> // for std::numeric_limits
|
||||
#include <boost/static_assert.hpp> // for BOOST_STATIC_ASSERT
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
// Control whether depreciated GCD and LCM functions are included (default: yes)
|
||||
#ifndef BOOST_CONTROL_RATIONAL_HAS_GCD
|
||||
#define BOOST_CONTROL_RATIONAL_HAS_GCD 1
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
|
||||
#if BOOST_CONTROL_RATIONAL_HAS_GCD
|
||||
template <typename IntType>
|
||||
IntType gcd(IntType n, IntType m)
|
||||
{
|
||||
// Defer to the version in Boost.Math
|
||||
return integer::gcd( n, m );
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
IntType lcm(IntType n, IntType m)
|
||||
{
|
||||
// Defer to the version in Boost.Math
|
||||
return integer::lcm( n, m );
|
||||
}
|
||||
#endif // BOOST_CONTROL_RATIONAL_HAS_GCD
|
||||
|
||||
class bad_rational : public std::domain_error
|
||||
{
|
||||
public:
|
||||
explicit bad_rational() : std::domain_error("bad rational: zero denominator") {}
|
||||
explicit bad_rational( char const *what ) : std::domain_error( what ) {}
|
||||
};
|
||||
|
||||
template <typename IntType>
|
||||
class rational :
|
||||
less_than_comparable < rational<IntType>,
|
||||
equality_comparable < rational<IntType>,
|
||||
less_than_comparable2 < rational<IntType>, IntType,
|
||||
equality_comparable2 < rational<IntType>, IntType,
|
||||
addable < rational<IntType>,
|
||||
subtractable < rational<IntType>,
|
||||
multipliable < rational<IntType>,
|
||||
dividable < rational<IntType>,
|
||||
addable2 < rational<IntType>, IntType,
|
||||
subtractable2 < rational<IntType>, IntType,
|
||||
subtractable2_left < rational<IntType>, IntType,
|
||||
multipliable2 < rational<IntType>, IntType,
|
||||
dividable2 < rational<IntType>, IntType,
|
||||
dividable2_left < rational<IntType>, IntType,
|
||||
incrementable < rational<IntType>,
|
||||
decrementable < rational<IntType>
|
||||
> > > > > > > > > > > > > > > >
|
||||
{
|
||||
// Class-wide pre-conditions
|
||||
BOOST_STATIC_ASSERT( ::std::numeric_limits<IntType>::is_specialized );
|
||||
|
||||
// Helper types
|
||||
typedef typename boost::call_traits<IntType>::param_type param_type;
|
||||
|
||||
struct helper { IntType parts[2]; };
|
||||
typedef IntType (helper::* bool_type)[2];
|
||||
|
||||
public:
|
||||
// Component type
|
||||
typedef IntType int_type;
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
rational() : num(0), den(1) {}
|
||||
BOOST_CONSTEXPR
|
||||
rational(param_type n) : num(n), den(1) {}
|
||||
rational(param_type n, param_type d) : num(n), den(d) { normalize(); }
|
||||
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATES
|
||||
template < typename NewType >
|
||||
BOOST_CONSTEXPR explicit
|
||||
rational(rational<NewType> const &r)
|
||||
: num(r.numerator()), den(is_normalized(int_type(r.numerator()),
|
||||
int_type(r.denominator())) ? r.denominator() :
|
||||
(BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){}
|
||||
#endif
|
||||
|
||||
// Default copy constructor and assignment are fine
|
||||
|
||||
// Add assignment from IntType
|
||||
rational& operator=(param_type i) { num = i; den = 1; return *this; }
|
||||
|
||||
// Assign in place
|
||||
rational& assign(param_type n, param_type d);
|
||||
|
||||
// Access to representation
|
||||
BOOST_CONSTEXPR
|
||||
const IntType& numerator() const { return num; }
|
||||
BOOST_CONSTEXPR
|
||||
const IntType& denominator() const { return den; }
|
||||
|
||||
// Arithmetic assignment operators
|
||||
rational& operator+= (const rational& r);
|
||||
rational& operator-= (const rational& r);
|
||||
rational& operator*= (const rational& r);
|
||||
rational& operator/= (const rational& r);
|
||||
|
||||
rational& operator+= (param_type i) { num += i * den; return *this; }
|
||||
rational& operator-= (param_type i) { num -= i * den; return *this; }
|
||||
rational& operator*= (param_type i);
|
||||
rational& operator/= (param_type i);
|
||||
|
||||
// Increment and decrement
|
||||
const rational& operator++() { num += den; return *this; }
|
||||
const rational& operator--() { num -= den; return *this; }
|
||||
|
||||
// Operator not
|
||||
BOOST_CONSTEXPR
|
||||
bool operator!() const { return !num; }
|
||||
|
||||
// Boolean conversion
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
|
||||
// The "ISO C++ Template Parser" option in CW 8.3 chokes on the
|
||||
// following, hence we selectively disable that option for the
|
||||
// offending memfun.
|
||||
#pragma parse_mfunc_templ off
|
||||
#endif
|
||||
|
||||
BOOST_CONSTEXPR
|
||||
operator bool_type() const { return operator !() ? 0 : &helper::parts; }
|
||||
|
||||
#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
|
||||
#pragma parse_mfunc_templ reset
|
||||
#endif
|
||||
|
||||
// Comparison operators
|
||||
bool operator< (const rational& r) const;
|
||||
BOOST_CONSTEXPR
|
||||
bool operator== (const rational& r) const;
|
||||
|
||||
bool operator< (param_type i) const;
|
||||
bool operator> (param_type i) const;
|
||||
BOOST_CONSTEXPR
|
||||
bool operator== (param_type i) const;
|
||||
|
||||
private:
|
||||
// Implementation - numerator and denominator (normalized).
|
||||
// Other possibilities - separate whole-part, or sign, fields?
|
||||
IntType num;
|
||||
IntType den;
|
||||
|
||||
// Helper functions
|
||||
static BOOST_CONSTEXPR
|
||||
int_type inner_gcd( param_type a, param_type b, int_type const &zero =
|
||||
int_type(0) )
|
||||
{ return b == zero ? a : inner_gcd(b, a % b, zero); }
|
||||
|
||||
static BOOST_CONSTEXPR
|
||||
int_type inner_abs( param_type x, int_type const &zero = int_type(0) )
|
||||
{ return x < zero ? -x : +x; }
|
||||
|
||||
// Representation note: Fractions are kept in normalized form at all
|
||||
// times. normalized form is defined as gcd(num,den) == 1 and den > 0.
|
||||
// In particular, note that the implementation of abs() below relies
|
||||
// on den always being positive.
|
||||
bool test_invariant() const;
|
||||
void normalize();
|
||||
|
||||
static BOOST_CONSTEXPR
|
||||
bool is_normalized( param_type n, param_type d, int_type const &zero =
|
||||
int_type(0), int_type const &one = int_type(1) )
|
||||
{
|
||||
return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n,
|
||||
d, zero), zero ) == one;
|
||||
}
|
||||
};
|
||||
|
||||
// Assign in place
|
||||
template <typename IntType>
|
||||
inline rational<IntType>& rational<IntType>::assign(param_type n, param_type d)
|
||||
{
|
||||
return *this = rational( n, d );
|
||||
}
|
||||
|
||||
// Unary plus and minus
|
||||
template <typename IntType>
|
||||
BOOST_CONSTEXPR
|
||||
inline rational<IntType> operator+ (const rational<IntType>& r)
|
||||
{
|
||||
return r;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
inline rational<IntType> operator- (const rational<IntType>& r)
|
||||
{
|
||||
return rational<IntType>(-r.numerator(), r.denominator());
|
||||
}
|
||||
|
||||
// Arithmetic assignment operators
|
||||
template <typename IntType>
|
||||
rational<IntType>& rational<IntType>::operator+= (const rational<IntType>& r)
|
||||
{
|
||||
// This calculation avoids overflow, and minimises the number of expensive
|
||||
// calculations. Thanks to Nickolay Mladenov for this algorithm.
|
||||
//
|
||||
// Proof:
|
||||
// We have to compute a/b + c/d, where gcd(a,b)=1 and gcd(b,c)=1.
|
||||
// Let g = gcd(b,d), and b = b1*g, d=d1*g. Then gcd(b1,d1)=1
|
||||
//
|
||||
// The result is (a*d1 + c*b1) / (b1*d1*g).
|
||||
// Now we have to normalize this ratio.
|
||||
// Let's assume h | gcd((a*d1 + c*b1), (b1*d1*g)), and h > 1
|
||||
// If h | b1 then gcd(h,d1)=1 and hence h|(a*d1+c*b1) => h|a.
|
||||
// But since gcd(a,b1)=1 we have h=1.
|
||||
// Similarly h|d1 leads to h=1.
|
||||
// So we have that h | gcd((a*d1 + c*b1) , (b1*d1*g)) => h|g
|
||||
// Finally we have gcd((a*d1 + c*b1), (b1*d1*g)) = gcd((a*d1 + c*b1), g)
|
||||
// Which proves that instead of normalizing the result, it is better to
|
||||
// divide num and den by gcd((a*d1 + c*b1), g)
|
||||
|
||||
// Protect against self-modification
|
||||
IntType r_num = r.num;
|
||||
IntType r_den = r.den;
|
||||
|
||||
IntType g = integer::gcd(den, r_den);
|
||||
den /= g; // = b1 from the calculations above
|
||||
num = num * (r_den / g) + r_num * den;
|
||||
g = integer::gcd(num, g);
|
||||
num /= g;
|
||||
den *= r_den/g;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
rational<IntType>& rational<IntType>::operator-= (const rational<IntType>& r)
|
||||
{
|
||||
// Protect against self-modification
|
||||
IntType r_num = r.num;
|
||||
IntType r_den = r.den;
|
||||
|
||||
// This calculation avoids overflow, and minimises the number of expensive
|
||||
// calculations. It corresponds exactly to the += case above
|
||||
IntType g = integer::gcd(den, r_den);
|
||||
den /= g;
|
||||
num = num * (r_den / g) - r_num * den;
|
||||
g = integer::gcd(num, g);
|
||||
num /= g;
|
||||
den *= r_den/g;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
rational<IntType>& rational<IntType>::operator*= (const rational<IntType>& r)
|
||||
{
|
||||
// Protect against self-modification
|
||||
IntType r_num = r.num;
|
||||
IntType r_den = r.den;
|
||||
|
||||
// Avoid overflow and preserve normalization
|
||||
IntType gcd1 = integer::gcd(num, r_den);
|
||||
IntType gcd2 = integer::gcd(r_num, den);
|
||||
num = (num/gcd1) * (r_num/gcd2);
|
||||
den = (den/gcd2) * (r_den/gcd1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
rational<IntType>& rational<IntType>::operator/= (const rational<IntType>& r)
|
||||
{
|
||||
// Protect against self-modification
|
||||
IntType r_num = r.num;
|
||||
IntType r_den = r.den;
|
||||
|
||||
// Avoid repeated construction
|
||||
IntType zero(0);
|
||||
|
||||
// Trap division by zero
|
||||
if (r_num == zero)
|
||||
BOOST_THROW_EXCEPTION(bad_rational());
|
||||
if (num == zero)
|
||||
return *this;
|
||||
|
||||
// Avoid overflow and preserve normalization
|
||||
IntType gcd1 = integer::gcd(num, r_num);
|
||||
IntType gcd2 = integer::gcd(r_den, den);
|
||||
num = (num/gcd1) * (r_den/gcd2);
|
||||
den = (den/gcd2) * (r_num/gcd1);
|
||||
|
||||
if (den < zero) {
|
||||
num = -num;
|
||||
den = -den;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Mixed-mode operators
|
||||
template <typename IntType>
|
||||
inline rational<IntType>&
|
||||
rational<IntType>::operator*= (param_type i)
|
||||
{
|
||||
// Avoid overflow and preserve normalization
|
||||
IntType gcd = integer::gcd(i, den);
|
||||
num *= i / gcd;
|
||||
den /= gcd;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
rational<IntType>&
|
||||
rational<IntType>::operator/= (param_type i)
|
||||
{
|
||||
// Avoid repeated construction
|
||||
IntType const zero(0);
|
||||
|
||||
if(i == zero) BOOST_THROW_EXCEPTION(bad_rational());
|
||||
if (num == zero) return *this;
|
||||
|
||||
// Avoid overflow and preserve normalization
|
||||
IntType const gcd = integer::gcd(num, i);
|
||||
num /= gcd;
|
||||
den *= i / gcd;
|
||||
|
||||
if (den < zero) {
|
||||
num = -num;
|
||||
den = -den;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Comparison operators
|
||||
template <typename IntType>
|
||||
bool rational<IntType>::operator< (const rational<IntType>& r) const
|
||||
{
|
||||
// Avoid repeated construction
|
||||
int_type const zero( 0 );
|
||||
|
||||
// This should really be a class-wide invariant. The reason for these
|
||||
// checks is that for 2's complement systems, INT_MIN has no corresponding
|
||||
// positive, so negating it during normalization keeps it INT_MIN, which
|
||||
// is bad for later calculations that assume a positive denominator.
|
||||
BOOST_ASSERT( this->den > zero );
|
||||
BOOST_ASSERT( r.den > zero );
|
||||
|
||||
// Determine relative order by expanding each value to its simple continued
|
||||
// fraction representation using the Euclidian GCD algorithm.
|
||||
struct { int_type n, d, q, r; }
|
||||
ts = { this->num, this->den, static_cast<int_type>(this->num / this->den),
|
||||
static_cast<int_type>(this->num % this->den) },
|
||||
rs = { r.num, r.den, static_cast<int_type>(r.num / r.den),
|
||||
static_cast<int_type>(r.num % r.den) };
|
||||
unsigned reverse = 0u;
|
||||
|
||||
// Normalize negative moduli by repeatedly adding the (positive) denominator
|
||||
// and decrementing the quotient. Later cycles should have all positive
|
||||
// values, so this only has to be done for the first cycle. (The rules of
|
||||
// C++ require a nonnegative quotient & remainder for a nonnegative dividend
|
||||
// & positive divisor.)
|
||||
while ( ts.r < zero ) { ts.r += ts.d; --ts.q; }
|
||||
while ( rs.r < zero ) { rs.r += rs.d; --rs.q; }
|
||||
|
||||
// Loop through and compare each variable's continued-fraction components
|
||||
for ( ;; )
|
||||
{
|
||||
// The quotients of the current cycle are the continued-fraction
|
||||
// components. Comparing two c.f. is comparing their sequences,
|
||||
// stopping at the first difference.
|
||||
if ( ts.q != rs.q )
|
||||
{
|
||||
// Since reciprocation changes the relative order of two variables,
|
||||
// and c.f. use reciprocals, the less/greater-than test reverses
|
||||
// after each index. (Start w/ non-reversed @ whole-number place.)
|
||||
return reverse ? ts.q > rs.q : ts.q < rs.q;
|
||||
}
|
||||
|
||||
// Prepare the next cycle
|
||||
reverse ^= 1u;
|
||||
|
||||
if ( (ts.r == zero) || (rs.r == zero) )
|
||||
{
|
||||
// At least one variable's c.f. expansion has ended
|
||||
break;
|
||||
}
|
||||
|
||||
ts.n = ts.d; ts.d = ts.r;
|
||||
ts.q = ts.n / ts.d; ts.r = ts.n % ts.d;
|
||||
rs.n = rs.d; rs.d = rs.r;
|
||||
rs.q = rs.n / rs.d; rs.r = rs.n % rs.d;
|
||||
}
|
||||
|
||||
// Compare infinity-valued components for otherwise equal sequences
|
||||
if ( ts.r == rs.r )
|
||||
{
|
||||
// Both remainders are zero, so the next (and subsequent) c.f.
|
||||
// components for both sequences are infinity. Therefore, the sequences
|
||||
// and their corresponding values are equal.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4800)
|
||||
#endif
|
||||
// Exactly one of the remainders is zero, so all following c.f.
|
||||
// components of that variable are infinity, while the other variable
|
||||
// has a finite next c.f. component. So that other variable has the
|
||||
// lesser value (modulo the reversal flag!).
|
||||
return ( ts.r != zero ) != static_cast<bool>( reverse );
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
bool rational<IntType>::operator< (param_type i) const
|
||||
{
|
||||
// Avoid repeated construction
|
||||
int_type const zero( 0 );
|
||||
|
||||
// Break value into mixed-fraction form, w/ always-nonnegative remainder
|
||||
BOOST_ASSERT( this->den > zero );
|
||||
int_type q = this->num / this->den, r = this->num % this->den;
|
||||
while ( r < zero ) { r += this->den; --q; }
|
||||
|
||||
// Compare with just the quotient, since the remainder always bumps the
|
||||
// value up. [Since q = floor(n/d), and if n/d < i then q < i, if n/d == i
|
||||
// then q == i, if n/d == i + r/d then q == i, and if n/d >= i + 1 then
|
||||
// q >= i + 1 > i; therefore n/d < i iff q < i.]
|
||||
return q < i;
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
bool rational<IntType>::operator> (param_type i) const
|
||||
{
|
||||
return operator==(i)? false: !operator<(i);
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
BOOST_CONSTEXPR
|
||||
inline bool rational<IntType>::operator== (const rational<IntType>& r) const
|
||||
{
|
||||
return ((num == r.num) && (den == r.den));
|
||||
}
|
||||
|
||||
template <typename IntType>
|
||||
BOOST_CONSTEXPR
|
||||
inline bool rational<IntType>::operator== (param_type i) const
|
||||
{
|
||||
return ((den == IntType(1)) && (num == i));
|
||||
}
|
||||
|
||||
// Invariant check
|
||||
template <typename IntType>
|
||||
inline bool rational<IntType>::test_invariant() const
|
||||
{
|
||||
return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) ==
|
||||
int_type(1) );
|
||||
}
|
||||
|
||||
// Normalisation
|
||||
template <typename IntType>
|
||||
void rational<IntType>::normalize()
|
||||
{
|
||||
// Avoid repeated construction
|
||||
IntType zero(0);
|
||||
|
||||
if (den == zero)
|
||||
BOOST_THROW_EXCEPTION(bad_rational());
|
||||
|
||||
// Handle the case of zero separately, to avoid division by zero
|
||||
if (num == zero) {
|
||||
den = IntType(1);
|
||||
return;
|
||||
}
|
||||
|
||||
IntType g = integer::gcd(num, den);
|
||||
|
||||
num /= g;
|
||||
den /= g;
|
||||
|
||||
// Ensure that the denominator is positive
|
||||
if (den < zero) {
|
||||
num = -num;
|
||||
den = -den;
|
||||
}
|
||||
|
||||
// ...But acknowledge that the previous step doesn't always work.
|
||||
// (Nominally, this should be done before the mutating steps, but this
|
||||
// member function is only called during the constructor, so we never have
|
||||
// to worry about zombie objects.)
|
||||
if (den < zero)
|
||||
BOOST_THROW_EXCEPTION(bad_rational("bad rational: non-zero singular denominator"));
|
||||
|
||||
BOOST_ASSERT( this->test_invariant() );
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
namespace detail {
|
||||
|
||||
// A utility class to reset the format flags for an istream at end
|
||||
// of scope, even in case of exceptions
|
||||
struct resetter {
|
||||
resetter(std::istream& is) : is_(is), f_(is.flags()) {}
|
||||
~resetter() { is_.flags(f_); }
|
||||
std::istream& is_;
|
||||
std::istream::fmtflags f_; // old GNU c++ lib has no ios_base
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
// Input and output
|
||||
template <typename IntType>
|
||||
std::istream& operator>> (std::istream& is, rational<IntType>& r)
|
||||
{
|
||||
using std::ios;
|
||||
|
||||
IntType n = IntType(0), d = IntType(1);
|
||||
char c = 0;
|
||||
detail::resetter sentry(is);
|
||||
|
||||
if ( is >> n )
|
||||
{
|
||||
if ( is.get(c) )
|
||||
{
|
||||
if ( c == '/' )
|
||||
{
|
||||
if ( is >> std::noskipws >> d )
|
||||
try {
|
||||
r.assign( n, d );
|
||||
} catch ( bad_rational & ) { // normalization fail
|
||||
try { is.setstate(ios::failbit); }
|
||||
catch ( ... ) {} // don't throw ios_base::failure...
|
||||
if ( is.exceptions() & ios::failbit )
|
||||
throw; // ...but the original exception instead
|
||||
// ELSE: suppress the exception, use just error flags
|
||||
}
|
||||
}
|
||||
else
|
||||
is.setstate( ios::failbit );
|
||||
}
|
||||
}
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
// Add manipulators for output format?
|
||||
template <typename IntType>
|
||||
std::ostream& operator<< (std::ostream& os, const rational<IntType>& r)
|
||||
{
|
||||
// The slash directly precedes the denominator, which has no prefixes.
|
||||
std::ostringstream ss;
|
||||
|
||||
ss.copyfmt( os );
|
||||
ss.tie( NULL );
|
||||
ss.exceptions( std::ios::goodbit );
|
||||
ss.width( 0 );
|
||||
ss << std::noshowpos << std::noshowbase << '/' << r.denominator();
|
||||
|
||||
// The numerator holds the showpos, internal, and showbase flags.
|
||||
std::string const tail = ss.str();
|
||||
std::streamsize const w =
|
||||
os.width() - static_cast<std::streamsize>( tail.size() );
|
||||
|
||||
ss.clear();
|
||||
ss.str( "" );
|
||||
ss.flags( os.flags() );
|
||||
ss << std::setw( w < 0 || (os.flags() & std::ios::adjustfield) !=
|
||||
std::ios::internal ? 0 : w ) << r.numerator();
|
||||
return os << ss.str() + tail;
|
||||
}
|
||||
#endif // BOOST_NO_IOSTREAM
|
||||
|
||||
// Type conversion
|
||||
template <typename T, typename IntType>
|
||||
BOOST_CONSTEXPR
|
||||
inline T rational_cast(const rational<IntType>& src)
|
||||
{
|
||||
return static_cast<T>(src.numerator())/static_cast<T>(src.denominator());
|
||||
}
|
||||
|
||||
// Do not use any abs() defined on IntType - it isn't worth it, given the
|
||||
// difficulties involved (Koenig lookup required, there may not *be* an abs()
|
||||
// defined, etc etc).
|
||||
template <typename IntType>
|
||||
inline rational<IntType> abs(const rational<IntType>& r)
|
||||
{
|
||||
return r.numerator() >= IntType(0)? r: -r;
|
||||
}
|
||||
|
||||
namespace integer {
|
||||
|
||||
template <typename IntType>
|
||||
struct gcd_evaluator< rational<IntType> >
|
||||
{
|
||||
typedef rational<IntType> result_type,
|
||||
first_argument_type, second_argument_type;
|
||||
result_type operator() ( first_argument_type const &a
|
||||
, second_argument_type const &b
|
||||
) const
|
||||
{
|
||||
return result_type(integer::gcd(a.numerator(), b.numerator()),
|
||||
integer::lcm(a.denominator(), b.denominator()));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename IntType>
|
||||
struct lcm_evaluator< rational<IntType> >
|
||||
{
|
||||
typedef rational<IntType> result_type,
|
||||
first_argument_type, second_argument_type;
|
||||
result_type operator() ( first_argument_type const &a
|
||||
, second_argument_type const &b
|
||||
) const
|
||||
{
|
||||
return result_type(integer::lcm(a.numerator(), b.numerator()),
|
||||
integer::gcd(a.denominator(), b.denominator()));
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace integer
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_RATIONAL_HPP
|
||||
@@ -0,0 +1,93 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_INNER_PRODUCT_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_INNER_PRODUCT_HPP
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/functional.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/accumulate.hpp>
|
||||
#include <boost/compute/container/vector.hpp>
|
||||
#include <boost/compute/iterator/transform_iterator.hpp>
|
||||
#include <boost/compute/iterator/zip_iterator.hpp>
|
||||
#include <boost/compute/functional/detail/unpack.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
/// Returns the inner product of the elements in the range
|
||||
/// [\p first1, \p last1) with the elements in the range beginning
|
||||
/// at \p first2.
|
||||
template<class InputIterator1, class InputIterator2, class T>
|
||||
inline T inner_product(InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
T init,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator1>::value_type input_type;
|
||||
|
||||
ptrdiff_t n = std::distance(first1, last1);
|
||||
|
||||
return ::boost::compute::accumulate(
|
||||
::boost::compute::make_transform_iterator(
|
||||
::boost::compute::make_zip_iterator(
|
||||
boost::make_tuple(first1, first2)
|
||||
),
|
||||
detail::unpack(multiplies<input_type>())
|
||||
),
|
||||
::boost::compute::make_transform_iterator(
|
||||
::boost::compute::make_zip_iterator(
|
||||
boost::make_tuple(last1, first2 + n)
|
||||
),
|
||||
detail::unpack(multiplies<input_type>())
|
||||
),
|
||||
init,
|
||||
queue
|
||||
);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<class InputIterator1,
|
||||
class InputIterator2,
|
||||
class T,
|
||||
class BinaryAccumulateFunction,
|
||||
class BinaryTransformFunction>
|
||||
inline T inner_product(InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
T init,
|
||||
BinaryAccumulateFunction accumulate_function,
|
||||
BinaryTransformFunction transform_function,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator1>::value_type value_type;
|
||||
|
||||
size_t count = detail::iterator_range_size(first1, last1);
|
||||
vector<value_type> result(count, queue.get_context());
|
||||
transform(first1,
|
||||
last1,
|
||||
first2,
|
||||
result.begin(),
|
||||
transform_function,
|
||||
queue);
|
||||
|
||||
return ::boost::compute::accumulate(result.begin(),
|
||||
result.end(),
|
||||
init,
|
||||
accumulate_function,
|
||||
queue);
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_INNER_PRODUCT_HPP
|
||||
@@ -0,0 +1,65 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_FOR_EACH_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_FOR_EACH_HPP
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class InputIterator, class Function>
|
||||
struct for_each_kernel : public meta_kernel
|
||||
{
|
||||
for_each_kernel(InputIterator first, InputIterator last, Function function)
|
||||
: meta_kernel("for_each")
|
||||
{
|
||||
// store range size
|
||||
m_count = detail::iterator_range_size(first, last);
|
||||
|
||||
// setup kernel source
|
||||
*this << function(first[get_global_id(0)]) << ";\n";
|
||||
}
|
||||
|
||||
void exec(command_queue &queue)
|
||||
{
|
||||
exec_1d(queue, 0, m_count);
|
||||
}
|
||||
|
||||
size_t m_count;
|
||||
};
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// Calls \p function on each element in the range [\p first, \p last).
|
||||
///
|
||||
/// \see transform()
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
inline UnaryFunction for_each(InputIterator first,
|
||||
InputIterator last,
|
||||
UnaryFunction function,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
detail::for_each_kernel<InputIterator, UnaryFunction> kernel(first, last, function);
|
||||
|
||||
kernel.exec(queue);
|
||||
|
||||
return function;
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_FOR_EACH_HPP
|
||||
@@ -0,0 +1,54 @@
|
||||
// -*- Mode: C++ -*-
|
||||
#ifndef PSK_REPORTER_H
|
||||
#define PSK_REPORTER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QHostAddress>
|
||||
#include <QQueue>
|
||||
#include <QHash>
|
||||
|
||||
class MessageClient;
|
||||
class QTimer;
|
||||
class QHostInfo;
|
||||
|
||||
class PSK_Reporter : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PSK_Reporter(MessageClient *, QObject *parent = nullptr);
|
||||
void setLocalStation(QString call, QString grid, QString antenna, QString programInfo);
|
||||
void addRemoteStation(QString call, QString grid, QString freq, QString mode, QString snr, QString time);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void sendReport();
|
||||
|
||||
private slots:
|
||||
void dnsLookupResult(QHostInfo info);
|
||||
|
||||
private:
|
||||
QString m_header_h;
|
||||
QString m_rxInfoDescriptor_h;
|
||||
QString m_txInfoDescriptor_h;
|
||||
QString m_randomId_h;
|
||||
QString m_linkId_h;
|
||||
|
||||
QString m_rxCall;
|
||||
QString m_rxGrid;
|
||||
QString m_rxAnt;
|
||||
QString m_progId;
|
||||
|
||||
QHostAddress m_pskReporterAddress;
|
||||
|
||||
QQueue< QHash<QString,QString> > m_spotQueue;
|
||||
|
||||
MessageClient * m_messageClient;
|
||||
|
||||
QTimer *reportTimer;
|
||||
|
||||
int m_sequenceNumber;
|
||||
};
|
||||
|
||||
#endif // PSK_REPORTER_H
|
||||
@@ -0,0 +1,114 @@
|
||||
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
|
||||
// Hinnant & John Maddock 2000-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/libs/type_traits for most recent version including documentation.
|
||||
|
||||
|
||||
#ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_CLASS_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/detail/config.hpp>
|
||||
#include <boost/type_traits/intrinsics.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#ifndef BOOST_IS_CLASS
|
||||
# include <boost/type_traits/is_union.hpp>
|
||||
|
||||
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
|
||||
# include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#else
|
||||
# include <boost/type_traits/is_scalar.hpp>
|
||||
# include <boost/type_traits/is_array.hpp>
|
||||
# include <boost/type_traits/is_reference.hpp>
|
||||
# include <boost/type_traits/is_void.hpp>
|
||||
# include <boost/type_traits/is_function.hpp>
|
||||
#endif
|
||||
|
||||
#endif // BOOST_IS_CLASS
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
|
||||
#ifndef BOOST_IS_CLASS
|
||||
#ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
|
||||
|
||||
// This is actually the conforming implementation which works with
|
||||
// abstract classes. However, enough compilers have trouble with
|
||||
// it that most will use the one in
|
||||
// boost/type_traits/object_traits.hpp. This implementation
|
||||
// actually works with VC7.0, but other interactions seem to fail
|
||||
// when we use it.
|
||||
|
||||
// is_class<> metafunction due to Paul Mensonides
|
||||
// (leavings@attbi.com). For more details:
|
||||
// http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1
|
||||
#if defined(__GNUC__) && !defined(__EDG_VERSION__)
|
||||
|
||||
template <class U> ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
|
||||
template <class U> ::boost::type_traits::no_type is_class_tester(...);
|
||||
|
||||
template <typename T>
|
||||
struct is_class_impl
|
||||
{
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
|
||||
&& ! ::boost::is_union<T>::value
|
||||
);
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
struct is_class_impl
|
||||
{
|
||||
template <class U> static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void));
|
||||
template <class U> static ::boost::type_traits::no_type is_class_tester(...);
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
sizeof(is_class_tester<T>(0)) == sizeof(::boost::type_traits::yes_type)
|
||||
&& ! ::boost::is_union<T>::value
|
||||
);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
template <typename T>
|
||||
struct is_class_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
! ::boost::is_union<T>::value >::value
|
||||
&& ! ::boost::is_scalar<T>::value
|
||||
&& ! ::boost::is_array<T>::value
|
||||
&& ! ::boost::is_reference<T>::value
|
||||
&& ! ::boost::is_void<T>::value
|
||||
&& ! ::boost::is_function<T>::value
|
||||
);
|
||||
};
|
||||
|
||||
# endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION
|
||||
# else // BOOST_IS_CLASS
|
||||
template <typename T>
|
||||
struct is_class_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T));
|
||||
};
|
||||
# endif // BOOST_IS_CLASS
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class T> struct is_class : public integral_constant<bool, ::boost::detail::is_class_impl<T>::value> {};
|
||||
# ifdef __EDG_VERSION__
|
||||
template <class T> struct is_class<const T> : public is_class<T>{};
|
||||
template <class T> struct is_class<const volatile T> : public is_class<T>{};
|
||||
template <class T> struct is_class<volatile T> : public is_class<T>{};
|
||||
# endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_CLASS_HPP_INCLUDED
|
||||
@@ -0,0 +1,18 @@
|
||||
// (C) Copyright David Abrahams 2001.
|
||||
// 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_TYPE_DWA20010120_HPP
|
||||
# define BOOST_TYPE_DWA20010120_HPP
|
||||
|
||||
namespace boost {
|
||||
|
||||
// Just a simple "type envelope". Useful in various contexts, mostly to work
|
||||
// around some MSVC deficiencies.
|
||||
template <class T>
|
||||
struct type {};
|
||||
|
||||
}
|
||||
|
||||
#endif // BOOST_TYPE_DWA20010120_HPP
|
||||
@@ -0,0 +1,196 @@
|
||||
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
|
||||
// Copyright (C) 2015 Andrzej Krzemienski.
|
||||
//
|
||||
// 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/libs/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_RELOPS_AJK_03OCT2015_HPP
|
||||
#define BOOST_OPTIONAL_DETAIL_OPTIONAL_RELOPS_AJK_03OCT2015_HPP
|
||||
|
||||
namespace boost {
|
||||
|
||||
// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values).
|
||||
// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead.
|
||||
|
||||
|
||||
//
|
||||
// optional<T> vs optional<T> cases
|
||||
//
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator == ( optional<T> const& x, optional<T> const& y )
|
||||
{ return equal_pointees(x,y); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator < ( optional<T> const& x, optional<T> const& y )
|
||||
{ return less_pointees(x,y); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator != ( optional<T> const& x, optional<T> const& y )
|
||||
{ return !( x == y ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator > ( optional<T> const& x, optional<T> const& y )
|
||||
{ return y < x ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator <= ( optional<T> const& x, optional<T> const& y )
|
||||
{ return !( y < x ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator >= ( optional<T> const& x, optional<T> const& y )
|
||||
{ return !( x < y ) ; }
|
||||
|
||||
|
||||
//
|
||||
// optional<T> vs T cases
|
||||
//
|
||||
template<class T>
|
||||
inline
|
||||
bool operator == ( optional<T> const& x, T const& y )
|
||||
{ return equal_pointees(x, optional<T>(y)); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator < ( optional<T> const& x, T const& y )
|
||||
{ return less_pointees(x, optional<T>(y)); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator != ( optional<T> const& x, T const& y )
|
||||
{ return !( x == y ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator > ( optional<T> const& x, T const& y )
|
||||
{ return y < x ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator <= ( optional<T> const& x, T const& y )
|
||||
{ return !( y < x ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator >= ( optional<T> const& x, T const& y )
|
||||
{ return !( x < y ) ; }
|
||||
|
||||
//
|
||||
// T vs optional<T> cases
|
||||
//
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator == ( T const& x, optional<T> const& y )
|
||||
{ return equal_pointees( optional<T>(x), y ); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator < ( T const& x, optional<T> const& y )
|
||||
{ return less_pointees( optional<T>(x), y ); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator != ( T const& x, optional<T> const& y )
|
||||
{ return !( x == y ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator > ( T const& x, optional<T> const& y )
|
||||
{ return y < x ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator <= ( T const& x, optional<T> const& y )
|
||||
{ return !( y < x ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator >= ( T const& x, optional<T> const& y )
|
||||
{ return !( x < y ) ; }
|
||||
|
||||
|
||||
//
|
||||
// optional<T> vs none cases
|
||||
//
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator == ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
|
||||
{ return !x; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator < ( optional<T> const& x, none_t )
|
||||
{ return less_pointees(x,optional<T>() ); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator != ( optional<T> const& x, none_t ) BOOST_NOEXCEPT
|
||||
{ return bool(x); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator > ( optional<T> const& x, none_t y )
|
||||
{ return y < x ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator <= ( optional<T> const& x, none_t y )
|
||||
{ return !( y < x ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator >= ( optional<T> const& x, none_t y )
|
||||
{ return !( x < y ) ; }
|
||||
|
||||
//
|
||||
// none vs optional<T> cases
|
||||
//
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator == ( none_t , optional<T> const& y ) BOOST_NOEXCEPT
|
||||
{ return !y; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator < ( none_t , optional<T> const& y )
|
||||
{ return less_pointees(optional<T>() ,y); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator != ( none_t, optional<T> const& y ) BOOST_NOEXCEPT
|
||||
{ return bool(y); }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator > ( none_t x, optional<T> const& y )
|
||||
{ return y < x ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator <= ( none_t x, optional<T> const& y )
|
||||
{ return !( y < x ) ; }
|
||||
|
||||
template<class T>
|
||||
inline
|
||||
bool operator >= ( none_t x, optional<T> const& y )
|
||||
{ return !( x < y ) ; }
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // header guard
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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_ITERATION_FINISH_2
|
||||
#
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9
|
||||
# undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10
|
||||
#
|
||||
# if BOOST_PP_SLOT_TEMP_3 == 0
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 1
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 2
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 3
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 4
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 5
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 6
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 7
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 8
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8
|
||||
# elif BOOST_PP_SLOT_TEMP_3 == 9
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_SLOT_TEMP_2 == 0
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 1
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 2
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 3
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 4
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 5
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 6
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 7
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 8
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8
|
||||
# elif BOOST_PP_SLOT_TEMP_2 == 9
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_SLOT_TEMP_1 == 0
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 1
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 2
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 3
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 4
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 5
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 6
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 7
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 8
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8
|
||||
# elif BOOST_PP_SLOT_TEMP_1 == 9
|
||||
# define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9
|
||||
# endif
|
||||
#
|
||||
# if BOOST_PP_ITERATION_FINISH_2_DIGIT_3
|
||||
# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1)
|
||||
# elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2
|
||||
# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1)
|
||||
# else
|
||||
# define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1
|
||||
# endif
|
||||
@@ -0,0 +1,420 @@
|
||||
/* DEC.C - Decoding procedures. */
|
||||
|
||||
/* Copyright (c) 1995-2012 by Radford M. Neal.
|
||||
*
|
||||
* Permission is granted for anyone to copy, use, modify, and distribute
|
||||
* these programs and accompanying documents for any purpose, provided
|
||||
* this copyright notice is retained and prominently displayed, and note
|
||||
* is made of any changes made to these programs. These programs and
|
||||
* documents are distributed without any warranty, express or implied.
|
||||
* As the programs were written for research purposes only, they have not
|
||||
* been tested to the degree that would be advisable in any important
|
||||
* application. All use of these programs is entirely at the user's own
|
||||
* risk.
|
||||
*/
|
||||
|
||||
|
||||
/* NOTE: See decoding.html for general documentation on the decoding methods */
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "alloc.h"
|
||||
#include "mod2sparse.h"
|
||||
#include "mod2dense.h"
|
||||
#include "mod2convert.h"
|
||||
/*#include "rand.h"*/
|
||||
#include "rcode.h"
|
||||
#include "check.h"
|
||||
#include "dec.h"
|
||||
#include "enc.h"
|
||||
|
||||
|
||||
/* GLOBAL VARIABLES. Declared in dec.h. */
|
||||
|
||||
decoding_method dec_method; /* Decoding method to use */
|
||||
|
||||
int ldpc_table; /* Trace option, 2 for a table of decoding details */
|
||||
int block_no; /* Number of current block, from zero */
|
||||
|
||||
int max_iter; /* Maximum number of iteratons of decoding to do */
|
||||
char *gen_file; /* Generator file for Enum_block and Enum_bit */
|
||||
|
||||
|
||||
/* DECODE BY EXHAUSTIVE ENUMERATION. Decodes by trying all possible source
|
||||
messages (and hence all possible codewords, unless the parity check matrix
|
||||
was redundant). If the last argument is 1, it sets dblk to the most likely
|
||||
entire block; if this argument is 0, each bit of dblk is set to the most
|
||||
likely value for that bit. The marginal probabilities of each bit being 1
|
||||
are returned in bitpr.
|
||||
|
||||
The function value returned is the total number of codewords tried (which
|
||||
will be the same for all blocks). The return valued is "unsigned" because
|
||||
it might conceivably be as big as 2^31.
|
||||
|
||||
The parity check matrix and other data are taken from the global variables
|
||||
declared in rcode.h.
|
||||
|
||||
The number of message bits should not be greater than 31 for this procedure.
|
||||
The setup procedure immediately below checks this, reads the generator file,
|
||||
and outputs headers for the detailed trace file, if required.
|
||||
*/
|
||||
|
||||
void enum_decode_setup(void)
|
||||
{
|
||||
read_gen(gen_file,0,0);
|
||||
|
||||
if (N-M>31)
|
||||
{ fprintf(stderr,
|
||||
"Trying to decode messages with %d bits by exhaustive enumeration is absurd!\n",
|
||||
N-M);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ldpc_table==2)
|
||||
{ printf(" block decoding likelihood\n");
|
||||
}
|
||||
}
|
||||
|
||||
unsigned enum_decode
|
||||
( double *lratio, /* Likelihood ratios for bits */
|
||||
char *dblk, /* Place to stored decoded message */
|
||||
double *bitpr, /* Place to store marginal bit probabilities */
|
||||
int max_block /* Maximize probability of whole block being correct? */
|
||||
)
|
||||
{
|
||||
mod2dense *u, *v;
|
||||
double lk, maxlk, tpr;
|
||||
double *bpr, *lk0, *lk1;
|
||||
char sblk[31];
|
||||
char *cblk;
|
||||
unsigned d;
|
||||
int i, j;
|
||||
|
||||
if (N-M>31) abort();
|
||||
|
||||
/* Allocate needed space. */
|
||||
|
||||
bpr = bitpr;
|
||||
if (bpr==0 && max_block==0)
|
||||
{ bpr = chk_alloc (N, sizeof *bpr);
|
||||
}
|
||||
|
||||
cblk = chk_alloc (N, sizeof *cblk);
|
||||
|
||||
if (type=='d')
|
||||
{ u = mod2dense_allocate(N-M,1);
|
||||
v = mod2dense_allocate(M,1);
|
||||
}
|
||||
|
||||
if (type=='m')
|
||||
{ u = mod2dense_allocate(M,1);
|
||||
v = mod2dense_allocate(M,1);
|
||||
}
|
||||
|
||||
lk0 = chk_alloc (N, sizeof *lk0);
|
||||
lk1 = chk_alloc (N, sizeof *lk1);
|
||||
|
||||
/* Pre-compute likelihoods for bits. */
|
||||
|
||||
for (j = 0; j<N; j++)
|
||||
{ lk0[j] = 1/(1+lratio[j]);
|
||||
lk1[j] = 1 - lk0[j];
|
||||
}
|
||||
|
||||
/* Initialize marginal bit probabilities. */
|
||||
|
||||
if (bpr)
|
||||
{ for (j = 0; j<N; j++) bpr[j] = 0.0;
|
||||
}
|
||||
|
||||
/* Exhaustively try all possible decoded messages. */
|
||||
|
||||
tpr = 0.0;
|
||||
|
||||
for (d = 0; d<=(1<<(N-M))-1; d++)
|
||||
{
|
||||
/* Unpack message into source block. */
|
||||
|
||||
for (i = N-M-1; i>=0; i--)
|
||||
{ sblk[i] = (d>>i)&1;
|
||||
}
|
||||
|
||||
/* Find full codeword for this message. */
|
||||
|
||||
switch (type)
|
||||
{ case 's':
|
||||
{ sparse_encode (sblk, cblk);
|
||||
break;
|
||||
}
|
||||
case 'd':
|
||||
{ dense_encode (sblk, cblk, u, v);
|
||||
break;
|
||||
}
|
||||
case 'm':
|
||||
{ mixed_encode (sblk, cblk, u, v);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Compute likelihood for this decoding. */
|
||||
|
||||
lk = 1;
|
||||
for (j = 0; j<N; j++)
|
||||
{ lk *= cblk[j]==0 ? lk0[j] : lk1[j];
|
||||
}
|
||||
|
||||
/* Update maximum likelihood decoding. */
|
||||
|
||||
if (max_block)
|
||||
{ if (d==0 || lk>maxlk)
|
||||
{ for (j = 0; j<N; j++)
|
||||
{ dblk[j] = cblk[j];
|
||||
}
|
||||
maxlk = lk;
|
||||
}
|
||||
}
|
||||
|
||||
/* Update bit probabilities. */
|
||||
|
||||
if (bpr)
|
||||
{ for (j = 0; j<N; j++)
|
||||
{ if (cblk[j]==1)
|
||||
{ bpr[j] += lk;
|
||||
}
|
||||
}
|
||||
tpr += lk;
|
||||
}
|
||||
|
||||
/* Output data to trace file. */
|
||||
|
||||
if (ldpc_table==2)
|
||||
{ printf("%7d %10x %10.4e\n",block_no,d,lk);
|
||||
}
|
||||
}
|
||||
|
||||
/* Normalize bit probabilities. */
|
||||
|
||||
if (bpr)
|
||||
{ for (j = 0; j<N; j++) bpr[j] /= tpr;
|
||||
}
|
||||
|
||||
/* Decoding to maximize bit-by-bit success, if that's what's wanted.
|
||||
In case of a tie, decode to a 1. */
|
||||
|
||||
if (!max_block)
|
||||
{ for (j = 0; j<N; j++)
|
||||
{ dblk[j] = bpr[j]>=0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/* Free space. */
|
||||
|
||||
if (bpr!=0 && bpr!=bitpr) free(bpr);
|
||||
free(cblk);
|
||||
free(lk0);
|
||||
free(lk1);
|
||||
|
||||
return 1<<(N-M);
|
||||
}
|
||||
|
||||
|
||||
/* DECODE USING PROBABILITY PROPAGATION. Tries to find the most probable
|
||||
values for the bits of the codeword, given a parity check matrix (H), and
|
||||
likelihood ratios (lratio) for each bit. If max_iter is positive, up to
|
||||
that many iterations of probability propagation are done, stopping before
|
||||
then if the tentative decoding is a valid codeword. If max_iter is
|
||||
negative, abs(max_iter) iterations are done, regardless of whether a
|
||||
codeword was found earlier.
|
||||
|
||||
Returns the number of iterations done (as an "unsigned" for consistency
|
||||
with enum_decode). Regardless of whether or not a valid codeword was
|
||||
reached, the bit vector from thresholding the bit-by-bit probabilities is
|
||||
stored in dblk, and the resulting parity checks are stored in pchk (all
|
||||
will be zero if the codeword is valid). The final probabilities for each
|
||||
bit being a 1 are stored in bprb.
|
||||
|
||||
The setup procedure immediately below outputs headers for the detailed trace
|
||||
file, if required.
|
||||
*/
|
||||
|
||||
void prprp_decode_setup (void)
|
||||
{
|
||||
if (ldpc_table==2)
|
||||
{ printf(
|
||||
" block iter changed perrs loglik Eperrs Eloglik entropy\n");
|
||||
}
|
||||
}
|
||||
|
||||
unsigned prprp_decode
|
||||
( mod2sparse *H, /* Parity check matrix */
|
||||
double *lratio, /* Likelihood ratios for bits */
|
||||
char *dblk, /* Place to store decoding */
|
||||
char *pchk, /* Place to store parity checks */
|
||||
double *bprb /* Place to store bit probabilities */
|
||||
)
|
||||
{
|
||||
int N, n, c;
|
||||
|
||||
N = mod2sparse_cols(H);
|
||||
|
||||
/* Initialize probability and likelihood ratios, and find initial guess. */
|
||||
|
||||
initprp(H,lratio,dblk,bprb);
|
||||
|
||||
/* Do up to abs(max_iter) iterations of probability propagation, stopping
|
||||
early if a codeword is found, unless max_iter is negative. */
|
||||
|
||||
for (n = 0; ; n++)
|
||||
{
|
||||
c = check(H,dblk,pchk);
|
||||
|
||||
if (ldpc_table==2)
|
||||
{ printf("%7d %5d %8.1f %6d %+9.2f %8.1f %+9.2f %7.1f\n",
|
||||
block_no, n, changed(lratio,dblk,N), c, loglikelihood(lratio,dblk,N),
|
||||
expected_parity_errors(H,bprb), expected_loglikelihood(lratio,bprb,N),
|
||||
entropy(bprb,N));
|
||||
}
|
||||
|
||||
if (n==max_iter || n==-max_iter || (max_iter>0 && c==0))
|
||||
{ break;
|
||||
}
|
||||
|
||||
iterprp(H,lratio,dblk,bprb);
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
/* INITIALIZE PROBABILITY PROPAGATION. Stores initial ratios, probabilities,
|
||||
and guess at decoding. */
|
||||
|
||||
void initprp
|
||||
( mod2sparse *H, /* Parity check matrix */
|
||||
double *lratio, /* Likelihood ratios for bits */
|
||||
char *dblk, /* Place to store decoding */
|
||||
double *bprb /* Place to store bit probabilities, 0 if not wanted */
|
||||
)
|
||||
{
|
||||
mod2entry *e;
|
||||
int N;
|
||||
int j;
|
||||
|
||||
N = mod2sparse_cols(H);
|
||||
|
||||
for (j = 0; j<N; j++)
|
||||
{ for (e = mod2sparse_first_in_col(H,j);
|
||||
!mod2sparse_at_end(e);
|
||||
e = mod2sparse_next_in_col(e))
|
||||
{ e->pr = lratio[j];
|
||||
e->lr = 1;
|
||||
}
|
||||
if (bprb) bprb[j] = 1 - 1/(1+lratio[j]);
|
||||
dblk[j] = lratio[j]>=1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* DO ONE ITERATION OF PROBABILITY PROPAGATION. */
|
||||
|
||||
void iterprp
|
||||
( mod2sparse *H, /* Parity check matrix */
|
||||
double *lratio, /* Likelihood ratios for bits */
|
||||
char *dblk, /* Place to store decoding */
|
||||
double *bprb /* Place to store bit probabilities, 0 if not wanted */
|
||||
)
|
||||
{
|
||||
double pr, dl, t;
|
||||
mod2entry *e;
|
||||
int N, M;
|
||||
int i, j;
|
||||
|
||||
M = mod2sparse_rows(H);
|
||||
N = mod2sparse_cols(H);
|
||||
|
||||
/* Recompute likelihood ratios. */
|
||||
|
||||
for (i = 0; i<M; i++)
|
||||
{ dl = 1;
|
||||
for (e = mod2sparse_first_in_row(H,i);
|
||||
!mod2sparse_at_end(e);
|
||||
e = mod2sparse_next_in_row(e))
|
||||
{ e->lr = dl;
|
||||
dl *= 2/(1+e->pr) - 1;
|
||||
}
|
||||
dl = 1;
|
||||
for (e = mod2sparse_last_in_row(H,i);
|
||||
!mod2sparse_at_end(e);
|
||||
e = mod2sparse_prev_in_row(e))
|
||||
{ t = e->lr * dl;
|
||||
e->lr = (1-t)/(1+t);
|
||||
dl *= 2/(1+e->pr) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Recompute probability ratios. Also find the next guess based on the
|
||||
individually most likely values. */
|
||||
|
||||
for (j = 0; j<N; j++)
|
||||
{ pr = lratio[j];
|
||||
for (e = mod2sparse_first_in_col(H,j);
|
||||
!mod2sparse_at_end(e);
|
||||
e = mod2sparse_next_in_col(e))
|
||||
{ e->pr = pr;
|
||||
pr *= e->lr;
|
||||
}
|
||||
if (isnan(pr))
|
||||
{ pr = 1;
|
||||
}
|
||||
if (bprb) bprb[j] = 1 - 1/(1+pr);
|
||||
dblk[j] = pr>=1;
|
||||
pr = 1;
|
||||
for (e = mod2sparse_last_in_col(H,j);
|
||||
!mod2sparse_at_end(e);
|
||||
e = mod2sparse_prev_in_col(e))
|
||||
{ e->pr *= pr;
|
||||
if (isnan(e->pr))
|
||||
{ e->pr = 1;
|
||||
}
|
||||
pr *= e->lr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ldpc_decode_ ( double lratio[], char decoded[], int *max_iterations, int *niterations, int *max_dither, int *ndither)
|
||||
{
|
||||
int i, j, itry, valid;
|
||||
char dblk[N],pchk[M];
|
||||
double bprb[N],lr[N];
|
||||
float fac;
|
||||
|
||||
max_iter=*max_iterations;
|
||||
srand(-1);
|
||||
for (itry=0; itry< *max_dither; itry++) {
|
||||
for (i=0; i<N; i++) {
|
||||
if( itry == 0 ) {
|
||||
fac=0.0;
|
||||
} else {
|
||||
fac=(rand()%1024-512)/512.0;
|
||||
}
|
||||
lr[i]=lratio[i]*exp(fac);
|
||||
}
|
||||
*niterations = prprp_decode ( H, lr, dblk, pchk, bprb );
|
||||
valid = check( H, dblk, pchk )==0;
|
||||
if( !valid ) {
|
||||
*niterations=-1;
|
||||
} else {
|
||||
j=0;
|
||||
for( i=M; i<N; i++ ) {
|
||||
decoded[j]=dblk[cols[i]];
|
||||
j=j+1;
|
||||
}
|
||||
*ndither=itry;
|
||||
// printf("ldpc_decode %d %d \n",*niterations, *ndither);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
// Copyright (C) 2007 Matthias Troyer
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
//
|
||||
// This file contains helper data structures for use in transmitting
|
||||
// properties. The basic idea is to optimize away any storage for the
|
||||
// properties when no properties are specified.
|
||||
#ifndef BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP
|
||||
#define BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP
|
||||
|
||||
#include <boost/mpi/datatype.hpp>
|
||||
#include <utility> // for std::pair
|
||||
#include <boost/serialization/utility.hpp>
|
||||
|
||||
namespace boost { namespace parallel { namespace detail {
|
||||
|
||||
/**
|
||||
* This structure is like std::pair, with the only difference
|
||||
* that tracking in the serialization library is turned off.
|
||||
*/
|
||||
|
||||
template<typename T, typename U>
|
||||
struct untracked_pair : public std::pair<T,U>
|
||||
{
|
||||
untracked_pair() {}
|
||||
|
||||
untracked_pair(const T& t, const U& u)
|
||||
: std::pair<T,U>(t,u) {}
|
||||
|
||||
template<class T1, class U1>
|
||||
untracked_pair(std::pair<T1,U1> const& p)
|
||||
: std::pair<T,U>(p) {}
|
||||
};
|
||||
|
||||
template<typename T, typename U>
|
||||
inline untracked_pair<T, U>
|
||||
make_untracked_pair(const T& t, const U& u)
|
||||
{
|
||||
return untracked_pair<T,U>(t,u);
|
||||
}
|
||||
|
||||
} } } // end namespace boost::parallel::detail
|
||||
|
||||
namespace boost { namespace mpi {
|
||||
|
||||
template<typename T, typename U>
|
||||
struct is_mpi_datatype<boost::parallel::detail::untracked_pair<T, U> >
|
||||
: is_mpi_datatype<std::pair<T,U> > {};
|
||||
|
||||
} } // end namespace boost::mpi
|
||||
|
||||
namespace boost { namespace serialization {
|
||||
|
||||
// pair
|
||||
template<class Archive, class F, class S>
|
||||
inline void serialize(
|
||||
Archive & ar,
|
||||
boost::parallel::detail::untracked_pair<F, S> & p,
|
||||
const unsigned int /* file_version */
|
||||
){
|
||||
ar & boost::serialization::make_nvp("first", p.first);
|
||||
ar & boost::serialization::make_nvp("second", p.second);
|
||||
}
|
||||
|
||||
template<typename T, typename U>
|
||||
struct is_bitwise_serializable<
|
||||
boost::parallel::detail::untracked_pair<T, U> >
|
||||
: is_bitwise_serializable<std::pair<T, U> > {};
|
||||
|
||||
template<typename T, typename U>
|
||||
struct implementation_level<boost::parallel::detail::untracked_pair<T, U> >
|
||||
: mpl::int_<object_serializable> {} ;
|
||||
|
||||
template<typename T, typename U>
|
||||
struct tracking_level<boost::parallel::detail::untracked_pair<T, U> >
|
||||
: mpl::int_<track_never> {} ;
|
||||
|
||||
} } // end namespace boost::serialization
|
||||
|
||||
#endif // BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef SPLASH_SCREEN_HPP___
|
||||
#define SPLASH_SCREEN_HPP___
|
||||
|
||||
#include <QSplashScreen>
|
||||
|
||||
#include "pimpl_h.hpp"
|
||||
|
||||
class SplashScreen final
|
||||
: public QSplashScreen
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SplashScreen ();
|
||||
~SplashScreen ();
|
||||
|
||||
Q_SIGNAL void disabled ();
|
||||
|
||||
private:
|
||||
class impl;
|
||||
pimpl<impl> m_;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,227 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_ITERATOR_TRANSFORM_ITERATOR_HPP
|
||||
#define BOOST_COMPUTE_ITERATOR_TRANSFORM_ITERATOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
|
||||
#include <boost/compute/functional.hpp>
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/detail/is_buffer_iterator.hpp>
|
||||
#include <boost/compute/detail/read_write_single_value.hpp>
|
||||
#include <boost/compute/iterator/detail/get_base_iterator_buffer.hpp>
|
||||
#include <boost/compute/type_traits/is_device_iterator.hpp>
|
||||
#include <boost/compute/type_traits/result_of.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
// forward declaration for transform_iterator
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
class transform_iterator;
|
||||
|
||||
namespace detail {
|
||||
|
||||
// meta-function returning the value_type for a transform_iterator
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
struct make_transform_iterator_value_type
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator>::value_type value_type;
|
||||
|
||||
typedef typename boost::compute::result_of<UnaryFunction(value_type)>::type type;
|
||||
};
|
||||
|
||||
// helper class which defines the iterator_adaptor super-class
|
||||
// type for transform_iterator
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
class transform_iterator_base
|
||||
{
|
||||
public:
|
||||
typedef ::boost::iterator_adaptor<
|
||||
::boost::compute::transform_iterator<InputIterator, UnaryFunction>,
|
||||
InputIterator,
|
||||
typename make_transform_iterator_value_type<InputIterator, UnaryFunction>::type,
|
||||
typename std::iterator_traits<InputIterator>::iterator_category,
|
||||
typename make_transform_iterator_value_type<InputIterator, UnaryFunction>::type
|
||||
> type;
|
||||
};
|
||||
|
||||
template<class InputIterator, class UnaryFunction, class IndexExpr>
|
||||
struct transform_iterator_index_expr
|
||||
{
|
||||
typedef typename
|
||||
make_transform_iterator_value_type<
|
||||
InputIterator,
|
||||
UnaryFunction
|
||||
>::type result_type;
|
||||
|
||||
transform_iterator_index_expr(const InputIterator &input_iter,
|
||||
const UnaryFunction &transform_expr,
|
||||
const IndexExpr &index_expr)
|
||||
: m_input_iter(input_iter),
|
||||
m_transform_expr(transform_expr),
|
||||
m_index_expr(index_expr)
|
||||
{
|
||||
}
|
||||
|
||||
InputIterator m_input_iter;
|
||||
UnaryFunction m_transform_expr;
|
||||
IndexExpr m_index_expr;
|
||||
};
|
||||
|
||||
template<class InputIterator, class UnaryFunction, class IndexExpr>
|
||||
inline meta_kernel& operator<<(meta_kernel &kernel,
|
||||
const transform_iterator_index_expr<InputIterator,
|
||||
UnaryFunction,
|
||||
IndexExpr> &expr)
|
||||
{
|
||||
return kernel << expr.m_transform_expr(expr.m_input_iter[expr.m_index_expr]);
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// \class transform_iterator
|
||||
/// \brief A transform iterator adaptor.
|
||||
///
|
||||
/// The transform_iterator adaptor applies a unary function to each element
|
||||
/// produced from the underlying iterator when dereferenced.
|
||||
///
|
||||
/// For example, to copy from an input range to an output range while taking
|
||||
/// the absolute value of each element:
|
||||
///
|
||||
/// \snippet test/test_transform_iterator.cpp copy_abs
|
||||
///
|
||||
/// \see buffer_iterator, make_transform_iterator()
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
class transform_iterator :
|
||||
public detail::transform_iterator_base<InputIterator, UnaryFunction>::type
|
||||
{
|
||||
public:
|
||||
typedef typename
|
||||
detail::transform_iterator_base<InputIterator,
|
||||
UnaryFunction>::type super_type;
|
||||
typedef typename super_type::value_type value_type;
|
||||
typedef typename super_type::reference reference;
|
||||
typedef typename super_type::base_type base_type;
|
||||
typedef typename super_type::difference_type difference_type;
|
||||
typedef UnaryFunction unary_function;
|
||||
|
||||
transform_iterator(InputIterator iterator, UnaryFunction transform)
|
||||
: super_type(iterator),
|
||||
m_transform(transform)
|
||||
{
|
||||
}
|
||||
|
||||
transform_iterator(const transform_iterator<InputIterator,
|
||||
UnaryFunction> &other)
|
||||
: super_type(other.base()),
|
||||
m_transform(other.m_transform)
|
||||
{
|
||||
}
|
||||
|
||||
transform_iterator<InputIterator, UnaryFunction>&
|
||||
operator=(const transform_iterator<InputIterator,
|
||||
UnaryFunction> &other)
|
||||
{
|
||||
if(this != &other){
|
||||
super_type::operator=(other);
|
||||
|
||||
m_transform = other.m_transform;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
~transform_iterator()
|
||||
{
|
||||
}
|
||||
|
||||
size_t get_index() const
|
||||
{
|
||||
return super_type::base().get_index();
|
||||
}
|
||||
|
||||
const buffer& get_buffer() const
|
||||
{
|
||||
return detail::get_base_iterator_buffer(*this);
|
||||
}
|
||||
|
||||
template<class IndexExpression>
|
||||
detail::transform_iterator_index_expr<InputIterator, UnaryFunction, IndexExpression>
|
||||
operator[](const IndexExpression &expr) const
|
||||
{
|
||||
return detail::transform_iterator_index_expr<InputIterator,
|
||||
UnaryFunction,
|
||||
IndexExpression>(super_type::base(),
|
||||
m_transform,
|
||||
expr);
|
||||
}
|
||||
|
||||
private:
|
||||
friend class ::boost::iterator_core_access;
|
||||
|
||||
reference dereference() const
|
||||
{
|
||||
const context &context = super_type::base().get_buffer().get_context();
|
||||
command_queue queue(context, context.get_device());
|
||||
|
||||
detail::meta_kernel k("read");
|
||||
size_t output_arg = k.add_arg<value_type *>(memory_object::global_memory, "output");
|
||||
k << "*output = " << m_transform(super_type::base()[k.lit(0)]) << ";";
|
||||
|
||||
kernel kernel = k.compile(context);
|
||||
|
||||
buffer output_buffer(context, sizeof(value_type));
|
||||
|
||||
kernel.set_arg(output_arg, output_buffer);
|
||||
|
||||
queue.enqueue_task(kernel);
|
||||
|
||||
return detail::read_single_value<value_type>(output_buffer, queue);
|
||||
}
|
||||
|
||||
private:
|
||||
UnaryFunction m_transform;
|
||||
};
|
||||
|
||||
/// Returns a transform_iterator for \p iterator with \p transform.
|
||||
///
|
||||
/// \param iterator the underlying iterator
|
||||
/// \param transform the unary transform function
|
||||
///
|
||||
/// \return a \c transform_iterator for \p iterator with \p transform
|
||||
///
|
||||
/// For example, to create an iterator which returns the square-root of each
|
||||
/// value in a \c vector<int>:
|
||||
/// \code
|
||||
/// auto sqrt_iterator = make_transform_iterator(vec.begin(), sqrt<int>());
|
||||
/// \endcode
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
inline transform_iterator<InputIterator, UnaryFunction>
|
||||
make_transform_iterator(InputIterator iterator, UnaryFunction transform)
|
||||
{
|
||||
return transform_iterator<InputIterator,
|
||||
UnaryFunction>(iterator, transform);
|
||||
}
|
||||
|
||||
/// \internal_ (is_device_iterator specialization for transform_iterator)
|
||||
template<class InputIterator, class UnaryFunction>
|
||||
struct is_device_iterator<
|
||||
transform_iterator<InputIterator, UnaryFunction> > : boost::true_type {};
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ITERATOR_TRANSFORM_ITERATOR_HPP
|
||||
@@ -0,0 +1,142 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2002-2003 Joel de Guzman
|
||||
Copyright (c) 2002-2003 Hartmut Kaiser
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
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)
|
||||
=============================================================================*/
|
||||
#if !defined(BOOST_SPIRIT_SUBRULE_IPP)
|
||||
#define BOOST_SPIRIT_SUBRULE_IPP
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
template <typename FirstT, typename RestT>
|
||||
struct subrule_list;
|
||||
|
||||
template <int ID, typename DefT, typename ContextT>
|
||||
struct subrule_parser;
|
||||
|
||||
namespace impl {
|
||||
|
||||
|
||||
template <int N, typename ListT>
|
||||
struct get_subrule
|
||||
{
|
||||
// First case. ListT is non-empty but the list's
|
||||
// first item does not have the ID we are looking for.
|
||||
|
||||
typedef typename get_subrule<N, typename ListT::rest_t>::type type;
|
||||
};
|
||||
|
||||
template <int ID, typename DefT, typename ContextT, typename RestT>
|
||||
struct get_subrule<
|
||||
ID,
|
||||
subrule_list<
|
||||
subrule_parser<ID, DefT, ContextT>,
|
||||
RestT> >
|
||||
{
|
||||
// Second case. ListT is non-empty and the list's
|
||||
// first item has the ID we are looking for.
|
||||
|
||||
typedef DefT type;
|
||||
};
|
||||
|
||||
template <int ID>
|
||||
struct get_subrule<ID, nil_t>
|
||||
{
|
||||
// Third case. ListT is empty
|
||||
typedef nil_t type;
|
||||
};
|
||||
|
||||
|
||||
template <typename T1, typename T2>
|
||||
struct get_result_t {
|
||||
|
||||
// If the result type dictated by the context is nil_t (no closures
|
||||
// present), then the whole subrule_parser return type is equal to
|
||||
// the return type of the right hand side of this subrule_parser,
|
||||
// otherwise it is equal to the dictated return value.
|
||||
|
||||
typedef typename mpl::if_<
|
||||
boost::is_same<T1, nil_t>, T2, T1
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <int ID, typename ScannerT, typename ContextResultT>
|
||||
struct get_subrule_result
|
||||
{
|
||||
typedef typename
|
||||
impl::get_subrule<ID, typename ScannerT::list_t>::type
|
||||
parser_t;
|
||||
|
||||
typedef typename parser_result<parser_t, ScannerT>::type
|
||||
def_result_t;
|
||||
|
||||
typedef typename match_result<ScannerT, ContextResultT>::type
|
||||
context_result_t;
|
||||
|
||||
typedef typename get_result_t<context_result_t, def_result_t>::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename DefT, typename ScannerT, typename ContextResultT>
|
||||
struct get_subrule_parser_result
|
||||
{
|
||||
typedef typename parser_result<DefT, ScannerT>::type
|
||||
def_result_t;
|
||||
|
||||
typedef typename match_result<ScannerT, ContextResultT>::type
|
||||
context_result_t;
|
||||
|
||||
typedef typename get_result_t<context_result_t, def_result_t>::type
|
||||
type;
|
||||
};
|
||||
|
||||
template <typename SubruleT, int ID>
|
||||
struct same_subrule_id
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = (SubruleT::id == ID));
|
||||
};
|
||||
|
||||
template <typename RT, typename ScannerT, int ID>
|
||||
struct parse_subrule
|
||||
{
|
||||
template <typename ListT>
|
||||
static void
|
||||
do_parse(RT& r, ScannerT const& scan, ListT const& list, mpl::true_)
|
||||
{
|
||||
r = list.first.rhs.parse(scan);
|
||||
}
|
||||
|
||||
template <typename ListT>
|
||||
static void
|
||||
do_parse(RT& r, ScannerT const& scan, ListT const& list, mpl::false_)
|
||||
{
|
||||
typedef typename ListT::rest_t::first_t subrule_t;
|
||||
mpl::bool_<same_subrule_id<subrule_t, ID>::value> same_id;
|
||||
do_parse(r, scan, list.rest, same_id);
|
||||
}
|
||||
|
||||
static void
|
||||
do_(RT& r, ScannerT const& scan)
|
||||
{
|
||||
typedef typename ScannerT::list_t::first_t subrule_t;
|
||||
mpl::bool_<same_subrule_id<subrule_t, ID>::value> same_id;
|
||||
do_parse(r, scan, scan.list, same_id);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace boost::spirit::impl
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_DETAIL_ITERATOR_PLUS_DISTANCE_HPP
|
||||
#define BOOST_COMPUTE_DETAIL_ITERATOR_PLUS_DISTANCE_HPP
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class Iterator, class Distance, class Tag>
|
||||
inline Iterator iterator_plus_distance(Iterator i, Distance n, Tag)
|
||||
{
|
||||
while(n--){ i++; }
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
template<class Iterator, class Distance>
|
||||
inline Iterator iterator_plus_distance(Iterator i,
|
||||
Distance n,
|
||||
std::random_access_iterator_tag)
|
||||
{
|
||||
typedef typename
|
||||
std::iterator_traits<Iterator>::difference_type difference_type;
|
||||
|
||||
return i + static_cast<difference_type>(n);
|
||||
}
|
||||
|
||||
// similar to std::advance() except returns the advanced iterator and
|
||||
// also works with iterators that don't define difference_type
|
||||
template<class Iterator, class Distance>
|
||||
inline Iterator iterator_plus_distance(Iterator i, Distance n)
|
||||
{
|
||||
typedef typename std::iterator_traits<Iterator>::iterator_category tag;
|
||||
|
||||
return iterator_plus_distance(i, n, tag());
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_DETAIL_ITERATOR_PLUS_DISTANCE_HPP
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 34 KiB |
@@ -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
|
||||
@@ -0,0 +1,37 @@
|
||||
// Copyright (C) 2005 Arkadiy Vertleyb
|
||||
// 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_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
|
||||
#define BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TYPEOF_class_BOOST_TYPEOF (class)
|
||||
#define BOOST_TYPEOF_typename_BOOST_TYPEOF (typename)
|
||||
|
||||
#define BOOST_TYPEOF_MAKE_OBJ_class BOOST_TYPEOF_TYPE_PARAM
|
||||
#define BOOST_TYPEOF_MAKE_OBJ_typename BOOST_TYPEOF_TYPE_PARAM
|
||||
|
||||
#define BOOST_TYPEOF_TYPE_PARAM\
|
||||
(TYPE_PARAM)
|
||||
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_EXPANDTYPE(Param) class
|
||||
|
||||
// TYPE_PARAM "virtual functions" implementation
|
||||
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_ENCODE(This, n)\
|
||||
typedef typename boost::type_of::encode_type<\
|
||||
BOOST_PP_CAT(V, n),\
|
||||
BOOST_PP_CAT(P, n)\
|
||||
>::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
|
||||
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_DECODE(This, n)\
|
||||
typedef boost::type_of::decode_type< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
|
||||
typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
|
||||
typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
|
||||
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_PLACEHOLDER(Param) int
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_DECLARATION_TYPE(Param) class
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_PLACEHOLDER_TYPES(Param, n) BOOST_PP_CAT(T,n)
|
||||
#define BOOST_TYPEOF_TYPE_PARAM_ISTEMPLATE 0
|
||||
|
||||
#endif//BOOST_TYPEOF_TYPE_TEMPLATE_PARAM_HPP_INCLUDED
|
||||
@@ -0,0 +1,478 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
struct fusion_sequence_tag;
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
|
||||
struct map : sequence_base<map<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> >
|
||||
{
|
||||
struct category : random_access_traversal_tag, associative_tag {};
|
||||
typedef map_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
typedef vector<
|
||||
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39>
|
||||
storage_type;
|
||||
typedef typename storage_type::size size;
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map()
|
||||
: data() {}
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(map const& rhs)
|
||||
: data(rhs.data) {}
|
||||
template <typename Sequence>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(Sequence const& rhs)
|
||||
: data(rhs) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
map(typename detail::call_param<T0 >::type arg0)
|
||||
: data(arg0) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
map(U0 && arg0
|
||||
|
||||
# if defined(BOOST_MSVC) && (BOOST_MSVC == 1700)
|
||||
, typename enable_if<is_same<U0, T0> >::type* = 0
|
||||
# endif
|
||||
)
|
||||
: data(std::forward<U0>( arg0)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1)
|
||||
: data(arg0 , arg1) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2)
|
||||
: data(arg0 , arg1 , arg2) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3)
|
||||
: data(arg0 , arg1 , arg2 , arg3) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34 , typename detail::call_param<T35 >::type arg35)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34 , arg35) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34) , std::forward<U35>( arg35)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34 , typename detail::call_param<T35 >::type arg35 , typename detail::call_param<T36 >::type arg36)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34 , arg35 , arg36) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34) , std::forward<U35>( arg35) , std::forward<U36>( arg36)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34 , typename detail::call_param<T35 >::type arg35 , typename detail::call_param<T36 >::type arg36 , typename detail::call_param<T37 >::type arg37)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34 , arg35 , arg36 , arg37) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34) , std::forward<U35>( arg35) , std::forward<U36>( arg36) , std::forward<U37>( arg37)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34 , typename detail::call_param<T35 >::type arg35 , typename detail::call_param<T36 >::type arg36 , typename detail::call_param<T37 >::type arg37 , typename detail::call_param<T38 >::type arg38)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34 , arg35 , arg36 , arg37 , arg38) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34) , std::forward<U35>( arg35) , std::forward<U36>( arg36) , std::forward<U37>( arg37) , std::forward<U38>( arg38)) {}
|
||||
# endif
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29 , typename detail::call_param<T30 >::type arg30 , typename detail::call_param<T31 >::type arg31 , typename detail::call_param<T32 >::type arg32 , typename detail::call_param<T33 >::type arg33 , typename detail::call_param<T34 >::type arg34 , typename detail::call_param<T35 >::type arg35 , typename detail::call_param<T36 >::type arg36 , typename detail::call_param<T37 >::type arg37 , typename detail::call_param<T38 >::type arg38 , typename detail::call_param<T39 >::type arg39)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23 , arg24 , arg25 , arg26 , arg27 , arg28 , arg29 , arg30 , arg31 , arg32 , arg33 , arg34 , arg35 , arg36 , arg37 , arg38 , arg39) {}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
map(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39
|
||||
)
|
||||
: data(std::forward<U0>( arg0) , std::forward<U1>( arg1) , std::forward<U2>( arg2) , std::forward<U3>( arg3) , std::forward<U4>( arg4) , std::forward<U5>( arg5) , std::forward<U6>( arg6) , std::forward<U7>( arg7) , std::forward<U8>( arg8) , std::forward<U9>( arg9) , std::forward<U10>( arg10) , std::forward<U11>( arg11) , std::forward<U12>( arg12) , std::forward<U13>( arg13) , std::forward<U14>( arg14) , std::forward<U15>( arg15) , std::forward<U16>( arg16) , std::forward<U17>( arg17) , std::forward<U18>( arg18) , std::forward<U19>( arg19) , std::forward<U20>( arg20) , std::forward<U21>( arg21) , std::forward<U22>( arg22) , std::forward<U23>( arg23) , std::forward<U24>( arg24) , std::forward<U25>( arg25) , std::forward<U26>( arg26) , std::forward<U27>( arg27) , std::forward<U28>( arg28) , std::forward<U29>( arg29) , std::forward<U30>( arg30) , std::forward<U31>( arg31) , std::forward<U32>( arg32) , std::forward<U33>( arg33) , std::forward<U34>( arg34) , std::forward<U35>( arg35) , std::forward<U36>( arg36) , std::forward<U37>( arg37) , std::forward<U38>( arg38) , std::forward<U39>( arg39)) {}
|
||||
# endif
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map& operator=(T const& rhs)
|
||||
{
|
||||
data = rhs;
|
||||
return *this;
|
||||
}
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map& operator=(map const& rhs)
|
||||
{
|
||||
data = rhs.data;
|
||||
return *this;
|
||||
}
|
||||
# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map(map&& rhs)
|
||||
: data(std::move(rhs.data)) {}
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map& operator=(T&& rhs)
|
||||
{
|
||||
data = std::forward<T>( rhs);
|
||||
return *this;
|
||||
}
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map& operator=(map&& rhs)
|
||||
{
|
||||
data = std::move(rhs.data);
|
||||
return *this;
|
||||
}
|
||||
# endif
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
storage_type& get_data() { return data; }
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
storage_type const& get_data() const { return data; }
|
||||
private:
|
||||
storage_type data;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,119 @@
|
||||
// Boost string_algo library formatter.hpp header file ---------------------------//
|
||||
|
||||
// Copyright Pavol Droba 2002-2003.
|
||||
//
|
||||
// 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 updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_STRING_FORMATTER_DETAIL_HPP
|
||||
#define BOOST_STRING_FORMATTER_DETAIL_HPP
|
||||
|
||||
|
||||
#include <boost/range/iterator_range_core.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
|
||||
#include <boost/algorithm/string/detail/util.hpp>
|
||||
|
||||
// generic replace functors -----------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
namespace algorithm {
|
||||
namespace detail {
|
||||
|
||||
// const format functor ----------------------------------------------------//
|
||||
|
||||
// constant format functor
|
||||
template<typename RangeT>
|
||||
struct const_formatF
|
||||
{
|
||||
private:
|
||||
typedef BOOST_STRING_TYPENAME
|
||||
range_const_iterator<RangeT>::type format_iterator;
|
||||
typedef iterator_range<format_iterator> result_type;
|
||||
|
||||
public:
|
||||
// Construction
|
||||
const_formatF(const RangeT& Format) :
|
||||
m_Format(::boost::begin(Format), ::boost::end(Format)) {}
|
||||
|
||||
// Operation
|
||||
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
||||
template<typename Range2T>
|
||||
result_type& operator()(const Range2T&)
|
||||
{
|
||||
return m_Format;
|
||||
}
|
||||
#endif
|
||||
|
||||
template<typename Range2T>
|
||||
const result_type& operator()(const Range2T&) const
|
||||
{
|
||||
return m_Format;
|
||||
}
|
||||
|
||||
private:
|
||||
result_type m_Format;
|
||||
};
|
||||
|
||||
// identity format functor ----------------------------------------------------//
|
||||
|
||||
// identity format functor
|
||||
template<typename RangeT>
|
||||
struct identity_formatF
|
||||
{
|
||||
// Operation
|
||||
template< typename Range2T >
|
||||
const RangeT& operator()(const Range2T& Replace) const
|
||||
{
|
||||
return RangeT(::boost::begin(Replace), ::boost::end(Replace));
|
||||
}
|
||||
};
|
||||
|
||||
// empty format functor ( used by erase ) ------------------------------------//
|
||||
|
||||
// empty format functor
|
||||
template< typename CharT >
|
||||
struct empty_formatF
|
||||
{
|
||||
template< typename ReplaceT >
|
||||
empty_container<CharT> operator()(const ReplaceT&) const
|
||||
{
|
||||
return empty_container<CharT>();
|
||||
}
|
||||
};
|
||||
|
||||
// dissect format functor ----------------------------------------------------//
|
||||
|
||||
// dissect format functor
|
||||
template<typename FinderT>
|
||||
struct dissect_formatF
|
||||
{
|
||||
public:
|
||||
// Construction
|
||||
dissect_formatF(FinderT Finder) :
|
||||
m_Finder(Finder) {}
|
||||
|
||||
// Operation
|
||||
template<typename RangeT>
|
||||
inline iterator_range<
|
||||
BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type>
|
||||
operator()(const RangeT& Replace) const
|
||||
{
|
||||
return m_Finder(::boost::begin(Replace), ::boost::end(Replace));
|
||||
}
|
||||
|
||||
private:
|
||||
FinderT m_Finder;
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
} // namespace algorithm
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_STRING_FORMATTER_DETAIL_HPP
|
||||
@@ -0,0 +1,242 @@
|
||||
// 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)
|
||||
// (C) Copyright 2008 Anthony Williams
|
||||
#ifndef THREAD_HEAP_ALLOC_PTHREAD_HPP
|
||||
#define THREAD_HEAP_ALLOC_PTHREAD_HPP
|
||||
|
||||
#include <boost/config/abi_prefix.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename T>
|
||||
inline T* heap_new()
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template<typename T,typename A1>
|
||||
inline T* heap_new(A1&& a1)
|
||||
{
|
||||
return new T(static_cast<A1&&>(a1));
|
||||
}
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new(A1&& a1,A2&& a2)
|
||||
{
|
||||
return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2));
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1&& a1,A2&& a2,A3&& a3)
|
||||
{
|
||||
return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
|
||||
static_cast<A3&&>(a3));
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1&& a1,A2&& a2,A3&& a3,A4&& a4)
|
||||
{
|
||||
return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
|
||||
static_cast<A3&&>(a3),static_cast<A4&&>(a4));
|
||||
}
|
||||
#else
|
||||
template<typename T,typename A1>
|
||||
inline T* heap_new_impl(A1 a1)
|
||||
{
|
||||
return new T(a1);
|
||||
}
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new_impl(A1 a1,A2 a2)
|
||||
{
|
||||
return new T(a1,a2);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new_impl(A1 a1,A2 a2,A3 a3)
|
||||
{
|
||||
return new T(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4)
|
||||
{
|
||||
return new T(a1,a2,a3,a4);
|
||||
}
|
||||
|
||||
template<typename T,typename A1>
|
||||
inline T* heap_new(A1 const& a1)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&>(a1);
|
||||
}
|
||||
template<typename T,typename A1>
|
||||
inline T* heap_new(A1& a1)
|
||||
{
|
||||
return heap_new_impl<T,A1&>(a1);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&>(a1,a2);
|
||||
}
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new(A1& a1,A2 const& a2)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&>(a1,a2);
|
||||
}
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new(A1 const& a1,A2& a2)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&>(a1,a2);
|
||||
}
|
||||
template<typename T,typename A1,typename A2>
|
||||
inline T* heap_new(A1& a1,A2& a2)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&>(a1,a2);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3 const&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3 const&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3 const&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3 const& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3 const&>(a1,a2,a3);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3&>(a1,a2,a3);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3& a3)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3&>(a1,a2,a3);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3& a3,A4 const& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1 const&,A2&,A3&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
template<typename T,typename A1,typename A2,typename A3,typename A4>
|
||||
inline T* heap_new(A1& a1,A2& a2,A3& a3,A4& a4)
|
||||
{
|
||||
return heap_new_impl<T,A1&,A2&,A3&,A4&>(a1,a2,a3,a4);
|
||||
}
|
||||
|
||||
#endif
|
||||
template<typename T>
|
||||
inline void heap_delete(T* data)
|
||||
{
|
||||
delete data;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
struct do_heap_delete
|
||||
{
|
||||
void operator()(T* data) const
|
||||
{
|
||||
detail::heap_delete(data);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#include <boost/config/abi_suffix.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,102 @@
|
||||
|
||||
// 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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/not_equal_to.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
|
||||
>
|
||||
struct not_equal_to_impl
|
||||
: if_c<
|
||||
( tag1_ > tag2_ )
|
||||
, aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct not_equal_to_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct not_equal_to_impl< na,integral_c_tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct not_equal_to_impl< integral_c_tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct not_equal_to_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct not_equal_to
|
||||
: aux::msvc_eti_base< typename apply_wrap2<
|
||||
not_equal_to_impl<
|
||||
typename not_equal_to_tag<N1>::type
|
||||
, typename not_equal_to_tag<N2>::type
|
||||
>
|
||||
, N1
|
||||
, N2
|
||||
>::type >::type
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct not_equal_to_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
( BOOST_MPL_AUX_VALUE_WKND(N1)::value !=
|
||||
BOOST_MPL_AUX_VALUE_WKND(N2)::value )
|
||||
);
|
||||
typedef bool_<value> type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*=============================================================================
|
||||
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_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM)
|
||||
#define BOOST_FUSION_SINGLE_VIEW_PRIOR_IMPL_JUL_07_2011_1348PM
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/prior.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct single_view_iterator_tag;
|
||||
|
||||
template <typename Sequence, typename Pos>
|
||||
struct single_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct prior_impl;
|
||||
|
||||
template <>
|
||||
struct prior_impl<single_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef single_view_iterator<
|
||||
typename Iterator::single_view_type,
|
||||
typename mpl::prior<typename Iterator::position>::type>
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
return type(i.view);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,206 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005-2013 Joel de Guzman
|
||||
|
||||
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_MAP_IMPL_02032013_2233)
|
||||
#define BOOST_FUSION_MAP_IMPL_02032013_2233
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/iterator/deref.hpp>
|
||||
#include <boost/fusion/iterator/next.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
}}
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
struct map_impl_from_iterator {};
|
||||
|
||||
template <int index, typename ...T>
|
||||
struct map_impl;
|
||||
|
||||
template <int index_>
|
||||
struct map_impl<index_>
|
||||
{
|
||||
typedef fusion_sequence_tag tag;
|
||||
static int const index = index_;
|
||||
static int const size = 0;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl() BOOST_NOEXCEPT {}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(Iterator const&, map_impl_from_iterator) BOOST_NOEXCEPT
|
||||
{}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
void assign(Iterator const&, map_impl_from_iterator) BOOST_NOEXCEPT
|
||||
{}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
void get();
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
void get_val();
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
void get_key();
|
||||
};
|
||||
|
||||
template <int index_, typename Pair, typename ...T>
|
||||
struct map_impl<index_, Pair, T...> : map_impl<index_ + 1, T...>
|
||||
{
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef map_impl<index_+1, T...> rest_type;
|
||||
|
||||
using rest_type::get;
|
||||
using rest_type::get_val;
|
||||
using rest_type::get_key;
|
||||
|
||||
static int const index = index_;
|
||||
static int const size = rest_type::size + 1;
|
||||
|
||||
typedef Pair pair_type;
|
||||
typedef typename Pair::first_type key_type;
|
||||
typedef typename Pair::second_type value_type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl()
|
||||
: rest_type(), element()
|
||||
{}
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(map_impl const& rhs)
|
||||
: rest_type(rhs.get_base()), element(rhs.element)
|
||||
{}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(map_impl&& rhs)
|
||||
: rest_type(BOOST_FUSION_FWD_ELEM(rest_type, *static_cast<rest_type*>(&rhs)))
|
||||
, element(BOOST_FUSION_FWD_ELEM(Pair, rhs.element))
|
||||
{}
|
||||
|
||||
template <typename ...U>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(map_impl<index, U...> const& rhs)
|
||||
: rest_type(rhs.get_base()), element(rhs.element)
|
||||
{}
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(typename detail::call_param<Pair>::type element_
|
||||
, typename detail::call_param<T>::type... rest)
|
||||
: rest_type(rest...), element(element_)
|
||||
{}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(Pair&& element_, T&&... rest)
|
||||
: rest_type(BOOST_FUSION_FWD_ELEM(T, rest)...)
|
||||
, element(BOOST_FUSION_FWD_ELEM(Pair, element_))
|
||||
{}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl(Iterator const& iter, map_impl_from_iterator fi)
|
||||
: rest_type(fusion::next(iter), fi)
|
||||
, element(*iter)
|
||||
{}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
rest_type& get_base()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
rest_type const& get_base() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
value_type get_val(mpl::identity<key_type>);
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
pair_type get_val(mpl::int_<index>);
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
value_type get_val(mpl::identity<key_type>) const;
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
pair_type get_val(mpl::int_<index>) const;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
mpl::identity<key_type> get_key(mpl::int_<index>);
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
mpl::identity<key_type> get_key(mpl::int_<index>) const;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename cref_result<value_type>::type
|
||||
get(mpl::identity<key_type>) const
|
||||
{
|
||||
return element.second;
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename ref_result<value_type>::type
|
||||
get(mpl::identity<key_type>)
|
||||
{
|
||||
return element.second;
|
||||
}
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename cref_result<pair_type>::type
|
||||
get(mpl::int_<index>) const
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename ref_result<pair_type>::type
|
||||
get(mpl::int_<index>)
|
||||
{
|
||||
return element;
|
||||
}
|
||||
|
||||
template <typename ...U>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl& operator=(map_impl<index, U...> const& rhs)
|
||||
{
|
||||
rest_type::operator=(rhs);
|
||||
element = rhs.element;
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl& operator=(map_impl const& rhs)
|
||||
{
|
||||
rest_type::operator=(rhs);
|
||||
element = rhs.element;
|
||||
return *this;
|
||||
}
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
map_impl& operator=(map_impl&& rhs)
|
||||
{
|
||||
rest_type::operator=(std::forward<map_impl>(rhs));
|
||||
element = BOOST_FUSION_FWD_ELEM(Pair, rhs.element);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
void assign(Iterator const& iter, map_impl_from_iterator fi)
|
||||
{
|
||||
rest_type::assign(fusion::next(iter), fi);
|
||||
element = *iter;
|
||||
}
|
||||
|
||||
Pair element;
|
||||
};
|
||||
}}}
|
||||
|
||||
#endif
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.9 KiB |
@@ -0,0 +1,933 @@
|
||||
/*
|
||||
* 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)
|
||||
*
|
||||
* Copyright (c) 2009 Helge Bahmann
|
||||
* Copyright (c) 2012 Tim Blechmann
|
||||
* Copyright (c) 2014 Andrey Semashev
|
||||
*/
|
||||
/*!
|
||||
* \file atomic/detail/ops_msvc_x86.hpp
|
||||
*
|
||||
* This header contains implementation of the \c operations template.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_
|
||||
#define BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_
|
||||
|
||||
#include <boost/memory_order.hpp>
|
||||
#include <boost/type_traits/make_signed.hpp>
|
||||
#include <boost/atomic/detail/config.hpp>
|
||||
#include <boost/atomic/detail/interlocked.hpp>
|
||||
#include <boost/atomic/detail/storage_type.hpp>
|
||||
#include <boost/atomic/detail/operations_fwd.hpp>
|
||||
#include <boost/atomic/capabilities.hpp>
|
||||
#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/atomic/detail/ops_cas_based.hpp>
|
||||
#endif
|
||||
#include <boost/atomic/detail/ops_msvc_common.hpp>
|
||||
#if !defined(_M_IX86) && !(defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8) && defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16))
|
||||
#include <boost/atomic/detail/ops_extending_cas_based.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_HAS_PRAGMA_ONCE
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(push)
|
||||
// frame pointer register 'ebx' modified by inline assembly code. See the note below.
|
||||
#pragma warning(disable: 4731)
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE)
|
||||
extern "C" void _mm_mfence(void);
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma intrinsic(_mm_mfence)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace atomics {
|
||||
namespace detail {
|
||||
|
||||
/*
|
||||
* Implementation note for asm blocks.
|
||||
*
|
||||
* http://msdn.microsoft.com/en-us/data/k1a8ss06%28v=vs.105%29
|
||||
*
|
||||
* Some SSE types require eight-byte stack alignment, forcing the compiler to emit dynamic stack-alignment code.
|
||||
* To be able to access both the local variables and the function parameters after the alignment, the compiler
|
||||
* maintains two frame pointers. If the compiler performs frame pointer omission (FPO), it will use EBP and ESP.
|
||||
* If the compiler does not perform FPO, it will use EBX and EBP. To ensure code runs correctly, do not modify EBX
|
||||
* in asm code if the function requires dynamic stack alignment as it could modify the frame pointer.
|
||||
* Either move the eight-byte aligned types out of the function, or avoid using EBX.
|
||||
*
|
||||
* Since we have no way of knowing that the compiler uses FPO, we have to always save and restore ebx
|
||||
* whenever we have to clobber it. Additionally, we disable warning C4731 above so that the compiler
|
||||
* doesn't spam about ebx use.
|
||||
*/
|
||||
|
||||
struct msvc_x86_operations_base
|
||||
{
|
||||
static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true;
|
||||
|
||||
static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT
|
||||
{
|
||||
#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE)
|
||||
_mm_mfence();
|
||||
#else
|
||||
long tmp;
|
||||
BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&tmp, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE void fence_before(memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE void fence_after(memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE void fence_after_load(memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
// On x86 and x86_64 there is no need for a hardware barrier,
|
||||
// even if seq_cst memory order is requested, because all
|
||||
// seq_cst writes are implemented with lock-prefixed operations
|
||||
// or xchg which has implied lock prefix. Therefore normal loads
|
||||
// are already ordered with seq_cst stores on these architectures.
|
||||
}
|
||||
};
|
||||
|
||||
template< typename T, typename Derived >
|
||||
struct msvc_x86_operations :
|
||||
public msvc_x86_operations_base
|
||||
{
|
||||
typedef T storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
if (order != memory_order_seq_cst)
|
||||
{
|
||||
fence_before(order);
|
||||
storage = v;
|
||||
fence_after(order);
|
||||
}
|
||||
else
|
||||
{
|
||||
Derived::exchange(storage, v, order);
|
||||
}
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type v = storage;
|
||||
fence_after_load(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
typedef typename make_signed< storage_type >::type signed_storage_type;
|
||||
return Derived::fetch_add(storage, static_cast< storage_type >(-static_cast< signed_storage_type >(v)), order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_weak(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return Derived::compare_exchange_strong(storage, expected, desired, success_order, failure_order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
return !!Derived::exchange(storage, (storage_type)1, order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
store(storage, (storage_type)0, order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 4u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type previous = expected;
|
||||
storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(&storage, desired, previous));
|
||||
expected = old_val;
|
||||
return (previous == old_val);
|
||||
}
|
||||
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_AND)
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND(&storage, v));
|
||||
}
|
||||
#else
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type res = storage;
|
||||
while (!compare_exchange_strong(storage, res, res & v, order, memory_order_relaxed)) {}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_OR)
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR(&storage, v));
|
||||
}
|
||||
#else
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type res = storage;
|
||||
while (!compare_exchange_strong(storage, res, res | v, order, memory_order_relaxed)) {}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_XOR)
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR(&storage, v));
|
||||
}
|
||||
#else
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type res = storage;
|
||||
while (!compare_exchange_strong(storage, res, res ^ v, order, memory_order_relaxed)) {}
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8)
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 1u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type previous = expected;
|
||||
storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8(&storage, desired, previous));
|
||||
expected = old_val;
|
||||
return (previous == old_val);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8(&storage, v));
|
||||
}
|
||||
};
|
||||
|
||||
#elif defined(_M_IX86)
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 1u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
__asm
|
||||
{
|
||||
mov edx, storage
|
||||
movzx eax, v
|
||||
lock xadd byte ptr [edx], al
|
||||
mov v, al
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
__asm
|
||||
{
|
||||
mov edx, storage
|
||||
movzx eax, v
|
||||
xchg byte ptr [edx], al
|
||||
mov v, al
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(success_order);
|
||||
bool success;
|
||||
__asm
|
||||
{
|
||||
mov esi, expected
|
||||
mov edi, storage
|
||||
movzx eax, byte ptr [esi]
|
||||
movzx edx, desired
|
||||
lock cmpxchg byte ptr [edi], dl
|
||||
mov byte ptr [esi], al
|
||||
sete success
|
||||
};
|
||||
// The success and failure fences are equivalent anyway
|
||||
base_type::fence_after(success_order);
|
||||
return success;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, byte ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dl, al
|
||||
and dl, bl
|
||||
lock cmpxchg byte ptr [edi], dl
|
||||
jne again
|
||||
mov v, al
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, byte ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dl, al
|
||||
or dl, bl
|
||||
lock cmpxchg byte ptr [edi], dl
|
||||
jne again
|
||||
mov v, al
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, byte ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dl, al
|
||||
xor dl, bl
|
||||
lock cmpxchg byte ptr [edi], dl
|
||||
jne again
|
||||
mov v, al
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 1u, Signed > :
|
||||
public extending_cas_based_operations< operations< 4u, Signed >, 1u, Signed >
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16)
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 2u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type previous = expected;
|
||||
storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16(&storage, desired, previous));
|
||||
expected = old_val;
|
||||
return (previous == old_val);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16(&storage, v));
|
||||
}
|
||||
};
|
||||
|
||||
#elif defined(_M_IX86)
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 2u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
__asm
|
||||
{
|
||||
mov edx, storage
|
||||
movzx eax, v
|
||||
lock xadd word ptr [edx], ax
|
||||
mov v, ax
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
__asm
|
||||
{
|
||||
mov edx, storage
|
||||
movzx eax, v
|
||||
xchg word ptr [edx], ax
|
||||
mov v, ax
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(success_order);
|
||||
bool success;
|
||||
__asm
|
||||
{
|
||||
mov esi, expected
|
||||
mov edi, storage
|
||||
movzx eax, word ptr [esi]
|
||||
movzx edx, desired
|
||||
lock cmpxchg word ptr [edi], dx
|
||||
mov word ptr [esi], ax
|
||||
sete success
|
||||
};
|
||||
// The success and failure fences are equivalent anyway
|
||||
base_type::fence_after(success_order);
|
||||
return success;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, word ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dx, ax
|
||||
and dx, bx
|
||||
lock cmpxchg word ptr [edi], dx
|
||||
jne again
|
||||
mov v, ax
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, word ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dx, ax
|
||||
or dx, bx
|
||||
lock cmpxchg word ptr [edi], dx
|
||||
jne again
|
||||
mov v, ax
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
base_type::fence_before(order);
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
xor edx, edx
|
||||
mov edi, storage
|
||||
movzx ebx, v
|
||||
movzx eax, word ptr [edi]
|
||||
align 16
|
||||
again:
|
||||
mov dx, ax
|
||||
xor dx, bx
|
||||
lock cmpxchg word ptr [edi], dx
|
||||
jne again
|
||||
mov v, ax
|
||||
mov ebx, backup
|
||||
};
|
||||
base_type::fence_after(order);
|
||||
return v;
|
||||
}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 2u, Signed > :
|
||||
public extending_cas_based_operations< operations< 4u, Signed >, 2u, Signed >
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B)
|
||||
|
||||
template< bool Signed >
|
||||
struct msvc_dcas_x86
|
||||
{
|
||||
typedef typename make_storage_type< 8u, Signed >::type storage_type;
|
||||
typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true;
|
||||
|
||||
// Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A, 8.1.1. Guaranteed Atomic Operations:
|
||||
//
|
||||
// The Pentium processor (and newer processors since) guarantees that the following additional memory operations will always be carried out atomically:
|
||||
// * Reading or writing a quadword aligned on a 64-bit boundary
|
||||
//
|
||||
// Luckily, the memory is almost always 8-byte aligned in our case because atomic<> uses 64 bit native types for storage and dynamic memory allocations
|
||||
// have at least 8 byte alignment. The only unfortunate case is when atomic is placed on the stack and it is not 8-byte aligned (like on 32 bit Windows).
|
||||
|
||||
static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
storage_type volatile* p = &storage;
|
||||
if (((uint32_t)p & 0x00000007) == 0)
|
||||
{
|
||||
#if defined(_M_IX86_FP) && _M_IX86_FP >= 2
|
||||
#if defined(__AVX__)
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
vmovq xmm4, v
|
||||
vmovq qword ptr [edx], xmm4
|
||||
};
|
||||
#else
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
movq xmm4, v
|
||||
movq qword ptr [edx], xmm4
|
||||
};
|
||||
#endif
|
||||
#else
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
fild v
|
||||
fistp qword ptr [edx]
|
||||
};
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
mov edi, p
|
||||
mov ebx, dword ptr [v]
|
||||
mov ecx, dword ptr [v + 4]
|
||||
mov eax, dword ptr [edi]
|
||||
mov edx, dword ptr [edi + 4]
|
||||
align 16
|
||||
again:
|
||||
lock cmpxchg8b qword ptr [edi]
|
||||
jne again
|
||||
mov ebx, backup
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
storage_type const volatile* p = &storage;
|
||||
storage_type value;
|
||||
|
||||
if (((uint32_t)p & 0x00000007) == 0)
|
||||
{
|
||||
#if defined(_M_IX86_FP) && _M_IX86_FP >= 2
|
||||
#if defined(__AVX__)
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
vmovq xmm4, qword ptr [edx]
|
||||
vmovq value, xmm4
|
||||
};
|
||||
#else
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
movq xmm4, qword ptr [edx]
|
||||
movq value, xmm4
|
||||
};
|
||||
#endif
|
||||
#else
|
||||
__asm
|
||||
{
|
||||
mov edx, p
|
||||
fild qword ptr [edx]
|
||||
fistp value
|
||||
};
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
// We don't care for comparison result here; the previous value will be stored into value anyway.
|
||||
// Also we don't care for ebx and ecx values, they just have to be equal to eax and edx before cmpxchg8b.
|
||||
__asm
|
||||
{
|
||||
mov edi, p
|
||||
mov eax, ebx
|
||||
mov edx, ecx
|
||||
lock cmpxchg8b qword ptr [edi]
|
||||
mov dword ptr [value], eax
|
||||
mov dword ptr [value + 4], edx
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
// MSVC-11 in 32-bit mode sometimes generates messed up code without compiler barriers,
|
||||
// even though the _InterlockedCompareExchange64 intrinsic already provides one.
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
storage_type volatile* p = &storage;
|
||||
#if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64)
|
||||
const storage_type old_val = (storage_type)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(p, desired, expected);
|
||||
const bool result = (old_val == expected);
|
||||
expected = old_val;
|
||||
#else
|
||||
bool result;
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
mov edi, p
|
||||
mov esi, expected
|
||||
mov ebx, dword ptr [desired]
|
||||
mov ecx, dword ptr [desired + 4]
|
||||
mov eax, dword ptr [esi]
|
||||
mov edx, dword ptr [esi + 4]
|
||||
lock cmpxchg8b qword ptr [edi]
|
||||
mov dword ptr [esi], eax
|
||||
mov dword ptr [esi + 4], edx
|
||||
mov ebx, backup
|
||||
sete result
|
||||
};
|
||||
#endif
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_weak(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return compare_exchange_strong(storage, expected, desired, success_order, failure_order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
storage_type volatile* p = &storage;
|
||||
int backup;
|
||||
__asm
|
||||
{
|
||||
mov backup, ebx
|
||||
mov edi, p
|
||||
mov ebx, dword ptr [v]
|
||||
mov ecx, dword ptr [v + 4]
|
||||
mov eax, dword ptr [edi]
|
||||
mov edx, dword ptr [edi + 4]
|
||||
align 16
|
||||
again:
|
||||
lock cmpxchg8b qword ptr [edi]
|
||||
jne again
|
||||
mov ebx, backup
|
||||
mov dword ptr [v], eax
|
||||
mov dword ptr [v + 4], edx
|
||||
};
|
||||
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 8u, Signed > :
|
||||
public cas_based_operations< msvc_dcas_x86< Signed > >
|
||||
{
|
||||
};
|
||||
|
||||
#elif defined(_M_AMD64)
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 8u, Signed > :
|
||||
public msvc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > >
|
||||
{
|
||||
typedef msvc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > base_type;
|
||||
typedef typename base_type::storage_type storage_type;
|
||||
typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type previous = expected;
|
||||
storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(&storage, desired, previous));
|
||||
expected = old_val;
|
||||
return (previous == old_val);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64(&storage, v));
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64(&storage, v));
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
|
||||
|
||||
template< bool Signed >
|
||||
struct msvc_dcas_x86_64
|
||||
{
|
||||
typedef typename make_storage_type< 16u, Signed >::type storage_type;
|
||||
typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type;
|
||||
|
||||
static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true;
|
||||
|
||||
static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type value = const_cast< storage_type& >(storage);
|
||||
while (!BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, v, &value)) {}
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
storage_type value = storage_type();
|
||||
BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, value, &value);
|
||||
return value;
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_strong(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return !!BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, desired, &expected);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool compare_exchange_weak(
|
||||
storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT
|
||||
{
|
||||
return compare_exchange_strong(storage, expected, desired, success_order, failure_order);
|
||||
}
|
||||
|
||||
static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
template< bool Signed >
|
||||
struct operations< 16u, Signed > :
|
||||
public cas_based_operations< cas_based_exchange< msvc_dcas_x86_64< Signed > > >
|
||||
{
|
||||
};
|
||||
|
||||
#endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)
|
||||
|
||||
BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
if (order == memory_order_seq_cst)
|
||||
msvc_x86_operations_base::hardware_full_fence();
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
}
|
||||
|
||||
BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT
|
||||
{
|
||||
if (order != memory_order_relaxed)
|
||||
BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace atomics
|
||||
} // namespace boost
|
||||
|
||||
#if defined(BOOST_MSVC)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
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_PREDEF_COMPILER_IAR_H
|
||||
#define BOOST_PREDEF_COMPILER_IAR_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_COMP_IAR`]
|
||||
|
||||
IAR C/C++ compiler.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__IAR_SYSTEMS_ICC__`] [__predef_detection__]]
|
||||
|
||||
[[`__VER__`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_COMP_IAR BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
# define BOOST_COMP_IAR_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__VER__)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_COMP_IAR_DETECTION
|
||||
# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
|
||||
# define BOOST_COMP_IAR_EMULATED BOOST_COMP_IAR_DETECTION
|
||||
# else
|
||||
# undef BOOST_COMP_IAR
|
||||
# define BOOST_COMP_IAR BOOST_COMP_IAR_DETECTION
|
||||
# endif
|
||||
# define BOOST_COMP_IAR_AVAILABLE
|
||||
# include <boost/predef/detail/comp_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_COMP_IAR_NAME "IAR C/C++"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR,BOOST_COMP_IAR_NAME)
|
||||
|
||||
#ifdef BOOST_COMP_IAR_EMULATED
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IAR_EMULATED,BOOST_COMP_IAR_NAME)
|
||||
#endif
|
||||
@@ -0,0 +1,48 @@
|
||||
// (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_4_HPP
|
||||
#define BOOST_MATH_TOOLS_RAT_EVAL_4_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]));
|
||||
}
|
||||
|
||||
|
||||
}}}} // namespaces
|
||||
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
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(FUSION_VALUE_OF_IMPL_05052005_1128)
|
||||
#define FUSION_VALUE_OF_IMPL_05052005_1128
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct vector_iterator_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_of_impl;
|
||||
|
||||
template <>
|
||||
struct value_of_impl<vector_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Iterator::vector vector;
|
||||
typedef typename Iterator::index index;
|
||||
typedef typename value_at_impl<vector_tag>::template apply<vector, index>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,171 @@
|
||||
// (C) Copyright Gennadiy Rozental 2001.
|
||||
// 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/test for the library home page.
|
||||
//
|
||||
//! @file
|
||||
//! Defines the is_forward_iterable collection type trait
|
||||
// ***************************************************************************
|
||||
|
||||
#ifndef BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
|
||||
#define BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
|
||||
|
||||
#if defined(BOOST_NO_CXX11_DECLTYPE) || \
|
||||
defined(BOOST_NO_CXX11_NULLPTR) || \
|
||||
defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
|
||||
|
||||
// some issues with boost.config
|
||||
#if !defined(BOOST_MSVC) || BOOST_MSVC_FULL_VER < 170061030 /* VC2012 upd 5 */
|
||||
#define BOOST_TEST_FWD_ITERABLE_CXX03
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_TEST_FWD_ITERABLE_CXX03)
|
||||
// Boost
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
// STL
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#else
|
||||
|
||||
// Boost
|
||||
#include <boost/utility/declval.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/test/utils/is_cstring.hpp>
|
||||
|
||||
// STL
|
||||
#include <utility>
|
||||
#include <type_traits>
|
||||
|
||||
#endif
|
||||
//____________________________________________________________________________//
|
||||
|
||||
namespace boost {
|
||||
namespace unit_test {
|
||||
|
||||
// ************************************************************************** //
|
||||
// ************** is_forward_iterable ************** //
|
||||
// ************************************************************************** //
|
||||
|
||||
#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) && !defined(BOOST_TEST_DOXYGEN_DOC__)
|
||||
template<typename T>
|
||||
struct is_forward_iterable : public mpl::false_ {};
|
||||
|
||||
template<typename T>
|
||||
struct is_forward_iterable<T const> : public is_forward_iterable<T> {};
|
||||
|
||||
template<typename T>
|
||||
struct is_forward_iterable<T&> : public is_forward_iterable<T> {};
|
||||
|
||||
template<typename T, typename A>
|
||||
struct is_forward_iterable< std::vector<T, A> > : public mpl::true_ {};
|
||||
|
||||
template<typename T, typename A>
|
||||
struct is_forward_iterable< std::list<T, A> > : public mpl::true_ {};
|
||||
|
||||
template<typename K, typename V, typename C, typename A>
|
||||
struct is_forward_iterable< std::map<K, V, C, A> > : public mpl::true_ {};
|
||||
|
||||
template<typename K, typename C, typename A>
|
||||
struct is_forward_iterable< std::set<K, C, A> > : public mpl::true_ {};
|
||||
|
||||
// string is also forward iterable, even if sometimes we want to treat the
|
||||
// assertions differently.
|
||||
template<>
|
||||
struct is_forward_iterable< std::string > : public mpl::true_ {};
|
||||
|
||||
#else
|
||||
|
||||
namespace ut_detail {
|
||||
|
||||
template<typename T>
|
||||
struct is_present : public mpl::true_ {};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
// some compiler do not implement properly decltype non expression involving members (eg. VS2013)
|
||||
// a workaround is to use -> decltype syntax.
|
||||
template <class T>
|
||||
struct has_member_size {
|
||||
private:
|
||||
struct nil_t {};
|
||||
template<typename U> static auto test( U* ) -> decltype(boost::declval<U>().size());
|
||||
template<typename> static nil_t test( ... );
|
||||
|
||||
public:
|
||||
static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template <class T>
|
||||
struct has_member_begin {
|
||||
private:
|
||||
struct nil_t {};
|
||||
template<typename U> static auto test( U* ) -> decltype(boost::declval<U>().begin());
|
||||
template<typename> static nil_t test( ... );
|
||||
public:
|
||||
static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template <class T>
|
||||
struct has_member_end {
|
||||
private:
|
||||
struct nil_t {};
|
||||
template<typename U> static auto test( U* ) -> decltype(boost::declval<U>().end());
|
||||
template<typename> static nil_t test( ... );
|
||||
public:
|
||||
static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template <class T, class enabled = void>
|
||||
struct is_forward_iterable_impl : std::false_type {
|
||||
};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
template <class T>
|
||||
struct is_forward_iterable_impl<
|
||||
T,
|
||||
typename std::enable_if<
|
||||
is_present<typename T::const_iterator>::value &&
|
||||
is_present<typename T::value_type>::value &&
|
||||
has_member_size<T>::value &&
|
||||
has_member_begin<T>::value &&
|
||||
has_member_end<T>::value &&
|
||||
!is_cstring<T>::value
|
||||
>::type
|
||||
> : std::true_type
|
||||
{};
|
||||
|
||||
//____________________________________________________________________________//
|
||||
|
||||
} // namespace ut_detail
|
||||
|
||||
/*! Indicates that a specific type implements the forward iterable concept. */
|
||||
template<typename T>
|
||||
struct is_forward_iterable {
|
||||
typedef typename std::remove_reference<T>::type T_ref;
|
||||
typedef ut_detail::is_forward_iterable_impl<T_ref> is_fwd_it_t;
|
||||
typedef mpl::bool_<is_fwd_it_t::value> type;
|
||||
enum { value = is_fwd_it_t::value };
|
||||
};
|
||||
|
||||
#endif /* defined(BOOST_TEST_FWD_ITERABLE_CXX03) */
|
||||
|
||||
} // namespace unit_test
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
|
||||
@@ -0,0 +1,81 @@
|
||||
//Copyright (c) 2006-2010 Emil Dotchevski and Reverge Studios, Inc.
|
||||
|
||||
//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 UUID_C3E1741C754311DDB2834CCA55D89593
|
||||
#define UUID_C3E1741C754311DDB2834CCA55D89593
|
||||
#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma warning(push,1)
|
||||
#endif
|
||||
|
||||
#include <boost/core/typeinfo.hpp>
|
||||
#include <boost/core/demangle.hpp>
|
||||
#include <boost/current_function.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <string>
|
||||
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
template <class T>
|
||||
inline
|
||||
std::string
|
||||
tag_type_name()
|
||||
{
|
||||
#ifdef BOOST_NO_TYPEID
|
||||
return BOOST_CURRENT_FUNCTION;
|
||||
#else
|
||||
return core::demangle(typeid(T*).name());
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline
|
||||
std::string
|
||||
type_name()
|
||||
{
|
||||
#ifdef BOOST_NO_TYPEID
|
||||
return BOOST_CURRENT_FUNCTION;
|
||||
#else
|
||||
return core::demangle(typeid(T).name());
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace
|
||||
exception_detail
|
||||
{
|
||||
struct
|
||||
type_info_
|
||||
{
|
||||
core::typeinfo const * type_;
|
||||
|
||||
explicit
|
||||
type_info_( core::typeinfo const & type ):
|
||||
type_(&type)
|
||||
{
|
||||
}
|
||||
|
||||
friend
|
||||
bool
|
||||
operator<( type_info_ const & a, type_info_ const & b )
|
||||
{
|
||||
return 0!=(a.type_->before(*b.type_));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#define BOOST_EXCEPTION_STATIC_TYPEID(T) ::boost::exception_detail::type_info_(BOOST_CORE_TYPEID(T))
|
||||
|
||||
#ifndef BOOST_NO_RTTI
|
||||
#define BOOST_EXCEPTION_DYNAMIC_TYPEID(x) ::boost::exception_detail::type_info_(typeid(x))
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,403 @@
|
||||
|
||||
// Copyright Peter Dimov 2001
|
||||
// Copyright Aleksey Gurtovoy 2001-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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/bind.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename T, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, typename Arg
|
||||
>
|
||||
struct replace_unnamed_arg
|
||||
{
|
||||
typedef Arg next;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Arg
|
||||
>
|
||||
struct replace_unnamed_arg< arg< -1 >, Arg >
|
||||
{
|
||||
typedef typename Arg::next next;
|
||||
typedef Arg type;
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg< arg<N>, U1, U2, U3, U4, U5 >
|
||||
{
|
||||
typedef typename apply_wrap5<mpl::arg<N>, U1, U2, U3, U4, U5>::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct bind0
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap0<
|
||||
f_
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind0<F>, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind0<F> f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(1, bind0)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0)
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct bind1
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap1<
|
||||
f_
|
||||
, typename t1::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename U1, typename U2, typename U3
|
||||
, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind1< F,T1 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind1< F,T1 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(2, bind1)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct bind2
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap2<
|
||||
f_
|
||||
, typename t1::type, typename t2::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename U1, typename U2
|
||||
, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind2< F,T1,T2 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind2< F,T1,T2 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(3, bind2)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct bind3
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap3<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename U1
|
||||
, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind3< F,T1,T2,T3 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(4, bind3)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct bind4
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||
typedef typename r4::type a4;
|
||||
typedef typename r4::next n5;
|
||||
typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap4<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename U1, typename U2, typename U3, typename U4, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind4< F,T1,T2,T3,T4 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(5, bind4)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct bind5
|
||||
{
|
||||
template<
|
||||
typename U1 = na, typename U2 = na, typename U3 = na
|
||||
, typename U4 = na, typename U5 = na
|
||||
>
|
||||
struct apply
|
||||
{
|
||||
private:
|
||||
typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0;
|
||||
typedef typename r0::type a0;
|
||||
typedef typename r0::next n1;
|
||||
typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T1,n1 > r1;
|
||||
typedef typename r1::type a1;
|
||||
typedef typename r1::next n2;
|
||||
typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T2,n2 > r2;
|
||||
typedef typename r2::type a2;
|
||||
typedef typename r2::next n3;
|
||||
typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T3,n3 > r3;
|
||||
typedef typename r3::type a3;
|
||||
typedef typename r3::next n4;
|
||||
typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T4,n4 > r4;
|
||||
typedef typename r4::type a4;
|
||||
typedef typename r4::next n5;
|
||||
typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4;
|
||||
///
|
||||
typedef aux::replace_unnamed_arg< T5,n5 > r5;
|
||||
typedef typename r5::type a5;
|
||||
typedef typename r5::next n6;
|
||||
typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5;
|
||||
///
|
||||
public:
|
||||
typedef typename apply_wrap5<
|
||||
f_
|
||||
, typename t1::type, typename t2::type, typename t3::type
|
||||
, typename t4::type, typename t5::type
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5, typename U1, typename U2, typename U3, typename U4
|
||||
, typename U5
|
||||
>
|
||||
struct resolve_bind_arg<
|
||||
bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5
|
||||
>
|
||||
{
|
||||
typedef bind5< F,T1,T2,T3,T4,T5 > f_;
|
||||
typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
BOOST_MPL_AUX_ARITY_SPEC(6, bind5)
|
||||
BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5)
|
||||
}}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user