Initial Commit
This commit is contained in:
@@ -0,0 +1,268 @@
|
||||
// (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
|
||||
|
||||
// Unrolled polynomial evaluation using second order Horners rule
|
||||
#ifndef BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
|
||||
#define BOOST_MATH_TOOLS_POLY_EVAL_14_HPP
|
||||
|
||||
namespace boost{ namespace math{ namespace tools{ namespace detail{
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(0);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(a[1] * x + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, 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]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = static_cast<V>(a[4] * x2 + a[2]);
|
||||
t[1] = static_cast<V>(a[3] * x2 + a[1]);
|
||||
t[0] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[1] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = a[5] * x2 + a[3];
|
||||
t[1] = a[4] * x2 + a[2];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[0] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = static_cast<V>(a[6] * x2 + a[4]);
|
||||
t[1] = static_cast<V>(a[5] * x2 + a[3]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[2]);
|
||||
t[1] += static_cast<V>(a[1]);
|
||||
t[0] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[1] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<8>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = a[7] * x2 + a[5];
|
||||
t[1] = a[6] * x2 + a[4];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[3]);
|
||||
t[1] += static_cast<V>(a[2]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[0] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<9>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = static_cast<V>(a[8] * x2 + a[6]);
|
||||
t[1] = static_cast<V>(a[7] * x2 + a[5]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[1] += static_cast<V>(a[3]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[2]);
|
||||
t[1] += static_cast<V>(a[1]);
|
||||
t[0] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[1] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<10>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = a[9] * x2 + a[7];
|
||||
t[1] = a[8] * x2 + a[6];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[5]);
|
||||
t[1] += static_cast<V>(a[4]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[3]);
|
||||
t[1] += static_cast<V>(a[2]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[0] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<11>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = static_cast<V>(a[10] * x2 + a[8]);
|
||||
t[1] = static_cast<V>(a[9] * x2 + a[7]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[6]);
|
||||
t[1] += static_cast<V>(a[5]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[1] += static_cast<V>(a[3]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[2]);
|
||||
t[1] += static_cast<V>(a[1]);
|
||||
t[0] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[1] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<12>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = a[11] * x2 + a[9];
|
||||
t[1] = a[10] * x2 + a[8];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[7]);
|
||||
t[1] += static_cast<V>(a[6]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[5]);
|
||||
t[1] += static_cast<V>(a[4]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[3]);
|
||||
t[1] += static_cast<V>(a[2]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[0] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<13>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = static_cast<V>(a[12] * x2 + a[10]);
|
||||
t[1] = static_cast<V>(a[11] * x2 + a[9]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[8]);
|
||||
t[1] += static_cast<V>(a[7]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[6]);
|
||||
t[1] += static_cast<V>(a[5]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[1] += static_cast<V>(a[3]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[2]);
|
||||
t[1] += static_cast<V>(a[1]);
|
||||
t[0] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[1] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<14>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[2];
|
||||
t[0] = a[13] * x2 + a[11];
|
||||
t[1] = a[12] * x2 + a[10];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[9]);
|
||||
t[1] += static_cast<V>(a[8]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[7]);
|
||||
t[1] += static_cast<V>(a[6]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[5]);
|
||||
t[1] += static_cast<V>(a[4]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[3]);
|
||||
t[1] += static_cast<V>(a[2]);
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[0] *= x;
|
||||
return t[0] + t[1];
|
||||
}
|
||||
|
||||
|
||||
}}}} // namespaces
|
||||
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
=== New in Version 1.8
|
||||
|
||||
For quick reference, here's a short list of features and capabilities
|
||||
added to _WSJT-X_ since Version 1.7.0:
|
||||
|
||||
- New modes: *FT8* and *FreqCal*
|
||||
|
||||
- Improved decoding performance for JT65, QRA64, and MSK144
|
||||
|
||||
- *SWL* option for third-party decoding short-format MSK144 messages
|
||||
|
||||
- Experimental amplitude and phase equalization for MSK144
|
||||
|
||||
- Options to minimize screen space used by the *Main* and *Wide Graph*
|
||||
windows
|
||||
|
||||
- New set of suggested default frequencies specific to the three IARU
|
||||
Regions.
|
||||
|
||||
- Enhanced scheme for managing table of default operating frequencies
|
||||
|
||||
- Improved CAT control for many rigs, including those controlled
|
||||
through Commander or OmniRig.
|
||||
|
||||
- Bug fixes and tweaks to the user interface
|
||||
|
||||
=== Documentation Conventions
|
||||
|
||||
In this manual the following icons call attention to particular types
|
||||
of information:
|
||||
|
||||
NOTE: *Notes* containing information that may be of interest to
|
||||
particuar classes of users.
|
||||
|
||||
TIP: *Tips* on program features or capabilities that might otherwise be
|
||||
overlooked.
|
||||
|
||||
IMPORTANT: *Warnings* about usage that could lead to undesired
|
||||
consequences.
|
||||
|
||||
=== How You Can Contribute
|
||||
|
||||
_WSJT-X_ is part of an open-source project released under the
|
||||
{gnu_gpl} (GPL). If you have programming or documentation skills or
|
||||
would like to contribute to the project in other ways, please make
|
||||
your interests known to the development team. The project's
|
||||
source-code repository can be found at {devsvn}, and most
|
||||
communication among the developers takes place on the email reflector
|
||||
{devmail}. Bug reports and suggestions for new features, improvements
|
||||
to the _WSJT-X_ User Guide, etc., may also be sent to the
|
||||
{wsjt_yahoo_group} email reflector.
|
||||
@@ -0,0 +1,127 @@
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
///// header body
|
||||
|
||||
#ifndef BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
# include <boost/mpl/next.hpp>
|
||||
# include <boost/mpl/apply_wrap.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
|
||||
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
|
||||
|
||||
# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp
|
||||
# include <boost/mpl/aux_/include_preprocessed.hpp>
|
||||
|
||||
#else
|
||||
|
||||
# include <boost/mpl/limits/unrolling.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
# include <boost/mpl/aux_/config/eti.hpp>
|
||||
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
// forward declaration
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward;
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/advance_forward.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
|
||||
struct advance_forward
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef typename apply_wrap1<
|
||||
advance_forward<BOOST_MPL_LIMIT_UNROLLING>
|
||||
, Iterator
|
||||
>::type chunk_result_;
|
||||
|
||||
typedef typename apply_wrap1<
|
||||
advance_forward<(
|
||||
(N - BOOST_MPL_LIMIT_UNROLLING) < 0
|
||||
? 0
|
||||
: N - BOOST_MPL_LIMIT_UNROLLING
|
||||
)>
|
||||
, chunk_result_
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
||||
#endif // BOOST_MPL_AUX_ADVANCE_FORWARD_HPP_INCLUDED
|
||||
|
||||
///// iteration, depth == 1
|
||||
|
||||
// For gcc 4.4 compatability, we must include the
|
||||
// BOOST_PP_ITERATION_DEPTH test inside an #else clause.
|
||||
#else // BOOST_PP_IS_ITERATING
|
||||
#if BOOST_PP_ITERATION_DEPTH() == 1
|
||||
#define i_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
template<>
|
||||
struct advance_forward< BOOST_PP_FRAME_ITERATION(1) >
|
||||
{
|
||||
template< typename Iterator > struct apply
|
||||
{
|
||||
typedef Iterator iter0;
|
||||
|
||||
#if i_ > 0
|
||||
# define BOOST_PP_ITERATION_PARAMS_2 \
|
||||
(3,(1, i_, <boost/mpl/aux_/advance_forward.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
#endif
|
||||
typedef BOOST_PP_CAT(iter,i_) type;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct apply<int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#undef i_
|
||||
|
||||
///// iteration, depth == 2
|
||||
|
||||
#elif BOOST_PP_ITERATION_DEPTH() == 2
|
||||
|
||||
# define AUX778076_ITER_0 BOOST_PP_CAT(iter,BOOST_PP_DEC(BOOST_PP_FRAME_ITERATION(2)))
|
||||
# define AUX778076_ITER_1 BOOST_PP_CAT(iter,BOOST_PP_FRAME_ITERATION(2))
|
||||
|
||||
typedef typename next<AUX778076_ITER_0>::type AUX778076_ITER_1;
|
||||
|
||||
# undef AUX778076_ITER_1
|
||||
# undef AUX778076_ITER_0
|
||||
|
||||
#endif // BOOST_PP_ITERATION_DEPTH()
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,280 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_SYSTEM_HPP
|
||||
#define BOOST_COMPUTE_SYSTEM_HPP
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <boost/compute/cl.hpp>
|
||||
#include <boost/compute/device.hpp>
|
||||
#include <boost/compute/context.hpp>
|
||||
#include <boost/compute/platform.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/detail/getenv.hpp>
|
||||
#include <boost/compute/exception/no_device_found.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
/// \class system
|
||||
/// \brief Provides access to platforms and devices on the system.
|
||||
///
|
||||
/// The system class contains a set of static functions which provide access to
|
||||
/// the OpenCL platforms and compute devices on the host system.
|
||||
///
|
||||
/// The default_device() convenience method automatically selects and returns
|
||||
/// the "best" compute device for the system following a set of heuristics and
|
||||
/// environment variables. This simplifies setup of the OpenCL enviornment.
|
||||
///
|
||||
/// \see platform, device, context
|
||||
class system
|
||||
{
|
||||
public:
|
||||
/// Returns the default compute device for the system.
|
||||
///
|
||||
/// The default device is selected based on a set of heuristics and can be
|
||||
/// influenced using one of the following environment variables:
|
||||
///
|
||||
/// \li \c BOOST_COMPUTE_DEFAULT_DEVICE -
|
||||
/// name of the compute device (e.g. "GTX TITAN")
|
||||
/// \li \c BOOST_COMPUTE_DEFAULT_DEVICE_TYPE
|
||||
/// type of the compute device (e.g. "GPU" or "CPU")
|
||||
/// \li \c BOOST_COMPUTE_DEFAULT_PLATFORM -
|
||||
/// name of the platform (e.g. "NVIDIA CUDA")
|
||||
/// \li \c BOOST_COMPUTE_DEFAULT_VENDOR -
|
||||
/// name of the device vendor (e.g. "NVIDIA")
|
||||
///
|
||||
/// The default device is determined once on the first time this function
|
||||
/// is called. Calling this function multiple times will always result in
|
||||
/// the same device being returned.
|
||||
///
|
||||
/// If no OpenCL device is found on the system, a no_device_found exception
|
||||
/// is thrown.
|
||||
///
|
||||
/// For example, to print the name of the default compute device on the
|
||||
/// system:
|
||||
/// \code
|
||||
/// // get the default compute device
|
||||
/// boost::compute::device device = boost::compute::system::default_device();
|
||||
///
|
||||
/// // print the name of the device
|
||||
/// std::cout << "default device: " << device.name() << std::endl;
|
||||
/// \endcode
|
||||
static device default_device()
|
||||
{
|
||||
static device default_device = find_default_device();
|
||||
|
||||
return default_device;
|
||||
}
|
||||
|
||||
/// Returns the device with \p name.
|
||||
///
|
||||
/// \throws no_device_found if no device with \p name is found.
|
||||
static device find_device(const std::string &name)
|
||||
{
|
||||
const std::vector<device> devices = system::devices();
|
||||
for(size_t i = 0; i < devices.size(); i++){
|
||||
const device& device = devices[i];
|
||||
|
||||
if(device.name() == name){
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_THROW_EXCEPTION(no_device_found());
|
||||
}
|
||||
|
||||
/// Returns a vector containing all of the compute devices on
|
||||
/// the system.
|
||||
///
|
||||
/// For example, to print out the name of each OpenCL-capable device
|
||||
/// available on the system:
|
||||
/// \code
|
||||
/// for(const auto &device : boost::compute::system::devices()){
|
||||
/// std::cout << device.name() << std::endl;
|
||||
/// }
|
||||
/// \endcode
|
||||
static std::vector<device> devices()
|
||||
{
|
||||
std::vector<device> devices;
|
||||
|
||||
const std::vector<platform> platforms = system::platforms();
|
||||
for(size_t i = 0; i < platforms.size(); i++){
|
||||
const std::vector<device> platform_devices = platforms[i].devices();
|
||||
|
||||
devices.insert(
|
||||
devices.end(), platform_devices.begin(), platform_devices.end()
|
||||
);
|
||||
}
|
||||
|
||||
return devices;
|
||||
}
|
||||
|
||||
/// Returns the number of compute devices on the system.
|
||||
static size_t device_count()
|
||||
{
|
||||
size_t count = 0;
|
||||
|
||||
const std::vector<platform> platforms = system::platforms();
|
||||
for(size_t i = 0; i < platforms.size(); i++){
|
||||
count += platforms[i].device_count();
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/// Returns the default context for the system.
|
||||
///
|
||||
/// The default context is created for the default device on the system
|
||||
/// (as returned by default_device()).
|
||||
///
|
||||
/// The default context is created once on the first time this function is
|
||||
/// called. Calling this function multiple times will always result in the
|
||||
/// same context object being returned.
|
||||
static context default_context()
|
||||
{
|
||||
static context default_context(default_device());
|
||||
|
||||
return default_context;
|
||||
}
|
||||
|
||||
/// Returns the default command queue for the system.
|
||||
static command_queue& default_queue()
|
||||
{
|
||||
static command_queue queue(default_context(), default_device());
|
||||
|
||||
return queue;
|
||||
}
|
||||
|
||||
/// Blocks until all outstanding computations on the default
|
||||
/// command queue are complete.
|
||||
///
|
||||
/// This is equivalent to:
|
||||
/// \code
|
||||
/// system::default_queue().finish();
|
||||
/// \endcode
|
||||
static void finish()
|
||||
{
|
||||
default_queue().finish();
|
||||
}
|
||||
|
||||
/// Returns a vector containing each of the OpenCL platforms on the system.
|
||||
///
|
||||
/// For example, to print out the name of each OpenCL platform present on
|
||||
/// the system:
|
||||
/// \code
|
||||
/// for(const auto &platform : boost::compute::system::platforms()){
|
||||
/// std::cout << platform.name() << std::endl;
|
||||
/// }
|
||||
/// \endcode
|
||||
static std::vector<platform> platforms()
|
||||
{
|
||||
cl_uint count = 0;
|
||||
clGetPlatformIDs(0, 0, &count);
|
||||
|
||||
std::vector<platform> platforms;
|
||||
if(count > 0)
|
||||
{
|
||||
std::vector<cl_platform_id> platform_ids(count);
|
||||
clGetPlatformIDs(count, &platform_ids[0], 0);
|
||||
|
||||
for(size_t i = 0; i < platform_ids.size(); i++){
|
||||
platforms.push_back(platform(platform_ids[i]));
|
||||
}
|
||||
}
|
||||
return platforms;
|
||||
}
|
||||
|
||||
/// Returns the number of compute platforms on the system.
|
||||
static size_t platform_count()
|
||||
{
|
||||
cl_uint count = 0;
|
||||
clGetPlatformIDs(0, 0, &count);
|
||||
return static_cast<size_t>(count);
|
||||
}
|
||||
|
||||
private:
|
||||
/// \internal_
|
||||
static device find_default_device()
|
||||
{
|
||||
// get a list of all devices on the system
|
||||
const std::vector<device> devices_ = devices();
|
||||
if(devices_.empty()){
|
||||
BOOST_THROW_EXCEPTION(no_device_found());
|
||||
}
|
||||
|
||||
// check for device from environment variable
|
||||
const char *name = detail::getenv("BOOST_COMPUTE_DEFAULT_DEVICE");
|
||||
const char *type = detail::getenv("BOOST_COMPUTE_DEFAULT_DEVICE_TYPE");
|
||||
const char *platform = detail::getenv("BOOST_COMPUTE_DEFAULT_PLATFORM");
|
||||
const char *vendor = detail::getenv("BOOST_COMPUTE_DEFAULT_VENDOR");
|
||||
|
||||
if(name || type || platform || vendor){
|
||||
for(size_t i = 0; i < devices_.size(); i++){
|
||||
const device& device = devices_[i];
|
||||
if (name && !matches(device.name(), name))
|
||||
continue;
|
||||
|
||||
if (type && matches(std::string("GPU"), type))
|
||||
if (!(device.type() & device::gpu))
|
||||
continue;
|
||||
|
||||
if (type && matches(std::string("CPU"), type))
|
||||
if (!(device.type() & device::cpu))
|
||||
continue;
|
||||
|
||||
if (platform && !matches(device.platform().name(), platform))
|
||||
continue;
|
||||
|
||||
if (vendor && !matches(device.vendor(), vendor))
|
||||
continue;
|
||||
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
// find the first gpu device
|
||||
for(size_t i = 0; i < devices_.size(); i++){
|
||||
const device& device = devices_[i];
|
||||
|
||||
if(device.type() & device::gpu){
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
// find the first cpu device
|
||||
for(size_t i = 0; i < devices_.size(); i++){
|
||||
const device& device = devices_[i];
|
||||
|
||||
if(device.type() & device::cpu){
|
||||
return device;
|
||||
}
|
||||
}
|
||||
|
||||
// return the first device found
|
||||
return devices_[0];
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
static bool matches(const std::string &str, const std::string &pattern)
|
||||
{
|
||||
return str.find(pattern) != std::string::npos;
|
||||
}
|
||||
};
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_SYSTEM_HPP
|
||||
@@ -0,0 +1,45 @@
|
||||
/* boost random/taus88.hpp header file
|
||||
*
|
||||
* Copyright Jens Maurer 2000-2001
|
||||
* Copyright Steven Watanabe 2011
|
||||
* Distributed under the Boost Software License, Version 1.0. (See
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org/libs/random for documentation.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RANDOM_TAUS88_HPP
|
||||
#define BOOST_RANDOM_TAUS88_HPP
|
||||
|
||||
#include <boost/random/linear_feedback_shift.hpp>
|
||||
#include <boost/random/xor_combine.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace random {
|
||||
|
||||
/**
|
||||
* The specialization taus88 was suggested in
|
||||
*
|
||||
* @blockquote
|
||||
* "Maximally Equidistributed Combined Tausworthe Generators",
|
||||
* Pierre L'Ecuyer, Mathematics of Computation, Volume 65,
|
||||
* Number 213, January 1996, Pages 203-213
|
||||
* @endblockquote
|
||||
*/
|
||||
typedef xor_combine_engine<
|
||||
xor_combine_engine<
|
||||
linear_feedback_shift_engine<uint32_t, 32, 31, 13, 12>, 0,
|
||||
linear_feedback_shift_engine<uint32_t, 32, 29, 2, 4>, 0>, 0,
|
||||
linear_feedback_shift_engine<uint32_t, 32, 28, 3, 17>, 0> taus88;
|
||||
|
||||
} // namespace random
|
||||
|
||||
using random::taus88;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_RANDOM_TAUS88_HPP
|
||||
@@ -0,0 +1,65 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// \file is_noncopyable.hpp
|
||||
/// Utility for detecting when types are non-copyable
|
||||
//
|
||||
// Copyright 2008 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)
|
||||
|
||||
#ifndef BOOST_PROTO_DETAIL_IS_NONCOPYABLE_HPP_EAN_19_07_2012
|
||||
#define BOOST_PROTO_DETAIL_IS_NONCOPYABLE_HPP_EAN_19_07_2012
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/type_traits/is_abstract.hpp>
|
||||
#include <boost/type_traits/is_function.hpp>
|
||||
#include <boost/proto/proto_fwd.hpp>
|
||||
|
||||
namespace boost { namespace proto { namespace detail
|
||||
{
|
||||
// All classes derived from std::ios_base have these public nested types,
|
||||
// and are non-copyable. This is an imperfect test, but it's the best we
|
||||
// we can do.
|
||||
template<typename T>
|
||||
yes_type check_is_iostream(
|
||||
typename T::failure *
|
||||
, typename T::Init *
|
||||
, typename T::fmtflags *
|
||||
, typename T::iostate *
|
||||
, typename T::openmode *
|
||||
, typename T::seekdir *
|
||||
);
|
||||
|
||||
template<typename T>
|
||||
no_type check_is_iostream(...);
|
||||
|
||||
template<typename T>
|
||||
struct is_iostream
|
||||
{
|
||||
static bool const value = sizeof(yes_type) == sizeof(check_is_iostream<T>(0,0,0,0,0,0));
|
||||
typedef mpl::bool_<value> type;
|
||||
};
|
||||
|
||||
/// INTERNAL ONLY
|
||||
// This should be a customization point. And it serves the same purpose
|
||||
// as the is_noncopyable trait in Boost.Foreach.
|
||||
template<typename T>
|
||||
struct is_noncopyable
|
||||
: mpl::or_<
|
||||
is_function<T>
|
||||
, is_abstract<T>
|
||||
, is_iostream<T>
|
||||
, is_base_of<noncopyable, T>
|
||||
>
|
||||
{};
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
struct is_noncopyable<T[N]>
|
||||
: mpl::true_
|
||||
{};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,33 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2011. *
|
||||
# * (C) Copyright Paul Mensonides 2011. *
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See *
|
||||
# * accompanying file LICENSE_1_0.txt or copy at *
|
||||
# * http://www.boost.org/LICENSE_1_0.txt) *
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
# define BOOST_PREPROCESSOR_ARRAY_TO_TUPLE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/array/data.hpp>
|
||||
# include <boost/preprocessor/array/size.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
#
|
||||
# /* BOOST_PP_ARRAY_TO_TUPLE */
|
||||
#
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE(array) \
|
||||
BOOST_PP_IF \
|
||||
( \
|
||||
BOOST_PP_ARRAY_SIZE(array), \
|
||||
BOOST_PP_ARRAY_DATA, \
|
||||
BOOST_PP_ARRAY_TO_TUPLE_EMPTY \
|
||||
) \
|
||||
(array) \
|
||||
/**/
|
||||
# define BOOST_PP_ARRAY_TO_TUPLE_EMPTY(array)
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,737 @@
|
||||
// main.c
|
||||
// Word Error Rate test example for Q-ary RA codes over GF(64)
|
||||
//
|
||||
// (c) 2016 - Nico Palermo, IV3NWV
|
||||
//
|
||||
// Thanks to Andrea Montefusco IW0HDV for his help on adapting the sources
|
||||
// to OSs other than MS Windows
|
||||
//
|
||||
// ------------------------------------------------------------------------------
|
||||
// This file is part of the qracodes project, a Forward Error Control
|
||||
// encoding/decoding package based on Q-ary RA (Repeat and Accumulate) LDPC codes.
|
||||
//
|
||||
// Files in this package:
|
||||
// main.c - this file
|
||||
// normrnd.c/.h - random gaussian number generator
|
||||
// npfwht.c/.h - Fast Walsh-Hadamard Transforms
|
||||
// pdmath.c/.h - Elementary math on probability distributions
|
||||
// qra12_63_64_irr_b.c/.h - Tables for a QRA(12,63) irregular RA code over GF(64)
|
||||
// qra13_64_64_irr_e.c/.h - Tables for a QRA(13,64) irregular RA code " "
|
||||
// qracodes.c/.h - QRA codes encoding/decoding functions
|
||||
//
|
||||
// -------------------------------------------------------------------------------
|
||||
//
|
||||
// qracodes is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
// qracodes is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with qracodes source distribution.
|
||||
// If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// Two codes are available for simulations in this sowftware release:
|
||||
|
||||
// QRA12_63_64_IRR_B: K=12 N=63 Q=64 irregular QRA code (defined in qra12_63_64_irr_b.h /.c)
|
||||
// QRA13_64_64_IRR_E: K=13 N=64 Q=64 irregular QRA code (defined in qra13_64_64_irr_b.h /.c)
|
||||
|
||||
// Codes with K=13 are designed to include a CRC as the 13th information symbol
|
||||
// and improve the code UER (Undetected Error Rate).
|
||||
// The CRC symbol is not sent along the channel (the codes are punctured) and the
|
||||
// resulting code is still a (12,63) code with an effective code rate of R = 12/63.
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
// OS dependent defines and includes --------------------------------------------
|
||||
|
||||
#if _WIN32 // note the underscore: without it, it's not msdn official!
|
||||
// Windows (x64 and x86)
|
||||
#include <windows.h> // required only for GetTickCount(...)
|
||||
#include <process.h> // _beginthread
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
// remove unwanted macros
|
||||
#define __cdecl
|
||||
|
||||
// implements Windows API
|
||||
#include <time.h>
|
||||
|
||||
unsigned int GetTickCount(void) {
|
||||
struct timespec ts;
|
||||
unsigned int theTick = 0U;
|
||||
clock_gettime( CLOCK_REALTIME, &ts );
|
||||
theTick = ts.tv_nsec / 1000000;
|
||||
theTick += ts.tv_sec * 1000;
|
||||
return theTick;
|
||||
}
|
||||
|
||||
// Convert Windows millisecond sleep
|
||||
//
|
||||
// VOID WINAPI Sleep(_In_ DWORD dwMilliseconds);
|
||||
//
|
||||
// to Posix usleep (in microseconds)
|
||||
//
|
||||
// int usleep(useconds_t usec);
|
||||
//
|
||||
#include <unistd.h>
|
||||
#define Sleep(x) usleep(x*1000)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || ( defined(__MINGW32__) || defined (__MIGW64__) )
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
#if __APPLE__
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "qracodes.h"
|
||||
#include "normrnd.h" // gaussian numbers generator
|
||||
#include "pdmath.h" // operations on probability distributions
|
||||
|
||||
// defined codes
|
||||
#include "qra12_63_64_irr_b.h"
|
||||
#include "qra13_64_64_irr_e.h"
|
||||
|
||||
// -----------------------------------------------------------------------------------
|
||||
|
||||
#define NTHREADS_MAX 160
|
||||
|
||||
// channel types
|
||||
#define CHANNEL_AWGN 0
|
||||
#define CHANNEL_RAYLEIGH 1
|
||||
|
||||
// amount of a-priori information provided to the decoder
|
||||
#define AP_NONE 0
|
||||
#define AP_28 1
|
||||
#define AP_44 2
|
||||
#define AP_56 3
|
||||
|
||||
const char ap_str[4][16] = {
|
||||
"None",
|
||||
"28 bit",
|
||||
"44 bit",
|
||||
"56 bit"
|
||||
};
|
||||
|
||||
const char fnameout_pfx[2][64] = {
|
||||
"wer-awgn-",
|
||||
"wer-rayleigh-"
|
||||
};
|
||||
const char fnameout_sfx[4][64] = {
|
||||
"-ap00.txt",
|
||||
"-ap28.txt",
|
||||
"-ap44.txt",
|
||||
"-ap56.txt"
|
||||
};
|
||||
|
||||
const int ap_masks_jt65[4][13] = {
|
||||
// Each row must be 13 entries long (to handle puntc. codes 13,64)
|
||||
// The mask of 13th symbol (crc) is alway initializated to 0
|
||||
// AP0 - no a-priori knowledge
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
// AP28 - 1st field known [cq ? ?] or [dst ? ?]
|
||||
{0x3F,0x3F,0x3F,0x3F,0x3C, 0, 0, 0, 0, 0, 0, 0},
|
||||
// AP44 - 1st and 3rd fields known [cq ? 0] or [dst ? 0]
|
||||
{0x3F,0x3F,0x3F,0x3F,0x3C, 0, 0, 0, 0,0x0F,0x3F,0x3F},
|
||||
// AP56 - 1st and 2nd fields known [dst src ?]
|
||||
{0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x30, 0, 0}
|
||||
};
|
||||
|
||||
void ix_mask(const qracode *pcode, float *r, const int *mask, const int *x);
|
||||
|
||||
void printword(char *msg, int *x, int size)
|
||||
{
|
||||
int k;
|
||||
printf("\n%s ",msg);
|
||||
for (k=0;k<size;k++)
|
||||
printf("%02hx ",x[k]);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
int channel_type;
|
||||
float EbNodB;
|
||||
volatile int nt;
|
||||
volatile int nerrs;
|
||||
volatile int nerrsu;
|
||||
volatile int stop;
|
||||
volatile int done;
|
||||
int ap_index; // index to the a priori knowledge mask
|
||||
const qracode *pcode; // pointer to the code descriptor
|
||||
int *x; //[qra_K]; input message buffer
|
||||
int *y, *ydec; //[qra_N]; encoded/decoded codewords buffers
|
||||
float *qra_v2cmsg; //[qra_NMSG*qra_M]; MP decoder v->c msg buffer
|
||||
float *qra_c2vmsg; //[qra_NMSG*qra_M]; MP decoder c->v msg buffer
|
||||
float *rp; // [qra_N*qra_M]; received samples (real component) buffer
|
||||
float *rq; // [qra_N*qra_M]; received samples (imag component) buffer
|
||||
float *chp; //[qra_N]; channel gains (real component) buffer
|
||||
float *chq; //[qra_N]; channel gains (imag component) buffer
|
||||
float *r; //[qra_N*qra_M]; received samples (amplitude) buffer
|
||||
float *ix; // [qra_N*qra_M]; // intrinsic information to the MP algorithm
|
||||
float *ex; // [qra_N*qra_M]; // extrinsic information from the MP algorithm
|
||||
|
||||
} wer_test_ds;
|
||||
|
||||
typedef void( __cdecl *pwer_test_thread)(wer_test_ds*);
|
||||
|
||||
// crc-6 generator polynomial
|
||||
// g(x) = x^6 + a5*x^5 + ... + a1*x + a0
|
||||
|
||||
// g(x) = x^6 + x + 1
|
||||
#define CRC6_GEN_POL 0x30 // MSB=a0 LSB=a5
|
||||
|
||||
// g(x) = x^6 + x^2 + x + 1 (as suggested by Joe. See: https://users.ece.cmu.edu/~koopman/crc/)
|
||||
// #define CRC6_GEN_POL 0x38 // MSB=a0 LSB=a5. Simulation results are similar
|
||||
|
||||
int calc_crc6(int *x, int sz)
|
||||
{
|
||||
int k,j,t,sr = 0;
|
||||
for (k=0;k<sz;k++) {
|
||||
t = x[k];
|
||||
for (j=0;j<6;j++) {
|
||||
if ((t^sr)&0x01)
|
||||
sr = (sr>>1) ^ CRC6_GEN_POL;
|
||||
else
|
||||
sr = (sr>>1);
|
||||
t>>=1;
|
||||
}
|
||||
}
|
||||
return sr;
|
||||
}
|
||||
|
||||
void wer_test_thread(wer_test_ds *pdata)
|
||||
{
|
||||
const qracode *pcode=pdata->pcode;
|
||||
const int qra_K = pcode->K;
|
||||
const int qra_N = pcode->N;
|
||||
const int qra_M = pcode->M;
|
||||
const int qra_m = pcode->m;
|
||||
const int NSAMPLES = pcode->N*pcode->M;
|
||||
|
||||
const float No = 1.0f; // noise spectral density
|
||||
const float sigma = (float)sqrt(No/2.0f); // std dev of noise I/Q components
|
||||
const float sigmach = (float)sqrt(1/2.0f); // std dev of channel I/Q gains
|
||||
|
||||
// Eb/No value for which we optimize the bessel metric
|
||||
const float EbNodBMetric = 2.8f;
|
||||
const float EbNoMetric = (float)pow(10,EbNodBMetric/10);
|
||||
|
||||
int k,t,j,diff;
|
||||
float R;
|
||||
float EsNoMetric;
|
||||
float EbNo, EsNo, Es, A;
|
||||
int channel_type, code_type;
|
||||
int nt=0; // transmitted codewords
|
||||
int nerrs = 0; // total number of errors
|
||||
int nerrsu = 0; // number of undetected errors
|
||||
int rc;
|
||||
|
||||
|
||||
// inizialize pointer to required buffers
|
||||
int *x=pdata->x; // message buffer
|
||||
int *y=pdata->y, *ydec=pdata->ydec; // encoded/decoded codeword buffers
|
||||
float *qra_v2cmsg=pdata->qra_v2cmsg; // table of the v->c messages
|
||||
float *qra_c2vmsg=pdata->qra_c2vmsg; // table of the c->v messages
|
||||
float *rp=pdata->rp; // received samples (real component)
|
||||
float *rq=pdata->rq; // received samples (imag component)
|
||||
float *chp=pdata->chp; // channel gains (real component)
|
||||
float *chq=pdata->chq; // channel gains (imag component)
|
||||
float *r=pdata->r; // received samples amplitudes
|
||||
float *ix=pdata->ix; // intrinsic information to the MP algorithm
|
||||
float *ex=pdata->ex; // extrinsic information from the MP algorithm
|
||||
|
||||
channel_type = pdata->channel_type;
|
||||
code_type = pcode->type;
|
||||
|
||||
// define the (true) code rate accordingly to the code type
|
||||
switch(code_type) {
|
||||
case QRATYPE_CRC:
|
||||
R = 1.0f*(qra_K-1)/qra_N;
|
||||
break;
|
||||
case QRATYPE_CRCPUNCTURED:
|
||||
R = 1.0f*(qra_K-1)/(qra_N-1);
|
||||
break;
|
||||
case QRATYPE_NORMAL:
|
||||
default:
|
||||
R = 1.0f*(qra_K)/(qra_N);
|
||||
}
|
||||
|
||||
EsNoMetric = 1.0f*qra_m*R*EbNoMetric;
|
||||
|
||||
EbNo = (float)pow(10,pdata->EbNodB/10);
|
||||
EsNo = 1.0f*qra_m*R*EbNo;
|
||||
Es = EsNo*No;
|
||||
A = (float)sqrt(Es);
|
||||
|
||||
|
||||
// encode the input
|
||||
if (code_type==QRATYPE_CRC || code_type==QRATYPE_CRCPUNCTURED) {
|
||||
// compute the information message symbol check as the (negated) xor of all the
|
||||
// information message symbols
|
||||
for (k=0;k<(qra_K-1);k++)
|
||||
x[k]=k%qra_M;
|
||||
x[k]=calc_crc6(x,qra_K-1);
|
||||
}
|
||||
else
|
||||
for (k=0;k<qra_K;k++)
|
||||
x[k]=k%qra_M;
|
||||
|
||||
qra_encode(pcode,y,x);
|
||||
|
||||
while (pdata->stop==0) {
|
||||
|
||||
// simulate the channel
|
||||
// NOTE: in the case that the code is punctured, for simplicity
|
||||
// we compute the channel outputs and the metric also for the crc symbol
|
||||
// then we ignore its observation.
|
||||
normrnd_s(rp,NSAMPLES,0,sigma);
|
||||
normrnd_s(rq,NSAMPLES,0,sigma);
|
||||
|
||||
if (channel_type == CHANNEL_AWGN) {
|
||||
for (k=0;k<qra_N;k++)
|
||||
rp[k*qra_M+y[k]]+=A;
|
||||
}
|
||||
else if (channel_type == CHANNEL_RAYLEIGH) {
|
||||
normrnd_s(chp,qra_N,0,sigmach);
|
||||
normrnd_s(chq,qra_N,0,sigmach);
|
||||
for (k=0;k<qra_N;k++) {
|
||||
rp[k*qra_M+y[k]]+=A*chp[k];
|
||||
rq[k*qra_M+y[k]]+=A*chq[k];
|
||||
}
|
||||
}
|
||||
else {
|
||||
pdata->done = 1;
|
||||
return; // unknown channel type
|
||||
}
|
||||
|
||||
// compute the squares of the amplitudes of the received samples
|
||||
for (k=0;k<NSAMPLES;k++)
|
||||
r[k] = rp[k]*rp[k] + rq[k]*rq[k];
|
||||
|
||||
// compute the intrinsic symbols probabilities
|
||||
qra_mfskbesselmetric(ix,r,pcode->m,pcode->N,EsNoMetric);
|
||||
|
||||
if (code_type==QRATYPE_CRCPUNCTURED) {
|
||||
// ignore observations of the CRC symbol as it is not actually sent
|
||||
// over the channel
|
||||
pd_init(PD_ROWADDR(ix,qra_M,qra_K),pd_uniform(qra_m),qra_M);
|
||||
}
|
||||
|
||||
|
||||
if (pdata->ap_index!=0)
|
||||
// mask channel observations with a priori knowledge
|
||||
ix_mask(pcode,ix,ap_masks_jt65[pdata->ap_index],x);
|
||||
|
||||
|
||||
// compute the extrinsic symbols probabilities with the message-passing algorithm
|
||||
// stop if extrinsic information does not converges to 1 within the given number of iterations
|
||||
rc = qra_extrinsic(pcode,ex,ix,100,qra_v2cmsg,qra_c2vmsg);
|
||||
|
||||
if (rc>=0) { // the MP algorithm converged to Iex~1 in rc iterations
|
||||
|
||||
// decode the codeword
|
||||
qra_mapdecode(pcode,ydec,ex,ix);
|
||||
|
||||
// look for undetected errors
|
||||
if (code_type==QRATYPE_CRC || code_type==QRATYPE_CRCPUNCTURED) {
|
||||
|
||||
j = 0; diff = 0;
|
||||
for (k=0;k<(qra_K-1);k++)
|
||||
diff |= (ydec[k]!=x[k]);
|
||||
t = calc_crc6(ydec,qra_K-1);
|
||||
if (t!=ydec[k]) // error detected - crc doesn't matches
|
||||
nerrs += 1;
|
||||
else
|
||||
if (diff) { // decoded message is not equal to the transmitted one but
|
||||
// the crc test passed
|
||||
// add as undetected error
|
||||
nerrsu += 1;
|
||||
nerrs += 1;
|
||||
// uncomment to see what the undetected error pattern looks like
|
||||
//printword("U", ydec);
|
||||
}
|
||||
}
|
||||
else
|
||||
for (k=0;k<qra_K;k++)
|
||||
if (ydec[k]!=x[k]) { // decoded msg differs from the transmitted one
|
||||
nerrsu += 1; // it's a false decode
|
||||
nerrs += 1;
|
||||
// uncomment to see what the undetected error pattern looks like
|
||||
// printword("U", ydec);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
else // failed to converge to a solution within the given number of iterations
|
||||
nerrs++;
|
||||
|
||||
nt = nt+1;
|
||||
|
||||
pdata->nt=nt;
|
||||
pdata->nerrs=nerrs;
|
||||
pdata->nerrsu=nerrsu;
|
||||
|
||||
}
|
||||
|
||||
pdata->done=1;
|
||||
|
||||
#if _WIN32
|
||||
_endthread();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(__linux__) || ( defined(__MINGW32__) || defined (__MIGW64__) )
|
||||
|
||||
void *wer_test_pthread(void *p)
|
||||
{
|
||||
wer_test_thread ((wer_test_ds *)p);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void ix_mask(const qracode *pcode, float *r, const int *mask, const int *x)
|
||||
{
|
||||
// mask intrinsic information (channel observations) with a priori knowledge
|
||||
|
||||
int k,kk, smask;
|
||||
const int qra_K=pcode->K;
|
||||
const int qra_M=pcode->M;
|
||||
const int qra_m=pcode->m;
|
||||
|
||||
for (k=0;k<qra_K;k++) {
|
||||
smask = mask[k];
|
||||
if (smask) {
|
||||
for (kk=0;kk<qra_M;kk++)
|
||||
if (((kk^x[k])&smask)!=0)
|
||||
*(PD_ROWADDR(r,qra_M,k)+kk) = 0.f;
|
||||
|
||||
pd_norm(PD_ROWADDR(r,qra_M,k),qra_m);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int wer_test_proc(const qracode *pcode, int nthreads, int chtype, int ap_index, float *EbNodB, int *nerrstgt, int nitems)
|
||||
{
|
||||
int k,nn,j,nt,nerrs,nerrsu,nd;
|
||||
int cini,cend;
|
||||
char fnameout[128];
|
||||
FILE *fout;
|
||||
wer_test_ds wt[NTHREADS_MAX];
|
||||
float pe,avgt;
|
||||
|
||||
nn = sizeof(EbNodB)/sizeof(float); // size of the EbNo array to test
|
||||
|
||||
if (nthreads>NTHREADS_MAX) {
|
||||
printf("Error: nthreads should be <=%d\n",NTHREADS_MAX);
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(fnameout,"%s%s%s",
|
||||
fnameout_pfx[chtype],
|
||||
pcode->name,
|
||||
fnameout_sfx[ap_index]);
|
||||
|
||||
fout = fopen(fnameout,"w");
|
||||
fprintf(fout,"# Channel (0=AWGN,1=Rayleigh), Eb/No (dB), Transmitted codewords, Errors, Undetected Errors, Avg dec. time (ms), WER\n");
|
||||
|
||||
printf("\nTesting the code %s over the %s channel\nSimulation data will be saved to %s\n",
|
||||
pcode->name,
|
||||
chtype==CHANNEL_AWGN?"AWGN":"Rayleigh",
|
||||
fnameout);
|
||||
fflush (stdout);
|
||||
|
||||
// init fixed thread parameters and preallocate buffers
|
||||
for (j=0;j<nthreads;j++) {
|
||||
wt[j].channel_type=chtype;
|
||||
wt[j].ap_index = ap_index;
|
||||
wt[j].pcode = pcode;
|
||||
wt[j].x = (int*)malloc(pcode->K*sizeof(int));
|
||||
wt[j].y = (int*)malloc(pcode->N*sizeof(int));
|
||||
wt[j].ydec = (int*)malloc(pcode->N*sizeof(int));
|
||||
wt[j].qra_v2cmsg = (float*)malloc(pcode->NMSG*pcode->M*sizeof(float));
|
||||
wt[j].qra_c2vmsg = (float*)malloc(pcode->NMSG*pcode->M*sizeof(float));
|
||||
wt[j].rp = (float*)malloc(pcode->N*pcode->M*sizeof(float));
|
||||
wt[j].rq = (float*)malloc(pcode->N*pcode->M*sizeof(float));
|
||||
wt[j].chp = (float*)malloc(pcode->N*sizeof(float));
|
||||
wt[j].chq = (float*)malloc(pcode->N*sizeof(float));
|
||||
wt[j].r = (float*)malloc(pcode->N*pcode->M*sizeof(float));
|
||||
wt[j].ix = (float*)malloc(pcode->N*pcode->M*sizeof(float));
|
||||
wt[j].ex = (float*)malloc(pcode->N*pcode->M*sizeof(float));
|
||||
}
|
||||
|
||||
|
||||
for (k=0;k<nitems;k++) {
|
||||
|
||||
printf("\nTesting at Eb/No=%4.1f dB...",EbNodB[k]);
|
||||
fflush (stdout);
|
||||
|
||||
for (j=0;j<nthreads;j++) {
|
||||
wt[j].EbNodB=EbNodB[k];
|
||||
wt[j].nt=0;
|
||||
wt[j].nerrs=0;
|
||||
wt[j].nerrsu=0;
|
||||
wt[j].done = 0;
|
||||
wt[j].stop = 0;
|
||||
#if defined(__linux__) || ( defined(__MINGW32__) || defined (__MIGW64__) )
|
||||
if (pthread_create (&wt[j].thread, 0, wer_test_pthread, &wt[j])) {
|
||||
perror ("Creating thread: ");
|
||||
exit (255);
|
||||
}
|
||||
#else
|
||||
_beginthread((void*)(void*)wer_test_thread,0,&wt[j]);
|
||||
#endif
|
||||
}
|
||||
|
||||
nd = 0;
|
||||
cini = GetTickCount();
|
||||
|
||||
while (1) {
|
||||
// count errors
|
||||
nerrs = 0;
|
||||
for (j=0;j<nthreads;j++)
|
||||
nerrs += wt[j].nerrs;
|
||||
// stop the working threads
|
||||
// if number of errors reached at this Eb/No value
|
||||
if (nerrs>=nerrstgt[k]) {
|
||||
for (j=0;j<nthreads;j++)
|
||||
wt[j].stop = 1;
|
||||
break;
|
||||
}
|
||||
else { // continue with the simulation
|
||||
Sleep(2);
|
||||
nd = (nd+1)%100;
|
||||
if (nd==0) {
|
||||
printf(".");
|
||||
fflush (stdout);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
cend = GetTickCount();
|
||||
|
||||
// wait for the working threads to exit
|
||||
for (j=0;j<nthreads;j++)
|
||||
#if defined(__linux__) || ( defined(__MINGW32__) || defined (__MIGW64__) )
|
||||
{
|
||||
void *rc;
|
||||
if (pthread_join (wt[j].thread, &rc)) {
|
||||
perror ("Waiting working threads to exit");
|
||||
exit (255);
|
||||
}
|
||||
}
|
||||
#else
|
||||
while(wt[j].done==0)
|
||||
Sleep(1);
|
||||
|
||||
#endif
|
||||
printf("\n");
|
||||
fflush (stdout);
|
||||
|
||||
// compute the total number of transmitted codewords
|
||||
// the total number of errors and the total number of undetected errors
|
||||
nt = 0;
|
||||
nerrs =0;
|
||||
nerrsu = 0;
|
||||
for (j=0;j<nthreads;j++) {
|
||||
nt += wt[j].nt;
|
||||
nerrs += wt[j].nerrs;
|
||||
nerrsu += wt[j].nerrsu;
|
||||
}
|
||||
|
||||
pe = 1.0f*nerrs/nt; // word error rate
|
||||
avgt = 1.0f*(cend-cini)/nt; // average time per decode (ms)
|
||||
|
||||
printf("Elapsed Time=%6.1fs (%5.2fms/word)\nTransmitted=%8d - Errors=%6d - Undetected=%3d - WER=%.2e\n",
|
||||
0.001f*(cend-cini),
|
||||
avgt, nt, nerrs, nerrsu, pe);
|
||||
fflush (stdout);
|
||||
|
||||
// save simulation data to output file
|
||||
fprintf(fout,"%01d %.2f %d %d %d %.2f %.2e\n",
|
||||
chtype,
|
||||
EbNodB[k],
|
||||
nt,
|
||||
nerrs,
|
||||
nerrsu,
|
||||
avgt,
|
||||
pe);
|
||||
|
||||
}
|
||||
|
||||
fclose(fout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const qracode *codetotest[] = {
|
||||
&qra_12_63_64_irr_b,
|
||||
&qra_13_64_64_irr_e
|
||||
};
|
||||
|
||||
void syntax(void)
|
||||
{
|
||||
printf("\nQ-ary Repeat-Accumulate Code Word Error Rate Simulator\n");
|
||||
printf("2016, Nico Palermo - IV3NWV\n\n");
|
||||
printf("Syntax: qracodes [-q<code_index>] [-t<threads>] [-c<ch_type>] [-a<ap_index>] [-f<fnamein>[-h]\n");
|
||||
printf("Options: \n");
|
||||
printf(" -q<code_index>: code to simulate. 0=qra_12_63_64_irr_b\n");
|
||||
printf(" 1=qra_13_64_64_irr_e (default)\n");
|
||||
printf(" -t<threads> : number of threads to be used for the simulation [1..24]\n");
|
||||
printf(" (default=8)\n");
|
||||
printf(" -c<ch_type> : channel_type. 0=AWGN 1=Rayleigh \n");
|
||||
printf(" (default=AWGN)\n");
|
||||
printf(" -a<ap_index> : amount of a-priori information provided to decoder. \n");
|
||||
printf(" 0= No a-priori (default)\n");
|
||||
printf(" 1= 28 bit \n");
|
||||
printf(" 2= 44 bit \n");
|
||||
printf(" 3= 56 bit \n");
|
||||
printf(" -f<fnamein> : name of the file containing the Eb/No values to be simulated\n");
|
||||
printf(" (default=ebnovalues.txt)\n");
|
||||
printf(" This file should contain lines in this format:\n");
|
||||
printf(" # Eb/No(dB) Target Errors\n");
|
||||
printf(" 0.1 5000\n");
|
||||
printf(" 0.6 5000\n");
|
||||
printf(" 1.1 1000\n");
|
||||
printf(" 1.6 1000\n");
|
||||
printf(" ...\n");
|
||||
printf(" (lines beginning with a # are treated as comments\n\n");
|
||||
}
|
||||
|
||||
#define SIM_POINTS_MAX 20
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
float EbNodB[SIM_POINTS_MAX];
|
||||
int nerrstgt[SIM_POINTS_MAX];
|
||||
FILE *fin;
|
||||
|
||||
char fnamein[128]= "ebnovalues.txt";
|
||||
char buf[128];
|
||||
|
||||
int nitems = 0;
|
||||
int code_idx = 1;
|
||||
int nthreads = 8;
|
||||
int ch_type = CHANNEL_AWGN;
|
||||
int ap_index = AP_NONE;
|
||||
|
||||
// parse command line
|
||||
while(--argc) {
|
||||
argv++;
|
||||
if (strncmp(*argv,"-h",2)==0) {
|
||||
syntax();
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-q",2)==0) {
|
||||
code_idx = (int)atoi((*argv)+2);
|
||||
if (code_idx>1) {
|
||||
printf("Invalid code index\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-t",2)==0) {
|
||||
nthreads = (int)atoi((*argv)+2);
|
||||
printf("nthreads = %d\n",nthreads);
|
||||
if (nthreads>NTHREADS_MAX) {
|
||||
printf("Invalid number of threads\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-c",2)==0) {
|
||||
ch_type = (int)atoi((*argv)+2);
|
||||
if (ch_type>CHANNEL_RAYLEIGH) {
|
||||
printf("Invalid channel type\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-a",2)==0) {
|
||||
ap_index = (int)atoi((*argv)+2);
|
||||
if (ap_index>AP_56) {
|
||||
printf("Invalid a-priori information index\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-f",2)==0) {
|
||||
strncpy(fnamein,(*argv)+2,127);
|
||||
}
|
||||
else
|
||||
if (strncmp(*argv,"-h",2)==0) {
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
printf("Invalid option\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// parse points to be simulated from the input file
|
||||
fin = fopen(fnamein,"r");
|
||||
if (!fin) {
|
||||
printf("Can't open file: %s\n",fnamein);
|
||||
syntax();
|
||||
}
|
||||
|
||||
while (fgets(buf,128,fin)!=0)
|
||||
if (*buf=='#' || *buf=='\n' )
|
||||
continue;
|
||||
else
|
||||
if (nitems==SIM_POINTS_MAX)
|
||||
break;
|
||||
else
|
||||
if (sscanf(buf,"%f %u",&EbNodB[nitems],&nerrstgt[nitems])!=2) {
|
||||
printf("Invalid input file format\n");
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
nitems++;
|
||||
|
||||
fclose(fin);
|
||||
|
||||
if (nitems==0) {
|
||||
printf("No Eb/No point specified in file %s\n",fnamein);
|
||||
syntax();
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("\nQ-ary Repeat-Accumulate Code Word Error Rate Simulator\n");
|
||||
printf("2016, Nico Palermo - IV3NWV\n\n");
|
||||
|
||||
printf("Nthreads = %d\n",nthreads);
|
||||
printf("Channel = %s\n",ch_type==CHANNEL_AWGN?"AWGN":"Rayleigh");
|
||||
printf("Codename = %s\n",codetotest[code_idx]->name);
|
||||
printf("A-priori = %s\n",ap_str[ap_index]);
|
||||
printf("Eb/No input file = %s\n\n",fnamein);
|
||||
|
||||
wer_test_proc(codetotest[code_idx], nthreads, ch_type, ap_index, EbNodB, nerrstgt, nitems);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/*=============================================================================
|
||||
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_PUSH_BACK_10022005_1647)
|
||||
#define FUSION_PUSH_BACK_10022005_1647
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/push_back.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
#include <boost/fusion/algorithm/transformation/push_back.hpp>
|
||||
#include <boost/fusion/sequence/convert.hpp>
|
||||
|
||||
namespace boost { namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct push_back_impl;
|
||||
|
||||
template <>
|
||||
struct push_back_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename T>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
fusion::result_of::push_back<Sequence, T>::type
|
||||
result;
|
||||
|
||||
typedef typename
|
||||
fusion::result_of::convert<
|
||||
typename fusion::detail::tag_of<Sequence>::type, result>::type
|
||||
type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,466 @@
|
||||
|
||||
// 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;
|
||||
};
|
||||
|
||||
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< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 >
|
||||
{
|
||||
typedef bind< F,T1,T2,T3,T4,T5 > f_;
|
||||
typedef typename apply_wrap5< f_,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
|
||||
>
|
||||
struct bind< F,na,na,na,na,na >
|
||||
: bind0<F>
|
||||
{
|
||||
};
|
||||
|
||||
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
|
||||
>
|
||||
struct bind< F,T1,na,na,na,na >
|
||||
: bind1< F,T1 >
|
||||
{
|
||||
};
|
||||
|
||||
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
|
||||
>
|
||||
struct bind< F,T1,T2,na,na,na >
|
||||
: bind2< F,T1,T2 >
|
||||
{
|
||||
};
|
||||
|
||||
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
|
||||
>
|
||||
struct bind< F,T1,T2,T3,na,na >
|
||||
: bind3< F,T1,T2,T3 >
|
||||
{
|
||||
};
|
||||
|
||||
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
|
||||
>
|
||||
struct bind< F,T1,T2,T3,T4,na >
|
||||
: bind4< F,T1,T2,T3,T4 >
|
||||
{
|
||||
};
|
||||
|
||||
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)
|
||||
|
||||
/// primary template (not a specialization!)
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct bind
|
||||
: bind5< F,T1,T2,T3,T4,T5 >
|
||||
{
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
#ifndef BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
|
||||
#define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_xml_grammar.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// this module is derived from simplexml.cpp - an example shipped as part of
|
||||
// the spirit parser. This example contains the following notice:
|
||||
/*=============================================================================
|
||||
simplexml.cpp
|
||||
|
||||
Spirit V1.3
|
||||
URL: http://spirit.sourceforge.net/
|
||||
|
||||
Copyright (c) 2001, Daniel C. Nuffer
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the copyright holder be held liable for
|
||||
any damages arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute
|
||||
it freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
=============================================================================*/
|
||||
#include <string>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/spirit/include/classic_rule.hpp>
|
||||
#include <boost/spirit/include/classic_chset.hpp>
|
||||
|
||||
#include <boost/archive/basic_archive.hpp>
|
||||
#include <boost/serialization/tracking.hpp>
|
||||
#include <boost/serialization/version.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// XML grammar parsing
|
||||
|
||||
template<class CharType>
|
||||
class basic_xml_grammar {
|
||||
public:
|
||||
// The following is not necessary according to DR45, but at least
|
||||
// one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise.
|
||||
struct return_values;
|
||||
friend struct return_values;
|
||||
|
||||
private:
|
||||
typedef typename std::basic_istream<CharType> IStream;
|
||||
typedef typename std::basic_string<CharType> StringType;
|
||||
typedef typename boost::spirit::classic::chset<CharType> chset_t;
|
||||
typedef typename boost::spirit::classic::chlit<CharType> chlit_t;
|
||||
typedef typename boost::spirit::classic::scanner<
|
||||
typename std::basic_string<CharType>::iterator
|
||||
> scanner_t;
|
||||
typedef typename boost::spirit::classic::rule<scanner_t> rule_t;
|
||||
// Start grammar definition
|
||||
rule_t
|
||||
Reference,
|
||||
Eq,
|
||||
STag,
|
||||
ETag,
|
||||
LetterOrUnderscoreOrColon,
|
||||
AttValue,
|
||||
CharRef1,
|
||||
CharRef2,
|
||||
CharRef,
|
||||
AmpRef,
|
||||
LTRef,
|
||||
GTRef,
|
||||
AposRef,
|
||||
QuoteRef,
|
||||
CharData,
|
||||
CharDataChars,
|
||||
content,
|
||||
AmpName,
|
||||
LTName,
|
||||
GTName,
|
||||
ClassNameChar,
|
||||
ClassName,
|
||||
Name,
|
||||
XMLDecl,
|
||||
XMLDeclChars,
|
||||
DocTypeDecl,
|
||||
DocTypeDeclChars,
|
||||
ClassIDAttribute,
|
||||
ObjectIDAttribute,
|
||||
ClassNameAttribute,
|
||||
TrackingAttribute,
|
||||
VersionAttribute,
|
||||
UnusedAttribute,
|
||||
Attribute,
|
||||
SignatureAttribute,
|
||||
SerializationWrapper,
|
||||
NameHead,
|
||||
NameTail,
|
||||
AttributeList,
|
||||
S;
|
||||
|
||||
// XML Character classes
|
||||
chset_t
|
||||
BaseChar,
|
||||
Ideographic,
|
||||
Char,
|
||||
Letter,
|
||||
Digit,
|
||||
CombiningChar,
|
||||
Extender,
|
||||
Sch,
|
||||
NameChar;
|
||||
|
||||
void init_chset();
|
||||
|
||||
bool my_parse(
|
||||
IStream & is,
|
||||
const rule_t &rule_,
|
||||
const CharType delimiter = L'>'
|
||||
) const ;
|
||||
public:
|
||||
struct return_values {
|
||||
StringType object_name;
|
||||
StringType contents;
|
||||
//class_id_type class_id;
|
||||
int_least16_t class_id;
|
||||
//object_id_type object_id;
|
||||
uint_least32_t object_id;
|
||||
//version_type version;
|
||||
unsigned int version;
|
||||
tracking_type tracking_level;
|
||||
StringType class_name;
|
||||
return_values() :
|
||||
version(0),
|
||||
tracking_level(false)
|
||||
{}
|
||||
} rv;
|
||||
bool parse_start_tag(IStream & is) /*const*/;
|
||||
bool parse_end_tag(IStream & is) const;
|
||||
bool parse_string(IStream & is, StringType & s) /*const*/;
|
||||
void init(IStream & is);
|
||||
bool windup(IStream & is);
|
||||
basic_xml_grammar();
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
// 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 the main "template_arity.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
template< int N > struct arity_tag
|
||||
{
|
||||
typedef char (&type)[N + 1];
|
||||
};
|
||||
|
||||
template<
|
||||
int C1, int C2, int C3, int C4, int C5, int C6
|
||||
>
|
||||
struct max_arity
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value =
|
||||
( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) )
|
||||
);
|
||||
};
|
||||
|
||||
arity_tag<0>::type arity_helper(...);
|
||||
|
||||
template<
|
||||
template< typename P1 > class F
|
||||
, typename T1
|
||||
>
|
||||
typename arity_tag<1>::type
|
||||
arity_helper(type_wrapper< F<T1> >, arity_tag<1>);
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2 > class F
|
||||
, typename T1, typename T2
|
||||
>
|
||||
typename arity_tag<2>::type
|
||||
arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>);
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3 > class F
|
||||
, typename T1, typename T2, typename T3
|
||||
>
|
||||
typename arity_tag<3>::type
|
||||
arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>);
|
||||
|
||||
template<
|
||||
template< typename P1, typename P2, typename P3, typename P4 > class F
|
||||
, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
typename arity_tag<4>::type
|
||||
arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>);
|
||||
|
||||
template<
|
||||
template<
|
||||
typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
>
|
||||
typename arity_tag<5>::type
|
||||
arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>);
|
||||
|
||||
template<
|
||||
template<
|
||||
typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6
|
||||
>
|
||||
class F
|
||||
, typename T1, typename T2, typename T3, typename T4, typename T5
|
||||
, typename T6
|
||||
>
|
||||
typename arity_tag<6>::type
|
||||
arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>);
|
||||
template< typename F, int N >
|
||||
struct template_arity_impl
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value =
|
||||
sizeof(::boost::mpl::aux::arity_helper(type_wrapper<F>(), arity_tag<N>())) - 1
|
||||
);
|
||||
};
|
||||
|
||||
template< typename F >
|
||||
struct template_arity
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value = (
|
||||
max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value
|
||||
));
|
||||
typedef mpl::int_<value> type;
|
||||
};
|
||||
|
||||
}}}
|
||||
@@ -0,0 +1,5 @@
|
||||
A UI for downloading sample files from a web server.
|
||||
|
||||
Works in concert with samples/CMakeLists.txt which generates the JSON
|
||||
contents description file and has a build target upload-samples that
|
||||
uploads the samples and content file to the project files server.
|
||||
@@ -0,0 +1,28 @@
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Copyright 2012 John Maddock. 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_
|
||||
|
||||
#ifndef BOOST_MATH_EXTRACT_EXPONENT_HPP
|
||||
#define BOOST_MATH_EXTRACT_EXPONENT_HPP
|
||||
|
||||
#include <boost/multiprecision/number.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace multiprecision{
|
||||
namespace backends{
|
||||
|
||||
template <class Backend, int cat>
|
||||
struct extract_exponent_type
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
template <class Backend>
|
||||
struct extract_exponent_type<Backend, number_kind_floating_point>
|
||||
{
|
||||
typedef typename Backend::exponent_type type;
|
||||
};
|
||||
|
||||
}}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,103 @@
|
||||
/*
|
||||
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_OS_BSD_H
|
||||
#define BOOST_PREDEF_OS_BSD_H
|
||||
|
||||
/* Special case: OSX will define BSD predefs if the sys/param.h
|
||||
* header is included. We can guard against that, but only if we
|
||||
* detect OSX first. Hence we will force include OSX detection
|
||||
* before doing any BSD detection.
|
||||
*/
|
||||
#include <boost/predef/os/macos.h>
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_OS_BSD`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system.
|
||||
|
||||
BSD has various branch operating systems possible and each detected
|
||||
individually. This detects the following variations and sets a specific
|
||||
version number macro to match:
|
||||
|
||||
* `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD]
|
||||
* `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD]
|
||||
* `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS]
|
||||
* `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD]
|
||||
* `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD]
|
||||
|
||||
[note The general `BOOST_OS_BSD` is set in all cases to indicate some form
|
||||
of BSD. If the above variants is detected the corresponding macro is also set.]
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`BSD`] [__predef_detection__]]
|
||||
[[`_SYSTYPE_BSD`] [__predef_detection__]]
|
||||
|
||||
[[`BSD4_2`] [4.2.0]]
|
||||
[[`BSD4_3`] [4.3.0]]
|
||||
[[`BSD4_4`] [4.4.0]]
|
||||
[[`BSD`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#include <boost/predef/os/bsd/bsdi.h>
|
||||
#include <boost/predef/os/bsd/dragonfly.h>
|
||||
#include <boost/predef/os/bsd/free.h>
|
||||
#include <boost/predef/os/bsd/open.h>
|
||||
#include <boost/predef/os/bsd/net.h>
|
||||
|
||||
#ifndef BOOST_OS_BSD
|
||||
#define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(BSD) || \
|
||||
defined(_SYSTYPE_BSD) \
|
||||
)
|
||||
# undef BOOST_OS_BSD
|
||||
# include <sys/param.h>
|
||||
# if !defined(BOOST_OS_BSD) && defined(BSD4_4)
|
||||
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD) && defined(BSD4_3)
|
||||
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD) && defined(BSD4_2)
|
||||
# define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD) && defined(BSD)
|
||||
# define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD)
|
||||
# endif
|
||||
# if !defined(BOOST_OS_BSD)
|
||||
# define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_BSD
|
||||
# define BOOST_OS_BSD_AVAILABLE
|
||||
# include <boost/predef/detail/os_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_OS_BSD_NAME "BSD"
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/predef/os/bsd/bsdi.h>
|
||||
#include <boost/predef/os/bsd/dragonfly.h>
|
||||
#include <boost/predef/os/bsd/free.h>
|
||||
#include <boost/predef/os/bsd/open.h>
|
||||
#include <boost/predef/os/bsd/net.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
|
||||
@@ -0,0 +1,82 @@
|
||||
<HTML><HEAD>
|
||||
|
||||
<TITLE> Installing the LDPC Software </TITLE>
|
||||
|
||||
</HEAD><BODY>
|
||||
|
||||
<H1> Installing the LDPC Software </H1>
|
||||
|
||||
The LDPC software is written in C, and may well work with any C
|
||||
compiler, though it has been tested only with gcc, in Unix and Linux
|
||||
environments, and in the <A HREF="http://www.cygwin.com">Cygwin</A>
|
||||
Unix-like environment that runs under Microsoft Windows. The
|
||||
installation instructions below assume that you are using a Unix-like
|
||||
system.
|
||||
|
||||
<P>All the software, including the documentation you are viewing here,
|
||||
is contained in a tar file, which you can download by clicking one
|
||||
of the options below:
|
||||
<BLOCKQUOTE>
|
||||
<A HREF="http://www.cs.utoronto.ca/~radford/ftp/LDPC-yyyy-mm-dd/LDPC-yyyy-mm-dd.tar">Tar
|
||||
file of LDPC software</A> (0.9 Megabytes)<BR>
|
||||
<A HREF="http://www.cs.utoronto.ca/~radford/ftp/LDPC-yyyy-mm-dd/LDPC-yyyy-mm-dd.tar.gz">Gzipped
|
||||
tar file of LDPC software</A> (0.4 Megabytes)
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>Once you obtain the tar file (and uncompress it with gunzip if
|
||||
necessary), you should extract the files with the following Unix command:
|
||||
<BLOCKQUOTE><PRE>
|
||||
tar xf LDPC-yyyy-mm-dd.tar
|
||||
</PRE></BLOCKQUOTE>
|
||||
This will create a source directory called <TT>LDPC-yyyy-mm-dd</TT>, and place
|
||||
all the source, documentation, and other files in this directory.
|
||||
|
||||
<P>If you prefer for this directory to be called something else,
|
||||
rename it <B>now</B>, before compiling the programs, since the file
|
||||
<TT>randfile</TT> in this directory, containing natural random numbers,
|
||||
is accessed according to its path when the programs were compiled.
|
||||
|
||||
<P>Once the tar command above has finished, you should change into the
|
||||
newly-created directory, and type
|
||||
<BLOCKQUOTE><PRE>
|
||||
make
|
||||
</PRE></BLOCKQUOTE>
|
||||
If all goes well, this should compile all the programs (except for some
|
||||
test programs, which can be compiled with <TT>make test</TT>). You
|
||||
may want to edit the file <TT>Makefile</TT> before running <TT>make</TT>
|
||||
in order to change compilation options, such as the optimization level.
|
||||
|
||||
<P>You can run the programs from this source directory, or you can copy
|
||||
them to some other directory by running the <TT>LDPC-install</TT>
|
||||
shell file. For instance, to install them in a bin directory in your
|
||||
home directory, do the following:
|
||||
<BLOCKQUOTE><PRE>
|
||||
./LDPC-install $HOME/bin
|
||||
</PRE></BLOCKQUOTE>
|
||||
|
||||
<P>The source directory contains a copy of all the HTML files
|
||||
documenting the software, such as the one you are reading now, with
|
||||
the file <TT>index.html</TT> being the starting point. It is best to
|
||||
use this local copy when referring to the documentation, rather than
|
||||
get it off the web, since that is faster and also insures that the
|
||||
documentation is for the version that you are using. Just tell your
|
||||
browser to open the URL
|
||||
<BLOCKQUOTE><PRE>
|
||||
file:<I>path-to-software</I>/index.html
|
||||
</PRE></BLOCKQUOTE>
|
||||
where <TT><I>path-to-software</I></TT> is the full path (starting with "/")
|
||||
to the directory where you've put the software.
|
||||
|
||||
<P>The command
|
||||
<BLOCKQUOTE><PRE>
|
||||
make clean
|
||||
</PRE></BLOCKQUOTE>
|
||||
will remove all the compiled programs, as well as the files created when
|
||||
the <A HREF="examples.html">examples</A> are run, and <TT>core</TT>, if it
|
||||
exists.
|
||||
|
||||
<HR>
|
||||
|
||||
<A HREF="index.html">Back to index for LDPC software</A>
|
||||
|
||||
</BODY></HTML>
|
||||
@@ -0,0 +1,14 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2013-2014 Damien Buhl
|
||||
|
||||
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_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_AUTO_HPP
|
||||
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_AUTO_HPP
|
||||
|
||||
#define BOOST_FUSION_ADAPT_AUTO auto
|
||||
#define BOOST_MPL_PP_TOKEN_EQUAL_auto(x) x
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,171 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
{
|
||||
template <typename T0>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type>
|
||||
make_tuple(T0 const& arg0)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type>(
|
||||
arg0);
|
||||
}
|
||||
template <typename T0 , typename T1>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>(
|
||||
arg0 , arg1);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>(
|
||||
arg0 , arg1 , arg2);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>(
|
||||
arg0 , arg1 , arg2 , arg3);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,931 @@
|
||||
#ifndef BOOST_RANGE_DETAIL_MICROSOFT_HPP
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_HPP
|
||||
|
||||
// Boost.Range MFC/ATL Extension
|
||||
//
|
||||
// Copyright Shunsuke Sogame 2005-2006.
|
||||
// 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)
|
||||
|
||||
|
||||
|
||||
|
||||
// config
|
||||
//
|
||||
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1 1
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator range_mutable_iterator
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_begin range_begin
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_end range_end
|
||||
#else
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator range_mutable_iterator
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_begin range_begin
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_range_end range_end
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// yet another customization way
|
||||
//
|
||||
|
||||
|
||||
#include <boost/iterator/iterator_traits.hpp> // iterator_difference
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/control/iif.hpp>
|
||||
#include <boost/preprocessor/comma_if.hpp>
|
||||
#include <boost/preprocessor/detail/is_unary.hpp>
|
||||
#include <boost/preprocessor/list/for_each.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/preprocessor/seq/for_each_i.hpp>
|
||||
#include <boost/preprocessor/seq/size.hpp>
|
||||
#include <boost/preprocessor/tuple/eat.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/range/size_type.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/remove_cv.hpp>
|
||||
#include <boost/utility/addressof.hpp>
|
||||
#include <boost/utility/enable_if.hpp> // disable_if
|
||||
|
||||
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
|
||||
#include <boost/range/mutable_iterator.hpp>
|
||||
#else
|
||||
#include <iterator> // distance
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/iterator.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost { namespace range_detail_microsoft {
|
||||
|
||||
|
||||
// customization point
|
||||
//
|
||||
|
||||
template< class Tag >
|
||||
struct customization;
|
||||
|
||||
|
||||
template< class T >
|
||||
struct customization_tag;
|
||||
|
||||
|
||||
struct using_type_as_tag
|
||||
{ };
|
||||
|
||||
|
||||
// Topic:
|
||||
// In fact, it is unnecessary for VC++.
|
||||
// VC++'s behavior seems conforming, while GCC fails without this.
|
||||
template< class Iterator, class T >
|
||||
struct mutable_ :
|
||||
disable_if< is_const<T>, Iterator >
|
||||
{ };
|
||||
|
||||
|
||||
// helpers
|
||||
//
|
||||
|
||||
template< class Tag, class T >
|
||||
struct customization_tag_of
|
||||
{
|
||||
typedef typename mpl::if_< is_same<using_type_as_tag, Tag>,
|
||||
T,
|
||||
Tag
|
||||
>::type type;
|
||||
};
|
||||
|
||||
|
||||
template< class T >
|
||||
struct customization_of
|
||||
{
|
||||
typedef typename remove_cv<T>::type bare_t;
|
||||
typedef typename customization_tag<bare_t>::type tag_t;
|
||||
typedef customization<tag_t> type;
|
||||
};
|
||||
|
||||
|
||||
template< class T >
|
||||
struct mutable_iterator_of
|
||||
{
|
||||
typedef typename remove_cv<T>::type bare_t;
|
||||
typedef typename customization_of<bare_t>::type cust_t;
|
||||
typedef typename cust_t::template meta<bare_t>::mutable_iterator type;
|
||||
};
|
||||
|
||||
|
||||
template< class T >
|
||||
struct const_iterator_of
|
||||
{
|
||||
typedef typename remove_cv<T>::type bare_t;
|
||||
typedef typename customization_of<bare_t>::type cust_t;
|
||||
typedef typename cust_t::template meta<bare_t>::const_iterator type;
|
||||
};
|
||||
|
||||
|
||||
template< class T >
|
||||
struct size_type_of
|
||||
{
|
||||
typedef typename range_detail_microsoft::mutable_iterator_of<T>::type miter_t;
|
||||
typedef typename iterator_difference<miter_t>::type type;
|
||||
};
|
||||
|
||||
|
||||
template< class T > inline
|
||||
typename mutable_iterator_of<T>::type
|
||||
begin_of(T& x)
|
||||
{
|
||||
typedef typename customization_of<T>::type cust_t;
|
||||
return cust_t().template begin<typename mutable_iterator_of<T>::type>(x);
|
||||
}
|
||||
|
||||
|
||||
template< class T > inline
|
||||
typename const_iterator_of<T>::type
|
||||
begin_of(T const& x)
|
||||
{
|
||||
typedef typename customization_of<T>::type cust_t;
|
||||
return cust_t().template begin<typename const_iterator_of<T>::type>(x);
|
||||
}
|
||||
|
||||
|
||||
template< class T > inline
|
||||
typename mutable_iterator_of<T>::type
|
||||
end_of(T& x)
|
||||
{
|
||||
typedef typename customization_of<T>::type cust_t;
|
||||
return cust_t().template end<typename mutable_iterator_of<T>::type>(x);
|
||||
}
|
||||
|
||||
|
||||
template< class T > inline
|
||||
typename const_iterator_of<T>::type
|
||||
end_of(T const& x)
|
||||
{
|
||||
typedef typename customization_of<T>::type cust_t;
|
||||
return cust_t().template end<typename const_iterator_of<T>::type>(x);
|
||||
}
|
||||
|
||||
|
||||
#if defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
|
||||
|
||||
template< class T > inline
|
||||
typename size_type_of<T>::type
|
||||
size_of(T const& x)
|
||||
{
|
||||
return std::distance(boost::begin(x), boost::end(x));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template< class Range >
|
||||
struct compatible_mutable_iterator :
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator<Range>
|
||||
{ };
|
||||
|
||||
|
||||
} } // namespace boost::range_detail_microsoft
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \
|
||||
BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open_op, ~, NamespaceList) \
|
||||
/**/
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open_op(r, data, elem) \
|
||||
namespace elem { \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \
|
||||
BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close_op, ~, NamespaceList) \
|
||||
/**/
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close_op(r, data, elem) \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op(r, data, elem) \
|
||||
:: elem \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE(Tag, NamespaceList, Name) \
|
||||
namespace boost { namespace range_detail_microsoft { \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_tag(Tag, BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
} } \
|
||||
\
|
||||
namespace boost { \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_mutable_iterator(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_const_iterator(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size_type(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
} \
|
||||
\
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin_const(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end_const(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name)) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_fullname(NamespaceList, Name) \
|
||||
BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op, ~, NamespaceList) :: Name \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_tag(Tag, Fullname) \
|
||||
template< > \
|
||||
struct customization_tag< Fullname > : \
|
||||
customization_tag_of< Tag, Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
// metafunctions
|
||||
//
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_mutable_iterator(Fullname) \
|
||||
template< > \
|
||||
struct BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator< Fullname > : \
|
||||
range_detail_microsoft::mutable_iterator_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_const_iterator(Fullname) \
|
||||
template< > \
|
||||
struct range_const_iterator< Fullname > : \
|
||||
range_detail_microsoft::const_iterator_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size_type(Fullname) \
|
||||
template< > \
|
||||
struct range_size< Fullname > : \
|
||||
range_detail_microsoft::size_type_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
// functions
|
||||
//
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin(Fullname) \
|
||||
inline \
|
||||
boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::begin_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_begin_const(Fullname) \
|
||||
inline \
|
||||
boost::range_detail_microsoft::const_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::begin_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end(Fullname) \
|
||||
inline \
|
||||
boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::end_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_end_const(Fullname) \
|
||||
inline \
|
||||
boost::range_detail_microsoft::const_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::end_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(Fullname) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TYPE_size(Fullname) \
|
||||
inline \
|
||||
boost::range_detail_microsoft::size_type_of< Fullname >::type \
|
||||
boost_range_size(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::size_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE(Tag, NamespaceList, Name, ParamSeqOrCount) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_impl( \
|
||||
Tag, NamespaceList, Name, \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq(ParamSeqOrCount) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq(ParamSeqOrCount) \
|
||||
BOOST_PP_IIF(BOOST_PP_IS_UNARY(ParamSeqOrCount), \
|
||||
ParamSeqOrCount BOOST_PP_TUPLE_EAT(3), \
|
||||
BOOST_PP_REPEAT \
|
||||
)(ParamSeqOrCount, BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq_op, ~) \
|
||||
/**/
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_to_param_seq_op(z, n, _) \
|
||||
(class) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_impl(Tag, NamespaceList, Name, ParamSeq) \
|
||||
namespace boost { namespace range_detail_microsoft { \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_tag( \
|
||||
Tag, \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
} } \
|
||||
\
|
||||
namespace boost { \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_mutable_iterator( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_const_iterator( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
\
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size_type( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
} \
|
||||
\
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_open(NamespaceList) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin_const( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end_const( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size( \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq), \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
) \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_close(NamespaceList) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params(ParamSeq) \
|
||||
BOOST_PP_SEQ_FOR_EACH_I(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params_op, ~, ParamSeq) \
|
||||
/**/
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_params_op(r, data, i, elem) \
|
||||
BOOST_PP_COMMA_IF(i) elem BOOST_PP_CAT(T, i) \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_fullname(NamespaceList, Name, ParamSeq) \
|
||||
BOOST_PP_LIST_FOR_EACH(BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_namespace_expand_op, ~, NamespaceList) \
|
||||
:: Name < BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(ParamSeq), T) > \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_tag(Tag, Params, Fullname) \
|
||||
template< Params > \
|
||||
struct customization_tag< Fullname > : \
|
||||
customization_tag_of< Tag, Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
// metafunctions
|
||||
//
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_mutable_iterator(Params, Fullname) \
|
||||
template< Params > \
|
||||
struct BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator< Fullname > : \
|
||||
range_detail_microsoft::mutable_iterator_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_const_iterator(Params, Fullname) \
|
||||
template< Params > \
|
||||
struct range_const_iterator< Fullname > : \
|
||||
range_detail_microsoft::const_iterator_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size_type(Params, Fullname) \
|
||||
template< Params > \
|
||||
struct range_size< Fullname > : \
|
||||
range_detail_microsoft::size_type_of< Fullname > \
|
||||
{ }; \
|
||||
/**/
|
||||
|
||||
|
||||
// functions
|
||||
//
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin(Params, Fullname) \
|
||||
template< Params > inline \
|
||||
typename boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::begin_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_begin_const(Params, Fullname) \
|
||||
template< Params > inline \
|
||||
typename boost::range_detail_microsoft::const_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_begin(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::begin_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end(Params, Fullname) \
|
||||
template< Params > inline \
|
||||
typename boost::range_detail_microsoft::mutable_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::end_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_end_const(Params, Fullname) \
|
||||
template< Params > inline \
|
||||
typename boost::range_detail_microsoft::const_iterator_of< Fullname >::type \
|
||||
BOOST_RANGE_DETAIL_MICROSOFT_range_end(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::end_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
|
||||
#if !defined(BOOST_RANGE_DETAIL_MICROSOFT_RANGE_VERSION_1)
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size(Params, Fullname) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_RANGE_DETAIL_MICROSOFT_CUSTOMIZATION_TEMPLATE_size(Params, Fullname) \
|
||||
template< Params > inline \
|
||||
typename boost::range_detail_microsoft::size_type_of< Fullname >::type \
|
||||
boost_range_size(Fullname const& x) \
|
||||
{ \
|
||||
return boost::range_detail_microsoft::size_of(x); \
|
||||
} \
|
||||
/**/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
// list_iterator and helpers
|
||||
//
|
||||
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/iterator/iterator_categories.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
// POSITION's header is undocumented, so is NULL.
|
||||
//
|
||||
struct __POSITION; // incomplete, but used as just a pointer.
|
||||
typedef __POSITION *POSITION;
|
||||
|
||||
|
||||
namespace boost { namespace range_detail_microsoft {
|
||||
|
||||
|
||||
template<
|
||||
class ListT,
|
||||
class Value,
|
||||
class Reference,
|
||||
class Traversal
|
||||
>
|
||||
struct list_iterator;
|
||||
|
||||
|
||||
template<
|
||||
class ListT,
|
||||
class Value,
|
||||
class Reference,
|
||||
class Traversal
|
||||
>
|
||||
struct list_iterator_super
|
||||
{
|
||||
typedef typename mpl::if_< is_same<use_default, Reference>,
|
||||
Value&,
|
||||
Reference
|
||||
>::type ref_t;
|
||||
|
||||
typedef typename mpl::if_< is_same<use_default, Traversal>,
|
||||
bidirectional_traversal_tag,
|
||||
Traversal
|
||||
>::type trv_t;
|
||||
|
||||
typedef iterator_facade<
|
||||
list_iterator<ListT, Value, Reference, Traversal>,
|
||||
Value,
|
||||
trv_t,
|
||||
ref_t
|
||||
> type;
|
||||
};
|
||||
|
||||
|
||||
template<
|
||||
class ListT,
|
||||
class Value,
|
||||
class Reference = use_default,
|
||||
class Traversal = use_default
|
||||
>
|
||||
struct list_iterator :
|
||||
list_iterator_super<ListT, Value, Reference, Traversal>::type
|
||||
{
|
||||
private:
|
||||
typedef list_iterator self_t;
|
||||
typedef typename list_iterator_super<ListT, Value, Reference, Traversal>::type super_t;
|
||||
typedef typename super_t::reference ref_t;
|
||||
|
||||
public:
|
||||
explicit list_iterator()
|
||||
{ }
|
||||
|
||||
explicit list_iterator(ListT& lst, POSITION pos) :
|
||||
m_plst(boost::addressof(lst)), m_pos(pos)
|
||||
{ }
|
||||
|
||||
template< class, class, class, class > friend struct list_iterator;
|
||||
template< class ListT_, class Value_, class Reference_, class Traversal_>
|
||||
list_iterator(list_iterator<ListT_, Value_, Reference_, Traversal_> const& other) :
|
||||
m_plst(other.m_plst), m_pos(other.m_pos)
|
||||
{ }
|
||||
|
||||
private:
|
||||
ListT *m_plst;
|
||||
POSITION m_pos;
|
||||
|
||||
friend class iterator_core_access;
|
||||
ref_t dereference() const
|
||||
{
|
||||
BOOST_ASSERT(m_pos != 0 && "out of range");
|
||||
return m_plst->GetAt(m_pos);
|
||||
}
|
||||
|
||||
// A B C D x
|
||||
// Head Tail NULL(0)
|
||||
//
|
||||
void increment()
|
||||
{
|
||||
BOOST_ASSERT(m_pos != 0 && "out of range");
|
||||
m_plst->GetNext(m_pos);
|
||||
}
|
||||
|
||||
void decrement()
|
||||
{
|
||||
if (m_pos == 0) {
|
||||
m_pos = m_plst->GetTailPosition();
|
||||
return;
|
||||
}
|
||||
|
||||
m_plst->GetPrev(m_pos);
|
||||
}
|
||||
|
||||
bool equal(self_t const& other) const
|
||||
{
|
||||
BOOST_ASSERT(m_plst == other.m_plst && "iterators incompatible");
|
||||
return m_pos == other.m_pos;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// customization helpers
|
||||
//
|
||||
|
||||
struct array_functions
|
||||
{
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
return x.GetData();
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return begin<Iterator>(x) + x.GetSize();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
struct list_functions
|
||||
{
|
||||
template< class Iterator, class X >
|
||||
Iterator begin(X& x)
|
||||
{
|
||||
return Iterator(x, x.GetHeadPosition());
|
||||
}
|
||||
|
||||
template< class Iterator, class X >
|
||||
Iterator end(X& x)
|
||||
{
|
||||
return Iterator(x, POSITION(0));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
} } // namespace boost::range_detail_microsoft
|
||||
|
||||
|
||||
|
||||
|
||||
// test
|
||||
//
|
||||
|
||||
|
||||
#if defined(BOOST_RANGE_DETAIL_MICROSOFT_TEST)
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/next_prior.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/const_iterator.hpp>
|
||||
#include <boost/range/difference_type.hpp>
|
||||
#include <boost/range/distance.hpp>
|
||||
#include <boost/range/empty.hpp>
|
||||
#include <boost/range/iterator_range.hpp>
|
||||
#include <boost/range/mutable_iterator.hpp>
|
||||
#include <boost/range/rbegin.hpp>
|
||||
#include <boost/range/rend.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace range_detail_microsoft {
|
||||
|
||||
|
||||
template< class Range1, class Range2 >
|
||||
bool test_equals(Range1 const& rng1, Range2 const& rng2)
|
||||
{
|
||||
return
|
||||
boost::distance(rng1) == boost::distance(rng2) &&
|
||||
std::equal(boost::begin(rng1), boost::end(rng1), boost::begin(rng2))
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
template< class AssocContainer, class PairT >
|
||||
bool test_find_key_and_mapped(AssocContainer const& ac, PairT const& pa)
|
||||
{
|
||||
typedef typename boost::range_const_iterator<AssocContainer>::type iter_t;
|
||||
for (iter_t it = boost::const_begin(ac), last = boost::const_end(ac); it != last; ++it) {
|
||||
if (it->first == pa.first && it->second == pa.second)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// test functions
|
||||
//
|
||||
|
||||
template< class Range >
|
||||
bool test_emptiness(Range& )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
Range emptyRng;
|
||||
result = result && boost::empty(emptyRng);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
template< class Range >
|
||||
bool test_trivial(Range& rng)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
// convertibility check
|
||||
typedef typename range_const_iterator<Range>::type citer_t;
|
||||
citer_t cit = boost::begin(rng);
|
||||
(void)cit; // unused
|
||||
|
||||
// mutability check
|
||||
typedef typename range_value<Range>::type val_t;
|
||||
val_t v = *boost::begin(rng);
|
||||
*boost::begin(rng) = v;
|
||||
result = result && *boost::begin(rng) == v;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
template< class Range >
|
||||
bool test_forward(Range& rng)
|
||||
{
|
||||
boost::function_requires< ForwardRangeConcept<Range> >();
|
||||
|
||||
bool result = (test_trivial)(rng);
|
||||
|
||||
typedef typename range_value<Range>::type val_t;
|
||||
|
||||
std::vector<val_t> saved;
|
||||
std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved));
|
||||
std::rotate(boost::begin(saved), boost::next(boost::begin(saved)), boost::end(saved));
|
||||
|
||||
std::rotate(boost::begin(rng), boost::next(boost::begin(rng)), boost::end(rng));
|
||||
|
||||
return result && (test_equals)(saved, rng);
|
||||
};
|
||||
|
||||
|
||||
template< class Range >
|
||||
bool test_bidirectional(Range& rng)
|
||||
{
|
||||
boost::function_requires< BidirectionalRangeConcept<Range> >();
|
||||
|
||||
bool result = (test_forward)(rng);
|
||||
|
||||
typedef typename range_value<Range>::type val_t;
|
||||
|
||||
std::vector<val_t> saved;
|
||||
std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved));
|
||||
|
||||
result = result && (test_equals)(
|
||||
boost::make_iterator_range(boost::rbegin(saved), boost::rend(saved)),
|
||||
boost::make_iterator_range(boost::rbegin(rng), boost::rend(rng))
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
template< class Range >
|
||||
bool test_random_access(Range& rng)
|
||||
{
|
||||
boost::function_requires< RandomAccessRangeConcept<Range> >();
|
||||
|
||||
bool result = (test_bidirectional)(rng);
|
||||
|
||||
typedef typename range_value<Range>::type val_t;
|
||||
|
||||
std::vector<val_t> saved;
|
||||
std::copy(boost::begin(rng), boost::end(rng), std::back_inserter(saved));
|
||||
std::sort(boost::begin(saved), boost::end(saved));
|
||||
|
||||
std::random_shuffle(boost::begin(rng), boost::end(rng));
|
||||
std::sort(boost::begin(rng), boost::end(rng));
|
||||
result = result && (test_equals)(rng, saved);
|
||||
|
||||
std::random_shuffle(boost::begin(rng), boost::end(rng));
|
||||
std::stable_sort(boost::begin(rng), boost::end(rng));
|
||||
result = result && (test_equals)(rng, saved);
|
||||
|
||||
std::random_shuffle(boost::begin(rng), boost::end(rng));
|
||||
std::partial_sort(boost::begin(rng), boost::end(rng), boost::end(rng));
|
||||
result = result && (test_equals)(rng, saved);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
// initializer
|
||||
//
|
||||
|
||||
template< class ArrayT, class SampleRange >
|
||||
bool test_init_array(ArrayT& arr, SampleRange const& sample)
|
||||
{
|
||||
typedef typename range_const_iterator<SampleRange>::type iter_t;
|
||||
typedef typename range_value<SampleRange>::type val_t;
|
||||
|
||||
for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) {
|
||||
val_t v = *it; // works around ATL3 CSimpleArray
|
||||
arr.Add(v);
|
||||
}
|
||||
|
||||
return (test_equals)(arr, sample);
|
||||
}
|
||||
|
||||
|
||||
template< class ListT, class SampleRange >
|
||||
bool test_init_list(ListT& lst, SampleRange const& sample)
|
||||
{
|
||||
typedef typename range_const_iterator<SampleRange>::type iter_t;
|
||||
|
||||
for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) {
|
||||
lst.AddTail(*it);
|
||||
}
|
||||
|
||||
return (test_equals)(lst, sample);
|
||||
}
|
||||
|
||||
|
||||
template< class StringT, class SampleRange >
|
||||
bool test_init_string(StringT& str, SampleRange const& sample)
|
||||
{
|
||||
typedef typename range_const_iterator<SampleRange>::type iter_t;
|
||||
typedef typename range_value<SampleRange>::type val_t;
|
||||
|
||||
for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) {
|
||||
str += *it;
|
||||
}
|
||||
|
||||
return (test_equals)(str, sample);
|
||||
}
|
||||
|
||||
|
||||
template< class MapT, class SampleMap >
|
||||
bool test_init_map(MapT& map, SampleMap const& sample)
|
||||
{
|
||||
typedef typename range_const_iterator<SampleMap>::type iter_t;
|
||||
|
||||
for (iter_t it = boost::const_begin(sample), last = boost::const_end(sample); it != last; ++it) {
|
||||
map.SetAt(it->first, it->second);
|
||||
}
|
||||
|
||||
return boost::distance(map) == boost::distance(sample);
|
||||
}
|
||||
|
||||
|
||||
// metafunction test
|
||||
//
|
||||
|
||||
template< class Range, class Iter >
|
||||
struct test_mutable_iter :
|
||||
boost::is_same< typename boost::BOOST_RANGE_DETAIL_MICROSOFT_range_mutable_iterator<Range>::type, Iter >
|
||||
{ };
|
||||
|
||||
|
||||
template< class Range, class Iter >
|
||||
struct test_const_iter :
|
||||
boost::is_same< typename boost::range_const_iterator<Range>::type, Iter >
|
||||
{ };
|
||||
|
||||
|
||||
} } // namespace boost::range_detail_microsoft
|
||||
|
||||
|
||||
#endif // defined(BOOST_RANGE_DETAIL_MICROSOFT_TEST)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,221 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013-2015 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_IMAGE_IMAGE_SAMPLER_HPP
|
||||
#define BOOST_COMPUTE_IMAGE_IMAGE_SAMPLER_HPP
|
||||
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
#include <boost/compute/config.hpp>
|
||||
#include <boost/compute/context.hpp>
|
||||
#include <boost/compute/kernel.hpp>
|
||||
#include <boost/compute/detail/get_object_info.hpp>
|
||||
#include <boost/compute/detail/assert_cl_success.hpp>
|
||||
#include <boost/compute/exception/opencl_error.hpp>
|
||||
#include <boost/compute/type_traits/type_name.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
/// \class image_sampler
|
||||
/// \brief An OpenCL image sampler object
|
||||
///
|
||||
/// \see image2d, image_format
|
||||
class image_sampler
|
||||
{
|
||||
public:
|
||||
enum addressing_mode {
|
||||
none = CL_ADDRESS_NONE,
|
||||
clamp_to_edge = CL_ADDRESS_CLAMP_TO_EDGE,
|
||||
clamp = CL_ADDRESS_CLAMP,
|
||||
repeat = CL_ADDRESS_REPEAT
|
||||
};
|
||||
|
||||
enum filter_mode {
|
||||
nearest = CL_FILTER_NEAREST,
|
||||
linear = CL_FILTER_LINEAR
|
||||
};
|
||||
|
||||
image_sampler()
|
||||
: m_sampler(0)
|
||||
{
|
||||
}
|
||||
|
||||
image_sampler(const context &context,
|
||||
bool normalized_coords,
|
||||
cl_addressing_mode addressing_mode,
|
||||
cl_filter_mode filter_mode)
|
||||
{
|
||||
cl_int error = 0;
|
||||
|
||||
#ifdef CL_VERSION_2_0
|
||||
std::vector<cl_sampler_properties> sampler_properties;
|
||||
sampler_properties.push_back(CL_SAMPLER_NORMALIZED_COORDS);
|
||||
sampler_properties.push_back(cl_sampler_properties(normalized_coords));
|
||||
sampler_properties.push_back(CL_SAMPLER_ADDRESSING_MODE);
|
||||
sampler_properties.push_back(cl_sampler_properties(addressing_mode));
|
||||
sampler_properties.push_back(CL_SAMPLER_FILTER_MODE);
|
||||
sampler_properties.push_back(cl_sampler_properties(filter_mode));
|
||||
sampler_properties.push_back(cl_sampler_properties(0));
|
||||
|
||||
m_sampler = clCreateSamplerWithProperties(
|
||||
context, &sampler_properties[0], &error
|
||||
);
|
||||
#else
|
||||
m_sampler = clCreateSampler(
|
||||
context, normalized_coords, addressing_mode, filter_mode, &error
|
||||
);
|
||||
#endif
|
||||
|
||||
if(!m_sampler){
|
||||
BOOST_THROW_EXCEPTION(opencl_error(error));
|
||||
}
|
||||
}
|
||||
|
||||
explicit image_sampler(cl_sampler sampler, bool retain = true)
|
||||
: m_sampler(sampler)
|
||||
{
|
||||
if(m_sampler && retain){
|
||||
clRetainSampler(m_sampler);
|
||||
}
|
||||
}
|
||||
|
||||
/// Creates a new image sampler object as a copy of \p other.
|
||||
image_sampler(const image_sampler &other)
|
||||
: m_sampler(other.m_sampler)
|
||||
{
|
||||
if(m_sampler){
|
||||
clRetainSampler(m_sampler);
|
||||
}
|
||||
}
|
||||
|
||||
/// Copies the image sampler object from \p other to \c *this.
|
||||
image_sampler& operator=(const image_sampler &other)
|
||||
{
|
||||
if(this != &other){
|
||||
if(m_sampler){
|
||||
clReleaseSampler(m_sampler);
|
||||
}
|
||||
|
||||
m_sampler = other.m_sampler;
|
||||
|
||||
if(m_sampler){
|
||||
clRetainSampler(m_sampler);
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
#ifndef BOOST_COMPUTE_NO_RVALUE_REFERENCES
|
||||
image_sampler(image_sampler&& other) BOOST_NOEXCEPT
|
||||
: m_sampler(other.m_sampler)
|
||||
{
|
||||
other.m_sampler = 0;
|
||||
}
|
||||
|
||||
image_sampler& operator=(image_sampler&& other) BOOST_NOEXCEPT
|
||||
{
|
||||
if(m_sampler){
|
||||
clReleaseSampler(m_sampler);
|
||||
}
|
||||
|
||||
m_sampler = other.m_sampler;
|
||||
other.m_sampler = 0;
|
||||
|
||||
return *this;
|
||||
}
|
||||
#endif // BOOST_COMPUTE_NO_RVALUE_REFERENCES
|
||||
|
||||
/// Destroys the image sampler object.
|
||||
~image_sampler()
|
||||
{
|
||||
if(m_sampler){
|
||||
BOOST_COMPUTE_ASSERT_CL_SUCCESS(
|
||||
clReleaseSampler(m_sampler)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the underlying \c cl_sampler object.
|
||||
cl_sampler& get() const
|
||||
{
|
||||
return const_cast<cl_sampler &>(m_sampler);
|
||||
}
|
||||
|
||||
/// Returns the context for the image sampler object.
|
||||
context get_context() const
|
||||
{
|
||||
return context(get_info<cl_context>(CL_SAMPLER_CONTEXT));
|
||||
}
|
||||
|
||||
/// Returns information about the sampler.
|
||||
///
|
||||
/// \see_opencl_ref{clGetSamplerInfo}
|
||||
template<class T>
|
||||
T get_info(cl_sampler_info info) const
|
||||
{
|
||||
return detail::get_object_info<T>(clGetSamplerInfo, m_sampler, info);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template<int Enum>
|
||||
typename detail::get_object_info_type<image_sampler, Enum>::type
|
||||
get_info() const;
|
||||
|
||||
/// Returns \c true if the sampler is the same at \p other.
|
||||
bool operator==(const image_sampler &other) const
|
||||
{
|
||||
return m_sampler == other.m_sampler;
|
||||
}
|
||||
|
||||
/// Returns \c true if the sampler is different from \p other.
|
||||
bool operator!=(const image_sampler &other) const
|
||||
{
|
||||
return m_sampler != other.m_sampler;
|
||||
}
|
||||
|
||||
operator cl_sampler() const
|
||||
{
|
||||
return m_sampler;
|
||||
}
|
||||
|
||||
private:
|
||||
cl_sampler m_sampler;
|
||||
};
|
||||
|
||||
/// \internal_ define get_info() specializations for image_sampler
|
||||
BOOST_COMPUTE_DETAIL_DEFINE_GET_INFO_SPECIALIZATIONS(image_sampler,
|
||||
((cl_uint, CL_SAMPLER_REFERENCE_COUNT))
|
||||
((cl_context, CL_SAMPLER_CONTEXT))
|
||||
((cl_addressing_mode, CL_SAMPLER_ADDRESSING_MODE))
|
||||
((cl_filter_mode, CL_SAMPLER_FILTER_MODE))
|
||||
((bool, CL_SAMPLER_NORMALIZED_COORDS))
|
||||
)
|
||||
|
||||
namespace detail {
|
||||
|
||||
// set_kernel_arg specialization for image samplers
|
||||
template<>
|
||||
struct set_kernel_arg<image_sampler>
|
||||
{
|
||||
void operator()(kernel &kernel_, size_t index, const image_sampler &sampler)
|
||||
{
|
||||
kernel_.set_arg(index, sampler.get());
|
||||
}
|
||||
};
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
BOOST_COMPUTE_TYPE_NAME(boost::compute::image_sampler, sampler_t)
|
||||
|
||||
#endif // BOOST_COMPUTE_IMAGE_IMAGE_SAMPLER_HPP
|
||||
@@ -0,0 +1,48 @@
|
||||
subroutine ccf2(ss,nz,nflip,ccfbest,xlagpk)
|
||||
|
||||
parameter (LAGMIN=-86,LAGMAX=258)
|
||||
real ss(nz)
|
||||
real ccf(-LAGMAX:LAGMAX)
|
||||
integer npr(126)
|
||||
|
||||
! The JT65 pseudo-random sync pattern:
|
||||
data npr/ &
|
||||
1,0,0,1,1,0,0,0,1,1,1,1,1,1,0,1,0,1,0,0, &
|
||||
0,1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,1,1, &
|
||||
0,1,1,0,1,1,1,1,0,0,0,1,1,0,1,0,1,0,1,1, &
|
||||
0,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,1, &
|
||||
1,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,1,1,0,1, &
|
||||
0,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,1, &
|
||||
1,1,1,1,1,1/
|
||||
save
|
||||
|
||||
ccfbest=0.
|
||||
lag1=LAGMIN
|
||||
lag2=LAGMAX
|
||||
do lag=lag1,lag2
|
||||
s0=0.
|
||||
s1=0.
|
||||
do i=1,126
|
||||
j=16*(i-1)+1 + lag
|
||||
if(j.ge.1 .and. j.le.nz-8) then
|
||||
x=ss(j)
|
||||
if(npr(i).eq.0) then
|
||||
s0=s0 + x
|
||||
else
|
||||
s1=s1 + x
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
ccf(lag)=nflip*(s1-s0)
|
||||
if(ccf(lag).gt.ccfbest) then
|
||||
ccfbest=ccf(lag)
|
||||
lagpk=lag
|
||||
xlagpk=lagpk
|
||||
endif
|
||||
enddo
|
||||
if( lagpk.gt.-LAGMAX .and. lagpk.lt.LAGMAX) then
|
||||
call peakup(ccf(lagpk-1),ccf(lagpk),ccf(lagpk+1),dx)
|
||||
xlagpk=lagpk+dx
|
||||
endif
|
||||
return
|
||||
end subroutine ccf2
|
||||
@@ -0,0 +1,280 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_BUFFER_ITERATOR_HPP
|
||||
#define BOOST_COMPUTE_ITERATOR_BUFFER_ITERATOR_HPP
|
||||
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
#include <boost/compute/buffer.hpp>
|
||||
#include <boost/compute/detail/buffer_value.hpp>
|
||||
#include <boost/compute/detail/is_buffer_iterator.hpp>
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/detail/read_write_single_value.hpp>
|
||||
#include <boost/compute/type_traits/is_device_iterator.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
// forward declaration for buffer_iterator<T>
|
||||
template<class T> class buffer_iterator;
|
||||
|
||||
namespace detail {
|
||||
|
||||
// helper class which defines the iterator_facade super-class
|
||||
// type for buffer_iterator<T>
|
||||
template<class T>
|
||||
class buffer_iterator_base
|
||||
{
|
||||
public:
|
||||
typedef ::boost::iterator_facade<
|
||||
::boost::compute::buffer_iterator<T>,
|
||||
T,
|
||||
::std::random_access_iterator_tag,
|
||||
::boost::compute::detail::buffer_value<T>
|
||||
> type;
|
||||
};
|
||||
|
||||
template<class T, class IndexExpr>
|
||||
struct buffer_iterator_index_expr
|
||||
{
|
||||
typedef T result_type;
|
||||
|
||||
buffer_iterator_index_expr(const buffer &buffer,
|
||||
size_t index,
|
||||
const memory_object::address_space address_space,
|
||||
const IndexExpr &expr)
|
||||
: m_buffer(buffer),
|
||||
m_index(index),
|
||||
m_address_space(address_space),
|
||||
m_expr(expr)
|
||||
{
|
||||
}
|
||||
|
||||
operator T() const
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(boost::is_integral<IndexExpr>::value,
|
||||
"Index expression must be integral");
|
||||
|
||||
return buffer_value<T>(m_buffer, size_t(m_expr) * sizeof(T));
|
||||
}
|
||||
|
||||
const buffer &m_buffer;
|
||||
size_t m_index;
|
||||
memory_object::address_space m_address_space;
|
||||
IndexExpr m_expr;
|
||||
};
|
||||
|
||||
template<class T, class IndexExpr>
|
||||
inline meta_kernel& operator<<(meta_kernel &kernel,
|
||||
const buffer_iterator_index_expr<T, IndexExpr> &expr)
|
||||
{
|
||||
if(expr.m_index == 0){
|
||||
return kernel <<
|
||||
kernel.get_buffer_identifier<T>(expr.m_buffer, expr.m_address_space) <<
|
||||
'[' << expr.m_expr << ']';
|
||||
}
|
||||
else {
|
||||
return kernel <<
|
||||
kernel.get_buffer_identifier<T>(expr.m_buffer, expr.m_address_space) <<
|
||||
'[' << uint_(expr.m_index) << "+(" << expr.m_expr << ")]";
|
||||
}
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// \class buffer_iterator
|
||||
/// \brief An iterator for values in a buffer.
|
||||
///
|
||||
/// The buffer_iterator class iterates over values in a memory buffer on a
|
||||
/// compute device. It is the most commonly used iterator in Boost.Compute
|
||||
/// and is used by the \ref vector "vector<T>" and \ref array "array<T, N>"
|
||||
/// container classes.
|
||||
///
|
||||
/// Buffer iterators store a reference to a memory buffer along with an index
|
||||
/// into that memory buffer.
|
||||
///
|
||||
/// The buffer_iterator class allows for arbitrary OpenCL memory objects
|
||||
/// (including those created outside of Boost.Compute) to be used with the
|
||||
/// Boost.Compute algorithms (such as transform() and sort()). For example,
|
||||
/// to reverse the contents of an OpenCL memory buffer containing a set of
|
||||
/// integers:
|
||||
///
|
||||
/// \snippet test/test_buffer_iterator.cpp reverse_external_buffer
|
||||
///
|
||||
/// \see buffer, make_buffer_iterator()
|
||||
template<class T>
|
||||
class buffer_iterator : public detail::buffer_iterator_base<T>::type
|
||||
{
|
||||
public:
|
||||
typedef typename detail::buffer_iterator_base<T>::type super_type;
|
||||
typedef typename super_type::reference reference;
|
||||
typedef typename super_type::difference_type difference_type;
|
||||
|
||||
buffer_iterator()
|
||||
: m_index(0)
|
||||
{
|
||||
}
|
||||
|
||||
buffer_iterator(const buffer &buffer, size_t index)
|
||||
: m_buffer(buffer.get(), false),
|
||||
m_index(index)
|
||||
{
|
||||
}
|
||||
|
||||
buffer_iterator(const buffer_iterator<T> &other)
|
||||
: m_buffer(other.m_buffer.get(), false),
|
||||
m_index(other.m_index)
|
||||
{
|
||||
}
|
||||
|
||||
buffer_iterator<T>& operator=(const buffer_iterator<T> &other)
|
||||
{
|
||||
if(this != &other){
|
||||
m_buffer.get() = other.m_buffer.get();
|
||||
m_index = other.m_index;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
~buffer_iterator()
|
||||
{
|
||||
// set buffer to null so that its reference count will
|
||||
// not be decremented when its destructor is called
|
||||
m_buffer.get() = 0;
|
||||
}
|
||||
|
||||
const buffer& get_buffer() const
|
||||
{
|
||||
return m_buffer;
|
||||
}
|
||||
|
||||
size_t get_index() const
|
||||
{
|
||||
return m_index;
|
||||
}
|
||||
|
||||
T read(command_queue &queue) const
|
||||
{
|
||||
BOOST_ASSERT(m_buffer.get());
|
||||
BOOST_ASSERT(m_index < m_buffer.size() / sizeof(T));
|
||||
|
||||
return detail::read_single_value<T>(m_buffer, m_index, queue);
|
||||
}
|
||||
|
||||
void write(const T &value, command_queue &queue)
|
||||
{
|
||||
BOOST_ASSERT(m_buffer.get());
|
||||
BOOST_ASSERT(m_index < m_buffer.size() / sizeof(T));
|
||||
|
||||
detail::write_single_value<T>(value, m_buffer, m_index, queue);
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
template<class Expr>
|
||||
detail::buffer_iterator_index_expr<T, Expr>
|
||||
operator[](const Expr &expr) const
|
||||
{
|
||||
BOOST_ASSERT(m_buffer.get());
|
||||
|
||||
return detail::buffer_iterator_index_expr<T, Expr>(
|
||||
m_buffer, m_index, memory_object::global_memory, expr
|
||||
);
|
||||
}
|
||||
|
||||
private:
|
||||
friend class ::boost::iterator_core_access;
|
||||
|
||||
/// \internal_
|
||||
reference dereference() const
|
||||
{
|
||||
return detail::buffer_value<T>(m_buffer, m_index * sizeof(T));
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
bool equal(const buffer_iterator<T> &other) const
|
||||
{
|
||||
return m_buffer.get() == other.m_buffer.get() &&
|
||||
m_index == other.m_index;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void increment()
|
||||
{
|
||||
m_index++;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void decrement()
|
||||
{
|
||||
m_index--;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void advance(difference_type n)
|
||||
{
|
||||
m_index = static_cast<size_t>(static_cast<difference_type>(m_index) + n);
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
difference_type distance_to(const buffer_iterator<T> &other) const
|
||||
{
|
||||
return static_cast<difference_type>(other.m_index - m_index);
|
||||
}
|
||||
|
||||
private:
|
||||
const buffer m_buffer;
|
||||
size_t m_index;
|
||||
};
|
||||
|
||||
/// Creates a new \ref buffer_iterator for \p buffer at \p index.
|
||||
///
|
||||
/// \param buffer the \ref buffer object
|
||||
/// \param index the index in the buffer
|
||||
///
|
||||
/// \return a \c buffer_iterator for \p buffer at \p index
|
||||
template<class T>
|
||||
inline buffer_iterator<T>
|
||||
make_buffer_iterator(const buffer &buffer, size_t index = 0)
|
||||
{
|
||||
return buffer_iterator<T>(buffer, index);
|
||||
}
|
||||
|
||||
/// \internal_ (is_device_iterator specialization for buffer_iterator)
|
||||
template<class T>
|
||||
struct is_device_iterator<buffer_iterator<T> > : boost::true_type {};
|
||||
|
||||
namespace detail {
|
||||
|
||||
// is_buffer_iterator specialization for buffer_iterator
|
||||
template<class Iterator>
|
||||
struct is_buffer_iterator<
|
||||
Iterator,
|
||||
typename boost::enable_if<
|
||||
boost::is_same<
|
||||
buffer_iterator<typename Iterator::value_type>,
|
||||
typename boost::remove_const<Iterator>::type
|
||||
>
|
||||
>::type
|
||||
> : public boost::true_type {};
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ITERATOR_BUFFER_ITERATOR_HPP
|
||||
@@ -0,0 +1,251 @@
|
||||
/*=============================================================================
|
||||
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
|
||||
{
|
||||
template <typename T0>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type>
|
||||
make_tuple(T0 const& arg0)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type>(
|
||||
arg0);
|
||||
}
|
||||
template <typename T0 , typename T1>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>(
|
||||
arg0 , arg1);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>(
|
||||
arg0 , arg1 , arg2);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>(
|
||||
arg0 , arg1 , arg2 , arg3);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9);
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type>(
|
||||
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);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24 , T25 const& arg25)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type>(
|
||||
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);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24 , T25 const& arg25 , T26 const& arg26)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type>(
|
||||
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);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24 , T25 const& arg25 , T26 const& arg26 , T27 const& arg27)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type>(
|
||||
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);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type , typename detail::as_fusion_element<T28>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24 , T25 const& arg25 , T26 const& arg26 , T27 const& arg27 , T28 const& arg28)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type , typename detail::as_fusion_element<T28>::type>(
|
||||
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);
|
||||
}
|
||||
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>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
inline tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type , typename detail::as_fusion_element<T28>::type , typename detail::as_fusion_element<T29>::type>
|
||||
make_tuple(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19 , T20 const& arg20 , T21 const& arg21 , T22 const& arg22 , T23 const& arg23 , T24 const& arg24 , T25 const& arg25 , T26 const& arg26 , T27 const& arg27 , T28 const& arg28 , T29 const& arg29)
|
||||
{
|
||||
return tuple<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type , typename detail::as_fusion_element<T20>::type , typename detail::as_fusion_element<T21>::type , typename detail::as_fusion_element<T22>::type , typename detail::as_fusion_element<T23>::type , typename detail::as_fusion_element<T24>::type , typename detail::as_fusion_element<T25>::type , typename detail::as_fusion_element<T26>::type , typename detail::as_fusion_element<T27>::type , typename detail::as_fusion_element<T28>::type , typename detail::as_fusion_element<T29>::type>(
|
||||
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);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,80 @@
|
||||
|
||||
// (C) Copyright John Maddock 2015.
|
||||
// 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_CONSTRUCTIBLE_HPP_INCLUDED
|
||||
#define BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
|
||||
|
||||
#include <boost/type_traits/is_destructible.hpp>
|
||||
#include <boost/type_traits/is_default_constructible.hpp>
|
||||
#include <boost/type_traits/detail/yes_no_type.hpp>
|
||||
#include <boost/type_traits/declval.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
namespace detail{
|
||||
|
||||
struct is_constructible_imp
|
||||
{
|
||||
template<typename T, typename ...TheArgs, typename = decltype(T(boost::declval<TheArgs>()...))>
|
||||
static boost::type_traits::yes_type test(int);
|
||||
template<typename, typename...>
|
||||
static boost::type_traits::no_type test(...);
|
||||
|
||||
template<typename T, typename Arg, typename = decltype(::new T(boost::declval<Arg>()))>
|
||||
static boost::type_traits::yes_type test1(int);
|
||||
template<typename, typename>
|
||||
static boost::type_traits::no_type test1(...);
|
||||
|
||||
template <typename T>
|
||||
static boost::type_traits::yes_type ref_test(T);
|
||||
template <typename T>
|
||||
static boost::type_traits::no_type ref_test(...);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class T, class ...Args> struct is_constructible : public integral_constant<bool, sizeof(detail::is_constructible_imp::test<T, Args...>(0)) == sizeof(boost::type_traits::yes_type)>{};
|
||||
template <class T, class Arg> struct is_constructible<T, Arg> : public integral_constant<bool, is_destructible<T>::value && sizeof(detail::is_constructible_imp::test1<T, Arg>(0)) == sizeof(boost::type_traits::yes_type)>{};
|
||||
template <class Ref, class Arg> struct is_constructible<Ref&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
|
||||
template <class Ref, class Arg> struct is_constructible<Ref&&, Arg> : public integral_constant<bool, sizeof(detail::is_constructible_imp::ref_test<Ref&&>(boost::declval<Arg>())) == sizeof(boost::type_traits::yes_type)>{};
|
||||
|
||||
template <> struct is_constructible<void> : public false_type{};
|
||||
template <> struct is_constructible<void const> : public false_type{};
|
||||
template <> struct is_constructible<void const volatile> : public false_type{};
|
||||
template <> struct is_constructible<void volatile> : public false_type{};
|
||||
|
||||
template <class T> struct is_constructible<T> : public is_default_constructible<T>{};
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_default_constructible.hpp>
|
||||
|
||||
namespace boost{
|
||||
|
||||
// We don't know how to implement this:
|
||||
template <class T, class U = void> struct is_constructible : public is_convertible<U, T>{};
|
||||
template <class T> struct is_constructible<T, void> : public is_default_constructible<T>{};
|
||||
template <> struct is_constructible<void, void> : public false_type{};
|
||||
template <> struct is_constructible<void const, void> : public false_type{};
|
||||
template <> struct is_constructible<void const volatile, void> : public false_type{};
|
||||
template <> struct is_constructible<void volatile, void> : public false_type{};
|
||||
template <class Ref> struct is_constructible<Ref&, void> : public false_type{};
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class Ref> struct is_constructible<Ref&&, void> : public false_type{};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_IS_CONSTRUCTIBLE_HPP_INCLUDED
|
||||
@@ -0,0 +1,64 @@
|
||||
// add_rvalue_reference.hpp ---------------------------------------------------------//
|
||||
|
||||
// Copyright 2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
|
||||
#define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <boost/type_traits/is_void.hpp>
|
||||
#include <boost/type_traits/is_reference.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// //
|
||||
// C++03 implementation of //
|
||||
// 20.9.7.2 Reference modifications [meta.trans.ref] //
|
||||
// Written by Vicente J. Botet Escriba //
|
||||
// //
|
||||
// If T names an object or function type then the member typedef type
|
||||
// shall name T&&; otherwise, type shall name T. [ Note: This rule reflects
|
||||
// the semantics of reference collapsing. For example, when a type T names
|
||||
// a type T1&, the type add_rvalue_reference<T>::type is not an rvalue
|
||||
// reference. -end note ]
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace type_traits_detail {
|
||||
|
||||
template <typename T, bool b>
|
||||
struct add_rvalue_reference_helper
|
||||
{ typedef T type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename T>
|
||||
struct add_rvalue_reference_helper<T, true>
|
||||
{
|
||||
typedef T&& type;
|
||||
};
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
struct add_rvalue_reference_imp
|
||||
{
|
||||
typedef typename boost::type_traits_detail::add_rvalue_reference_helper
|
||||
<T, (is_void<T>::value == false && is_reference<T>::value == false) >::type type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template <class T> struct add_rvalue_reference
|
||||
{
|
||||
typedef typename boost::type_traits_detail::add_rvalue_reference_imp<T>::type type;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/external/mpi/mpi_nested_algebra.hpp
|
||||
|
||||
[begin_description]
|
||||
Nested parallelized algebra for MPI.
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
Copyright 2013 Pascal Germroth
|
||||
|
||||
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_ODEINT_EXTERNAL_MPI_MPI_NESTED_ALGEBRA_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_MPI_MPI_NESTED_ALGEBRA_HPP_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/algebra/norm_result_type.hpp>
|
||||
#include <boost/numeric/odeint/util/n_ary_helper.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
/** \brief MPI-parallelized algebra, wrapping another algebra.
|
||||
*/
|
||||
template< class InnerAlgebra >
|
||||
struct mpi_nested_algebra
|
||||
{
|
||||
|
||||
// execute the InnerAlgebra on each node's local data.
|
||||
#define BOOST_ODEINT_GEN_BODY(n) \
|
||||
InnerAlgebra::for_each##n( \
|
||||
BOOST_PP_ENUM_BINARY_PARAMS(n, s, () BOOST_PP_INTERCEPT) , \
|
||||
op \
|
||||
);
|
||||
BOOST_ODEINT_GEN_FOR_EACH(BOOST_ODEINT_GEN_BODY)
|
||||
#undef BOOST_ODEINT_GEN_BODY
|
||||
|
||||
|
||||
template< class NestedState >
|
||||
static typename norm_result_type< typename NestedState::value_type >::type norm_inf( const NestedState &s )
|
||||
{
|
||||
typedef typename norm_result_type< typename NestedState::value_type >::type result_type;
|
||||
// local maximum
|
||||
result_type value = InnerAlgebra::norm_inf( s() );
|
||||
// global maximum
|
||||
return boost::mpi::all_reduce(s.world, value, boost::mpi::maximum<result_type>());
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,90 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1998-2003 Joel de Guzman
|
||||
Copyright (c) 2001 Daniel Nuffer
|
||||
Copyright (c) 2002 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_SEQUENTIAL_OR_IPP)
|
||||
#define BOOST_SPIRIT_SEQUENTIAL_OR_IPP
|
||||
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// sequential-or class implementation
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <typename A, typename B>
|
||||
inline sequential_or<A, B>
|
||||
operator||(parser<A> const& a, parser<B> const& b)
|
||||
{
|
||||
return sequential_or<A, B>(a.derived(), b.derived());
|
||||
}
|
||||
|
||||
template <typename A>
|
||||
inline sequential_or<A, chlit<char> >
|
||||
operator||(parser<A> const& a, char b)
|
||||
{
|
||||
return sequential_or<A, chlit<char> >(a.derived(), b);
|
||||
}
|
||||
|
||||
template <typename B>
|
||||
inline sequential_or<chlit<char>, B>
|
||||
operator||(char a, parser<B> const& b)
|
||||
{
|
||||
return sequential_or<chlit<char>, B>(a, b.derived());
|
||||
}
|
||||
|
||||
template <typename A>
|
||||
inline sequential_or<A, strlit<char const*> >
|
||||
operator||(parser<A> const& a, char const* b)
|
||||
{
|
||||
return sequential_or<A, strlit<char const*> >(a.derived(), b);
|
||||
}
|
||||
|
||||
template <typename B>
|
||||
inline sequential_or<strlit<char const*>, B>
|
||||
operator||(char const* a, parser<B> const& b)
|
||||
{
|
||||
return sequential_or<strlit<char const*>, B>(a, b.derived());
|
||||
}
|
||||
|
||||
template <typename A>
|
||||
inline sequential_or<A, chlit<wchar_t> >
|
||||
operator||(parser<A> const& a, wchar_t b)
|
||||
{
|
||||
return sequential_or<A, chlit<wchar_t> >(a.derived(), b);
|
||||
}
|
||||
|
||||
template <typename B>
|
||||
inline sequential_or<chlit<wchar_t>, B>
|
||||
operator||(wchar_t a, parser<B> const& b)
|
||||
{
|
||||
return sequential_or<chlit<wchar_t>, B>(a, b.derived());
|
||||
}
|
||||
|
||||
template <typename A>
|
||||
inline sequential_or<A, strlit<wchar_t const*> >
|
||||
operator||(parser<A> const& a, wchar_t const* b)
|
||||
{
|
||||
return sequential_or<A, strlit<wchar_t const*> >(a.derived(), b);
|
||||
}
|
||||
|
||||
template <typename B>
|
||||
inline sequential_or<strlit<wchar_t const*>, B>
|
||||
operator||(wchar_t const* a, parser<B> const& b)
|
||||
{
|
||||
return sequential_or<strlit<wchar_t const*>, B>(a, b.derived());
|
||||
}
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace boost::spirit
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (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. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP
|
||||
# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/comparison/not_equal.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/expr_iif.hpp>
|
||||
# include <boost/preprocessor/facilities/identity.hpp>
|
||||
# include <boost/preprocessor/logical/bitand.hpp>
|
||||
# include <boost/preprocessor/seq/detail/is_empty.hpp>
|
||||
# include <boost/preprocessor/seq/detail/split.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
#
|
||||
# /* BOOST_PP_SEQ_REST_N */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||
# else
|
||||
# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq)
|
||||
# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq))
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \
|
||||
BOOST_PP_EXPR_IIF \
|
||||
( \
|
||||
BOOST_PP_BITAND \
|
||||
( \
|
||||
BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \
|
||||
BOOST_PP_NOT_EQUAL(n,size) \
|
||||
), \
|
||||
BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \
|
||||
) \
|
||||
/**/
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,198 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2007-2014
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
|
||||
#define BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/intrusive_fwd.hpp>
|
||||
#include <boost/intrusive/detail/assert.hpp>
|
||||
#include <boost/intrusive/detail/algo_type.hpp>
|
||||
#include <boost/core/no_exceptions_support.hpp>
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template<class NodeTraits>
|
||||
class common_slist_algorithms
|
||||
{
|
||||
public:
|
||||
typedef typename NodeTraits::node node;
|
||||
typedef typename NodeTraits::node_ptr node_ptr;
|
||||
typedef typename NodeTraits::const_node_ptr const_node_ptr;
|
||||
typedef NodeTraits node_traits;
|
||||
|
||||
static node_ptr get_previous_node(node_ptr p, const node_ptr & this_node)
|
||||
{
|
||||
for( node_ptr p_next
|
||||
; this_node != (p_next = NodeTraits::get_next(p))
|
||||
; p = p_next){
|
||||
//Logic error: possible use of linear lists with
|
||||
//operations only permitted with circular lists
|
||||
BOOST_INTRUSIVE_INVARIANT_ASSERT(p);
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & this_node)
|
||||
{ NodeTraits::set_next(this_node, node_ptr()); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
|
||||
{
|
||||
node_ptr next = NodeTraits::get_next(this_node);
|
||||
return !next || next == this_node;
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
|
||||
{ return !NodeTraits::get_next(this_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node)
|
||||
{
|
||||
const_node_ptr this_node(NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
|
||||
{ NodeTraits::set_next(prev_node, last_node); }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
|
||||
{
|
||||
NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
|
||||
NodeTraits::set_next(prev_node, this_node);
|
||||
}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(const node_ptr & bp, const node_ptr & b, const node_ptr & be)
|
||||
{
|
||||
node_ptr p(NodeTraits::get_next(bp));
|
||||
NodeTraits::set_next(bp, b);
|
||||
NodeTraits::set_next(be, p);
|
||||
}
|
||||
|
||||
static void transfer_after(const node_ptr & bp, const node_ptr & bb, const node_ptr & be)
|
||||
{
|
||||
if (bp != bb && bp != be && bb != be) {
|
||||
node_ptr next_b = NodeTraits::get_next(bb);
|
||||
node_ptr next_e = NodeTraits::get_next(be);
|
||||
node_ptr next_p = NodeTraits::get_next(bp);
|
||||
NodeTraits::set_next(bb, next_e);
|
||||
NodeTraits::set_next(be, next_p);
|
||||
NodeTraits::set_next(bp, next_b);
|
||||
}
|
||||
}
|
||||
|
||||
struct stable_partition_info
|
||||
{
|
||||
std::size_t num_1st_partition;
|
||||
std::size_t num_2nd_partition;
|
||||
node_ptr beg_2st_partition;
|
||||
node_ptr new_last_node;
|
||||
};
|
||||
|
||||
template<class Pred>
|
||||
static void stable_partition(node_ptr before_beg, const node_ptr &end, Pred pred, stable_partition_info &info)
|
||||
{
|
||||
node_ptr bcur = before_beg;
|
||||
node_ptr cur = node_traits::get_next(bcur);
|
||||
node_ptr new_f = end;
|
||||
|
||||
std::size_t num1 = 0, num2 = 0;
|
||||
while(cur != end){
|
||||
if(pred(cur)){
|
||||
++num1;
|
||||
bcur = cur;
|
||||
cur = node_traits::get_next(cur);
|
||||
}
|
||||
else{
|
||||
++num2;
|
||||
node_ptr last_to_remove = bcur;
|
||||
new_f = cur;
|
||||
bcur = cur;
|
||||
cur = node_traits::get_next(cur);
|
||||
BOOST_TRY{
|
||||
//Main loop
|
||||
while(cur != end){
|
||||
if(pred(cur)){ //Might throw
|
||||
++num1;
|
||||
//Process current node
|
||||
node_traits::set_next(last_to_remove, cur);
|
||||
last_to_remove = cur;
|
||||
node_ptr nxt = node_traits::get_next(cur);
|
||||
node_traits::set_next(bcur, nxt);
|
||||
cur = nxt;
|
||||
}
|
||||
else{
|
||||
++num2;
|
||||
bcur = cur;
|
||||
cur = node_traits::get_next(cur);
|
||||
}
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
node_traits::set_next(last_to_remove, new_f);
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
node_traits::set_next(last_to_remove, new_f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
info.num_1st_partition = num1;
|
||||
info.num_2nd_partition = num2;
|
||||
info.beg_2st_partition = new_f;
|
||||
info.new_last_node = bcur;
|
||||
}
|
||||
|
||||
//! <b>Requires</b>: f and l must be in a circular list.
|
||||
//!
|
||||
//! <b>Effects</b>: Returns the number of nodes in the range [f, l).
|
||||
//!
|
||||
//! <b>Complexity</b>: Linear
|
||||
//!
|
||||
//! <b>Throws</b>: Nothing.
|
||||
static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
|
||||
{
|
||||
const_node_ptr i(f);
|
||||
std::size_t result = 0;
|
||||
while(i != l){
|
||||
i = NodeTraits::get_next(i);
|
||||
++result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
/// @endcond
|
||||
|
||||
} //namespace detail
|
||||
|
||||
/// @cond
|
||||
|
||||
template<class NodeTraits>
|
||||
struct get_algo<CommonSListAlgorithms, NodeTraits>
|
||||
{
|
||||
typedef detail::common_slist_algorithms<NodeTraits> type;
|
||||
};
|
||||
|
||||
|
||||
} //namespace intrusive
|
||||
} //namespace boost
|
||||
|
||||
#endif //BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,102 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_PP_LIST_TIE_07192005_0109)
|
||||
#define FUSION_PP_LIST_TIE_07192005_0109
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
|
||||
#include <boost/fusion/container/list/list.hpp>
|
||||
|
||||
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
|
||||
#include <boost/fusion/container/generation/detail/preprocessed/list_tie.hpp>
|
||||
#else
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/list_tie" FUSION_MAX_LIST_SIZE_STR".hpp")
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
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!
|
||||
==============================================================================*/
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(preserve: 1)
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <
|
||||
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
|
||||
FUSION_MAX_LIST_SIZE, typename T, void_)
|
||||
, typename Extra = void_
|
||||
>
|
||||
struct list_tie;
|
||||
}
|
||||
|
||||
// $$$ shouldn't we remove_reference first to allow references? $$$
|
||||
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_list_tie.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_LIST_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef BOOST_FUSION_REF
|
||||
|
||||
}}
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
#pragma wave option(output: null)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
|
||||
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Preprocessor vertical repetition code
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
#define TEXT(z, n, text) , text
|
||||
struct list_tie< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_LIST_SIZE, TEXT, void_) >
|
||||
#undef TEXT
|
||||
{
|
||||
typedef list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)> type;
|
||||
};
|
||||
}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T)>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>
|
||||
list_tie(BOOST_PP_ENUM_BINARY_PARAMS(N, T, & arg))
|
||||
{
|
||||
return list<BOOST_PP_ENUM(N, BOOST_FUSION_REF, _)>(
|
||||
BOOST_PP_ENUM_PARAMS(N, arg));
|
||||
}
|
||||
|
||||
#undef N
|
||||
#endif // defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
|
||||
// Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 + counter code)
|
||||
// Copyright (C) 2005-2007 Peder Holt (VC 7.0 + framework)
|
||||
// Copyright (C) 2006 Steven Watanabe (VC 8.0)
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
|
||||
# define BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/detail/workaround.hpp>
|
||||
# include <boost/mpl/int.hpp>
|
||||
# include <boost/type_traits/is_function.hpp>
|
||||
# include <boost/utility/enable_if.hpp>
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
|
||||
# include <typeinfo>
|
||||
# endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace type_of
|
||||
{
|
||||
|
||||
//Compile time constant code
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,>=1300) && defined(_MSC_EXTENSIONS)
|
||||
template<int N> struct the_counter;
|
||||
|
||||
template<typename T,int N = 5/*for similarity*/>
|
||||
struct encode_counter
|
||||
{
|
||||
__if_exists(the_counter<N + 256>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 257>::count));
|
||||
}
|
||||
__if_not_exists(the_counter<N + 256>)
|
||||
{
|
||||
__if_exists(the_counter<N + 64>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 65>::count));
|
||||
}
|
||||
__if_not_exists(the_counter<N + 64>)
|
||||
{
|
||||
__if_exists(the_counter<N + 16>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 17>::count));
|
||||
}
|
||||
__if_not_exists(the_counter<N + 16>)
|
||||
{
|
||||
__if_exists(the_counter<N + 4>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 5>::count));
|
||||
}
|
||||
__if_not_exists(the_counter<N + 4>)
|
||||
{
|
||||
__if_exists(the_counter<N>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 1>::count));
|
||||
}
|
||||
__if_not_exists(the_counter<N>)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(unsigned,count=N);
|
||||
typedef the_counter<N> type;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
# define BOOST_TYPEOF_INDEX(T) (encode_counter<T>::count)
|
||||
# define BOOST_TYPEOF_NEXT_INDEX(next)
|
||||
# else
|
||||
template<int N> struct encode_counter : encode_counter<N - 1> {};
|
||||
template<> struct encode_counter<0> {};
|
||||
|
||||
//Need to default to a larger value than 4, as due to MSVC's ETI errors. (sizeof(int)==4)
|
||||
char (*encode_index(...))[5];
|
||||
|
||||
# define BOOST_TYPEOF_INDEX(T) (sizeof(*boost::type_of::encode_index((boost::type_of::encode_counter<1005>*)0)))
|
||||
# define BOOST_TYPEOF_NEXT_INDEX(next) friend char (*encode_index(encode_counter<next>*))[next];
|
||||
# endif
|
||||
|
||||
//Typeof code
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,==1300)
|
||||
template<typename ID>
|
||||
struct msvc_extract_type
|
||||
{
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID>
|
||||
{
|
||||
template<>
|
||||
struct id2type_impl<true> //VC7.0 specific bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
#elif BOOST_WORKAROUND(BOOST_MSVC,>=1400)
|
||||
struct msvc_extract_type_default_param {};
|
||||
|
||||
template<typename ID, typename T = msvc_extract_type_default_param>
|
||||
struct msvc_extract_type;
|
||||
|
||||
template<typename ID>
|
||||
struct msvc_extract_type<ID, msvc_extract_type_default_param> {
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename ID, typename T>
|
||||
struct msvc_extract_type : msvc_extract_type<ID,msvc_extract_type_default_param>
|
||||
{
|
||||
template<>
|
||||
struct id2type_impl<true> //VC8.0 specific bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
template<bool>
|
||||
struct id2type_impl;
|
||||
|
||||
typedef id2type_impl<true> id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID, T>
|
||||
{
|
||||
};
|
||||
# else
|
||||
template<typename ID>
|
||||
struct msvc_extract_type
|
||||
{
|
||||
struct id2type;
|
||||
};
|
||||
|
||||
template<typename T, typename ID>
|
||||
struct msvc_register_type : msvc_extract_type<ID>
|
||||
{
|
||||
typedef msvc_extract_type<ID> base_type;
|
||||
struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
};
|
||||
# endif
|
||||
// EAN: preprocess this block out on advice of Peder Holt
|
||||
// to eliminate errors in type_traits/common_type.hpp
|
||||
# if 0 //BOOST_WORKAROUND(BOOST_MSVC,==1310)
|
||||
template<const std::type_info& ref_type_info>
|
||||
struct msvc_typeid_wrapper {
|
||||
typedef typename msvc_extract_type<msvc_typeid_wrapper>::id2type id2type;
|
||||
typedef typename id2type::type wrapped_type;
|
||||
typedef typename wrapped_type::type type;
|
||||
};
|
||||
//This class is used for registering the type T. encode_type<T> is mapped against typeid(encode_type<T>).
|
||||
//msvc_typeid_wrapper<typeid(encode_type<T>)> will now have a type typedef that equals encode_type<T>.
|
||||
template<typename T>
|
||||
struct encode_type
|
||||
{
|
||||
typedef encode_type<T> input_type;
|
||||
//Invoke registration of encode_type<T>. typeid(encode_type<T>) is now mapped to encode_type<T>. Do not use registered_type for anything.
|
||||
//The reason for registering encode_type<T> rather than T, is that VC handles typeid(function reference) poorly. By adding another
|
||||
//level of indirection, we solve this problem.
|
||||
typedef typename msvc_register_type<input_type,msvc_typeid_wrapper<typeid(input_type)> >::id2type registered_type;
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<typename T> typename disable_if<
|
||||
typename is_function<T>::type,
|
||||
typename encode_type<T>::input_type>::type encode_start(T const&);
|
||||
|
||||
template<typename T> typename enable_if<
|
||||
typename is_function<T>::type,
|
||||
typename encode_type<T>::input_type>::type encode_start(T&);
|
||||
|
||||
template<typename Organizer, typename T>
|
||||
msvc_register_type<T,Organizer> typeof_register_type(const T&);
|
||||
|
||||
|
||||
# define BOOST_TYPEOF(expr) \
|
||||
boost::type_of::msvc_typeid_wrapper<typeid(boost::type_of::encode_start(expr))>::type
|
||||
|
||||
# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
|
||||
|
||||
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
|
||||
struct name {\
|
||||
enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
|
||||
typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
|
||||
typedef typename id2type::type type;\
|
||||
};
|
||||
|
||||
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
|
||||
struct name {\
|
||||
enum {_typeof_register_value=sizeof(typeid(boost::type_of::typeof_register_type<name>(expr)))};\
|
||||
typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
|
||||
typedef id2type::type type;\
|
||||
};
|
||||
|
||||
# else
|
||||
template<int ID>
|
||||
struct msvc_typeid_wrapper {
|
||||
typedef typename msvc_extract_type<mpl::int_<ID> >::id2type id2type;
|
||||
typedef typename id2type::type type;
|
||||
};
|
||||
//Workaround for ETI-bug for VC6 and VC7
|
||||
template<>
|
||||
struct msvc_typeid_wrapper<1> {
|
||||
typedef msvc_typeid_wrapper<1> type;
|
||||
};
|
||||
//Workaround for ETI-bug for VC7.1
|
||||
template<>
|
||||
struct msvc_typeid_wrapper<4> {
|
||||
typedef msvc_typeid_wrapper<4> type;
|
||||
};
|
||||
|
||||
//Tie it all together
|
||||
template<typename T>
|
||||
struct encode_type
|
||||
{
|
||||
//Get the next available compile time constants index
|
||||
BOOST_STATIC_CONSTANT(unsigned,value=BOOST_TYPEOF_INDEX(T));
|
||||
//Instantiate the template
|
||||
typedef typename msvc_register_type<T,mpl::int_<value> >::id2type type;
|
||||
//Set the next compile time constants index
|
||||
BOOST_STATIC_CONSTANT(unsigned,next=value+1);
|
||||
//Increment the compile time constant (only needed when extensions are not active
|
||||
BOOST_TYPEOF_NEXT_INDEX(next);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct sizer
|
||||
{
|
||||
typedef char(*type)[encode_type<T>::value];
|
||||
};
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC,>=1310)
|
||||
template<typename T> typename disable_if<
|
||||
typename is_function<T>::type,
|
||||
typename sizer<T>::type>::type encode_start(T const&);
|
||||
|
||||
template<typename T> typename enable_if<
|
||||
typename is_function<T>::type,
|
||||
typename sizer<T>::type>::type encode_start(T&);
|
||||
# else
|
||||
template<typename T>
|
||||
typename sizer<T>::type encode_start(T const&);
|
||||
# endif
|
||||
template<typename Organizer, typename T>
|
||||
msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
|
||||
|
||||
# define BOOST_TYPEOF(expr) \
|
||||
boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>::type
|
||||
|
||||
# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
|
||||
|
||||
# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
|
||||
struct name {\
|
||||
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr)));\
|
||||
typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
|
||||
typedef typename id2type::type type;\
|
||||
};
|
||||
|
||||
# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
|
||||
struct name {\
|
||||
BOOST_STATIC_CONSTANT(int,_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr)));\
|
||||
typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
|
||||
typedef id2type::type type;\
|
||||
};
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endif//BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
|
||||
Reference in New Issue
Block a user