Initial Commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
// (C) Copyright John Maddock 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This file is machine generated, do not edit by hand
|
||||
|
||||
// Polynomial evaluation using second order Horners rule
|
||||
#ifndef BOOST_MATH_TOOLS_POLY_EVAL_5_HPP
|
||||
#define BOOST_MATH_TOOLS_POLY_EVAL_5_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;
|
||||
return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
|
||||
}
|
||||
|
||||
|
||||
}}}} // namespaces
|
||||
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Copyright Charly Chevalier 2015
|
||||
Copyright Joel Falcou 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_HARDWARE_SIMD_X86_AMD_VERSIONS_H
|
||||
#define BOOST_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
Those defines represent x86 (AMD specific) SIMD extensions versions.
|
||||
|
||||
[note You *MUST* compare them with the predef `BOOST_HW_SIMD_X86_AMD`.]
|
||||
*/
|
||||
|
||||
|
||||
// ---------------------------------
|
||||
|
||||
/*`
|
||||
[heading `BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
|
||||
|
||||
Version number is: *4.0.0*.
|
||||
*/
|
||||
#define BOOST_HW_SIMD_X86_AMD_SSE4A_VERSION BOOST_VERSION_NUMBER(4, 0, 0)
|
||||
|
||||
/*`
|
||||
[heading `BOOST_HW_SIMD_X86_AMD_FMA4_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
|
||||
|
||||
Version number is: *5.1.0*.
|
||||
*/
|
||||
#define BOOST_HW_SIMD_X86_AMD_FMA4_VERSION BOOST_VERSION_NUMBER(5, 1, 0)
|
||||
|
||||
/*`
|
||||
[heading `BOOST_HW_SIMD_X86_AMD_XOP_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
|
||||
|
||||
Version number is: *5.1.1*.
|
||||
*/
|
||||
#define BOOST_HW_SIMD_X86_AMD_XOP_VERSION BOOST_VERSION_NUMBER(5, 1, 1)
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,140 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil_;
|
||||
struct void_;
|
||||
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>
|
||||
struct list
|
||||
: detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>::type
|
||||
{
|
||||
private:
|
||||
typedef
|
||||
detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19>
|
||||
list_to_cons;
|
||||
typedef typename list_to_cons::type inherited_type;
|
||||
public:
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list()
|
||||
: inherited_type() {}
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19> const& rhs)
|
||||
: inherited_type(rhs) {}
|
||||
template <typename Sequence>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
list(Sequence const& rhs
|
||||
, typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
|
||||
: inherited_type(rhs) {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
list(typename detail::call_param<T0 >::type arg0)
|
||||
: inherited_type(list_to_cons::call(arg0))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19))
|
||||
{}
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list&
|
||||
operator=(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19> const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::enable_if<traits::is_sequence<Sequence>, list&>::type
|
||||
operator=(Sequence const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef CONSTRUCT_REFERENCE_DWA2002716_HPP
|
||||
# define CONSTRUCT_REFERENCE_DWA2002716_HPP
|
||||
|
||||
namespace boost { namespace python { namespace detail {
|
||||
|
||||
template <class T, class Arg>
|
||||
void construct_pointee(void* storage, Arg& x, T const volatile*)
|
||||
{
|
||||
new (storage) T(x);
|
||||
}
|
||||
|
||||
template <class T, class Arg>
|
||||
void construct_referent_impl(void* storage, Arg& x, T&(*)())
|
||||
{
|
||||
construct_pointee(storage, x, (T*)0);
|
||||
}
|
||||
|
||||
template <class T, class Arg>
|
||||
void construct_referent(void* storage, Arg const& x, T(*tag)() = 0)
|
||||
{
|
||||
construct_referent_impl(storage, x, tag);
|
||||
}
|
||||
|
||||
template <class T, class Arg>
|
||||
void construct_referent(void* storage, Arg& x, T(*tag)() = 0)
|
||||
{
|
||||
construct_referent_impl(storage, x, tag);
|
||||
}
|
||||
|
||||
}}} // namespace boost::python::detail
|
||||
|
||||
#endif // CONSTRUCT_REFERENCE_DWA2002716_HPP
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
|
||||
#define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2003-2004
|
||||
// Copyright David Abrahams 2003-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Tag > struct value_type_impl;
|
||||
template< typename AssociativeSequence, typename T > struct value_type;
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED
|
||||
@@ -0,0 +1,377 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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/interprocess for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This interface is inspired by Howard Hinnant's lock proposal.
|
||||
// http://home.twcny.rr.com/hinnant/cpp_extensions/threads_move.html
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTERPROCESS_SCOPED_LOCK_HPP
|
||||
#define BOOST_INTERPROCESS_SCOPED_LOCK_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/detail/config_begin.hpp>
|
||||
#include <boost/interprocess/detail/workaround.hpp>
|
||||
#include <boost/interprocess/interprocess_fwd.hpp>
|
||||
#include <boost/interprocess/sync/lock_options.hpp>
|
||||
#include <boost/interprocess/exceptions.hpp>
|
||||
#include <boost/interprocess/detail/mpl.hpp>
|
||||
#include <boost/interprocess/detail/type_traits.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
|
||||
#include <boost/interprocess/detail/simple_swap.hpp>
|
||||
|
||||
//!\file
|
||||
//!Describes the scoped_lock class.
|
||||
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
|
||||
|
||||
//!scoped_lock is meant to carry out the tasks for locking, unlocking, try-locking
|
||||
//!and timed-locking (recursive or not) for the Mutex. The Mutex need not supply all
|
||||
//!of this functionality. If the client of scoped_lock<Mutex> does not use
|
||||
//!functionality which the Mutex does not supply, no harm is done. Mutex ownership
|
||||
//!transfer is supported through the syntax of move semantics. Ownership transfer
|
||||
//!is allowed both by construction and assignment. The scoped_lock does not support
|
||||
//!copy semantics. A compile time error results if copy construction or copy
|
||||
//!assignment is attempted. Mutex ownership can also be moved from an
|
||||
//!upgradable_lock and sharable_lock via constructor. In this role, scoped_lock
|
||||
//!shares the same functionality as a write_lock.
|
||||
template <class Mutex>
|
||||
class scoped_lock
|
||||
{
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
private:
|
||||
typedef scoped_lock<Mutex> this_type;
|
||||
BOOST_MOVABLE_BUT_NOT_COPYABLE(scoped_lock)
|
||||
typedef bool this_type::*unspecified_bool_type;
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
public:
|
||||
|
||||
typedef Mutex mutex_type;
|
||||
|
||||
//!Effects: Default constructs a scoped_lock.
|
||||
//!Postconditions: owns() == false and mutex() == 0.
|
||||
scoped_lock()
|
||||
: mp_mutex(0), m_locked(false)
|
||||
{}
|
||||
|
||||
//!Effects: m.lock().
|
||||
//!Postconditions: owns() == true and mutex() == &m.
|
||||
//!Notes: The constructor will take ownership of the mutex. If another thread
|
||||
//! already owns the mutex, this thread will block until the mutex is released.
|
||||
//! Whether or not this constructor handles recursive locking depends upon the mutex.
|
||||
explicit scoped_lock(mutex_type& m)
|
||||
: mp_mutex(&m), m_locked(false)
|
||||
{ mp_mutex->lock(); m_locked = true; }
|
||||
|
||||
//!Postconditions: owns() == false, and mutex() == &m.
|
||||
//!Notes: The constructor will not take ownership of the mutex. There is no effect
|
||||
//! required on the referenced mutex.
|
||||
scoped_lock(mutex_type& m, defer_lock_type)
|
||||
: mp_mutex(&m), m_locked(false)
|
||||
{}
|
||||
|
||||
//!Postconditions: owns() == true, and mutex() == &m.
|
||||
//!Notes: The constructor will suppose that the mutex is already locked. There
|
||||
//! is no effect required on the referenced mutex.
|
||||
scoped_lock(mutex_type& m, accept_ownership_type)
|
||||
: mp_mutex(&m), m_locked(true)
|
||||
{}
|
||||
|
||||
//!Effects: m.try_lock().
|
||||
//!Postconditions: mutex() == &m. owns() == the return value of the
|
||||
//! m.try_lock() executed within the constructor.
|
||||
//!Notes: The constructor will take ownership of the mutex if it can do
|
||||
//! so without waiting. Whether or not this constructor handles recursive
|
||||
//! locking depends upon the mutex. If the mutex_type does not support try_lock,
|
||||
//! this constructor will fail at compile time if instantiated, but otherwise
|
||||
//! have no effect.
|
||||
scoped_lock(mutex_type& m, try_to_lock_type)
|
||||
: mp_mutex(&m), m_locked(mp_mutex->try_lock())
|
||||
{}
|
||||
|
||||
//!Effects: m.timed_lock(abs_time).
|
||||
//!Postconditions: mutex() == &m. owns() == the return value of the
|
||||
//! m.timed_lock(abs_time) executed within the constructor.
|
||||
//!Notes: The constructor will take ownership of the mutex if it can do
|
||||
//! it until abs_time is reached. Whether or not this constructor
|
||||
//! handles recursive locking depends upon the mutex. If the mutex_type
|
||||
//! does not support try_lock, this constructor will fail at compile
|
||||
//! time if instantiated, but otherwise have no effect.
|
||||
scoped_lock(mutex_type& m, const boost::posix_time::ptime& abs_time)
|
||||
: mp_mutex(&m), m_locked(mp_mutex->timed_lock(abs_time))
|
||||
{}
|
||||
|
||||
//!Postconditions: mutex() == the value scop.mutex() had before the
|
||||
//! constructor executes. s1.mutex() == 0. owns() == the value of
|
||||
//! scop.owns() before the constructor executes. scop.owns().
|
||||
//!Notes: If the scop scoped_lock owns the mutex, ownership is moved
|
||||
//! to thisscoped_lock with no blocking. If the scop scoped_lock does not
|
||||
//! own the mutex, then neither will this scoped_lock. Only a moved
|
||||
//! scoped_lock's will match this signature. An non-moved scoped_lock
|
||||
//! can be moved with the expression: "boost::move(lock);". This
|
||||
//! constructor does not alter the state of the mutex, only potentially
|
||||
//! who owns it.
|
||||
scoped_lock(BOOST_RV_REF(scoped_lock) scop)
|
||||
: mp_mutex(0), m_locked(scop.owns())
|
||||
{ mp_mutex = scop.release(); }
|
||||
|
||||
//!Effects: If upgr.owns() then calls unlock_upgradable_and_lock() on the
|
||||
//! referenced mutex. upgr.release() is called.
|
||||
//!Postconditions: mutex() == the value upgr.mutex() had before the construction.
|
||||
//! upgr.mutex() == 0. owns() == upgr.owns() before the construction.
|
||||
//! upgr.owns() == false after the construction.
|
||||
//!Notes: If upgr is locked, this constructor will lock this scoped_lock while
|
||||
//! unlocking upgr. If upgr is unlocked, then this scoped_lock will be
|
||||
//! unlocked as well. Only a moved upgradable_lock's will match this
|
||||
//! signature. An non-moved upgradable_lock can be moved with
|
||||
//! the expression: "boost::move(lock);" This constructor may block if
|
||||
//! other threads hold a sharable_lock on this mutex (sharable_lock's can
|
||||
//! share ownership with an upgradable_lock).
|
||||
template<class T>
|
||||
explicit scoped_lock(BOOST_RV_REF(upgradable_lock<T>) upgr
|
||||
, typename ipcdetail::enable_if< ipcdetail::is_same<T, Mutex> >::type * = 0)
|
||||
: mp_mutex(0), m_locked(false)
|
||||
{
|
||||
upgradable_lock<mutex_type> &u_lock = upgr;
|
||||
if(u_lock.owns()){
|
||||
u_lock.mutex()->unlock_upgradable_and_lock();
|
||||
m_locked = true;
|
||||
}
|
||||
mp_mutex = u_lock.release();
|
||||
}
|
||||
|
||||
//!Effects: If upgr.owns() then calls try_unlock_upgradable_and_lock() on the
|
||||
//!referenced mutex:
|
||||
//! a)if try_unlock_upgradable_and_lock() returns true then mutex() obtains
|
||||
//! the value from upgr.release() and owns() is set to true.
|
||||
//! b)if try_unlock_upgradable_and_lock() returns false then upgr is
|
||||
//! unaffected and this scoped_lock construction as the same effects as
|
||||
//! a default construction.
|
||||
//! c)Else upgr.owns() is false. mutex() obtains the value from upgr.release()
|
||||
//! and owns() is set to false
|
||||
//!Notes: This construction will not block. It will try to obtain mutex
|
||||
//! ownership from upgr immediately, while changing the lock type from a
|
||||
//! "read lock" to a "write lock". If the "read lock" isn't held in the
|
||||
//! first place, the mutex merely changes type to an unlocked "write lock".
|
||||
//! If the "read lock" is held, then mutex transfer occurs only if it can
|
||||
//! do so in a non-blocking manner.
|
||||
template<class T>
|
||||
scoped_lock(BOOST_RV_REF(upgradable_lock<T>) upgr, try_to_lock_type
|
||||
, typename ipcdetail::enable_if< ipcdetail::is_same<T, Mutex> >::type * = 0)
|
||||
: mp_mutex(0), m_locked(false)
|
||||
{
|
||||
upgradable_lock<mutex_type> &u_lock = upgr;
|
||||
if(u_lock.owns()){
|
||||
if((m_locked = u_lock.mutex()->try_unlock_upgradable_and_lock()) == true){
|
||||
mp_mutex = u_lock.release();
|
||||
}
|
||||
}
|
||||
else{
|
||||
u_lock.release();
|
||||
}
|
||||
}
|
||||
|
||||
//!Effects: If upgr.owns() then calls timed_unlock_upgradable_and_lock(abs_time)
|
||||
//! on the referenced mutex:
|
||||
//! a)if timed_unlock_upgradable_and_lock(abs_time) returns true then mutex()
|
||||
//! obtains the value from upgr.release() and owns() is set to true.
|
||||
//! b)if timed_unlock_upgradable_and_lock(abs_time) returns false then upgr
|
||||
//! is unaffected and this scoped_lock construction as the same effects
|
||||
//! as a default construction.
|
||||
//! c)Else upgr.owns() is false. mutex() obtains the value from upgr.release()
|
||||
//! and owns() is set to false
|
||||
//!Notes: This construction will not block. It will try to obtain mutex ownership
|
||||
//! from upgr immediately, while changing the lock type from a "read lock" to a
|
||||
//! "write lock". If the "read lock" isn't held in the first place, the mutex
|
||||
//! merely changes type to an unlocked "write lock". If the "read lock" is held,
|
||||
//! then mutex transfer occurs only if it can do so in a non-blocking manner.
|
||||
template<class T>
|
||||
scoped_lock(BOOST_RV_REF(upgradable_lock<T>) upgr, boost::posix_time::ptime &abs_time
|
||||
, typename ipcdetail::enable_if< ipcdetail::is_same<T, Mutex> >::type * = 0)
|
||||
: mp_mutex(0), m_locked(false)
|
||||
{
|
||||
upgradable_lock<mutex_type> &u_lock = upgr;
|
||||
if(u_lock.owns()){
|
||||
if((m_locked = u_lock.mutex()->timed_unlock_upgradable_and_lock(abs_time)) == true){
|
||||
mp_mutex = u_lock.release();
|
||||
}
|
||||
}
|
||||
else{
|
||||
u_lock.release();
|
||||
}
|
||||
}
|
||||
|
||||
//!Effects: If shar.owns() then calls try_unlock_sharable_and_lock() on the
|
||||
//!referenced mutex.
|
||||
//! a)if try_unlock_sharable_and_lock() returns true then mutex() obtains
|
||||
//! the value from shar.release() and owns() is set to true.
|
||||
//! b)if try_unlock_sharable_and_lock() returns false then shar is
|
||||
//! unaffected and this scoped_lock construction has the same
|
||||
//! effects as a default construction.
|
||||
//! c)Else shar.owns() is false. mutex() obtains the value from
|
||||
//! shar.release() and owns() is set to false
|
||||
//!Notes: This construction will not block. It will try to obtain mutex
|
||||
//! ownership from shar immediately, while changing the lock type from a
|
||||
//! "read lock" to a "write lock". If the "read lock" isn't held in the
|
||||
//! first place, the mutex merely changes type to an unlocked "write lock".
|
||||
//! If the "read lock" is held, then mutex transfer occurs only if it can
|
||||
//! do so in a non-blocking manner.
|
||||
template<class T>
|
||||
scoped_lock(BOOST_RV_REF(sharable_lock<T>) shar, try_to_lock_type
|
||||
, typename ipcdetail::enable_if< ipcdetail::is_same<T, Mutex> >::type * = 0)
|
||||
: mp_mutex(0), m_locked(false)
|
||||
{
|
||||
sharable_lock<mutex_type> &s_lock = shar;
|
||||
if(s_lock.owns()){
|
||||
if((m_locked = s_lock.mutex()->try_unlock_sharable_and_lock()) == true){
|
||||
mp_mutex = s_lock.release();
|
||||
}
|
||||
}
|
||||
else{
|
||||
s_lock.release();
|
||||
}
|
||||
}
|
||||
|
||||
//!Effects: if (owns()) mp_mutex->unlock().
|
||||
//!Notes: The destructor behavior ensures that the mutex lock is not leaked.*/
|
||||
~scoped_lock()
|
||||
{
|
||||
try{ if(m_locked && mp_mutex) mp_mutex->unlock(); }
|
||||
catch(...){}
|
||||
}
|
||||
|
||||
//!Effects: If owns() before the call, then unlock() is called on mutex().
|
||||
//! *this gets the state of scop and scop gets set to a default constructed state.
|
||||
//!Notes: With a recursive mutex it is possible that both this and scop own
|
||||
//! the same mutex before the assignment. In this case, this will own the
|
||||
//! mutex after the assignment (and scop will not), but the mutex's lock
|
||||
//! count will be decremented by one.
|
||||
scoped_lock &operator=(BOOST_RV_REF(scoped_lock) scop)
|
||||
{
|
||||
if(this->owns())
|
||||
this->unlock();
|
||||
m_locked = scop.owns();
|
||||
mp_mutex = scop.release();
|
||||
return *this;
|
||||
}
|
||||
|
||||
//!Effects: If mutex() == 0 or if already locked, throws a lock_exception()
|
||||
//! exception. Calls lock() on the referenced mutex.
|
||||
//!Postconditions: owns() == true.
|
||||
//!Notes: The scoped_lock changes from a state of not owning the mutex, to
|
||||
//! owning the mutex, blocking if necessary.
|
||||
void lock()
|
||||
{
|
||||
if(!mp_mutex || m_locked)
|
||||
throw lock_exception();
|
||||
mp_mutex->lock();
|
||||
m_locked = true;
|
||||
}
|
||||
|
||||
//!Effects: If mutex() == 0 or if already locked, throws a lock_exception()
|
||||
//! exception. Calls try_lock() on the referenced mutex.
|
||||
//!Postconditions: owns() == the value returned from mutex()->try_lock().
|
||||
//!Notes: The scoped_lock changes from a state of not owning the mutex, to
|
||||
//! owning the mutex, but only if blocking was not required. If the
|
||||
//! mutex_type does not support try_lock(), this function will fail at
|
||||
//! compile time if instantiated, but otherwise have no effect.*/
|
||||
bool try_lock()
|
||||
{
|
||||
if(!mp_mutex || m_locked)
|
||||
throw lock_exception();
|
||||
m_locked = mp_mutex->try_lock();
|
||||
return m_locked;
|
||||
}
|
||||
|
||||
//!Effects: If mutex() == 0 or if already locked, throws a lock_exception()
|
||||
//! exception. Calls timed_lock(abs_time) on the referenced mutex.
|
||||
//!Postconditions: owns() == the value returned from mutex()-> timed_lock(abs_time).
|
||||
//!Notes: The scoped_lock changes from a state of not owning the mutex, to
|
||||
//! owning the mutex, but only if it can obtain ownership by the specified
|
||||
//! time. If the mutex_type does not support timed_lock (), this function
|
||||
//! will fail at compile time if instantiated, but otherwise have no effect.*/
|
||||
bool timed_lock(const boost::posix_time::ptime& abs_time)
|
||||
{
|
||||
if(!mp_mutex || m_locked)
|
||||
throw lock_exception();
|
||||
m_locked = mp_mutex->timed_lock(abs_time);
|
||||
return m_locked;
|
||||
}
|
||||
|
||||
//!Effects: If mutex() == 0 or if not locked, throws a lock_exception()
|
||||
//! exception. Calls unlock() on the referenced mutex.
|
||||
//!Postconditions: owns() == false.
|
||||
//!Notes: The scoped_lock changes from a state of owning the mutex, to not
|
||||
//! owning the mutex.*/
|
||||
void unlock()
|
||||
{
|
||||
if(!mp_mutex || !m_locked)
|
||||
throw lock_exception();
|
||||
mp_mutex->unlock();
|
||||
m_locked = false;
|
||||
}
|
||||
|
||||
//!Effects: Returns true if this scoped_lock has acquired
|
||||
//!the referenced mutex.
|
||||
bool owns() const
|
||||
{ return m_locked && mp_mutex; }
|
||||
|
||||
//!Conversion to bool.
|
||||
//!Returns owns().
|
||||
operator unspecified_bool_type() const
|
||||
{ return m_locked? &this_type::m_locked : 0; }
|
||||
|
||||
//!Effects: Returns a pointer to the referenced mutex, or 0 if
|
||||
//!there is no mutex to reference.
|
||||
mutex_type* mutex() const
|
||||
{ return mp_mutex; }
|
||||
|
||||
//!Effects: Returns a pointer to the referenced mutex, or 0 if there is no
|
||||
//! mutex to reference.
|
||||
//!Postconditions: mutex() == 0 and owns() == false.
|
||||
mutex_type* release()
|
||||
{
|
||||
mutex_type *mut = mp_mutex;
|
||||
mp_mutex = 0;
|
||||
m_locked = false;
|
||||
return mut;
|
||||
}
|
||||
|
||||
//!Effects: Swaps state with moved lock.
|
||||
//!Throws: Nothing.
|
||||
void swap( scoped_lock<mutex_type> &other)
|
||||
{
|
||||
(simple_swap)(mp_mutex, other.mp_mutex);
|
||||
(simple_swap)(m_locked, other.m_locked);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
private:
|
||||
mutex_type *mp_mutex;
|
||||
bool m_locked;
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
} // namespace interprocess
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
#endif // BOOST_INTERPROCESS_SCOPED_LOCK_HPP
|
||||
@@ -0,0 +1,52 @@
|
||||
|
||||
#ifndef BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
|
||||
#define BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/na.hpp>
|
||||
#include <boost/mpl/aux_/type_wrapper.hpp>
|
||||
|
||||
#include <boost/mpl/vector/aux_/iterator.hpp>
|
||||
#include <boost/mpl/vector/aux_/tag.hpp>
|
||||
#include <boost/mpl/aux_/config/typeof.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename Dummy = na > struct vector0;
|
||||
|
||||
template<> struct vector0<na>
|
||||
{
|
||||
#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
|
||||
typedef aux::vector_tag tag;
|
||||
typedef vector0 type;
|
||||
typedef long_<32768> lower_bound_;
|
||||
typedef lower_bound_ upper_bound_;
|
||||
typedef long_<0> size;
|
||||
|
||||
static aux::type_wrapper<void_> item_(...);
|
||||
#else
|
||||
typedef aux::vector_tag<0> tag;
|
||||
typedef vector0 type;
|
||||
typedef void_ item0;
|
||||
|
||||
typedef v_iter<vector0<>,0> begin;
|
||||
typedef v_iter<vector0<>,0> end;
|
||||
#endif
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_VECTOR_AUX_VECTOR0_HPP_INCLUDED
|
||||
@@ -0,0 +1,72 @@
|
||||
module ft8_decode
|
||||
|
||||
type :: ft8_decoder
|
||||
procedure(ft8_decode_callback), pointer :: callback
|
||||
contains
|
||||
procedure :: decode
|
||||
end type ft8_decoder
|
||||
|
||||
abstract interface
|
||||
subroutine ft8_decode_callback (this,sync,snr,dt,freq,nbadcrc,decoded)
|
||||
import ft8_decoder
|
||||
implicit none
|
||||
class(ft8_decoder), intent(inout) :: this
|
||||
real, intent(in) :: sync
|
||||
integer, intent(in) :: snr
|
||||
real, intent(in) :: dt
|
||||
real, intent(in) :: freq
|
||||
integer, intent(in) :: nbadcrc
|
||||
character(len=22), intent(in) :: decoded
|
||||
end subroutine ft8_decode_callback
|
||||
end interface
|
||||
|
||||
contains
|
||||
|
||||
subroutine decode(this,callback,ss,iwave,nfqso,newdat,npts8,nutc,nfa, &
|
||||
nfsplit,nfb,ntol,nzhsym,nagain,ndepth,nmode,nsubmode,nexp_decode)
|
||||
|
||||
use timer_module, only: timer
|
||||
include 'fsk4hf/ft8_params.f90'
|
||||
|
||||
class(ft8_decoder), intent(inout) :: this
|
||||
procedure(ft8_decode_callback) :: callback
|
||||
real ss(1,1) !### dummy, to be removed ###
|
||||
real s(NH1,NHSYM)
|
||||
real candidate(3,100)
|
||||
logical, intent(in) :: newdat, nagain
|
||||
integer*2 iwave(15*12000)
|
||||
character datetime*13,message*22
|
||||
|
||||
this%callback => callback
|
||||
write(datetime,1001) nutc !### TEMPORARY ###
|
||||
1001 format("000000_",i6.6)
|
||||
|
||||
call timer('sync8 ',0)
|
||||
call sync8(iwave,nfa,nfb,nfqso,s,candidate,ncand)
|
||||
call timer('sync8 ',1)
|
||||
|
||||
syncmin=4.0
|
||||
! rewind 51
|
||||
do icand=1,ncand
|
||||
sync=candidate(3,icand)
|
||||
if(sync.lt.syncmin) cycle
|
||||
f1=candidate(1,icand)
|
||||
xdt=candidate(2,icand)
|
||||
nsnr=min(99,nint(10.0*log10(sync) - 25.5)) !### empirical ###
|
||||
call timer('ft8b ',0)
|
||||
call ft8b(s,nfqso,f1,xdt,nharderrors,dmin,nbadcrc,message)
|
||||
xdt=xdt-0.6
|
||||
call timer('ft8b ',1)
|
||||
if (associated(this%callback)) call this%callback(sync,nsnr,xdt, &
|
||||
f1,nbadcrc,message)
|
||||
! write(13,1110) datetime,0,nsnr,xdt,f1,nharderrors,dmin,message
|
||||
!1110 format(a13,2i4,f6.2,f7.1,i4,' ~ ',f6.2,2x,a22,' FT8')
|
||||
! write(51,3051) xdt,f1,sync,dmin,nsnr,nharderrors,nbadcrc,message
|
||||
!3051 format(4f9.1,3i5,2x,a22)
|
||||
! flush(51)
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine decode
|
||||
|
||||
end module ft8_decode
|
||||
@@ -0,0 +1,182 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2014 Roshan <thisisroshansmail@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_SET_DIFFERENCE_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_SET_DIFFERENCE_HPP
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/compute/algorithm/detail/compact.hpp>
|
||||
#include <boost/compute/algorithm/detail/balanced_path.hpp>
|
||||
#include <boost/compute/algorithm/exclusive_scan.hpp>
|
||||
#include <boost/compute/algorithm/fill_n.hpp>
|
||||
#include <boost/compute/container/vector.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/system.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
///
|
||||
/// \brief Serial set difference kernel class
|
||||
///
|
||||
/// Subclass of meta_kernel to perform serial set difference after tiling
|
||||
///
|
||||
class serial_set_difference_kernel : meta_kernel
|
||||
{
|
||||
public:
|
||||
unsigned int tile_size;
|
||||
|
||||
serial_set_difference_kernel() : meta_kernel("set_difference")
|
||||
{
|
||||
tile_size = 4;
|
||||
}
|
||||
|
||||
template<class InputIterator1, class InputIterator2,
|
||||
class InputIterator3, class InputIterator4,
|
||||
class OutputIterator1, class OutputIterator2>
|
||||
void set_range(InputIterator1 first1,
|
||||
InputIterator2 first2,
|
||||
InputIterator3 tile_first1,
|
||||
InputIterator3 tile_last1,
|
||||
InputIterator4 tile_first2,
|
||||
OutputIterator1 result,
|
||||
OutputIterator2 counts)
|
||||
{
|
||||
m_count = iterator_range_size(tile_first1, tile_last1) - 1;
|
||||
|
||||
*this <<
|
||||
"uint i = get_global_id(0);\n" <<
|
||||
"uint start1 = " << tile_first1[expr<uint_>("i")] << ";\n" <<
|
||||
"uint end1 = " << tile_first1[expr<uint_>("i+1")] << ";\n" <<
|
||||
"uint start2 = " << tile_first2[expr<uint_>("i")] << ";\n" <<
|
||||
"uint end2 = " << tile_first2[expr<uint_>("i+1")] << ";\n" <<
|
||||
"uint index = i*" << tile_size << ";\n" <<
|
||||
"uint count = 0;\n" <<
|
||||
"while(start1<end1 && start2<end2)\n" <<
|
||||
"{\n" <<
|
||||
" if(" << first1[expr<uint_>("start1")] << " == " <<
|
||||
first2[expr<uint_>("start2")] << ")\n" <<
|
||||
" {\n" <<
|
||||
" start1++; start2++;\n" <<
|
||||
" }\n" <<
|
||||
" else if(" << first1[expr<uint_>("start1")] << " < " <<
|
||||
first2[expr<uint_>("start2")] << ")\n" <<
|
||||
" {\n" <<
|
||||
result[expr<uint_>("index")] <<
|
||||
" = " << first1[expr<uint_>("start1")] << ";\n" <<
|
||||
" index++; count++;\n" <<
|
||||
" start1++;\n" <<
|
||||
" }\n" <<
|
||||
" else\n" <<
|
||||
" {\n" <<
|
||||
" start2++;\n" <<
|
||||
" }\n" <<
|
||||
"}\n" <<
|
||||
"while(start1<end1)\n" <<
|
||||
"{\n" <<
|
||||
result[expr<uint_>("index")] <<
|
||||
" = " << first1[expr<uint_>("start1")] << ";\n" <<
|
||||
" index++; count++;\n" <<
|
||||
" start1++;\n" <<
|
||||
"}\n" <<
|
||||
counts[expr<uint_>("i")] << " = count;\n";
|
||||
}
|
||||
|
||||
event exec(command_queue &queue)
|
||||
{
|
||||
if(m_count == 0) {
|
||||
return event();
|
||||
}
|
||||
|
||||
return exec_1d(queue, 0, m_count);
|
||||
}
|
||||
|
||||
private:
|
||||
size_t m_count;
|
||||
};
|
||||
|
||||
} //end detail namespace
|
||||
|
||||
///
|
||||
/// \brief Set difference algorithm
|
||||
///
|
||||
/// Finds the difference of the sorted range [first2, last2) from the sorted
|
||||
/// range [first1, last1) and stores it in range starting at result
|
||||
/// \return Iterator pointing to end of difference
|
||||
///
|
||||
/// \param first1 Iterator pointing to start of first set
|
||||
/// \param last1 Iterator pointing to end of first set
|
||||
/// \param first2 Iterator pointing to start of second set
|
||||
/// \param last2 Iterator pointing to end of second set
|
||||
/// \param result Iterator pointing to start of range in which the difference
|
||||
/// will be stored
|
||||
/// \param queue Queue on which to execute
|
||||
///
|
||||
template<class InputIterator1, class InputIterator2, class OutputIterator>
|
||||
inline OutputIterator set_difference(InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
InputIterator2 last2,
|
||||
OutputIterator result,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
typedef typename std::iterator_traits<InputIterator1>::value_type value_type;
|
||||
|
||||
int tile_size = 1024;
|
||||
|
||||
int count1 = detail::iterator_range_size(first1, last1);
|
||||
int count2 = detail::iterator_range_size(first2, last2);
|
||||
|
||||
vector<uint_> tile_a((count1+count2+tile_size-1)/tile_size+1, queue.get_context());
|
||||
vector<uint_> tile_b((count1+count2+tile_size-1)/tile_size+1, queue.get_context());
|
||||
|
||||
// Tile the sets
|
||||
detail::balanced_path_kernel tiling_kernel;
|
||||
tiling_kernel.tile_size = tile_size;
|
||||
tiling_kernel.set_range(first1, last1, first2, last2,
|
||||
tile_a.begin()+1, tile_b.begin()+1);
|
||||
fill_n(tile_a.begin(), 1, 0, queue);
|
||||
fill_n(tile_b.begin(), 1, 0, queue);
|
||||
tiling_kernel.exec(queue);
|
||||
|
||||
fill_n(tile_a.end()-1, 1, count1, queue);
|
||||
fill_n(tile_b.end()-1, 1, count2, queue);
|
||||
|
||||
vector<value_type> temp_result(count1+count2, queue.get_context());
|
||||
vector<uint_> counts((count1+count2+tile_size-1)/tile_size + 1, queue.get_context());
|
||||
fill_n(counts.end()-1, 1, 0, queue);
|
||||
|
||||
// Find individual differences
|
||||
detail::serial_set_difference_kernel difference_kernel;
|
||||
difference_kernel.tile_size = tile_size;
|
||||
difference_kernel.set_range(first1, first2, tile_a.begin(), tile_a.end(),
|
||||
tile_b.begin(), temp_result.begin(), counts.begin());
|
||||
|
||||
difference_kernel.exec(queue);
|
||||
|
||||
exclusive_scan(counts.begin(), counts.end(), counts.begin(), queue);
|
||||
|
||||
// Compact the results
|
||||
detail::compact_kernel compact_kernel;
|
||||
compact_kernel.tile_size = tile_size;
|
||||
compact_kernel.set_range(temp_result.begin(), counts.begin(), counts.end(), result);
|
||||
|
||||
compact_kernel.exec(queue);
|
||||
|
||||
return result + (counts.end() - 1).read(queue);
|
||||
}
|
||||
|
||||
} //end compute namespace
|
||||
} //end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_SET_DIFFERENCE_HPP
|
||||
@@ -0,0 +1,94 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef TO_PYTHON_CONVERTER_DWA200221_HPP
|
||||
# define TO_PYTHON_CONVERTER_DWA200221_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
|
||||
# include <boost/python/converter/registry.hpp>
|
||||
# include <boost/python/converter/as_to_python_function.hpp>
|
||||
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
|
||||
# include <boost/python/converter/pytype_function.hpp>
|
||||
#endif
|
||||
# include <boost/python/type_id.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
#if 0 //get_pytype member detection
|
||||
namespace detail
|
||||
{
|
||||
typedef char yes_type;
|
||||
typedef struct {char a[2]; } no_type;
|
||||
template<PyTypeObject const * (*f)()> struct test_get_pytype1 { };
|
||||
template<PyTypeObject * (*f)()> struct test_get_pytype2 { };
|
||||
|
||||
template<class T> yes_type tester(test_get_pytype1<&T::get_pytype>*);
|
||||
|
||||
template<class T> yes_type tester(test_get_pytype2<&T::get_pytype>*);
|
||||
|
||||
template<class T> no_type tester(...);
|
||||
|
||||
template<class T>
|
||||
struct test_get_pytype_base
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value= (sizeof(detail::tester<T>(0)) == sizeof(yes_type)));
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct test_get_pytype : boost::mpl::bool_<test_get_pytype_base<T>::value>
|
||||
{
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
template < class T, class Conversion, bool has_get_pytype=false >
|
||||
struct to_python_converter
|
||||
{
|
||||
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
|
||||
typedef boost::mpl::bool_<has_get_pytype> HasGetPytype;
|
||||
|
||||
static PyTypeObject const* get_pytype_1(boost::mpl::true_ *)
|
||||
{
|
||||
return Conversion::get_pytype();
|
||||
}
|
||||
|
||||
static PyTypeObject const* get_pytype_1(boost::mpl::false_ *)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static PyTypeObject const* get_pytype_impl()
|
||||
{
|
||||
return get_pytype_1((HasGetPytype*)0);
|
||||
}
|
||||
#endif
|
||||
|
||||
to_python_converter();
|
||||
};
|
||||
|
||||
//
|
||||
// implementation
|
||||
//
|
||||
|
||||
template <class T, class Conversion ,bool has_get_pytype>
|
||||
to_python_converter<T,Conversion, has_get_pytype>::to_python_converter()
|
||||
{
|
||||
typedef converter::as_to_python_function<
|
||||
T, Conversion
|
||||
> normalized;
|
||||
|
||||
converter::registry::insert(
|
||||
&normalized::convert
|
||||
, type_id<T>()
|
||||
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
|
||||
, &get_pytype_impl
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
#endif // TO_PYTHON_CONVERTER_DWA200221_HPP
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Copyright Franz Detro 2014
|
||||
Copyright (c) Microsoft Corporation 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)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_ARCHITECTURE_ARM_H
|
||||
#define BOOST_PREDEF_ARCHITECTURE_ARM_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_ARCH_ARM`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__arm__`] [__predef_detection__]]
|
||||
[[`__arm64`] [__predef_detection__]]
|
||||
[[`__thumb__`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_ARM`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`__TARGET_ARCH_ARM`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_THUMB`] [V.0.0]]
|
||||
[[`_M_ARM`] [V.0.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
|
||||
defined(_M_ARM)
|
||||
# undef BOOST_ARCH_ARM
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__arm64)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(8,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM) && defined(_M_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER(_M_ARM,0,0)
|
||||
# endif
|
||||
# if !defined(BOOST_ARCH_ARM)
|
||||
# define BOOST_ARCH_ARM BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_ARCH_ARM
|
||||
# define BOOST_ARCH_ARM_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_ARCH_ARM_NAME "ARM"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_ARM,BOOST_ARCH_ARM_NAME)
|
||||
@@ -0,0 +1,186 @@
|
||||
// (C) Copyright John Maddock 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This file is machine generated, do not edit by hand
|
||||
|
||||
// Polynomial evaluation using second order Horners rule
|
||||
#ifndef BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
|
||||
#define BOOST_MATH_TOOLS_RAT_EVAL_7_HPP
|
||||
|
||||
namespace boost{ namespace math{ namespace tools{ namespace detail{
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T*, const U*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(0);
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(a[0]) / static_cast<V>(b[0]);
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>((a[1] * x + a[0]) / (b[1] * x + b[0]));
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(((a[2] * x + a[1]) * x + a[0]) / ((b[2] * x + b[1]) * x + b[0]));
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<4>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>((((a[3] * x + a[2]) * x + a[1]) * x + a[0]) / (((b[3] * x + b[2]) * x + b[1]) * x + b[0]));
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<5>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
if(x <= 1)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[4];
|
||||
t[0] = a[4] * x2 + a[2];
|
||||
t[1] = a[3] * x2 + a[1];
|
||||
t[2] = b[4] * x2 + b[2];
|
||||
t[3] = b[3] * x2 + b[1];
|
||||
t[0] *= x2;
|
||||
t[2] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[2] += static_cast<V>(b[0]);
|
||||
t[1] *= x;
|
||||
t[3] *= x;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
V z = 1 / x;
|
||||
V z2 = 1 / (x * x);
|
||||
V t[4];
|
||||
t[0] = a[0] * z2 + a[2];
|
||||
t[1] = a[1] * z2 + a[3];
|
||||
t[2] = b[0] * z2 + b[2];
|
||||
t[3] = b[1] * z2 + b[3];
|
||||
t[0] *= z2;
|
||||
t[2] *= z2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[2] += static_cast<V>(b[4]);
|
||||
t[1] *= z;
|
||||
t[3] *= z;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<6>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
if(x <= 1)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[4];
|
||||
t[0] = a[5] * x2 + a[3];
|
||||
t[1] = a[4] * x2 + a[2];
|
||||
t[2] = b[5] * x2 + b[3];
|
||||
t[3] = b[4] * x2 + b[2];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[2] *= x2;
|
||||
t[3] *= x2;
|
||||
t[0] += static_cast<V>(a[1]);
|
||||
t[1] += static_cast<V>(a[0]);
|
||||
t[2] += static_cast<V>(b[1]);
|
||||
t[3] += static_cast<V>(b[0]);
|
||||
t[0] *= x;
|
||||
t[2] *= x;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
V z = 1 / x;
|
||||
V z2 = 1 / (x * x);
|
||||
V t[4];
|
||||
t[0] = a[0] * z2 + a[2];
|
||||
t[1] = a[1] * z2 + a[3];
|
||||
t[2] = b[0] * z2 + b[2];
|
||||
t[3] = b[1] * z2 + b[3];
|
||||
t[0] *= z2;
|
||||
t[1] *= z2;
|
||||
t[2] *= z2;
|
||||
t[3] *= z2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[1] += static_cast<V>(a[5]);
|
||||
t[2] += static_cast<V>(b[4]);
|
||||
t[3] += static_cast<V>(b[5]);
|
||||
t[0] *= z;
|
||||
t[2] *= z;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T, class U, class V>
|
||||
inline V evaluate_rational_c_imp(const T* a, const U* b, const V& x, const mpl::int_<7>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
if(x <= 1)
|
||||
{
|
||||
V x2 = x * x;
|
||||
V t[4];
|
||||
t[0] = a[6] * x2 + a[4];
|
||||
t[1] = a[5] * x2 + a[3];
|
||||
t[2] = b[6] * x2 + b[4];
|
||||
t[3] = b[5] * x2 + b[3];
|
||||
t[0] *= x2;
|
||||
t[1] *= x2;
|
||||
t[2] *= x2;
|
||||
t[3] *= x2;
|
||||
t[0] += static_cast<V>(a[2]);
|
||||
t[1] += static_cast<V>(a[1]);
|
||||
t[2] += static_cast<V>(b[2]);
|
||||
t[3] += static_cast<V>(b[1]);
|
||||
t[0] *= x2;
|
||||
t[2] *= x2;
|
||||
t[0] += static_cast<V>(a[0]);
|
||||
t[2] += static_cast<V>(b[0]);
|
||||
t[1] *= x;
|
||||
t[3] *= x;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
else
|
||||
{
|
||||
V z = 1 / x;
|
||||
V z2 = 1 / (x * x);
|
||||
V t[4];
|
||||
t[0] = a[0] * z2 + a[2];
|
||||
t[1] = a[1] * z2 + a[3];
|
||||
t[2] = b[0] * z2 + b[2];
|
||||
t[3] = b[1] * z2 + b[3];
|
||||
t[0] *= z2;
|
||||
t[1] *= z2;
|
||||
t[2] *= z2;
|
||||
t[3] *= z2;
|
||||
t[0] += static_cast<V>(a[4]);
|
||||
t[1] += static_cast<V>(a[5]);
|
||||
t[2] += static_cast<V>(b[4]);
|
||||
t[3] += static_cast<V>(b[5]);
|
||||
t[0] *= z2;
|
||||
t[2] *= z2;
|
||||
t[0] += static_cast<V>(a[6]);
|
||||
t[2] += static_cast<V>(b[6]);
|
||||
t[1] *= z;
|
||||
t[3] *= z;
|
||||
return (t[0] + t[1]) / (t[2] + t[3]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}}}} // namespaces
|
||||
|
||||
#endif // include guard
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
// mac/chrono.cpp --------------------------------------------------------------//
|
||||
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Mac //
|
||||
//----------------------------------------------------------------------------//
|
||||
|
||||
#include <sys/time.h> //for gettimeofday and timeval
|
||||
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace chrono
|
||||
{
|
||||
|
||||
// system_clock
|
||||
|
||||
// gettimeofday is the most precise "system time" available on this platform.
|
||||
// It returns the number of microseconds since New Years 1970 in a struct called timeval
|
||||
// which has a field for seconds and a field for microseconds.
|
||||
// Fill in the timeval and then convert that to the time_point
|
||||
system_clock::time_point
|
||||
system_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
system_clock::time_point
|
||||
system_clock::now(system::error_code & ec)
|
||||
{
|
||||
timeval tv;
|
||||
gettimeofday(&tv, 0);
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
|
||||
}
|
||||
#endif
|
||||
// Take advantage of the fact that on this platform time_t is nothing but
|
||||
// an integral count of seconds since New Years 1970 (same epoch as timeval).
|
||||
// Just get the duration out of the time_point and truncate it to seconds.
|
||||
time_t
|
||||
system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
|
||||
}
|
||||
|
||||
// Just turn the time_t into a count of seconds and construct a time_point with it.
|
||||
system_clock::time_point
|
||||
system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
|
||||
{
|
||||
return system_clock::time_point(seconds(t));
|
||||
}
|
||||
|
||||
namespace chrono_detail
|
||||
{
|
||||
|
||||
// steady_clock
|
||||
|
||||
// Note, in this implementation steady_clock and high_resolution_clock
|
||||
// are the same clock. They are both based on mach_absolute_time().
|
||||
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
|
||||
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
|
||||
// are run time constants supplied by the OS. This clock has no relationship
|
||||
// to the Gregorian calendar. It's main use is as a high resolution timer.
|
||||
|
||||
// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
|
||||
// for that case as an optimization.
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified()
|
||||
{
|
||||
return mach_absolute_time();
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_simplified_ec(system::error_code & ec)
|
||||
{
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return mach_absolute_time();
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
double
|
||||
compute_steady_factor(kern_return_t& err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 ) {
|
||||
return 0;
|
||||
}
|
||||
return static_cast<double>(MachInfo.numer) / MachInfo.denom;
|
||||
}
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full()
|
||||
{
|
||||
kern_return_t err;
|
||||
const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
steady_clock::rep
|
||||
steady_full_ec(system::error_code & ec)
|
||||
{
|
||||
kern_return_t err;
|
||||
const double factor = chrono_detail::compute_steady_factor(err);
|
||||
if (err != 0)
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return steady_clock::rep();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef steady_clock::rep (*FP)();
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
typedef steady_clock::rep (*FP_ec)(system::error_code &);
|
||||
#endif
|
||||
|
||||
BOOST_CHRONO_STATIC
|
||||
FP
|
||||
init_steady_clock(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified;
|
||||
}
|
||||
return &chrono_detail::steady_full;
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
BOOST_CHRONO_STATIC
|
||||
FP_ec
|
||||
init_steady_clock_ec(kern_return_t & err)
|
||||
{
|
||||
mach_timebase_info_data_t MachInfo;
|
||||
err = mach_timebase_info(&MachInfo);
|
||||
if ( err != 0 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (MachInfo.numer == MachInfo.denom)
|
||||
{
|
||||
return &chrono_detail::steady_simplified_ec;
|
||||
}
|
||||
return &chrono_detail::steady_full_ec;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
steady_clock::time_point
|
||||
steady_clock::now() BOOST_NOEXCEPT
|
||||
{
|
||||
kern_return_t err;
|
||||
chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
|
||||
}
|
||||
return time_point(duration(fp()));
|
||||
}
|
||||
|
||||
#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
|
||||
steady_clock::time_point
|
||||
steady_clock::now(system::error_code & ec)
|
||||
{
|
||||
kern_return_t err;
|
||||
chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
|
||||
if ( err != 0 )
|
||||
{
|
||||
if (BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
boost::throw_exception(
|
||||
system::system_error(
|
||||
err,
|
||||
BOOST_CHRONO_SYSTEM_CATEGORY,
|
||||
"chrono::steady_clock" ));
|
||||
}
|
||||
else
|
||||
{
|
||||
ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
|
||||
return time_point();
|
||||
}
|
||||
}
|
||||
if (!BOOST_CHRONO_IS_THROWS(ec))
|
||||
{
|
||||
ec.clear();
|
||||
}
|
||||
return time_point(duration(fp(ec)));
|
||||
}
|
||||
#endif
|
||||
} // namespace chrono
|
||||
} // namespace boost
|
||||
@@ -0,0 +1,55 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331)
|
||||
#define BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct single_view_iterator_tag;
|
||||
|
||||
template <typename SingleView, typename Pos>
|
||||
struct single_view_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct next_impl;
|
||||
|
||||
template <>
|
||||
struct next_impl<single_view_iterator_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply
|
||||
{
|
||||
typedef single_view_iterator<
|
||||
typename Iterator::single_view_type,
|
||||
typename mpl::next<typename Iterator::position>::type>
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Iterator const& i)
|
||||
{
|
||||
// Workaround for ICE on GCC 4.0.0.
|
||||
// see https://svn.boost.org/trac/boost/ticket/5808
|
||||
typedef typename type::position position;
|
||||
BOOST_STATIC_ASSERT((position::value < 2));
|
||||
return type(i.view);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct nil_;
|
||||
struct void_;
|
||||
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>
|
||||
struct list
|
||||
: detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29>::type
|
||||
{
|
||||
private:
|
||||
typedef
|
||||
detail::list_to_cons<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29>
|
||||
list_to_cons;
|
||||
typedef typename list_to_cons::type inherited_type;
|
||||
public:
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list()
|
||||
: inherited_type() {}
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29> const& rhs)
|
||||
: inherited_type(rhs) {}
|
||||
template <typename Sequence>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
list(Sequence const& rhs
|
||||
, typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
|
||||
: inherited_type(rhs) {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
list(typename detail::call_param<T0 >::type arg0)
|
||||
: inherited_type(list_to_cons::call(arg0))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23)
|
||||
: inherited_type(list_to_cons::call(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19 , arg20 , arg21 , arg22 , arg23))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9 , typename detail::call_param<T10 >::type arg10 , typename detail::call_param<T11 >::type arg11 , typename detail::call_param<T12 >::type arg12 , typename detail::call_param<T13 >::type arg13 , typename detail::call_param<T14 >::type arg14 , typename detail::call_param<T15 >::type arg15 , typename detail::call_param<T16 >::type arg16 , typename detail::call_param<T17 >::type arg17 , typename detail::call_param<T18 >::type arg18 , typename detail::call_param<T19 >::type arg19 , typename detail::call_param<T20 >::type arg20 , typename detail::call_param<T21 >::type arg21 , typename detail::call_param<T22 >::type arg22 , typename detail::call_param<T23 >::type arg23 , typename detail::call_param<T24 >::type arg24 , typename detail::call_param<T25 >::type arg25 , typename detail::call_param<T26 >::type arg26 , typename detail::call_param<T27 >::type arg27 , typename detail::call_param<T28 >::type arg28 , typename detail::call_param<T29 >::type arg29)
|
||||
: inherited_type(list_to_cons::call(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))
|
||||
{}
|
||||
template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
list&
|
||||
operator=(list<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29> const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
template <typename Sequence>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
typename boost::enable_if<traits::is_sequence<Sequence>, list&>::type
|
||||
operator=(Sequence const& rhs)
|
||||
{
|
||||
inherited_type::operator=(rhs);
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,43 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef COPY_NON_CONST_REFERENCE_DWA2002131_HPP
|
||||
# define COPY_NON_CONST_REFERENCE_DWA2002131_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/python/to_python_value.hpp>
|
||||
|
||||
namespace boost { namespace python {
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <class R>
|
||||
struct copy_non_const_reference_expects_a_non_const_reference_return_type
|
||||
# if defined(__GNUC__) || defined(__EDG__)
|
||||
{}
|
||||
# endif
|
||||
;
|
||||
}
|
||||
|
||||
template <class T> struct to_python_value;
|
||||
|
||||
struct copy_non_const_reference
|
||||
{
|
||||
template <class T>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::if_c<
|
||||
indirect_traits::is_reference_to_non_const<T>::value
|
||||
, to_python_value<T>
|
||||
, detail::copy_non_const_reference_expects_a_non_const_reference_return_type<T>
|
||||
>::type type;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}} // namespace boost::python
|
||||
|
||||
#endif // COPY_NON_CONST_REFERENCE_DWA2002131_HPP
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,92 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/less.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct less_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct less_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct less_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct less_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct less_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct less
|
||||
|
||||
: less_impl<
|
||||
typename less_tag<N1>::type
|
||||
, typename less_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, less)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct less_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) >
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,534 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/vector_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
template< int N >
|
||||
struct vector_c_chooser;
|
||||
|
||||
}
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<0>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector0_c<
|
||||
T
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<1>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector1_c<
|
||||
T, T(C0)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<2>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector2_c<
|
||||
T, T(C0), T(C1)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<3>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector3_c<
|
||||
T, T(C0), T(C1), T(C2)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<4>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector4_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<5>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector5_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<6>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector6_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<7>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector7_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<8>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector8_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<9>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector9_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<10>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector10_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<11>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector11_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<12>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector12_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<13>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector13_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<14>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector14_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<15>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector15_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<16>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector16_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<17>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector17_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<18>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector18_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<19>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector19_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template<>
|
||||
struct vector_c_chooser<20>
|
||||
{
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename vector20_c<
|
||||
T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19)
|
||||
>::type type;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
namespace aux {
|
||||
|
||||
template< long C >
|
||||
struct is_vector_c_arg
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = true);
|
||||
};
|
||||
|
||||
template<>
|
||||
struct is_vector_c_arg<LONG_MAX>
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = false);
|
||||
};
|
||||
|
||||
template<
|
||||
long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8
|
||||
, long C9, long C10, long C11, long C12, long C13, long C14, long C15
|
||||
, long C16, long C17, long C18, long C19, long C20
|
||||
>
|
||||
struct vector_c_count_args
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, value =
|
||||
is_vector_c_arg<C1>::value + is_vector_c_arg<C2>::value
|
||||
+ is_vector_c_arg<C3>::value + is_vector_c_arg<C4>::value
|
||||
+ is_vector_c_arg<C5>::value + is_vector_c_arg<C6>::value
|
||||
+ is_vector_c_arg<C7>::value + is_vector_c_arg<C8>::value
|
||||
+ is_vector_c_arg<C9>::value + is_vector_c_arg<C10>::value
|
||||
+ is_vector_c_arg<C11>::value + is_vector_c_arg<C12>::value
|
||||
+ is_vector_c_arg<C13>::value + is_vector_c_arg<C14>::value
|
||||
+ is_vector_c_arg<C15>::value + is_vector_c_arg<C16>::value
|
||||
+ is_vector_c_arg<C17>::value + is_vector_c_arg<C18>::value
|
||||
+ is_vector_c_arg<C19>::value + is_vector_c_arg<C20>::value
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
template<
|
||||
typename T, long C0, long C1, long C2, long C3, long C4, long C5
|
||||
, long C6, long C7, long C8, long C9, long C10, long C11, long C12
|
||||
, long C13, long C14, long C15, long C16, long C17, long C18, long C19
|
||||
>
|
||||
struct vector_c_impl
|
||||
{
|
||||
typedef aux::vector_c_count_args<
|
||||
C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
|
||||
> arg_num_;
|
||||
|
||||
typedef typename aux::vector_c_chooser< arg_num_::value >
|
||||
::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type;
|
||||
};
|
||||
|
||||
} // namespace aux
|
||||
|
||||
template<
|
||||
typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX
|
||||
, long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX
|
||||
, long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX
|
||||
, long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX
|
||||
, long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX
|
||||
, long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX
|
||||
, long C18 = LONG_MAX, long C19 = LONG_MAX
|
||||
>
|
||||
struct vector_c
|
||||
: aux::vector_c_impl<
|
||||
T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
|
||||
>::type
|
||||
{
|
||||
typedef typename aux::vector_c_impl<
|
||||
T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19
|
||||
>::type type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
#ifndef BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
|
||||
#define BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/vector/vector0.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template< typename T > struct vector0_c
|
||||
: vector0<>
|
||||
{
|
||||
typedef vector0_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_VECTOR_VECTOR0_C_HPP_INCLUDED
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/util/odeint_error.hpp
|
||||
|
||||
[begin_description]
|
||||
Runtime Exceptions thrown by odeint
|
||||
[end_description]
|
||||
|
||||
Copyright 2015 Mario Mulansky
|
||||
|
||||
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_UTIL_ODEINT_ERROR_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_UTIL_ODEINT_ERROR_HPP_INCLUDED
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
|
||||
/**
|
||||
* \brief Runtime error thrown by odeint
|
||||
*/
|
||||
class odeint_error : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
odeint_error(const std::string &s)
|
||||
: std::runtime_error(s)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief Runtime error thrown from integrate routines
|
||||
*
|
||||
* This Error occures when too many iterations are performed in between two
|
||||
* observer calls in the integrate routines.
|
||||
*/
|
||||
class no_progress_error : public odeint_error
|
||||
{
|
||||
public:
|
||||
no_progress_error(const std::string &s)
|
||||
: odeint_error(s)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* \brief Runtime error thrown during stepsize adjustment
|
||||
*
|
||||
* This Error occures when too many iterations are performed without finding
|
||||
* an appropriate new step size. This usually indicates non-continuous points
|
||||
* in the ODE.
|
||||
*/
|
||||
class step_adjustment_error : public odeint_error
|
||||
{
|
||||
public:
|
||||
step_adjustment_error(const std::string &s)
|
||||
: odeint_error(s)
|
||||
{ }
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_UTIL_ODEINT_ERROR_HPP_INCLUDED
|
||||
@@ -0,0 +1,384 @@
|
||||
/*
|
||||
*-------------------------------------------------------------------------------
|
||||
*
|
||||
* This file is part of the WSPR application, Weak Signal Propagation Reporter
|
||||
*
|
||||
* File Name: nhash.c
|
||||
* Description: Functions to produce 32-bit hashes for hash table lookup
|
||||
*
|
||||
* Copyright (C) 2008-2014 Joseph Taylor, K1JT
|
||||
* License: GPL-3
|
||||
*
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
|
||||
* Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Files: lookup3.c
|
||||
* Copyright: Copyright (C) 2006 Bob Jenkins <bob_jenkins@burtleburtle.net>
|
||||
* License: public-domain
|
||||
* You may use this code any way you wish, private, educational, or commercial.
|
||||
* It's free.
|
||||
*
|
||||
*-------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*
|
||||
These are functions for producing 32-bit hashes for hash table lookup.
|
||||
hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
|
||||
are externally useful functions. Routines to test the hash are included
|
||||
if SELF_TEST is defined. You can use this free for any purpose. It's in
|
||||
the public domain. It has no warranty.
|
||||
|
||||
You probably want to use hashlittle(). hashlittle() and hashbig()
|
||||
hash byte arrays. hashlittle() is is faster than hashbig() on
|
||||
little-endian machines. Intel and AMD are little-endian machines.
|
||||
On second thought, you probably want hashlittle2(), which is identical to
|
||||
hashlittle() except it returns two 32-bit hashes for the price of one.
|
||||
You could implement hashbig2() if you wanted but I haven't bothered here.
|
||||
|
||||
If you want to find a hash of, say, exactly 7 integers, do
|
||||
a = i1; b = i2; c = i3;
|
||||
mix(a,b,c);
|
||||
a += i4; b += i5; c += i6;
|
||||
mix(a,b,c);
|
||||
a += i7;
|
||||
final(a,b,c);
|
||||
then use c as the hash value. If you have a variable length array of
|
||||
4-byte integers to hash, use hashword(). If you have a byte array (like
|
||||
a character string), use hashlittle(). If you have several byte arrays, or
|
||||
a mix of things, see the comments above hashlittle().
|
||||
|
||||
Why is this so big? I read 12 bytes at a time into 3 4-byte integers,
|
||||
then mix those integers. This is fast (you can do a lot more thorough
|
||||
mixing with 12*3 instructions on 3 integers than you can with 3 instructions
|
||||
on 1 byte), but shoehorning those bytes into integers efficiently is messy.
|
||||
*/
|
||||
|
||||
#define SELF_TEST 1
|
||||
|
||||
#include <stdio.h> /* defines printf for tests */
|
||||
#include <time.h> /* defines time_t for timings in the test */
|
||||
#ifdef Win32
|
||||
#include "win_stdint.h" /* defines uint32_t etc */
|
||||
#else
|
||||
#include <stdint.h> /* defines uint32_t etc */
|
||||
#endif
|
||||
//#include <sys/param.h> /* attempt to define endianness */
|
||||
//#ifdef linux
|
||||
//# include <endian.h> /* attempt to define endianness */
|
||||
//#endif
|
||||
|
||||
#define HASH_LITTLE_ENDIAN 1
|
||||
|
||||
#define hashsize(n) ((uint32_t)1<<(n))
|
||||
#define hashmask(n) (hashsize(n)-1)
|
||||
#define rot(x,k) (((x)<<(k)) | ((x)>>(32-(k))))
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------------
|
||||
mix -- mix 3 32-bit values reversibly.
|
||||
|
||||
This is reversible, so any information in (a,b,c) before mix() is
|
||||
still in (a,b,c) after mix().
|
||||
|
||||
If four pairs of (a,b,c) inputs are run through mix(), or through
|
||||
mix() in reverse, there are at least 32 bits of the output that
|
||||
are sometimes the same for one pair and different for another pair.
|
||||
This was tested for:
|
||||
* pairs that differed by one bit, by two bits, in any combination
|
||||
of top bits of (a,b,c), or in any combination of bottom bits of
|
||||
(a,b,c).
|
||||
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed
|
||||
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
|
||||
is commonly produced by subtraction) look like a single 1-bit
|
||||
difference.
|
||||
* the base values were pseudorandom, all zero but one bit set, or
|
||||
all zero plus a counter that starts at zero.
|
||||
|
||||
Some k values for my "a-=c; a^=rot(c,k); c+=b;" arrangement that
|
||||
satisfy this are
|
||||
4 6 8 16 19 4
|
||||
9 15 3 18 27 15
|
||||
14 9 3 7 17 3
|
||||
Well, "9 15 3 18 27 15" didn't quite get 32 bits diffing
|
||||
for "differ" defined as + with a one-bit base and a two-bit delta. I
|
||||
used http://burtleburtle.net/bob/hash/avalanche.html to choose
|
||||
the operations, constants, and arrangements of the variables.
|
||||
|
||||
This does not achieve avalanche. There are input bits of (a,b,c)
|
||||
that fail to affect some output bits of (a,b,c), especially of a. The
|
||||
most thoroughly mixed value is c, but it doesn't really even achieve
|
||||
avalanche in c.
|
||||
|
||||
This allows some parallelism. Read-after-writes are good at doubling
|
||||
the number of bits affected, so the goal of mixing pulls in the opposite
|
||||
direction as the goal of parallelism. I did what I could. Rotates
|
||||
seem to cost as much as shifts on every machine I could lay my hands
|
||||
on, and rotates are much kinder to the top and bottom bits, so I used
|
||||
rotates.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
#define mix(a,b,c) \
|
||||
{ \
|
||||
a -= c; a ^= rot(c, 4); c += b; \
|
||||
b -= a; b ^= rot(a, 6); a += c; \
|
||||
c -= b; c ^= rot(b, 8); b += a; \
|
||||
a -= c; a ^= rot(c,16); c += b; \
|
||||
b -= a; b ^= rot(a,19); a += c; \
|
||||
c -= b; c ^= rot(b, 4); b += a; \
|
||||
}
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------------
|
||||
final -- final mixing of 3 32-bit values (a,b,c) into c
|
||||
|
||||
Pairs of (a,b,c) values differing in only a few bits will usually
|
||||
produce values of c that look totally different. This was tested for
|
||||
* pairs that differed by one bit, by two bits, in any combination
|
||||
of top bits of (a,b,c), or in any combination of bottom bits of
|
||||
(a,b,c).
|
||||
* "differ" is defined as +, -, ^, or ~^. For + and -, I transformed
|
||||
the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
|
||||
is commonly produced by subtraction) look like a single 1-bit
|
||||
difference.
|
||||
* the base values were pseudorandom, all zero but one bit set, or
|
||||
all zero plus a counter that starts at zero.
|
||||
|
||||
These constants passed:
|
||||
14 11 25 16 4 14 24
|
||||
12 14 25 16 4 14 24
|
||||
and these came close:
|
||||
4 8 15 26 3 22 24
|
||||
10 8 15 26 3 22 24
|
||||
11 8 15 26 3 22 24
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
#define final(a,b,c) \
|
||||
{ \
|
||||
c ^= b; c -= rot(b,14); \
|
||||
a ^= c; a -= rot(c,11); \
|
||||
b ^= a; b -= rot(a,25); \
|
||||
c ^= b; c -= rot(b,16); \
|
||||
a ^= c; a -= rot(c,4); \
|
||||
b ^= a; b -= rot(a,14); \
|
||||
c ^= b; c -= rot(b,24); \
|
||||
}
|
||||
|
||||
/*
|
||||
-------------------------------------------------------------------------------
|
||||
hashlittle() -- hash a variable-length key into a 32-bit value
|
||||
k : the key (the unaligned variable-length array of bytes)
|
||||
length : the length of the key, counting by bytes
|
||||
initval : can be any 4-byte value
|
||||
Returns a 32-bit value. Every bit of the key affects every bit of
|
||||
the return value. Two keys differing by one or two bits will have
|
||||
totally different hash values.
|
||||
|
||||
The best hash table sizes are powers of 2. There is no need to do
|
||||
mod a prime (mod is sooo slow!). If you need less than 32 bits,
|
||||
use a bitmask. For example, if you need only 10 bits, do
|
||||
h = (h & hashmask(10));
|
||||
In which case, the hash table should have hashsize(10) elements.
|
||||
|
||||
If you are hashing n strings (uint8_t **)k, do it like this:
|
||||
for (i=0, h=0; i<n; ++i) h = hashlittle( k[i], len[i], h);
|
||||
|
||||
By Bob Jenkins, 2006. bob_jenkins@burtleburtle.net. You may use this
|
||||
code any way you wish, private, educational, or commercial. It's free.
|
||||
|
||||
Use for hash table lookup, or anything where one collision in 2^^32 is
|
||||
acceptable. Do NOT use for cryptographic purposes.
|
||||
-------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
//uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
|
||||
#ifdef STDCALL
|
||||
uint32_t __stdcall NHASH( const void *key, size_t *length0, uint32_t *initval0)
|
||||
#else
|
||||
uint32_t nhash_( const void *key, int *length0, uint32_t *initval0)
|
||||
#endif
|
||||
{
|
||||
uint32_t a,b,c; /* internal state */
|
||||
size_t length;
|
||||
uint32_t initval;
|
||||
union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */
|
||||
|
||||
length=*length0;
|
||||
initval=*initval0;
|
||||
|
||||
/* Set up the internal state */
|
||||
a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
|
||||
|
||||
u.ptr = key;
|
||||
if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
|
||||
const uint32_t *k = (const uint32_t *)key; /* read 32-bit chunks */
|
||||
const uint8_t *k8;
|
||||
|
||||
k8=0; //Silence compiler warning
|
||||
/*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
|
||||
while (length > 12)
|
||||
{
|
||||
a += k[0];
|
||||
b += k[1];
|
||||
c += k[2];
|
||||
mix(a,b,c);
|
||||
length -= 12;
|
||||
k += 3;
|
||||
}
|
||||
|
||||
/*----------------------------- handle the last (probably partial) block */
|
||||
/*
|
||||
* "k[2]&0xffffff" actually reads beyond the end of the string, but
|
||||
* then masks off the part it's not allowed to read. Because the
|
||||
* string is aligned, the masked-off tail is in the same word as the
|
||||
* rest of the string. Every machine with memory protection I've seen
|
||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||
* still catch it and complain. The masking trick does make the hash
|
||||
* noticably faster for short strings (like English words).
|
||||
*/
|
||||
#ifndef VALGRIND
|
||||
|
||||
switch(length)
|
||||
{
|
||||
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
||||
case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break;
|
||||
case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break;
|
||||
case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break;
|
||||
case 8 : b+=k[1]; a+=k[0]; break;
|
||||
case 7 : b+=k[1]&0xffffff; a+=k[0]; break;
|
||||
case 6 : b+=k[1]&0xffff; a+=k[0]; break;
|
||||
case 5 : b+=k[1]&0xff; a+=k[0]; break;
|
||||
case 4 : a+=k[0]; break;
|
||||
case 3 : a+=k[0]&0xffffff; break;
|
||||
case 2 : a+=k[0]&0xffff; break;
|
||||
case 1 : a+=k[0]&0xff; break;
|
||||
case 0 : return c; /* zero length strings require no mixing */
|
||||
}
|
||||
|
||||
#else /* make valgrind happy */
|
||||
|
||||
k8 = (const uint8_t *)k;
|
||||
switch(length)
|
||||
{
|
||||
case 12: c+=k[2]; b+=k[1]; a+=k[0]; break;
|
||||
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
|
||||
case 10: c+=((uint32_t)k8[9])<<8; /* fall through */
|
||||
case 9 : c+=k8[8]; /* fall through */
|
||||
case 8 : b+=k[1]; a+=k[0]; break;
|
||||
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
|
||||
case 6 : b+=((uint32_t)k8[5])<<8; /* fall through */
|
||||
case 5 : b+=k8[4]; /* fall through */
|
||||
case 4 : a+=k[0]; break;
|
||||
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
|
||||
case 2 : a+=((uint32_t)k8[1])<<8; /* fall through */
|
||||
case 1 : a+=k8[0]; break;
|
||||
case 0 : return c;
|
||||
}
|
||||
|
||||
#endif /* !valgrind */
|
||||
|
||||
} else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
|
||||
const uint16_t *k = (const uint16_t *)key; /* read 16-bit chunks */
|
||||
const uint8_t *k8;
|
||||
|
||||
/*--------------- all but last block: aligned reads and different mixing */
|
||||
while (length > 12)
|
||||
{
|
||||
a += k[0] + (((uint32_t)k[1])<<16);
|
||||
b += k[2] + (((uint32_t)k[3])<<16);
|
||||
c += k[4] + (((uint32_t)k[5])<<16);
|
||||
mix(a,b,c);
|
||||
length -= 12;
|
||||
k += 6;
|
||||
}
|
||||
|
||||
/*----------------------------- handle the last (probably partial) block */
|
||||
k8 = (const uint8_t *)k;
|
||||
switch(length)
|
||||
{
|
||||
case 12: c+=k[4]+(((uint32_t)k[5])<<16);
|
||||
b+=k[2]+(((uint32_t)k[3])<<16);
|
||||
a+=k[0]+(((uint32_t)k[1])<<16);
|
||||
break;
|
||||
case 11: c+=((uint32_t)k8[10])<<16; /* fall through */
|
||||
case 10: c+=k[4];
|
||||
b+=k[2]+(((uint32_t)k[3])<<16);
|
||||
a+=k[0]+(((uint32_t)k[1])<<16);
|
||||
break;
|
||||
case 9 : c+=k8[8]; /* fall through */
|
||||
case 8 : b+=k[2]+(((uint32_t)k[3])<<16);
|
||||
a+=k[0]+(((uint32_t)k[1])<<16);
|
||||
break;
|
||||
case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */
|
||||
case 6 : b+=k[2];
|
||||
a+=k[0]+(((uint32_t)k[1])<<16);
|
||||
break;
|
||||
case 5 : b+=k8[4]; /* fall through */
|
||||
case 4 : a+=k[0]+(((uint32_t)k[1])<<16);
|
||||
break;
|
||||
case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */
|
||||
case 2 : a+=k[0];
|
||||
break;
|
||||
case 1 : a+=k8[0];
|
||||
break;
|
||||
case 0 : return c; /* zero length requires no mixing */
|
||||
}
|
||||
|
||||
} else { /* need to read the key one byte at a time */
|
||||
const uint8_t *k = (const uint8_t *)key;
|
||||
|
||||
/*--------------- all but the last block: affect some 32 bits of (a,b,c) */
|
||||
while (length > 12)
|
||||
{
|
||||
a += k[0];
|
||||
a += ((uint32_t)k[1])<<8;
|
||||
a += ((uint32_t)k[2])<<16;
|
||||
a += ((uint32_t)k[3])<<24;
|
||||
b += k[4];
|
||||
b += ((uint32_t)k[5])<<8;
|
||||
b += ((uint32_t)k[6])<<16;
|
||||
b += ((uint32_t)k[7])<<24;
|
||||
c += k[8];
|
||||
c += ((uint32_t)k[9])<<8;
|
||||
c += ((uint32_t)k[10])<<16;
|
||||
c += ((uint32_t)k[11])<<24;
|
||||
mix(a,b,c);
|
||||
length -= 12;
|
||||
k += 12;
|
||||
}
|
||||
|
||||
/*-------------------------------- last block: affect all 32 bits of (c) */
|
||||
switch(length) /* all the case statements fall through */
|
||||
{
|
||||
case 12: c+=((uint32_t)k[11])<<24;
|
||||
case 11: c+=((uint32_t)k[10])<<16;
|
||||
case 10: c+=((uint32_t)k[9])<<8;
|
||||
case 9 : c+=k[8];
|
||||
case 8 : b+=((uint32_t)k[7])<<24;
|
||||
case 7 : b+=((uint32_t)k[6])<<16;
|
||||
case 6 : b+=((uint32_t)k[5])<<8;
|
||||
case 5 : b+=k[4];
|
||||
case 4 : a+=((uint32_t)k[3])<<24;
|
||||
case 3 : a+=((uint32_t)k[2])<<16;
|
||||
case 2 : a+=((uint32_t)k[1])<<8;
|
||||
case 1 : a+=k[0];
|
||||
break;
|
||||
case 0 : return c;
|
||||
}
|
||||
}
|
||||
|
||||
final(a,b,c);
|
||||
return c;
|
||||
}
|
||||
|
||||
//uint32_t __stdcall NHASH(const void *key, size_t length, uint32_t initval)
|
||||
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_INCLUDE_IS_SEGMENTED)
|
||||
#define BOOST_FUSION_INCLUDE_IS_SEGMENTED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/is_segmented.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,500 @@
|
||||
// Copyright 2002 The Trustees of Indiana University.
|
||||
|
||||
// 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)
|
||||
|
||||
// Boost.MultiArray Library
|
||||
// Authors: Ronald Garcia
|
||||
// Jeremy Siek
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BASE_RG071801_HPP
|
||||
#define BASE_RG071801_HPP
|
||||
|
||||
//
|
||||
// base.hpp - some implementation base classes for from which
|
||||
// functionality is acquired
|
||||
//
|
||||
|
||||
#include "boost/multi_array/extent_range.hpp"
|
||||
#include "boost/multi_array/extent_gen.hpp"
|
||||
#include "boost/multi_array/index_range.hpp"
|
||||
#include "boost/multi_array/index_gen.hpp"
|
||||
#include "boost/multi_array/storage_order.hpp"
|
||||
#include "boost/multi_array/types.hpp"
|
||||
#include "boost/config.hpp"
|
||||
#include "boost/multi_array/concept_checks.hpp" //for ignore_unused_...
|
||||
#include "boost/mpl/eval_if.hpp"
|
||||
#include "boost/mpl/if.hpp"
|
||||
#include "boost/mpl/size_t.hpp"
|
||||
#include "boost/iterator/reverse_iterator.hpp"
|
||||
#include "boost/static_assert.hpp"
|
||||
#include "boost/type.hpp"
|
||||
#include "boost/assert.hpp"
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
|
||||
namespace boost {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class declarations
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<typename T, std::size_t NumDims,
|
||||
typename Allocator = std::allocator<T> >
|
||||
class multi_array;
|
||||
|
||||
// This is a public interface for use by end users!
|
||||
namespace multi_array_types {
|
||||
typedef boost::detail::multi_array::size_type size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef boost::detail::multi_array::index index;
|
||||
typedef detail::multi_array::index_range<index,size_type> index_range;
|
||||
typedef detail::multi_array::extent_range<index,size_type> extent_range;
|
||||
typedef detail::multi_array::index_gen<0,0> index_gen;
|
||||
typedef detail::multi_array::extent_gen<0> extent_gen;
|
||||
}
|
||||
|
||||
|
||||
// boost::extents and boost::indices are now a part of the public
|
||||
// interface. That way users don't necessarily have to create their
|
||||
// own objects. On the other hand, one may not want the overhead of
|
||||
// object creation in small-memory environments. Thus, the objects
|
||||
// can be left undefined by defining BOOST_MULTI_ARRAY_NO_GENERATORS
|
||||
// before loading multi_array.hpp.
|
||||
#ifndef BOOST_MULTI_ARRAY_NO_GENERATORS
|
||||
namespace {
|
||||
multi_array_types::extent_gen extents;
|
||||
multi_array_types::index_gen indices;
|
||||
}
|
||||
#endif // BOOST_MULTI_ARRAY_NO_GENERATORS
|
||||
|
||||
namespace detail {
|
||||
namespace multi_array {
|
||||
|
||||
template <typename T, std::size_t NumDims>
|
||||
class sub_array;
|
||||
|
||||
template <typename T, std::size_t NumDims, typename TPtr = const T*>
|
||||
class const_sub_array;
|
||||
|
||||
template <typename T, typename TPtr, typename NumDims, typename Reference,
|
||||
typename IteratorCategory>
|
||||
class array_iterator;
|
||||
|
||||
template <typename T, std::size_t NumDims, typename TPtr = const T*>
|
||||
class const_multi_array_view;
|
||||
|
||||
template <typename T, std::size_t NumDims>
|
||||
class multi_array_view;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class interfaces
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class multi_array_base {
|
||||
public:
|
||||
typedef multi_array_types::size_type size_type;
|
||||
typedef multi_array_types::difference_type difference_type;
|
||||
typedef multi_array_types::index index;
|
||||
typedef multi_array_types::index_range index_range;
|
||||
typedef multi_array_types::extent_range extent_range;
|
||||
typedef multi_array_types::index_gen index_gen;
|
||||
typedef multi_array_types::extent_gen extent_gen;
|
||||
};
|
||||
|
||||
//
|
||||
// value_accessor_n
|
||||
// contains the routines for accessing elements from
|
||||
// N-dimensional views.
|
||||
//
|
||||
template<typename T, std::size_t NumDims>
|
||||
class value_accessor_n : public multi_array_base {
|
||||
typedef multi_array_base super_type;
|
||||
public:
|
||||
typedef typename super_type::index index;
|
||||
|
||||
//
|
||||
// public typedefs used by classes that inherit from this base
|
||||
//
|
||||
typedef T element;
|
||||
typedef boost::multi_array<T,NumDims-1> value_type;
|
||||
typedef sub_array<T,NumDims-1> reference;
|
||||
typedef const_sub_array<T,NumDims-1> const_reference;
|
||||
|
||||
protected:
|
||||
// used by array operator[] and iterators to get reference types.
|
||||
template <typename Reference, typename TPtr>
|
||||
Reference access(boost::type<Reference>,index idx,TPtr base,
|
||||
const size_type* extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
|
||||
BOOST_ASSERT(idx - index_bases[0] >= 0);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);
|
||||
// return a sub_array<T,NDims-1> proxy object
|
||||
TPtr newbase = base + idx * strides[0];
|
||||
return Reference(newbase,extents+1,strides+1,index_bases+1);
|
||||
|
||||
}
|
||||
|
||||
value_accessor_n() { }
|
||||
~value_accessor_n() { }
|
||||
};
|
||||
|
||||
|
||||
|
||||
//
|
||||
// value_accessor_one
|
||||
// contains the routines for accessing reference elements from
|
||||
// 1-dimensional views.
|
||||
//
|
||||
template<typename T>
|
||||
class value_accessor_one : public multi_array_base {
|
||||
typedef multi_array_base super_type;
|
||||
public:
|
||||
typedef typename super_type::index index;
|
||||
//
|
||||
// public typedefs for use by classes that inherit it.
|
||||
//
|
||||
typedef T element;
|
||||
typedef T value_type;
|
||||
typedef T& reference;
|
||||
typedef T const& const_reference;
|
||||
|
||||
protected:
|
||||
// used by array operator[] and iterators to get reference types.
|
||||
template <typename Reference, typename TPtr>
|
||||
Reference access(boost::type<Reference>,index idx,TPtr base,
|
||||
const size_type* extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
|
||||
ignore_unused_variable_warning(index_bases);
|
||||
ignore_unused_variable_warning(extents);
|
||||
BOOST_ASSERT(idx - index_bases[0] >= 0);
|
||||
BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]);
|
||||
return *(base + idx * strides[0]);
|
||||
}
|
||||
|
||||
value_accessor_one() { }
|
||||
~value_accessor_one() { }
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// choose value accessor begins
|
||||
//
|
||||
|
||||
template <typename T, std::size_t NumDims>
|
||||
struct choose_value_accessor_n {
|
||||
typedef value_accessor_n<T,NumDims> type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct choose_value_accessor_one {
|
||||
typedef value_accessor_one<T> type;
|
||||
};
|
||||
|
||||
template <typename T, typename NumDims>
|
||||
struct value_accessor_generator {
|
||||
BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims::value);
|
||||
|
||||
typedef typename
|
||||
mpl::eval_if_c<(dimensionality == 1),
|
||||
choose_value_accessor_one<T>,
|
||||
choose_value_accessor_n<T,dimensionality>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
template <class T, class NumDims>
|
||||
struct associated_types
|
||||
: value_accessor_generator<T,NumDims>::type
|
||||
{};
|
||||
|
||||
//
|
||||
// choose value accessor ends
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Due to some imprecision in the C++ Standard,
|
||||
// MSVC 2010 is broken in debug mode: it requires
|
||||
// that an Output Iterator have output_iterator_tag in its iterator_category if
|
||||
// that iterator is not bidirectional_iterator or random_access_iterator.
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
|
||||
struct mutable_iterator_tag
|
||||
: boost::random_access_traversal_tag, std::input_iterator_tag
|
||||
{
|
||||
operator std::output_iterator_tag() const {
|
||||
return std::output_iterator_tag();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// multi_array_base
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
template <typename T, std::size_t NumDims>
|
||||
class multi_array_impl_base
|
||||
:
|
||||
public value_accessor_generator<T,mpl::size_t<NumDims> >::type
|
||||
{
|
||||
typedef associated_types<T,mpl::size_t<NumDims> > types;
|
||||
public:
|
||||
typedef typename types::index index;
|
||||
typedef typename types::size_type size_type;
|
||||
typedef typename types::element element;
|
||||
typedef typename types::index_range index_range;
|
||||
typedef typename types::value_type value_type;
|
||||
typedef typename types::reference reference;
|
||||
typedef typename types::const_reference const_reference;
|
||||
|
||||
template <std::size_t NDims>
|
||||
struct subarray {
|
||||
typedef boost::detail::multi_array::sub_array<T,NDims> type;
|
||||
};
|
||||
|
||||
template <std::size_t NDims>
|
||||
struct const_subarray {
|
||||
typedef boost::detail::multi_array::const_sub_array<T,NDims> type;
|
||||
};
|
||||
|
||||
template <std::size_t NDims>
|
||||
struct array_view {
|
||||
typedef boost::detail::multi_array::multi_array_view<T,NDims> type;
|
||||
};
|
||||
|
||||
template <std::size_t NDims>
|
||||
struct const_array_view {
|
||||
public:
|
||||
typedef boost::detail::multi_array::const_multi_array_view<T,NDims> type;
|
||||
};
|
||||
|
||||
//
|
||||
// iterator support
|
||||
//
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1600)
|
||||
// Deal with VC 2010 output_iterator_tag requirement
|
||||
typedef array_iterator<T,T*,mpl::size_t<NumDims>,reference,
|
||||
mutable_iterator_tag> iterator;
|
||||
#else
|
||||
typedef array_iterator<T,T*,mpl::size_t<NumDims>,reference,
|
||||
boost::random_access_traversal_tag> iterator;
|
||||
#endif
|
||||
typedef array_iterator<T,T const*,mpl::size_t<NumDims>,const_reference,
|
||||
boost::random_access_traversal_tag> const_iterator;
|
||||
|
||||
typedef ::boost::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef ::boost::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
|
||||
BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims);
|
||||
protected:
|
||||
|
||||
multi_array_impl_base() { }
|
||||
~multi_array_impl_base() { }
|
||||
|
||||
// Used by operator() in our array classes
|
||||
template <typename Reference, typename IndexList, typename TPtr>
|
||||
Reference access_element(boost::type<Reference>,
|
||||
const IndexList& indices,
|
||||
TPtr base,
|
||||
const size_type* extents,
|
||||
const index* strides,
|
||||
const index* index_bases) const {
|
||||
boost::function_requires<
|
||||
CollectionConcept<IndexList> >();
|
||||
ignore_unused_variable_warning(index_bases);
|
||||
ignore_unused_variable_warning(extents);
|
||||
#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS)
|
||||
for (size_type i = 0; i != NumDims; ++i) {
|
||||
BOOST_ASSERT(indices[i] - index_bases[i] >= 0);
|
||||
BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < extents[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
index offset = 0;
|
||||
{
|
||||
typename IndexList::const_iterator i = indices.begin();
|
||||
size_type n = 0;
|
||||
while (n != NumDims) {
|
||||
offset += (*i) * strides[n];
|
||||
++n;
|
||||
++i;
|
||||
}
|
||||
}
|
||||
return base[offset];
|
||||
}
|
||||
|
||||
template <typename StrideList, typename ExtentList>
|
||||
void compute_strides(StrideList& stride_list, ExtentList& extent_list,
|
||||
const general_storage_order<NumDims>& storage)
|
||||
{
|
||||
// invariant: stride = the stride for dimension n
|
||||
index stride = 1;
|
||||
for (size_type n = 0; n != NumDims; ++n) {
|
||||
index stride_sign = +1;
|
||||
|
||||
if (!storage.ascending(storage.ordering(n)))
|
||||
stride_sign = -1;
|
||||
|
||||
// The stride for this dimension is the product of the
|
||||
// lengths of the ranks minor to it.
|
||||
stride_list[storage.ordering(n)] = stride * stride_sign;
|
||||
|
||||
stride *= extent_list[storage.ordering(n)];
|
||||
}
|
||||
}
|
||||
|
||||
// This calculates the offset to the array base pointer due to:
|
||||
// 1. dimensions stored in descending order
|
||||
// 2. non-zero dimension index bases
|
||||
template <typename StrideList, typename ExtentList, typename BaseList>
|
||||
index
|
||||
calculate_origin_offset(const StrideList& stride_list,
|
||||
const ExtentList& extent_list,
|
||||
const general_storage_order<NumDims>& storage,
|
||||
const BaseList& index_base_list)
|
||||
{
|
||||
return
|
||||
calculate_descending_dimension_offset(stride_list,extent_list,
|
||||
storage) +
|
||||
calculate_indexing_offset(stride_list,index_base_list);
|
||||
}
|
||||
|
||||
// This calculates the offset added to the base pointer that are
|
||||
// caused by descending dimensions
|
||||
template <typename StrideList, typename ExtentList>
|
||||
index
|
||||
calculate_descending_dimension_offset(const StrideList& stride_list,
|
||||
const ExtentList& extent_list,
|
||||
const general_storage_order<NumDims>& storage)
|
||||
{
|
||||
index offset = 0;
|
||||
if (!storage.all_dims_ascending())
|
||||
for (size_type n = 0; n != NumDims; ++n)
|
||||
if (!storage.ascending(n))
|
||||
offset -= (extent_list[n] - 1) * stride_list[n];
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
// This is used to reindex array_views, which are no longer
|
||||
// concerned about storage order (specifically, whether dimensions
|
||||
// are ascending or descending) since the viewed array handled it.
|
||||
|
||||
template <typename StrideList, typename BaseList>
|
||||
index
|
||||
calculate_indexing_offset(const StrideList& stride_list,
|
||||
const BaseList& index_base_list)
|
||||
{
|
||||
index offset = 0;
|
||||
for (size_type n = 0; n != NumDims; ++n)
|
||||
offset -= stride_list[n] * index_base_list[n];
|
||||
return offset;
|
||||
}
|
||||
|
||||
// Slicing using an index_gen.
|
||||
// Note that populating an index_gen creates a type that encodes
|
||||
// both the number of dimensions in the current Array (NumDims), and
|
||||
// the Number of dimensions for the resulting view. This allows the
|
||||
// compiler to fail if the dimensions aren't completely accounted
|
||||
// for. For reasons unbeknownst to me, a BOOST_STATIC_ASSERT
|
||||
// within the member function template does not work. I should add a
|
||||
// note to the documentation specifying that you get a damn ugly
|
||||
// error message if you screw up in your slicing code.
|
||||
template <typename ArrayRef, int NDims, typename TPtr>
|
||||
ArrayRef
|
||||
generate_array_view(boost::type<ArrayRef>,
|
||||
const boost::detail::multi_array::
|
||||
index_gen<NumDims,NDims>& indices,
|
||||
const size_type* extents,
|
||||
const index* strides,
|
||||
const index* index_bases,
|
||||
TPtr base) const {
|
||||
|
||||
boost::array<index,NDims> new_strides;
|
||||
boost::array<index,NDims> new_extents;
|
||||
|
||||
index offset = 0;
|
||||
size_type dim = 0;
|
||||
for (size_type n = 0; n != NumDims; ++n) {
|
||||
|
||||
// Use array specs and input specs to produce real specs.
|
||||
const index default_start = index_bases[n];
|
||||
const index default_finish = default_start+extents[n];
|
||||
const index_range& current_range = indices.ranges_[n];
|
||||
index start = current_range.get_start(default_start);
|
||||
index finish = current_range.get_finish(default_finish);
|
||||
index stride = current_range.stride();
|
||||
BOOST_ASSERT(stride != 0);
|
||||
|
||||
// An index range indicates a half-open strided interval
|
||||
// [start,finish) (with stride) which faces upward when stride
|
||||
// is positive and downward when stride is negative,
|
||||
|
||||
// RG: The following code for calculating length suffers from
|
||||
// some representation issues: if finish-start cannot be represented as
|
||||
// by type index, then overflow may result.
|
||||
|
||||
index len;
|
||||
if ((finish - start) / stride < 0) {
|
||||
// [start,finish) is empty according to the direction imposed by
|
||||
// the stride.
|
||||
len = 0;
|
||||
} else {
|
||||
// integral trick for ceiling((finish-start) / stride)
|
||||
// taking into account signs.
|
||||
index shrinkage = stride > 0 ? 1 : -1;
|
||||
len = (finish - start + (stride - shrinkage)) / stride;
|
||||
}
|
||||
|
||||
// start marks the closed side of the range, so it must lie
|
||||
// exactly in the set of legal indices
|
||||
// with a special case for empty arrays
|
||||
BOOST_ASSERT(index_bases[n] <= start &&
|
||||
((start <= index_bases[n]+index(extents[n])) ||
|
||||
(start == index_bases[n] && extents[n] == 0)));
|
||||
|
||||
#ifndef BOOST_DISABLE_ASSERTS
|
||||
// finish marks the open side of the range, so it can go one past
|
||||
// the "far side" of the range (the top if stride is positive, the bottom
|
||||
// if stride is negative).
|
||||
index bound_adjustment = stride < 0 ? 1 : 0;
|
||||
BOOST_ASSERT(((index_bases[n] - bound_adjustment) <= finish) &&
|
||||
(finish <= (index_bases[n] + index(extents[n]) - bound_adjustment)));
|
||||
#endif // BOOST_DISABLE_ASSERTS
|
||||
|
||||
|
||||
// the array data pointer is modified to account for non-zero
|
||||
// bases during slicing (see [Garcia] for the math involved)
|
||||
offset += start * strides[n];
|
||||
|
||||
if (!current_range.is_degenerate()) {
|
||||
|
||||
// The stride for each dimension is included into the
|
||||
// strides for the array_view (see [Garcia] for the math involved).
|
||||
new_strides[dim] = stride * strides[n];
|
||||
|
||||
// calculate new extents
|
||||
new_extents[dim] = len;
|
||||
++dim;
|
||||
}
|
||||
}
|
||||
BOOST_ASSERT(dim == NDims);
|
||||
|
||||
return
|
||||
ArrayRef(base+offset,
|
||||
new_extents,
|
||||
new_strides);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace multi_array
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BASE_RG071801_HPP
|
||||
@@ -0,0 +1,264 @@
|
||||
#ifndef CONFIGURATION_HPP_
|
||||
#define CONFIGURATION_HPP_
|
||||
|
||||
#include <QObject>
|
||||
#include <QFont>
|
||||
|
||||
#include "Radio.hpp"
|
||||
#include "IARURegions.hpp"
|
||||
#include "AudioDevice.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
|
||||
#include "pimpl_h.hpp"
|
||||
|
||||
class QSettings;
|
||||
class QWidget;
|
||||
class QAudioDeviceInfo;
|
||||
class QString;
|
||||
class QDir;
|
||||
class Bands;
|
||||
class FrequencyList_v2;
|
||||
class StationList;
|
||||
class QStringListModel;
|
||||
class QHostAddress;
|
||||
|
||||
//
|
||||
// Class Configuration
|
||||
//
|
||||
// Encapsulates the control, access and, persistence of user defined
|
||||
// settings for the wsjtx GUI. Setting values are accessed through a
|
||||
// QDialog window containing concept orientated tab windows.
|
||||
//
|
||||
// Responsibilities
|
||||
//
|
||||
// Provides management of the CAT and PTT rig interfaces, providing
|
||||
// control access via a minimal generic set of Qt slots and status
|
||||
// updates via Qt signals. Internally the rig control capability is
|
||||
// farmed out to a separate thread since many of the rig control
|
||||
// functions are blocking.
|
||||
//
|
||||
// All user settings required by the wsjtx GUI are exposed through
|
||||
// query methods. Settings only become visible once they have been
|
||||
// accepted by the user which is done by clicking the "OK" button on
|
||||
// the settings dialog.
|
||||
//
|
||||
// The QSettings instance passed to the constructor is used to read
|
||||
// and write user settings.
|
||||
//
|
||||
// Pointers to three QAbstractItemModel objects are provided to give
|
||||
// access to amateur band information, user working frequencies and,
|
||||
// user operating band information. These porovide consistent data
|
||||
// models that can be used in GUI lists or tables or simply queried
|
||||
// for user defined bands, default operating frequencies and, station
|
||||
// descriptions.
|
||||
//
|
||||
class Configuration final
|
||||
: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_ENUMS (DataMode Type2MsgGen)
|
||||
|
||||
public:
|
||||
using MODE = Transceiver::MODE;
|
||||
using TransceiverState = Transceiver::TransceiverState;
|
||||
using Frequency = Radio::Frequency;
|
||||
using port_type = quint16;
|
||||
|
||||
enum DataMode {data_mode_none, data_mode_USB, data_mode_data};
|
||||
Q_ENUM (DataMode)
|
||||
enum Type2MsgGen {type_2_msg_1_full, type_2_msg_3_full, type_2_msg_5_only};
|
||||
Q_ENUM (Type2MsgGen)
|
||||
|
||||
explicit Configuration (QDir const& temp_directory, QSettings * settings,
|
||||
QWidget * parent = nullptr);
|
||||
~Configuration ();
|
||||
|
||||
void select_tab (int);
|
||||
int exec ();
|
||||
bool is_active () const;
|
||||
|
||||
QDir temp_dir () const;
|
||||
QDir doc_dir () const;
|
||||
QDir data_dir () const;
|
||||
QDir writeable_data_dir () const;
|
||||
|
||||
QAudioDeviceInfo const& audio_input_device () const;
|
||||
AudioDevice::Channel audio_input_channel () const;
|
||||
QAudioDeviceInfo const& audio_output_device () const;
|
||||
AudioDevice::Channel audio_output_channel () const;
|
||||
|
||||
// These query methods should be used after a call to exec() to
|
||||
// determine if either the audio input or audio output stream
|
||||
// parameters have changed. The respective streams should be
|
||||
// re-opened if they return true.
|
||||
bool restart_audio_input () const;
|
||||
bool restart_audio_output () const;
|
||||
|
||||
QString my_callsign () const;
|
||||
QString my_grid () const;
|
||||
QFont text_font () const;
|
||||
QFont decoded_text_font () const;
|
||||
qint32 id_interval () const;
|
||||
qint32 ntrials() const;
|
||||
qint32 aggressive() const;
|
||||
qint32 RxBandwidth() const;
|
||||
double degrade() const;
|
||||
double txDelay() const;
|
||||
bool id_after_73 () const;
|
||||
bool tx_QSY_allowed () const;
|
||||
bool spot_to_psk_reporter () const;
|
||||
bool monitor_off_at_startup () const;
|
||||
bool monitor_last_used () const;
|
||||
bool log_as_RTTY () const;
|
||||
bool report_in_comments () const;
|
||||
bool prompt_to_log () const;
|
||||
bool insert_blank () const;
|
||||
bool DXCC () const;
|
||||
bool clear_DX () const;
|
||||
bool miles () const;
|
||||
bool quick_call () const;
|
||||
bool disable_TX_on_73 () const;
|
||||
int watchdog () const;
|
||||
bool TX_messages () const;
|
||||
bool split_mode () const;
|
||||
bool enable_VHF_features () const;
|
||||
bool decode_at_52s () const;
|
||||
bool single_decode () const;
|
||||
bool twoPass() const;
|
||||
bool x2ToneSpacing() const;
|
||||
bool contestMode() const;
|
||||
bool realTimeDecode() const;
|
||||
bool MyDx() const;
|
||||
bool CQMyN() const;
|
||||
bool NDxG() const;
|
||||
bool NN() const;
|
||||
bool EMEonly() const;
|
||||
bool post_decodes () const;
|
||||
QString udp_server_name () const;
|
||||
port_type udp_server_port () const;
|
||||
bool accept_udp_requests () const;
|
||||
bool udpWindowToFront () const;
|
||||
bool udpWindowRestore () const;
|
||||
Bands * bands ();
|
||||
Bands const * bands () const;
|
||||
IARURegions::Region region () const;
|
||||
FrequencyList_v2 * frequencies ();
|
||||
FrequencyList_v2 const * frequencies () const;
|
||||
StationList * stations ();
|
||||
StationList const * stations () const;
|
||||
QStringListModel * macros ();
|
||||
QStringListModel const * macros () const;
|
||||
QDir save_directory () const;
|
||||
QDir azel_directory () const;
|
||||
QString rig_name () const;
|
||||
Type2MsgGen type_2_msg_gen () const;
|
||||
QColor color_CQ () const;
|
||||
QColor color_MyCall () const;
|
||||
QColor color_TxMsg () const;
|
||||
QColor color_DXCC () const;
|
||||
QColor color_NewCall () const;
|
||||
bool pwrBandTxMemory () const;
|
||||
bool pwrBandTuneMemory () const;
|
||||
// This method queries if a CAT and PTT connection is operational.
|
||||
bool is_transceiver_online () const;
|
||||
|
||||
// Start the rig connection, safe and normal to call when rig is
|
||||
// already open.
|
||||
bool transceiver_online ();
|
||||
|
||||
// check if a real rig is configured
|
||||
bool is_dummy_rig () const;
|
||||
|
||||
// Frequency resolution of the rig
|
||||
//
|
||||
// 0 - 1Hz
|
||||
// 1 - 10Hz rounded
|
||||
// -1 - 10Hz truncated
|
||||
// 2 - 100Hz rounded
|
||||
// -2 - 100Hz truncated
|
||||
int transceiver_resolution () const;
|
||||
|
||||
// Close down connection to rig.
|
||||
void transceiver_offline ();
|
||||
|
||||
// Set transceiver frequency in Hertz.
|
||||
Q_SLOT void transceiver_frequency (Frequency);
|
||||
|
||||
// Setting a non zero TX frequency means split operation
|
||||
// rationalise_mode means ensure TX uses same mode as RX.
|
||||
Q_SLOT void transceiver_tx_frequency (Frequency = 0u);
|
||||
|
||||
// Set transceiver mode.
|
||||
//
|
||||
// Rationalise means ensure TX uses same mode as RX.
|
||||
Q_SLOT void transceiver_mode (MODE);
|
||||
|
||||
// Set/unset PTT.
|
||||
//
|
||||
// Note that this must be called even if VOX PTT is selected since
|
||||
// the "Emulate Split" mode requires PTT information to coordinate
|
||||
// frequency changes.
|
||||
Q_SLOT void transceiver_ptt (bool = true);
|
||||
|
||||
// Attempt to (re-)synchronise transceiver state.
|
||||
//
|
||||
// Force signal guarantees either a transceiver_update or a
|
||||
// transceiver_failure signal.
|
||||
//
|
||||
// The enforce_mode_and_split parameter ensures that future
|
||||
// transceiver updates have the correct mode and split setting
|
||||
// i.e. the transceiver is ready for use.
|
||||
Q_SLOT void sync_transceiver (bool force_signal = false, bool enforce_mode_and_split = false);
|
||||
|
||||
|
||||
//
|
||||
// These signals indicate a font has been selected and accepted for
|
||||
// the application text and decoded text respectively.
|
||||
//
|
||||
Q_SIGNAL void text_font_changed (QFont);
|
||||
Q_SIGNAL void decoded_text_font_changed (QFont);
|
||||
|
||||
//
|
||||
// This signal is emitted when the UDP server changes
|
||||
//
|
||||
Q_SIGNAL void udp_server_changed (QString const& udp_server);
|
||||
Q_SIGNAL void udp_server_port_changed (port_type server_port);
|
||||
|
||||
|
||||
//
|
||||
// These signals are emitted and reflect transceiver state changes
|
||||
//
|
||||
|
||||
// signals a change in one of the TransceiverState members
|
||||
Q_SIGNAL void transceiver_update (Transceiver::TransceiverState const&) const;
|
||||
|
||||
// Signals a failure of a control rig CAT or PTT connection.
|
||||
//
|
||||
// A failed rig CAT or PTT connection is fatal and the underlying
|
||||
// connections are closed automatically. The connections can be
|
||||
// re-established with a call to transceiver_online(true) assuming
|
||||
// the fault condition has been rectified or is transient.
|
||||
Q_SIGNAL void transceiver_failure (QString const& reason) const;
|
||||
|
||||
private:
|
||||
class impl;
|
||||
pimpl<impl> m_;
|
||||
};
|
||||
|
||||
#if QT_VERSION < 0x050500
|
||||
Q_DECLARE_METATYPE (Configuration::DataMode);
|
||||
Q_DECLARE_METATYPE (Configuration::Type2MsgGen);
|
||||
#endif
|
||||
|
||||
#if !defined (QT_NO_DEBUG_STREAM)
|
||||
ENUM_QDEBUG_OPS_DECL (Configuration, DataMode);
|
||||
ENUM_QDEBUG_OPS_DECL (Configuration, Type2MsgGen);
|
||||
#endif
|
||||
|
||||
ENUM_QDATASTREAM_OPS_DECL (Configuration, DataMode);
|
||||
ENUM_QDATASTREAM_OPS_DECL (Configuration, Type2MsgGen);
|
||||
|
||||
ENUM_CONVERSION_OPS_DECL (Configuration, DataMode);
|
||||
ENUM_CONVERSION_OPS_DECL (Configuration, Type2MsgGen);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user