Initial Commit
This commit is contained in:
@@ -0,0 +1,276 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1998-2003 Joel de Guzman
|
||||
Copyright (c) 2002-2003 Martin Wille
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
#ifndef BOOST_SPIRIT_EPSILON_HPP
|
||||
#define BOOST_SPIRIT_EPSILON_HPP
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/core/parser.hpp>
|
||||
#include <boost/spirit/home/classic/meta/parser_traits.hpp>
|
||||
#include <boost/spirit/home/classic/core/composite/composite.hpp>
|
||||
#include <boost/spirit/home/classic/core/composite/no_actions.hpp>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// condition_parser class
|
||||
//
|
||||
// handles expresions of the form
|
||||
//
|
||||
// epsilon_p(cond)
|
||||
//
|
||||
// where cond is a function or a functor that returns a value suitable
|
||||
// to be used in boolean context. The expression returns a parser that
|
||||
// returns an empty match when the condition evaluates to true.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
template <typename CondT, bool positive_ = true>
|
||||
struct condition_parser : parser<condition_parser<CondT, positive_> >
|
||||
{
|
||||
typedef condition_parser<CondT, positive_> self_t;
|
||||
|
||||
// not explicit! (needed for implementation of if_p et al.)
|
||||
condition_parser(CondT const& cond_) : cond(cond_) {}
|
||||
|
||||
template <typename ScannerT>
|
||||
typename parser_result<self_t, ScannerT>::type
|
||||
parse(ScannerT const& scan) const
|
||||
{
|
||||
if (positive_ == bool(cond())) // allow cond to return int
|
||||
return scan.empty_match();
|
||||
else
|
||||
return scan.no_match();
|
||||
}
|
||||
|
||||
condition_parser<CondT, !positive_>
|
||||
negate() const
|
||||
{ return condition_parser<CondT, !positive_>(cond); }
|
||||
|
||||
private:
|
||||
|
||||
CondT cond;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1310) || \
|
||||
BOOST_WORKAROUND(BOOST_MSVC, == 1400) || \
|
||||
BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
|
||||
// VC 7.1, VC8 and Sun CC <= 5.8 do not support general
|
||||
// expressions of non-type template parameters in instantiations
|
||||
template <typename CondT>
|
||||
inline condition_parser<CondT, false>
|
||||
operator~(condition_parser<CondT, true> const& p)
|
||||
{ return p.negate(); }
|
||||
|
||||
template <typename CondT>
|
||||
inline condition_parser<CondT, true>
|
||||
operator~(condition_parser<CondT, false> const& p)
|
||||
{ return p.negate(); }
|
||||
#else // BOOST_WORKAROUND(BOOST_MSVC, == 1310) || == 1400
|
||||
template <typename CondT, bool positive>
|
||||
inline condition_parser<CondT, !positive>
|
||||
operator~(condition_parser<CondT, positive> const& p)
|
||||
{ return p.negate(); }
|
||||
#endif // BOOST_WORKAROUND(BOOST_MSVC, == 1310) || == 1400
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// empty_match_parser class
|
||||
//
|
||||
// handles expressions of the form
|
||||
// epsilon_p(subject)
|
||||
// where subject is a parser. The expresion returns a composite
|
||||
// parser that returns an empty match if the subject parser matches.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
struct empty_match_parser_gen;
|
||||
struct negated_empty_match_parser_gen;
|
||||
|
||||
template <typename SubjectT>
|
||||
struct negated_empty_match_parser; // Forward declaration
|
||||
|
||||
template<typename SubjectT>
|
||||
struct empty_match_parser
|
||||
: unary<SubjectT, parser<empty_match_parser<SubjectT> > >
|
||||
{
|
||||
typedef empty_match_parser<SubjectT> self_t;
|
||||
typedef unary<SubjectT, parser<self_t> > base_t;
|
||||
typedef unary_parser_category parser_category_t;
|
||||
typedef empty_match_parser_gen parser_genererator_t;
|
||||
typedef self_t embed_t;
|
||||
|
||||
explicit empty_match_parser(SubjectT const& p) : base_t(p) {}
|
||||
|
||||
template <typename ScannerT>
|
||||
struct result
|
||||
{ typedef typename match_result<ScannerT, nil_t>::type type; };
|
||||
|
||||
template <typename ScannerT>
|
||||
typename parser_result<self_t, ScannerT>::type
|
||||
parse(ScannerT const& scan) const
|
||||
{
|
||||
typename ScannerT::iterator_t save(scan.first);
|
||||
|
||||
typedef typename no_actions_scanner<ScannerT>::policies_t
|
||||
policies_t;
|
||||
|
||||
bool matches = this->subject().parse(
|
||||
scan.change_policies(policies_t(scan)));
|
||||
if (matches)
|
||||
{
|
||||
scan.first = save; // reset the position
|
||||
return scan.empty_match();
|
||||
}
|
||||
else
|
||||
{
|
||||
return scan.no_match();
|
||||
}
|
||||
}
|
||||
|
||||
negated_empty_match_parser<SubjectT>
|
||||
negate() const
|
||||
{ return negated_empty_match_parser<SubjectT>(this->subject()); }
|
||||
};
|
||||
|
||||
template<typename SubjectT>
|
||||
struct negated_empty_match_parser
|
||||
: public unary<SubjectT, parser<negated_empty_match_parser<SubjectT> > >
|
||||
{
|
||||
typedef negated_empty_match_parser<SubjectT> self_t;
|
||||
typedef unary<SubjectT, parser<self_t> > base_t;
|
||||
typedef unary_parser_category parser_category_t;
|
||||
typedef negated_empty_match_parser_gen parser_genererator_t;
|
||||
|
||||
explicit negated_empty_match_parser(SubjectT const& p) : base_t(p) {}
|
||||
|
||||
template <typename ScannerT>
|
||||
struct result
|
||||
{ typedef typename match_result<ScannerT, nil_t>::type type; };
|
||||
|
||||
template <typename ScannerT>
|
||||
typename parser_result<self_t, ScannerT>::type
|
||||
parse(ScannerT const& scan) const
|
||||
{
|
||||
typename ScannerT::iterator_t save(scan.first);
|
||||
|
||||
typedef typename no_actions_scanner<ScannerT>::policies_t
|
||||
policies_t;
|
||||
|
||||
bool matches = this->subject().parse(
|
||||
scan.change_policies(policies_t(scan)));
|
||||
if (!matches)
|
||||
{
|
||||
scan.first = save; // reset the position
|
||||
return scan.empty_match();
|
||||
}
|
||||
else
|
||||
{
|
||||
return scan.no_match();
|
||||
}
|
||||
}
|
||||
|
||||
empty_match_parser<SubjectT>
|
||||
negate() const
|
||||
{ return empty_match_parser<SubjectT>(this->subject()); }
|
||||
};
|
||||
|
||||
struct empty_match_parser_gen
|
||||
{
|
||||
template <typename SubjectT>
|
||||
struct result
|
||||
{ typedef empty_match_parser<SubjectT> type; };
|
||||
|
||||
template <typename SubjectT>
|
||||
static empty_match_parser<SubjectT>
|
||||
generate(parser<SubjectT> const& subject)
|
||||
{ return empty_match_parser<SubjectT>(subject.derived()); }
|
||||
};
|
||||
|
||||
struct negated_empty_match_parser_gen
|
||||
{
|
||||
template <typename SubjectT>
|
||||
struct result
|
||||
{ typedef negated_empty_match_parser<SubjectT> type; };
|
||||
|
||||
template <typename SubjectT>
|
||||
static negated_empty_match_parser<SubjectT>
|
||||
generate(parser<SubjectT> const& subject)
|
||||
{ return negated_empty_match_parser<SubjectT>(subject.derived()); }
|
||||
};
|
||||
|
||||
//////////////////////////////
|
||||
template <typename SubjectT>
|
||||
inline negated_empty_match_parser<SubjectT>
|
||||
operator~(empty_match_parser<SubjectT> const& p)
|
||||
{ return p.negate(); }
|
||||
|
||||
template <typename SubjectT>
|
||||
inline empty_match_parser<SubjectT>
|
||||
operator~(negated_empty_match_parser<SubjectT> const& p)
|
||||
{ return p.negate(); }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// epsilon_ parser and parser generator class
|
||||
//
|
||||
// Operates as primitive parser that always matches an empty sequence.
|
||||
//
|
||||
// Also operates as a parser generator. According to the type of the
|
||||
// argument an instance of empty_match_parser<> (when the argument is
|
||||
// a parser) or condition_parser<> (when the argument is not a parser)
|
||||
// is returned by operator().
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
namespace impl
|
||||
{
|
||||
template <typename SubjectT>
|
||||
struct epsilon_selector
|
||||
{
|
||||
typedef typename as_parser<SubjectT>::type subject_t;
|
||||
typedef typename
|
||||
mpl::if_<
|
||||
is_parser<subject_t>
|
||||
,empty_match_parser<subject_t>
|
||||
,condition_parser<subject_t>
|
||||
>::type type;
|
||||
};
|
||||
}
|
||||
|
||||
struct epsilon_parser : public parser<epsilon_parser>
|
||||
{
|
||||
typedef epsilon_parser self_t;
|
||||
|
||||
epsilon_parser() {}
|
||||
|
||||
template <typename ScannerT>
|
||||
typename parser_result<self_t, ScannerT>::type
|
||||
parse(ScannerT const& scan) const
|
||||
{ return scan.empty_match(); }
|
||||
|
||||
template <typename SubjectT>
|
||||
typename impl::epsilon_selector<SubjectT>::type
|
||||
operator()(SubjectT const& subject) const
|
||||
{
|
||||
typedef typename impl::epsilon_selector<SubjectT>::type result_t;
|
||||
return result_t(subject);
|
||||
}
|
||||
};
|
||||
|
||||
epsilon_parser const epsilon_p = epsilon_parser();
|
||||
epsilon_parser const eps_p = epsilon_parser();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace BOOST_SPIRIT_CLASSIC_NS
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,50 @@
|
||||
subroutine msk144_freq_search(cdat,fc,if1,if2,delf,nframes,navmask,cb, &
|
||||
cdat2,xmax,bestf,cs,xccs)
|
||||
|
||||
parameter (NSPM=864,NZ=7*NSPM)
|
||||
complex cdat(NZ)
|
||||
complex cdat2(NZ)
|
||||
complex c(NSPM) !Coherently averaged complex data
|
||||
complex ct2(2*NSPM)
|
||||
complex cs(NSPM)
|
||||
complex cb(42) !Complex waveform for sync word
|
||||
complex cc(0:NSPM-1)
|
||||
real xcc(0:NSPM-1)
|
||||
real xccs(0:NSPM-1)
|
||||
integer navmask(nframes) !Tells which frames to average
|
||||
|
||||
navg=sum(navmask)
|
||||
n=nframes*NSPM
|
||||
fac=1.0/(48.0*sqrt(float(navg)))
|
||||
|
||||
do ifr=if1,if2 !Find freq that maximizes sync
|
||||
ferr=ifr*delf
|
||||
call tweak1(cdat,n,-(fc+ferr),cdat2)
|
||||
c=0
|
||||
sumw=0.
|
||||
do i=1,nframes
|
||||
ib=(i-1)*NSPM+1
|
||||
ie=ib+NSPM-1
|
||||
if(navmask(i).eq.1) c=c + cdat2(ib:ie)
|
||||
enddo
|
||||
|
||||
cc=0
|
||||
ct2(1:NSPM)=c
|
||||
ct2(NSPM+1:2*NSPM)=c
|
||||
|
||||
do ish=0,NSPM-1
|
||||
cc(ish)=dot_product(ct2(1+ish:42+ish)+ct2(337+ish:378+ish),cb(1:42))
|
||||
enddo
|
||||
|
||||
xcc=abs(cc)
|
||||
xb=maxval(xcc)*fac
|
||||
if(xb.gt.xmax) then
|
||||
xmax=xb
|
||||
bestf=ferr
|
||||
cs=c
|
||||
xccs=xcc
|
||||
endif
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine msk144_freq_search
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-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/detail/workaround.hpp>
|
||||
|
||||
#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED
|
||||
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610)
|
||||
#define FUSION_SEQUENCE_VIEW_ITERATOR_RANGE_10022005_0610
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/view/iterator_range/iterator_range.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
// Boost.Range library
|
||||
//
|
||||
// Copyright Neil Groves 2014. Use, modification and
|
||||
// distribution is subject to the Boost Software License, Version
|
||||
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// For more information, see http://www.boost.org/libs/range/
|
||||
//
|
||||
#ifndef BOOST_RANGE_DETAIL_DEFAULT_CONSTRUCTIBLE_UNARY_FN_HPP_INCLUDED
|
||||
#define BOOST_RANGE_DETAIL_DEFAULT_CONSTRUCTIBLE_UNARY_FN_HPP_INCLUDED
|
||||
|
||||
#include <boost/optional/optional.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/has_trivial_constructor.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range_detail
|
||||
{
|
||||
|
||||
template<typename F, typename R>
|
||||
class default_constructible_unary_fn_wrapper
|
||||
{
|
||||
public:
|
||||
typedef R result_type;
|
||||
|
||||
default_constructible_unary_fn_wrapper()
|
||||
{
|
||||
}
|
||||
default_constructible_unary_fn_wrapper(const F& source)
|
||||
: m_impl(source)
|
||||
{
|
||||
}
|
||||
template<typename Arg>
|
||||
R operator()(const Arg& arg) const
|
||||
{
|
||||
BOOST_ASSERT(m_impl);
|
||||
return (*m_impl)(arg);
|
||||
}
|
||||
template<typename Arg>
|
||||
R operator()(Arg& arg) const
|
||||
{
|
||||
BOOST_ASSERT(m_impl);
|
||||
return (*m_impl)(arg);
|
||||
}
|
||||
private:
|
||||
boost::optional<F> m_impl;
|
||||
};
|
||||
|
||||
template<typename F, typename R>
|
||||
struct default_constructible_unary_fn_gen
|
||||
{
|
||||
typedef typename boost::mpl::if_<
|
||||
boost::has_trivial_default_constructor<F>,
|
||||
F,
|
||||
default_constructible_unary_fn_wrapper<F,R>
|
||||
>::type type;
|
||||
};
|
||||
|
||||
} // namespace range_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,46 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_PARTITION_POINT_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_PARTITION_POINT_HPP
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/detail/binary_find.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
///
|
||||
/// \brief Partition point algorithm
|
||||
///
|
||||
/// Finds the end of true values in the partitioned range [first, last)
|
||||
/// \return Iterator pointing to end of true values
|
||||
///
|
||||
/// \param first Iterator pointing to start of range
|
||||
/// \param last Iterator pointing to end of range
|
||||
/// \param predicate Unary predicate to be applied on each element
|
||||
/// \param queue Queue on which to execute
|
||||
///
|
||||
/// \see partition() and stable_partition()
|
||||
///
|
||||
template<class InputIterator, class UnaryPredicate>
|
||||
inline InputIterator partition_point(InputIterator first,
|
||||
InputIterator last,
|
||||
UnaryPredicate predicate,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
return detail::binary_find(first, last, not1(predicate), queue);
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_PARTITION_POINT_HPP
|
||||
@@ -0,0 +1,111 @@
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_MATH_TRUNC_HPP
|
||||
#define BOOST_MATH_TRUNC_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/math_fwd.hpp>
|
||||
#include <boost/math/tools/config.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
template <class T, class Policy>
|
||||
inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol, const mpl::false_&)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
typedef typename tools::promote_args<T>::type result_type;
|
||||
if(!(boost::math::isfinite)(v))
|
||||
return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol);
|
||||
return (v >= 0) ? static_cast<result_type>(floor(v)) : static_cast<result_type>(ceil(v));
|
||||
}
|
||||
|
||||
template <class T, class Policy>
|
||||
inline typename tools::promote_args<T>::type trunc(const T& v, const Policy&, const mpl::true_&)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template <class T, class Policy>
|
||||
inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol)
|
||||
{
|
||||
return detail::trunc(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>());
|
||||
}
|
||||
template <class T>
|
||||
inline typename tools::promote_args<T>::type trunc(const T& v)
|
||||
{
|
||||
return trunc(v, policies::policy<>());
|
||||
}
|
||||
//
|
||||
// The following functions will not compile unless T has an
|
||||
// implicit convertion to the integer types. For user-defined
|
||||
// number types this will likely not be the case. In that case
|
||||
// these functions should either be specialized for the UDT in
|
||||
// question, or else overloads should be placed in the same
|
||||
// namespace as the UDT: these will then be found via argument
|
||||
// dependent lookup. See our concept archetypes for examples.
|
||||
//
|
||||
template <class T, class Policy>
|
||||
inline int itrunc(const T& v, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
typedef typename tools::promote_args<T>::type result_type;
|
||||
result_type r = boost::math::trunc(v, pol);
|
||||
if((r > (std::numeric_limits<int>::max)()) || (r < (std::numeric_limits<int>::min)()))
|
||||
return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0, pol));
|
||||
return static_cast<int>(r);
|
||||
}
|
||||
template <class T>
|
||||
inline int itrunc(const T& v)
|
||||
{
|
||||
return itrunc(v, policies::policy<>());
|
||||
}
|
||||
|
||||
template <class T, class Policy>
|
||||
inline long ltrunc(const T& v, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
typedef typename tools::promote_args<T>::type result_type;
|
||||
result_type r = boost::math::trunc(v, pol);
|
||||
if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)()))
|
||||
return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0L, pol));
|
||||
return static_cast<long>(r);
|
||||
}
|
||||
template <class T>
|
||||
inline long ltrunc(const T& v)
|
||||
{
|
||||
return ltrunc(v, policies::policy<>());
|
||||
}
|
||||
|
||||
#ifdef BOOST_HAS_LONG_LONG
|
||||
|
||||
template <class T, class Policy>
|
||||
inline boost::long_long_type lltrunc(const T& v, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
typedef typename tools::promote_args<T>::type result_type;
|
||||
result_type r = boost::math::trunc(v, pol);
|
||||
if((r > (std::numeric_limits<boost::long_long_type>::max)()) || (r < (std::numeric_limits<boost::long_long_type>::min)()))
|
||||
return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, static_cast<boost::long_long_type>(0), pol));
|
||||
return static_cast<boost::long_long_type>(r);
|
||||
}
|
||||
template <class T>
|
||||
inline boost::long_long_type lltrunc(const T& v)
|
||||
{
|
||||
return lltrunc(v, policies::policy<>());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif // BOOST_MATH_TRUNC_HPP
|
||||
@@ -0,0 +1,360 @@
|
||||
#include <iostream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
#include <locale.h>
|
||||
#include <fftw3.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QApplication>
|
||||
#include <QRegularExpression>
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QLibraryInfo>
|
||||
#include <QSysInfo>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <QStringList>
|
||||
#include <QLockFile>
|
||||
#include <QStack>
|
||||
#include <QSplashScreen>
|
||||
|
||||
#if QT_VERSION >= 0x050200
|
||||
#include <QCommandLineParser>
|
||||
#include <QCommandLineOption>
|
||||
#endif
|
||||
|
||||
#include "revision_utils.hpp"
|
||||
#include "MetaDataRegistry.hpp"
|
||||
#include "SettingsGroup.hpp"
|
||||
#include "TraceFile.hpp"
|
||||
#include "MultiSettings.hpp"
|
||||
#include "mainwindow.h"
|
||||
#include "commons.h"
|
||||
#include "lib/init_random_seed.h"
|
||||
#include "Radio.hpp"
|
||||
#include "FrequencyList.hpp"
|
||||
#include "SplashScreen.hpp"
|
||||
#include "MessageBox.hpp" // last to avoid nasty MS macro definitions
|
||||
|
||||
extern "C" {
|
||||
// Fortran procedures we need
|
||||
void four2a_(_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len);
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
struct RNGSetup
|
||||
{
|
||||
RNGSetup ()
|
||||
{
|
||||
// one time seed of pseudo RNGs from current time
|
||||
auto seed = QDateTime::currentMSecsSinceEpoch ();
|
||||
qsrand (seed); // this is good for rand() as well
|
||||
}
|
||||
} seeding;
|
||||
|
||||
class MessageTimestamper
|
||||
{
|
||||
public:
|
||||
MessageTimestamper ()
|
||||
{
|
||||
prior_handlers_.push (qInstallMessageHandler (message_handler));
|
||||
}
|
||||
~MessageTimestamper ()
|
||||
{
|
||||
if (prior_handlers_.size ()) qInstallMessageHandler (prior_handlers_.pop ());
|
||||
}
|
||||
|
||||
private:
|
||||
static void message_handler (QtMsgType type, QMessageLogContext const& context, QString const& msg)
|
||||
{
|
||||
QtMessageHandler handler {prior_handlers_.top ()};
|
||||
if (handler)
|
||||
{
|
||||
handler (type, context,
|
||||
QDateTime::currentDateTimeUtc ().toString ("yy-MM-ddTHH:mm:ss.zzzZ: ") + msg);
|
||||
}
|
||||
}
|
||||
static QStack<QtMessageHandler> prior_handlers_;
|
||||
};
|
||||
QStack<QtMessageHandler> MessageTimestamper::prior_handlers_;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Add timestamps to all debug messages
|
||||
MessageTimestamper message_timestamper;
|
||||
|
||||
init_random_seed ();
|
||||
|
||||
// make the Qt type magic happen
|
||||
Radio::register_types ();
|
||||
register_types ();
|
||||
|
||||
// Multiple instances communicate with jt9 via this
|
||||
QSharedMemory mem_jt9;
|
||||
|
||||
QApplication a(argc, argv);
|
||||
try
|
||||
{
|
||||
setlocale (LC_NUMERIC, "C"); // ensure number forms are in
|
||||
// consistent format, do this after
|
||||
// instantiating QApplication so
|
||||
// that GUI has correct l18n
|
||||
|
||||
// Override programs executable basename as application name.
|
||||
a.setApplicationName ("WSJT-X");
|
||||
a.setApplicationVersion (version ());
|
||||
|
||||
#if QT_VERSION >= 0x050200
|
||||
QCommandLineParser parser;
|
||||
parser.setApplicationDescription ("\nJT65, JT9, JT4, MSK144, QRA64, ISCAT & WSPR Weak Signal Communications Program.");
|
||||
auto help_option = parser.addHelpOption ();
|
||||
auto version_option = parser.addVersionOption ();
|
||||
|
||||
// support for multiple instances running from a single installation
|
||||
QCommandLineOption rig_option (QStringList {} << "r" << "rig-name"
|
||||
, a.translate ("main", "Where <rig-name> is for multi-instance support.")
|
||||
, a.translate ("main", "rig-name"));
|
||||
parser.addOption (rig_option);
|
||||
|
||||
// support for start up configuration
|
||||
QCommandLineOption cfg_option (QStringList {} << "c" << "config"
|
||||
, a.translate ("main", "Where <configuration> is an existing one.")
|
||||
, a.translate ("main", "configuration"));
|
||||
parser.addOption (cfg_option);
|
||||
|
||||
QCommandLineOption test_option (QStringList {} << "test-mode"
|
||||
, a.translate ("main", "Writable files in test location. Use with caution, for testing only."));
|
||||
parser.addOption (test_option);
|
||||
|
||||
if (!parser.parse (a.arguments ()))
|
||||
{
|
||||
MessageBox::critical_message (nullptr, a.translate ("main", "Command line error"), parser.errorText ());
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parser.isSet (help_option))
|
||||
{
|
||||
MessageBox::information_message (nullptr, a.translate ("main", "Command line help"), parser.helpText ());
|
||||
return 0;
|
||||
}
|
||||
else if (parser.isSet (version_option))
|
||||
{
|
||||
MessageBox::information_message (nullptr, a.translate ("main", "Application version"), a.applicationVersion ());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
QStandardPaths::setTestModeEnabled (parser.isSet (test_option));
|
||||
|
||||
// support for multiple instances running from a single installation
|
||||
bool multiple {false};
|
||||
if (parser.isSet (rig_option) || parser.isSet (test_option))
|
||||
{
|
||||
auto temp_name = parser.value (rig_option);
|
||||
if (!temp_name.isEmpty ())
|
||||
{
|
||||
if (temp_name.contains (QRegularExpression {R"([\\/,])"}))
|
||||
{
|
||||
std::cerr << QObject::tr ("Invalid rig name - \\ & / not allowed").toLocal8Bit ().data () << std::endl;
|
||||
parser.showHelp (-1);
|
||||
}
|
||||
|
||||
a.setApplicationName (a.applicationName () + " - " + temp_name);
|
||||
}
|
||||
|
||||
if (parser.isSet (test_option))
|
||||
{
|
||||
a.setApplicationName (a.applicationName () + " - test");
|
||||
}
|
||||
|
||||
multiple = true;
|
||||
}
|
||||
|
||||
// now we have the application name we can open the settings
|
||||
MultiSettings multi_settings {parser.value (cfg_option)};
|
||||
|
||||
// find the temporary files path
|
||||
QDir temp_dir {QStandardPaths::writableLocation (QStandardPaths::TempLocation)};
|
||||
Q_ASSERT (temp_dir.exists ()); // sanity check
|
||||
|
||||
// disallow multiple instances with same instance key
|
||||
QLockFile instance_lock {temp_dir.absoluteFilePath (a.applicationName () + ".lock")};
|
||||
instance_lock.setStaleLockTime (0);
|
||||
bool lock_ok {false};
|
||||
while (!(lock_ok = instance_lock.tryLock ()))
|
||||
{
|
||||
if (QLockFile::LockFailedError == instance_lock.error ())
|
||||
{
|
||||
auto button = MessageBox::query_message (nullptr
|
||||
, a.translate ("main", "Another instance may be running")
|
||||
, a.translate ("main", "try to remove stale lock file?")
|
||||
, QString {}
|
||||
, MessageBox::Yes | MessageBox::Retry | MessageBox::No
|
||||
, MessageBox::Yes);
|
||||
switch (button)
|
||||
{
|
||||
case MessageBox::Yes:
|
||||
instance_lock.removeStaleLockFile ();
|
||||
break;
|
||||
|
||||
case MessageBox::Retry:
|
||||
break;
|
||||
|
||||
default:
|
||||
throw std::runtime_error {"Multiple instances must have unique rig names"};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if WSJT_QDEBUG_TO_FILE
|
||||
// Open a trace file
|
||||
TraceFile trace_file {temp_dir.absoluteFilePath (a.applicationName () + "_trace.log")};
|
||||
qDebug () << program_title (revision ()) + " - Program startup";
|
||||
#endif
|
||||
|
||||
// Create a unique writeable temporary directory in a suitable location
|
||||
bool temp_ok {false};
|
||||
QString unique_directory {QApplication::applicationName ()};
|
||||
do
|
||||
{
|
||||
if (!temp_dir.mkpath (unique_directory)
|
||||
|| !temp_dir.cd (unique_directory))
|
||||
{
|
||||
MessageBox::critical_message (nullptr,
|
||||
a.translate ("main", "Failed to create a temporary directory"),
|
||||
a.translate ("main", "Path: \"%1\"").arg (temp_dir.absolutePath ()));
|
||||
throw std::runtime_error {"Failed to create a temporary directory"};
|
||||
}
|
||||
if (!temp_dir.isReadable () || !(temp_ok = QTemporaryFile {temp_dir.absoluteFilePath ("test")}.open ()))
|
||||
{
|
||||
auto button = MessageBox::critical_message (nullptr,
|
||||
a.translate ("main", "Failed to create a usable temporary directory"),
|
||||
a.translate ("main", "Another application may be locking the directory"),
|
||||
a.translate ("main", "Path: \"%1\"").arg (temp_dir.absolutePath ()),
|
||||
MessageBox::Retry | MessageBox::Cancel);
|
||||
if (MessageBox::Cancel == button)
|
||||
{
|
||||
throw std::runtime_error {"Failed to create a usable temporary directory"};
|
||||
}
|
||||
temp_dir.cdUp (); // revert to parent as this one is no good
|
||||
}
|
||||
}
|
||||
while (!temp_ok);
|
||||
|
||||
SplashScreen splash;
|
||||
{
|
||||
// change this key if you want to force a new splash screen
|
||||
// for a new version, the user will be able to re-disable it
|
||||
// if they wish
|
||||
QString splash_flag_name {"Splash_v1.7"};
|
||||
if (multi_settings.common_value (splash_flag_name, true).toBool ())
|
||||
{
|
||||
QObject::connect (&splash, &SplashScreen::disabled, [&, splash_flag_name] {
|
||||
multi_settings.set_common_value (splash_flag_name, false);
|
||||
splash.close ();
|
||||
});
|
||||
splash.show ();
|
||||
a.processEvents ();
|
||||
}
|
||||
}
|
||||
|
||||
int result;
|
||||
do
|
||||
{
|
||||
#if WSJT_QDEBUG_TO_FILE
|
||||
// announce to trace file and dump settings
|
||||
qDebug () << "++++++++++++++++++++++++++++ Settings ++++++++++++++++++++++++++++";
|
||||
for (auto const& key: multi_settings.settings ()->allKeys ())
|
||||
{
|
||||
auto const& value = multi_settings.settings ()->value (key);
|
||||
if (value.canConvert<QVariantList> ())
|
||||
{
|
||||
auto const sequence = value.value<QSequentialIterable> ();
|
||||
qDebug ().nospace () << key << ": ";
|
||||
for (auto const& item: sequence)
|
||||
{
|
||||
qDebug ().nospace () << '\t' << item;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug ().nospace () << key << ": " << value;
|
||||
}
|
||||
}
|
||||
qDebug () << "---------------------------- Settings ----------------------------";
|
||||
#endif
|
||||
|
||||
// Create and initialize shared memory segment
|
||||
// Multiple instances: use rig_name as shared memory key
|
||||
mem_jt9.setKey(a.applicationName ());
|
||||
|
||||
if(!mem_jt9.attach()) {
|
||||
if (!mem_jt9.create(sizeof(struct dec_data))) {
|
||||
splash.hide ();
|
||||
MessageBox::critical_message (nullptr, a.translate ("main", "Shared memory error"),
|
||||
a.translate ("main", "Unable to create shared memory segment"));
|
||||
throw std::runtime_error {"Shared memory error"};
|
||||
}
|
||||
}
|
||||
memset(mem_jt9.data(),0,sizeof(struct dec_data)); //Zero all decoding params in shared memory
|
||||
|
||||
unsigned downSampleFactor;
|
||||
{
|
||||
SettingsGroup {multi_settings.settings (), "Tune"};
|
||||
|
||||
// deal with Windows Vista and earlier input audio rate
|
||||
// converter problems
|
||||
downSampleFactor = multi_settings.settings ()->value ("Audio/DisableInputResampling",
|
||||
#if defined (Q_OS_WIN)
|
||||
// default to true for
|
||||
// Windows Vista and older
|
||||
QSysInfo::WV_VISTA >= QSysInfo::WindowsVersion ? true : false
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
).toBool () ? 1u : 4u;
|
||||
}
|
||||
|
||||
// run the application UI
|
||||
MainWindow w(temp_dir, multiple, &multi_settings, &mem_jt9, downSampleFactor, &splash);
|
||||
w.show();
|
||||
splash.raise ();
|
||||
QObject::connect (&a, SIGNAL (lastWindowClosed()), &a, SLOT (quit()));
|
||||
result = a.exec();
|
||||
}
|
||||
while (!result && !multi_settings.exit ());
|
||||
|
||||
// clean up lazily initialized resources
|
||||
{
|
||||
int nfft {-1};
|
||||
int ndim {1};
|
||||
int isign {1};
|
||||
int iform {1};
|
||||
// free FFT plan resources
|
||||
four2a_ (nullptr, &nfft, &ndim, &isign, &iform, 0);
|
||||
}
|
||||
fftwf_forget_wisdom ();
|
||||
fftwf_cleanup ();
|
||||
|
||||
temp_dir.removeRecursively (); // clean up temp files
|
||||
return result;
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
MessageBox::critical_message (nullptr, a.translate ("main", "Fatal error"), e.what ());
|
||||
std::cerr << "Error: " << e.what () << '\n';
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
MessageBox::critical_message (nullptr, a.translate ("main", "Unexpected fatal error"));
|
||||
std::cerr << "Unexpected fatal error\n";
|
||||
throw; // hoping the runtime might tell us more about the exception
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
// Copyright 2005 Daniel Wallin.
|
||||
// Copyright 2005 Joel de Guzman.
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// Modeled after range_ex, Copyright 2004 Eric Niebler
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_remove_if.hpp
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_PHOENIX_HAS_REMOVE_IF_EN_14_12_2004
|
||||
#define BOOST_PHOENIX_HAS_REMOVE_IF_EN_14_12_2004
|
||||
|
||||
#include "./is_std_list.hpp"
|
||||
|
||||
namespace boost
|
||||
{
|
||||
// Specialize this for user-defined types
|
||||
template<typename T>
|
||||
struct has_remove_if
|
||||
: is_std_list<T>
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,20 @@
|
||||
// Status=review
|
||||
|
||||
[[FigTxMacros]]
|
||||
image::tx-macros.png[align="center",alt="Tx Macros Screen"]
|
||||
|
||||
*Tx Macros* are an aid for sending brief, frequently used free-text
|
||||
messages such as the examples shown above.
|
||||
|
||||
- To add a new message to the list, enter the desired text (up to 13
|
||||
characters) in the entry field at top, then click *Add*.
|
||||
|
||||
- To remove an unwanted message, click on the message and then on
|
||||
*Delete*.
|
||||
|
||||
- You can reorder your macro messages by using drag-and-drop. The
|
||||
new order will be preserved when _WSJT-X_ is restarted.
|
||||
|
||||
- Messages can also be added from the main window's *Tx5* field on Tab
|
||||
1 or the *Free msg* field on Tab 2. Simply hit [Enter] after the
|
||||
message has been entered.
|
||||
@@ -0,0 +1,148 @@
|
||||
subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand)
|
||||
|
||||
include 'ft8_params.f90'
|
||||
! Search over +/- 1.5s relative to 0.5s TX start time.
|
||||
parameter (JZ=38)
|
||||
complex cx(0:NH1)
|
||||
real s(NH1,NHSYM)
|
||||
real savg(NH1)
|
||||
real x(NFFT1)
|
||||
real sync2d(NH1,-JZ:JZ)
|
||||
real red(NH1)
|
||||
real candidate0(3,200)
|
||||
real candidate(3,200)
|
||||
real dd(NMAX)
|
||||
integer jpeak(NH1)
|
||||
integer indx(NH1)
|
||||
integer ii(1)
|
||||
integer icos7(0:6)
|
||||
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
|
||||
equivalence (x,cx)
|
||||
|
||||
! Compute symbol spectra, stepping by NSTEP steps.
|
||||
savg=0.
|
||||
tstep=NSTEP/12000.0
|
||||
df=12000.0/NFFT1 !3.125 Hz
|
||||
fac=1.0/300.0
|
||||
do j=1,NHSYM
|
||||
ia=(j-1)*NSTEP + 1
|
||||
ib=ia+NSPS-1
|
||||
x(1:NSPS)=fac*dd(ia:ib)
|
||||
x(NSPS+1:)=0.
|
||||
call four2a(x,NFFT1,1,-1,0) !r2c FFT
|
||||
do i=1,NH1
|
||||
s(i,j)=real(cx(i))**2 + aimag(cx(i))**2
|
||||
enddo
|
||||
savg=savg + s(1:NH1,j) !Average spectrum
|
||||
enddo
|
||||
savg=savg/NHSYM
|
||||
! do i=1,NH1
|
||||
! write(51,3051) i*df,savg(i),db(savg(i))
|
||||
!3051 format(f10.3,e12.3,f12.3)
|
||||
! enddo
|
||||
|
||||
ia=max(1,nint(nfa/df))
|
||||
ib=nint(nfb/df)
|
||||
nssy=NSPS/NSTEP ! # steps per symbol
|
||||
nfos=NFFT1/NSPS ! # frequency bin oversampling factor
|
||||
jstrt=0.5/tstep
|
||||
|
||||
do i=ia,ib
|
||||
do j=-JZ,+JZ
|
||||
ta=0.
|
||||
tb=0.
|
||||
tc=0.
|
||||
t0a=0.
|
||||
t0b=0.
|
||||
t0c=0.
|
||||
do n=0,6
|
||||
k=j+jstrt+nssy*n
|
||||
if(k.ge.1.and.k.le.NHSYM) then
|
||||
ta=ta + s(i+nfos*icos7(n),k)
|
||||
t0a=t0a + sum(s(i:i+nfos*6:nfos,k))
|
||||
endif
|
||||
tb=tb + s(i+nfos*icos7(n),k+nssy*36)
|
||||
t0b=t0b + sum(s(i:i+nfos*6:nfos,k+nssy*36))
|
||||
if(k+nssy*72.le.NHSYM) then
|
||||
tc=tc + s(i+nfos*icos7(n),k+nssy*72)
|
||||
t0c=t0c + sum(s(i:i+nfos*6:nfos,k+nssy*72))
|
||||
endif
|
||||
enddo
|
||||
t=ta+tb+tc
|
||||
t0=t0a+t0b+t0c
|
||||
t0=(t0-t)/6.0
|
||||
sync_abc=t/t0
|
||||
|
||||
t=tb+tc
|
||||
t0=t0b+t0c
|
||||
t0=(t0-t)/6.0
|
||||
sync_bc=t/t0
|
||||
sync2d(i,j)=max(sync_abc,sync_bc)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
red=0.
|
||||
do i=ia,ib
|
||||
ii=maxloc(sync2d(i,-JZ:JZ)) - 1 - JZ
|
||||
j0=ii(1)
|
||||
jpeak(i)=j0
|
||||
red(i)=sync2d(i,j0)
|
||||
! write(52,3052) i*df,red(i),db(red(i))
|
||||
!3052 format(3f12.3)
|
||||
enddo
|
||||
iz=ib-ia+1
|
||||
call indexx(red(ia:ib),iz,indx)
|
||||
ibase=indx(nint(0.40*iz)) - 1 + ia
|
||||
base=red(ibase)
|
||||
red=red/base
|
||||
|
||||
candidate0=0.
|
||||
k=0
|
||||
do i=1,200
|
||||
n=ia + indx(iz+1-i) - 1
|
||||
if(red(n).lt.syncmin) exit
|
||||
if(k.lt.200) k=k+1
|
||||
candidate0(1,k)=n*df
|
||||
candidate0(2,k)=(jpeak(n)-1)*tstep
|
||||
candidate0(3,k)=red(n)
|
||||
enddo
|
||||
ncand=k
|
||||
|
||||
! Put nfqso at top of list, and save only the best of near-dupe freqs.
|
||||
do i=1,ncand
|
||||
if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i)
|
||||
if(i.ge.2) then
|
||||
do j=1,i-1
|
||||
fdiff=abs(candidate0(1,i))-abs(candidate0(1,j))
|
||||
if(abs(fdiff).lt.4.0) then
|
||||
if(candidate0(3,i).ge.candidate0(3,j)) candidate0(3,j)=0.
|
||||
if(candidate0(3,i).lt.candidate0(3,j)) candidate0(3,i)=0.
|
||||
endif
|
||||
enddo
|
||||
! write(*,3001) i,candidate0(1,i-1),candidate0(1,i),candidate0(3,i-1), &
|
||||
! candidate0(3,i)
|
||||
!3001 format(i2,4f8.1)
|
||||
endif
|
||||
enddo
|
||||
|
||||
fac=20.0/maxval(s)
|
||||
s=fac*s
|
||||
|
||||
! Sort by sync
|
||||
! call indexx(candidate0(3,1:ncand),ncand,indx)
|
||||
! Sort by frequency
|
||||
call indexx(candidate0(1,1:ncand),ncand,indx)
|
||||
k=1
|
||||
! do i=ncand,1,-1
|
||||
do i=1,ncand
|
||||
j=indx(i)
|
||||
if( candidate0(3,j) .ge. syncmin .and. candidate0(2,j).ge.-1.5 ) then
|
||||
candidate(1,k)=abs(candidate0(1,j))
|
||||
candidate(2,k)=candidate0(2,j)
|
||||
candidate(3,k)=candidate0(3,j)
|
||||
k=k+1
|
||||
endif
|
||||
enddo
|
||||
ncand=k-1
|
||||
return
|
||||
end subroutine sync8
|
||||
@@ -0,0 +1,41 @@
|
||||
// Status=review
|
||||
|
||||
image::settings-audio.png[align="center",alt="WSJT-X Audio Configuration Screen"]
|
||||
|
||||
Select the *Audio* tab to configure your sound system.
|
||||
|
||||
- _Soundcard_: Select the audio devices to be used for *Input* and
|
||||
*Output*. Usually the *Mono* settings will suffice, but in special
|
||||
cases you can choose *Left*, *Right*, or *Both* stereo channels.
|
||||
|
||||
- Be sure that your audio device is configured to sample at 48000 Hz,
|
||||
16 bits.
|
||||
|
||||
|
||||
IMPORTANT: If you select the audio output device that is also your
|
||||
computer's default audio device, be sure to turn off all system sounds
|
||||
to prevent inadvertently transmitting them over the air.
|
||||
|
||||
NOTE: Windows Vista and later may configure audio devices using
|
||||
the Texas Instruments PCM2900 series CODEC for microphone input rather
|
||||
line input. (This chip is used in many radios with built-in USB
|
||||
CODECs, as well as various other audio interfaces.) If you are using
|
||||
such a device, be sure to set the mic level in the Recording Device
|
||||
Properties to 0 dB.
|
||||
|
||||
- _Save Directory_: _WSJT-X_ can save its received audio sequences as
|
||||
`.wav` files. A default directory for these files is provided; you
|
||||
can select another location if desired.
|
||||
|
||||
- _AzEl Directory_: A file named `azel.dat` will appear in the
|
||||
specified directory. The file contains information usable by another
|
||||
program for automatic tracking of the Sun or Moon, as well as
|
||||
calculated Doppler shift for the specified EME path. The file is
|
||||
updated once per second whenever the <<ASTRODATA,Astronomical Data>>
|
||||
window is displayed.
|
||||
|
||||
- _Remember power settings by band_: Checking either of these will
|
||||
cause _WSJT-X_ to remember the *Pwr* slider setting for that operation
|
||||
on a band-by-band basis. For example, when *Tune* is checked here and
|
||||
you click the *Tune* button on the main window, the power slider will
|
||||
change to the most recent setting used for *Tune* on the band in use.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 170 KiB |
@@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
Copyright (c) 2009-2010 Christopher Schmidt
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
|
||||
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_CATEGORY_OF_IMPL_HPP
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace extension
|
||||
{
|
||||
template<typename>
|
||||
struct category_of_impl;
|
||||
|
||||
template<>
|
||||
struct category_of_impl<struct_tag>
|
||||
{
|
||||
template<typename Seq>
|
||||
struct apply
|
||||
{
|
||||
typedef random_access_traversal_tag type;
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct category_of_impl<assoc_struct_tag>
|
||||
{
|
||||
template<typename Seq>
|
||||
struct apply
|
||||
{
|
||||
typedef assoc_struct_category type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,401 @@
|
||||
subroutine bpdecode174(llr,apmask,maxiterations,decoded,cw,nharderror)
|
||||
!
|
||||
! A log-domain belief propagation decoder for the (174,87) code.
|
||||
!
|
||||
integer, parameter:: N=174, K=87, M=N-K
|
||||
integer*1 codeword(N),cw(N),apmask(N)
|
||||
integer colorder(N)
|
||||
integer*1 decoded(K)
|
||||
integer Nm(7,M) ! 5, 6, or 7 bits per check
|
||||
integer Mn(3,N) ! 3 checks per bit
|
||||
integer synd(M)
|
||||
real tov(3,N)
|
||||
real toc(7,M)
|
||||
real tanhtoc(7,M)
|
||||
real zn(N)
|
||||
real llr(N)
|
||||
real Tmn
|
||||
integer nrw(M)
|
||||
|
||||
data colorder/ &
|
||||
0, 1, 2, 3, 30, 4, 5, 6, 7, 8, 9, 10, 11, 32, 12, 40, 13, 14, 15, 16,&
|
||||
17, 18, 37, 45, 29, 19, 20, 21, 41, 22, 42, 31, 33, 34, 44, 35, 47, 51, 50, 43,&
|
||||
36, 52, 63, 46, 25, 55, 27, 24, 23, 53, 39, 49, 59, 38, 48, 61, 60, 57, 28, 62,&
|
||||
56, 58, 65, 66, 26, 70, 64, 69, 68, 67, 74, 71, 54, 76, 72, 75, 78, 77, 80, 79,&
|
||||
73, 83, 84, 81, 82, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99,&
|
||||
100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,&
|
||||
120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,&
|
||||
140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,&
|
||||
160,161,162,163,164,165,166,167,168,169,170,171,172,173/
|
||||
|
||||
data Mn/ &
|
||||
1, 25, 69, &
|
||||
2, 5, 73, &
|
||||
3, 32, 68, &
|
||||
4, 51, 61, &
|
||||
6, 63, 70, &
|
||||
7, 33, 79, &
|
||||
8, 50, 86, &
|
||||
9, 37, 43, &
|
||||
10, 41, 65, &
|
||||
11, 14, 64, &
|
||||
12, 75, 77, &
|
||||
13, 23, 81, &
|
||||
15, 16, 82, &
|
||||
17, 56, 66, &
|
||||
18, 53, 60, &
|
||||
19, 31, 52, &
|
||||
20, 67, 84, &
|
||||
21, 29, 72, &
|
||||
22, 24, 44, &
|
||||
26, 35, 76, &
|
||||
27, 36, 38, &
|
||||
28, 40, 42, &
|
||||
30, 54, 55, &
|
||||
34, 49, 87, &
|
||||
39, 57, 58, &
|
||||
45, 74, 83, &
|
||||
46, 62, 80, &
|
||||
47, 48, 85, &
|
||||
59, 71, 78, &
|
||||
1, 50, 53, &
|
||||
2, 47, 84, &
|
||||
3, 25, 79, &
|
||||
4, 6, 14, &
|
||||
5, 7, 80, &
|
||||
8, 34, 55, &
|
||||
9, 36, 69, &
|
||||
10, 43, 83, &
|
||||
11, 23, 74, &
|
||||
12, 17, 44, &
|
||||
13, 57, 76, &
|
||||
15, 27, 56, &
|
||||
16, 28, 29, &
|
||||
18, 19, 59, &
|
||||
20, 40, 63, &
|
||||
21, 35, 52, &
|
||||
22, 54, 64, &
|
||||
24, 62, 78, &
|
||||
26, 32, 77, &
|
||||
30, 72, 85, &
|
||||
31, 65, 87, &
|
||||
33, 39, 51, &
|
||||
37, 48, 75, &
|
||||
38, 70, 71, &
|
||||
41, 42, 68, &
|
||||
45, 67, 86, &
|
||||
46, 81, 82, &
|
||||
49, 66, 73, &
|
||||
58, 60, 66, &
|
||||
61, 65, 85, &
|
||||
1, 14, 21, &
|
||||
2, 13, 59, &
|
||||
3, 67, 82, &
|
||||
4, 32, 73, &
|
||||
5, 36, 54, &
|
||||
6, 43, 46, &
|
||||
7, 28, 75, &
|
||||
8, 33, 71, &
|
||||
9, 49, 76, &
|
||||
10, 58, 64, &
|
||||
11, 48, 68, &
|
||||
12, 19, 45, &
|
||||
15, 50, 61, &
|
||||
16, 22, 26, &
|
||||
17, 72, 80, &
|
||||
18, 40, 55, &
|
||||
20, 35, 51, &
|
||||
23, 25, 34, &
|
||||
24, 63, 87, &
|
||||
27, 39, 74, &
|
||||
29, 78, 83, &
|
||||
30, 70, 77, &
|
||||
31, 69, 84, &
|
||||
22, 37, 86, &
|
||||
38, 41, 81, &
|
||||
42, 44, 57, &
|
||||
47, 53, 62, &
|
||||
52, 56, 79, &
|
||||
60, 75, 81, &
|
||||
1, 39, 77, &
|
||||
2, 16, 41, &
|
||||
3, 31, 54, &
|
||||
4, 36, 78, &
|
||||
5, 45, 65, &
|
||||
6, 57, 85, &
|
||||
7, 14, 49, &
|
||||
8, 21, 46, &
|
||||
9, 15, 72, &
|
||||
10, 20, 62, &
|
||||
11, 17, 71, &
|
||||
12, 34, 47, &
|
||||
13, 68, 86, &
|
||||
18, 23, 43, &
|
||||
19, 64, 73, &
|
||||
24, 48, 79, &
|
||||
25, 70, 83, &
|
||||
26, 80, 87, &
|
||||
27, 32, 40, &
|
||||
28, 56, 69, &
|
||||
29, 63, 66, &
|
||||
30, 42, 50, &
|
||||
33, 37, 82, &
|
||||
35, 60, 74, &
|
||||
38, 55, 84, &
|
||||
44, 52, 61, &
|
||||
51, 53, 72, &
|
||||
58, 59, 67, &
|
||||
47, 56, 76, &
|
||||
1, 19, 37, &
|
||||
2, 61, 75, &
|
||||
3, 8, 66, &
|
||||
4, 60, 84, &
|
||||
5, 34, 39, &
|
||||
6, 26, 53, &
|
||||
7, 32, 57, &
|
||||
9, 52, 67, &
|
||||
10, 12, 15, &
|
||||
11, 51, 69, &
|
||||
13, 14, 65, &
|
||||
16, 31, 43, &
|
||||
17, 20, 36, &
|
||||
18, 80, 86, &
|
||||
21, 48, 59, &
|
||||
22, 40, 46, &
|
||||
23, 33, 62, &
|
||||
24, 30, 74, &
|
||||
25, 42, 64, &
|
||||
27, 49, 85, &
|
||||
28, 38, 73, &
|
||||
29, 44, 81, &
|
||||
35, 68, 70, &
|
||||
41, 63, 76, &
|
||||
45, 49, 71, &
|
||||
50, 58, 87, &
|
||||
48, 54, 83, &
|
||||
13, 55, 79, &
|
||||
77, 78, 82, &
|
||||
1, 2, 24, &
|
||||
3, 6, 75, &
|
||||
4, 56, 87, &
|
||||
5, 44, 53, &
|
||||
7, 50, 83, &
|
||||
8, 10, 28, &
|
||||
9, 55, 62, &
|
||||
11, 29, 67, &
|
||||
12, 33, 40, &
|
||||
14, 16, 20, &
|
||||
15, 35, 73, &
|
||||
17, 31, 39, &
|
||||
18, 36, 57, &
|
||||
19, 46, 76, &
|
||||
21, 42, 84, &
|
||||
22, 34, 59, &
|
||||
23, 26, 61, &
|
||||
25, 60, 65, &
|
||||
27, 64, 80, &
|
||||
30, 37, 66, &
|
||||
32, 45, 72, &
|
||||
38, 51, 86, &
|
||||
41, 77, 79, &
|
||||
43, 56, 68, &
|
||||
47, 74, 82, &
|
||||
40, 52, 78, &
|
||||
54, 61, 71, &
|
||||
46, 58, 69/
|
||||
|
||||
data Nm/ &
|
||||
1, 30, 60, 89, 118, 147, 0, &
|
||||
2, 31, 61, 90, 119, 147, 0, &
|
||||
3, 32, 62, 91, 120, 148, 0, &
|
||||
4, 33, 63, 92, 121, 149, 0, &
|
||||
2, 34, 64, 93, 122, 150, 0, &
|
||||
5, 33, 65, 94, 123, 148, 0, &
|
||||
6, 34, 66, 95, 124, 151, 0, &
|
||||
7, 35, 67, 96, 120, 152, 0, &
|
||||
8, 36, 68, 97, 125, 153, 0, &
|
||||
9, 37, 69, 98, 126, 152, 0, &
|
||||
10, 38, 70, 99, 127, 154, 0, &
|
||||
11, 39, 71, 100, 126, 155, 0, &
|
||||
12, 40, 61, 101, 128, 145, 0, &
|
||||
10, 33, 60, 95, 128, 156, 0, &
|
||||
13, 41, 72, 97, 126, 157, 0, &
|
||||
13, 42, 73, 90, 129, 156, 0, &
|
||||
14, 39, 74, 99, 130, 158, 0, &
|
||||
15, 43, 75, 102, 131, 159, 0, &
|
||||
16, 43, 71, 103, 118, 160, 0, &
|
||||
17, 44, 76, 98, 130, 156, 0, &
|
||||
18, 45, 60, 96, 132, 161, 0, &
|
||||
19, 46, 73, 83, 133, 162, 0, &
|
||||
12, 38, 77, 102, 134, 163, 0, &
|
||||
19, 47, 78, 104, 135, 147, 0, &
|
||||
1, 32, 77, 105, 136, 164, 0, &
|
||||
20, 48, 73, 106, 123, 163, 0, &
|
||||
21, 41, 79, 107, 137, 165, 0, &
|
||||
22, 42, 66, 108, 138, 152, 0, &
|
||||
18, 42, 80, 109, 139, 154, 0, &
|
||||
23, 49, 81, 110, 135, 166, 0, &
|
||||
16, 50, 82, 91, 129, 158, 0, &
|
||||
3, 48, 63, 107, 124, 167, 0, &
|
||||
6, 51, 67, 111, 134, 155, 0, &
|
||||
24, 35, 77, 100, 122, 162, 0, &
|
||||
20, 45, 76, 112, 140, 157, 0, &
|
||||
21, 36, 64, 92, 130, 159, 0, &
|
||||
8, 52, 83, 111, 118, 166, 0, &
|
||||
21, 53, 84, 113, 138, 168, 0, &
|
||||
25, 51, 79, 89, 122, 158, 0, &
|
||||
22, 44, 75, 107, 133, 155, 172, &
|
||||
9, 54, 84, 90, 141, 169, 0, &
|
||||
22, 54, 85, 110, 136, 161, 0, &
|
||||
8, 37, 65, 102, 129, 170, 0, &
|
||||
19, 39, 85, 114, 139, 150, 0, &
|
||||
26, 55, 71, 93, 142, 167, 0, &
|
||||
27, 56, 65, 96, 133, 160, 174, &
|
||||
28, 31, 86, 100, 117, 171, 0, &
|
||||
28, 52, 70, 104, 132, 144, 0, &
|
||||
24, 57, 68, 95, 137, 142, 0, &
|
||||
7, 30, 72, 110, 143, 151, 0, &
|
||||
4, 51, 76, 115, 127, 168, 0, &
|
||||
16, 45, 87, 114, 125, 172, 0, &
|
||||
15, 30, 86, 115, 123, 150, 0, &
|
||||
23, 46, 64, 91, 144, 173, 0, &
|
||||
23, 35, 75, 113, 145, 153, 0, &
|
||||
14, 41, 87, 108, 117, 149, 170, &
|
||||
25, 40, 85, 94, 124, 159, 0, &
|
||||
25, 58, 69, 116, 143, 174, 0, &
|
||||
29, 43, 61, 116, 132, 162, 0, &
|
||||
15, 58, 88, 112, 121, 164, 0, &
|
||||
4, 59, 72, 114, 119, 163, 173, &
|
||||
27, 47, 86, 98, 134, 153, 0, &
|
||||
5, 44, 78, 109, 141, 0, 0, &
|
||||
10, 46, 69, 103, 136, 165, 0, &
|
||||
9, 50, 59, 93, 128, 164, 0, &
|
||||
14, 57, 58, 109, 120, 166, 0, &
|
||||
17, 55, 62, 116, 125, 154, 0, &
|
||||
3, 54, 70, 101, 140, 170, 0, &
|
||||
1, 36, 82, 108, 127, 174, 0, &
|
||||
5, 53, 81, 105, 140, 0, 0, &
|
||||
29, 53, 67, 99, 142, 173, 0, &
|
||||
18, 49, 74, 97, 115, 167, 0, &
|
||||
2, 57, 63, 103, 138, 157, 0, &
|
||||
26, 38, 79, 112, 135, 171, 0, &
|
||||
11, 52, 66, 88, 119, 148, 0, &
|
||||
20, 40, 68, 117, 141, 160, 0, &
|
||||
11, 48, 81, 89, 146, 169, 0, &
|
||||
29, 47, 80, 92, 146, 172, 0, &
|
||||
6, 32, 87, 104, 145, 169, 0, &
|
||||
27, 34, 74, 106, 131, 165, 0, &
|
||||
12, 56, 84, 88, 139, 0, 0, &
|
||||
13, 56, 62, 111, 146, 171, 0, &
|
||||
26, 37, 80, 105, 144, 151, 0, &
|
||||
17, 31, 82, 113, 121, 161, 0, &
|
||||
28, 49, 59, 94, 137, 0, 0, &
|
||||
7, 55, 83, 101, 131, 168, 0, &
|
||||
24, 50, 78, 106, 143, 149, 0/
|
||||
|
||||
data nrw/ &
|
||||
6,6,6,6,6,6,6,6,6,6, &
|
||||
6,6,6,6,6,6,6,6,6,6, &
|
||||
6,6,6,6,6,6,6,6,6,6, &
|
||||
6,6,6,6,6,6,6,6,6,7, &
|
||||
6,6,6,6,6,7,6,6,6,6, &
|
||||
6,6,6,6,6,7,6,6,6,6, &
|
||||
7,6,5,6,6,6,6,6,6,5, &
|
||||
6,6,6,6,6,6,6,6,6,6, &
|
||||
5,6,6,6,5,6,6/
|
||||
|
||||
ncw=3
|
||||
|
||||
decoded=0
|
||||
toc=0
|
||||
tov=0
|
||||
tanhtoc=0
|
||||
! initialize messages to checks
|
||||
do j=1,M
|
||||
do i=1,nrw(j)
|
||||
toc(i,j)=llr((Nm(i,j)))
|
||||
enddo
|
||||
enddo
|
||||
|
||||
ncnt=0
|
||||
|
||||
do iter=0,maxiterations
|
||||
|
||||
! Update bit log likelihood ratios (tov=0 in iteration 0).
|
||||
do i=1,N
|
||||
if( apmask(i) .ne. 1 ) then
|
||||
zn(i)=llr(i)+sum(tov(1:ncw,i))
|
||||
else
|
||||
zn(i)=llr(i)
|
||||
endif
|
||||
enddo
|
||||
|
||||
! Check to see if we have a codeword (check before we do any iteration).
|
||||
cw=0
|
||||
where( zn .gt. 0. ) cw=1
|
||||
ncheck=0
|
||||
do i=1,M
|
||||
synd(i)=sum(cw(Nm(1:nrw(i),i)))
|
||||
if( mod(synd(i),2) .ne. 0 ) ncheck=ncheck+1
|
||||
! if( mod(synd(i),2) .ne. 0 ) write(*,*) 'check ',i,' unsatisfied'
|
||||
enddo
|
||||
! write(*,*) 'number of unsatisfied parity checks ',ncheck
|
||||
if( ncheck .eq. 0 ) then ! we have a codeword - reorder the columns and return it
|
||||
codeword=cw(colorder+1)
|
||||
decoded=codeword(M+1:N)
|
||||
nerr=0
|
||||
do i=1,N
|
||||
if( (2*cw(i)-1)*llr(i) .lt. 0.0 ) nerr=nerr+1
|
||||
enddo
|
||||
nharderror=nerr
|
||||
return
|
||||
endif
|
||||
|
||||
if( iter.gt.0 ) then ! this code block implements an early stopping criterion
|
||||
! if( iter.gt.10000 ) then ! this code block implements an early stopping criterion
|
||||
nd=ncheck-nclast
|
||||
if( nd .lt. 0 ) then ! # of unsatisfied parity checks decreased
|
||||
ncnt=0 ! reset counter
|
||||
else
|
||||
ncnt=ncnt+1
|
||||
endif
|
||||
! write(*,*) iter,ncheck,nd,ncnt
|
||||
if( ncnt .ge. 5 .and. iter .ge. 10 .and. ncheck .gt. 15) then
|
||||
nharderror=-1
|
||||
return
|
||||
endif
|
||||
endif
|
||||
nclast=ncheck
|
||||
|
||||
! Send messages from bits to check nodes
|
||||
do j=1,M
|
||||
do i=1,nrw(j)
|
||||
ibj=Nm(i,j)
|
||||
toc(i,j)=zn(ibj)
|
||||
do kk=1,ncw ! subtract off what the bit had received from the check
|
||||
if( Mn(kk,ibj) .eq. j ) then
|
||||
toc(i,j)=toc(i,j)-tov(kk,ibj)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
! send messages from check nodes to variable nodes
|
||||
do i=1,M
|
||||
tanhtoc(1:7,i)=tanh(-toc(1:7,i)/2)
|
||||
enddo
|
||||
|
||||
do j=1,N
|
||||
do i=1,ncw
|
||||
ichk=Mn(i,j) ! Mn(:,j) are the checks that include bit j
|
||||
Tmn=product(tanhtoc(1:nrw(ichk),ichk),mask=Nm(1:nrw(ichk),ichk).ne.j)
|
||||
call platanh(-Tmn,y)
|
||||
! y=atanh(-Tmn)
|
||||
tov(i,j)=2*y
|
||||
enddo
|
||||
enddo
|
||||
|
||||
enddo
|
||||
nharderror=-1
|
||||
return
|
||||
end subroutine bpdecode174
|
||||
@@ -0,0 +1,351 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct void_;
|
||||
namespace result_of
|
||||
{
|
||||
template <
|
||||
typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_
|
||||
, typename Extra = void_
|
||||
>
|
||||
struct make_deque;
|
||||
template <>
|
||||
struct make_deque<>
|
||||
{
|
||||
typedef deque<> type;
|
||||
};
|
||||
}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<>
|
||||
make_deque()
|
||||
{
|
||||
return deque<>();
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0>
|
||||
struct make_deque< T0 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type>
|
||||
make_deque(T0 const& arg0)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type>(
|
||||
arg0);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1>
|
||||
struct make_deque< T0 , T1 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type>(
|
||||
arg0 , arg1);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
struct make_deque< T0 , T1 , T2 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type>(
|
||||
arg0 , arg1 , arg2);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type>(
|
||||
arg0 , arg1 , arg2 , arg3);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , void_ , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , void_ , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , void_ , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , void_ , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , void_ , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , void_ , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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>
|
||||
struct make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , void_ , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18);
|
||||
}
|
||||
namespace result_of
|
||||
{
|
||||
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 make_deque< T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , void_ >
|
||||
{
|
||||
typedef deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type> type;
|
||||
};
|
||||
}
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>
|
||||
make_deque(T0 const& arg0 , T1 const& arg1 , T2 const& arg2 , T3 const& arg3 , T4 const& arg4 , T5 const& arg5 , T6 const& arg6 , T7 const& arg7 , T8 const& arg8 , T9 const& arg9 , T10 const& arg10 , T11 const& arg11 , T12 const& arg12 , T13 const& arg13 , T14 const& arg14 , T15 const& arg15 , T16 const& arg16 , T17 const& arg17 , T18 const& arg18 , T19 const& arg19)
|
||||
{
|
||||
return deque<typename detail::as_fusion_element<T0>::type , typename detail::as_fusion_element<T1>::type , typename detail::as_fusion_element<T2>::type , typename detail::as_fusion_element<T3>::type , typename detail::as_fusion_element<T4>::type , typename detail::as_fusion_element<T5>::type , typename detail::as_fusion_element<T6>::type , typename detail::as_fusion_element<T7>::type , typename detail::as_fusion_element<T8>::type , typename detail::as_fusion_element<T9>::type , typename detail::as_fusion_element<T10>::type , typename detail::as_fusion_element<T11>::type , typename detail::as_fusion_element<T12>::type , typename detail::as_fusion_element<T13>::type , typename detail::as_fusion_element<T14>::type , typename detail::as_fusion_element<T15>::type , typename detail::as_fusion_element<T16>::type , typename detail::as_fusion_element<T17>::type , typename detail::as_fusion_element<T18>::type , typename detail::as_fusion_element<T19>::type>(
|
||||
arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9 , arg10 , arg11 , arg12 , arg13 , arg14 , arg15 , arg16 , arg17 , arg18 , arg19);
|
||||
}
|
||||
}}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_DEREF_05042005_1019)
|
||||
#define FUSION_DEREF_05042005_1019
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/support/tag_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
// Special tags:
|
||||
struct iterator_facade_tag; // iterator facade tag
|
||||
struct boost_array_iterator_tag; // boost::array iterator tag
|
||||
struct mpl_iterator_tag; // mpl sequence iterator tag
|
||||
struct std_pair_iterator_tag; // std::pair iterator tag
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct deref_impl
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct deref_impl<iterator_facade_tag>
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct apply : Iterator::template deref<Iterator> {};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct deref_impl<boost_array_iterator_tag>;
|
||||
|
||||
template <>
|
||||
struct deref_impl<mpl_iterator_tag>;
|
||||
|
||||
template <>
|
||||
struct deref_impl<std_pair_iterator_tag>;
|
||||
}
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct deref
|
||||
: extension::deref_impl<typename detail::tag_of<Iterator>::type>::
|
||||
template apply<Iterator>
|
||||
{};
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::deref<Iterator>::type
|
||||
deref(Iterator const& i)
|
||||
{
|
||||
typedef result_of::deref<Iterator> deref_meta;
|
||||
return deref_meta::call(i);
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline typename result_of::deref<Iterator>::type
|
||||
operator*(iterator_base<Iterator> const& i)
|
||||
{
|
||||
return fusion::deref(i.cast());
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,98 @@
|
||||
program ft8sim
|
||||
|
||||
! Generate simulated data for a 15-second HF/6m mode using 8-FSK.
|
||||
! Output is saved to a *.wav file.
|
||||
|
||||
use wavhdr
|
||||
include 'ft8_params.f90' !Set various constants
|
||||
type(hdr) h !Header for .wav file
|
||||
character arg*12,fname*17
|
||||
character msg*22,msgsent*22
|
||||
complex c0(0:NMAX-1)
|
||||
complex c(0:NMAX-1)
|
||||
integer itone(NN)
|
||||
integer*2 iwave(NMAX) !Generated full-length waveform
|
||||
|
||||
! Get command-line argument(s)
|
||||
nargs=iargc()
|
||||
if(nargs.ne.6) then
|
||||
print*,'Usage: ft8sim "message" DT fdop del nfiles snr'
|
||||
print*,'Example: ft8sim "K1ABC W9XYZ EN37" 0.0 0.1 1.0 10 -18'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,msg) !Message to be transmitted
|
||||
call getarg(2,arg)
|
||||
read(arg,*) xdt !Time offset from nominal (s)
|
||||
call getarg(3,arg)
|
||||
read(arg,*) fspread !Watterson frequency spread (Hz)
|
||||
call getarg(4,arg)
|
||||
read(arg,*) delay !Watterson delay (ms)
|
||||
call getarg(5,arg)
|
||||
read(arg,*) nfiles !Number of files
|
||||
call getarg(6,arg)
|
||||
read(arg,*) snrdb !SNR_2500
|
||||
|
||||
twopi=8.0*atan(1.0)
|
||||
fs=12000.0 !Sample rate (Hz)
|
||||
dt=1.0/fs !Sample interval (s)
|
||||
tt=NSPS*dt !Duration of symbols (s)
|
||||
baud=1.0/tt !Keying rate (baud)
|
||||
bw=8*baud !Occupied bandwidth (Hz)
|
||||
txt=NZ*dt !Transmission length (s)
|
||||
bandwidth_ratio=2500.0/(fs/2.0)
|
||||
sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
|
||||
if(snrdb.gt.90.0) sig=1.0
|
||||
txt=NN*NSPS/12000.0
|
||||
|
||||
call genft8(msg,msgsent,itone) !Source-encode, then get itone()
|
||||
write(*,1000) f0,xdt,txt,snrdb,bw,msgsent
|
||||
1000 format('f0:',f9.3,' DT:',f6.2,' TxT:',f6.1,' SNR:',f6.1, &
|
||||
' BW:',f4.1,2x,a22)
|
||||
|
||||
! call sgran()
|
||||
c=0.
|
||||
do ifile=1,nfiles
|
||||
c0=0.
|
||||
do isig=1,25
|
||||
f0=(isig+2)*100.0
|
||||
phi=0.0
|
||||
k=-1 + nint(xdt+0.5/dt)
|
||||
do j=1,NN !Generate complex waveform
|
||||
dphi=twopi*(f0+itone(j)*baud)*dt
|
||||
if(k.eq.0) phi=-dphi
|
||||
do i=1,NSPS
|
||||
k=k+1
|
||||
phi=phi+dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
if(k.ge.0 .and. k.lt.NMAX) c0(k)=cmplx(cos(xphi),sin(xphi))
|
||||
enddo
|
||||
enddo
|
||||
if(fspread.ne.0.0 .or. delay.ne.0.0) call watterson(c,NMAX,fs,delay,fspread)
|
||||
c=c+c0
|
||||
enddo
|
||||
c=c*sig
|
||||
if(snrdb.lt.90) then
|
||||
do i=0,NMAX-1 !Add gaussian noise at specified SNR
|
||||
xnoise=gran()
|
||||
ynoise=gran()
|
||||
c(i)=c(i) + cmplx(xnoise,ynoise)
|
||||
enddo
|
||||
endif
|
||||
|
||||
fac=32767.0
|
||||
rms=100.0
|
||||
if(snrdb.ge.90.0) iwave(1:NMAX)=nint(fac*real(c))
|
||||
if(snrdb.lt.90.0) iwave(1:NMAX)=nint(rms*real(c))
|
||||
|
||||
h=default_header(12000,NMAX)
|
||||
write(fname,1102) ifile
|
||||
1102 format('000000_',i6.6,'.wav')
|
||||
open(10,file=fname,status='unknown',access='stream')
|
||||
write(10) h,iwave !Save to *.wav file
|
||||
close(10)
|
||||
write(*,1110) ifile,xdt,f0,snrdb,fname
|
||||
1110 format(i4,f7.2,f8.2,f7.1,2x,a17)
|
||||
enddo
|
||||
|
||||
999 end program ft8sim
|
||||
@@ -0,0 +1,39 @@
|
||||
// -----------------------------------------------------------
|
||||
// lowest_bit.hpp
|
||||
//
|
||||
// Position of the lowest bit 'on'
|
||||
//
|
||||
// Copyright (c) 2003-2004, 2008 Gennaro Prota
|
||||
//
|
||||
// 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_LOWEST_BIT_HPP_GP_20030301
|
||||
#define BOOST_LOWEST_BIT_HPP_GP_20030301
|
||||
|
||||
#include <assert.h>
|
||||
#include "boost/pending/integer_log2.hpp"
|
||||
|
||||
|
||||
namespace boost {
|
||||
|
||||
template <typename T>
|
||||
int lowest_bit(T x) {
|
||||
|
||||
assert(x >= 1); // PRE
|
||||
|
||||
// clear all bits on except the rightmost one,
|
||||
// then calculate the logarithm base 2
|
||||
//
|
||||
return boost::integer_log2<T>( x - ( x & (x-1) ) );
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,34 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_AT_10022005_1616)
|
||||
#define FUSION_AT_10022005_1616
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/value_at.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
}
|
||||
|
||||
namespace mpl
|
||||
{
|
||||
template <typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<fusion::fusion_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply : fusion::result_of::value_at<Sequence, N> {};
|
||||
};
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
subroutine wspr_downsample(id2,k)
|
||||
|
||||
! Input:
|
||||
! id2 raw 16-bit integer data, 12000 Hz sample rate
|
||||
! k pointer to the most recent new data
|
||||
|
||||
! Output (in common/c0com)
|
||||
! c0 complex data downsampled to 1500 Hz
|
||||
|
||||
parameter (NMAX=120*12000) !Total sample intervals per 30 minutes
|
||||
parameter (NDMAX=120*1500) !Sample intervals at 1500 Hz rate
|
||||
parameter (NSMAX=1366) !Max length of saved spectra
|
||||
parameter (NFFT1=1024)
|
||||
parameter (MAXFFT3=32768)
|
||||
real*4 w3(MAXFFT3)
|
||||
real*4 x0(NFFT1)
|
||||
real*4 x2(NFFT1+105)
|
||||
real*4 ssum(NSMAX)
|
||||
integer*2 id2(NMAX)
|
||||
complex c0
|
||||
common/c0com/c0(NDMAX)
|
||||
data rms/999.0/,k0/99999999/,nfft3z/0/,nsps/8192/,nbfo/1500/
|
||||
save
|
||||
|
||||
nfft3=nsps/4
|
||||
jstep=nsps/16
|
||||
if(k.gt.NMAX) go to 999
|
||||
if(k.lt.nfft3) go to 999 !Wait for enough samples to start
|
||||
if(nfft3.ne.nfft3z) then
|
||||
pi=4.0*atan(1.0)
|
||||
do i=1,nfft3
|
||||
w3(i)=2.0*(sin(i*pi/nfft3))**2 !Window for nfft3
|
||||
enddo
|
||||
nfft3z=nfft3
|
||||
endif
|
||||
|
||||
if(k.lt.k0) then
|
||||
ja=0
|
||||
ssum=0.
|
||||
k1=0
|
||||
k8=0
|
||||
x2=0.
|
||||
! if(ndiskdat.eq.0) then
|
||||
! id2(k+1:)=0
|
||||
! c0=0. !This is necessary to prevent "ghosts". Not sure why.
|
||||
! endif
|
||||
endif
|
||||
k0=k
|
||||
|
||||
nzap=0
|
||||
nbslider=0
|
||||
sigmas=1.0*(10.0**(0.01*nbslider)) + 0.7
|
||||
peaklimit=sigmas*max(10.0,rms)
|
||||
px=0.
|
||||
|
||||
nwindow=2
|
||||
kstep1=NFFT1
|
||||
if(nwindow.ne.0) kstep1=NFFT1/2
|
||||
fac=2.0/NFFT1
|
||||
nblks=(k-k1)/kstep1
|
||||
gain=1.0
|
||||
nb=0
|
||||
do nblk=1,nblks
|
||||
do i=1,NFFT1
|
||||
x0(i)=gain*id2(k1+i)
|
||||
enddo
|
||||
! call timf2(x0,k,NFFT1,nwindow,nb,peaklimit,x1, &
|
||||
! slimit,lstrong,px,nzap)
|
||||
! Mix at nbfo Hz, lowpass at +/-750 Hz, and downsample to 1500 Hz complex.
|
||||
call mixlpf(x0,nbfo,c0(k8+1))
|
||||
k1=k1+kstep1
|
||||
k8=k8+kstep1/8
|
||||
enddo
|
||||
|
||||
999 return
|
||||
end subroutine wspr_downsample
|
||||
@@ -0,0 +1,90 @@
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Bill Kempf 2001.
|
||||
// (C) Copyright Aleksey Gurtovoy 2003.
|
||||
// (C) Copyright Rene Rivera 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// Win32 specific config options:
|
||||
|
||||
#define BOOST_PLATFORM "Win32"
|
||||
|
||||
// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION.
|
||||
#if defined(__MINGW32__)
|
||||
# include <_mingw.h>
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF)
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#endif
|
||||
|
||||
// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT
|
||||
// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport),
|
||||
// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and
|
||||
// BOOST_SYMBOL_IMPORT
|
||||
#ifndef BOOST_SYMBOL_EXPORT
|
||||
# define BOOST_HAS_DECLSPEC
|
||||
# define BOOST_SYMBOL_EXPORT __declspec(dllexport)
|
||||
# define BOOST_SYMBOL_IMPORT __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0)))
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# ifndef __STDC_LIMIT_MACROS
|
||||
# define __STDC_LIMIT_MACROS
|
||||
# endif
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__) && (__GNUC__ >= 4)
|
||||
// Mingw has these functions but there are persistent problems
|
||||
// with calls to these crashing, so disable for now:
|
||||
//# define BOOST_HAS_EXPM1
|
||||
//# define BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
#endif
|
||||
//
|
||||
// Win32 will normally be using native Win32 threads,
|
||||
// but there is a pthread library avaliable as an option,
|
||||
// we used to disable this when BOOST_DISABLE_WIN32 was
|
||||
// defined but no longer - this should allow some
|
||||
// files to be compiled in strict mode - while maintaining
|
||||
// a consistent setting of BOOST_HAS_THREADS across
|
||||
// all translation units (needed for shared_ptr etc).
|
||||
//
|
||||
|
||||
#ifndef BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_WINTHREADS
|
||||
#endif
|
||||
|
||||
//
|
||||
// WinCE configuration:
|
||||
//
|
||||
#if defined(_WIN32_WCE) || defined(UNDER_CE)
|
||||
# define BOOST_NO_ANSI_APIS
|
||||
// Windows CE does not have a conforming signature for swprintf
|
||||
# define BOOST_NO_SWPRINTF
|
||||
#else
|
||||
# define BOOST_HAS_GETSYSTEMTIMEASFILETIME
|
||||
# define BOOST_HAS_THREADEX
|
||||
# define BOOST_HAS_GETSYSTEMTIMEASFILETIME
|
||||
#endif
|
||||
|
||||
//
|
||||
// Windows Runtime
|
||||
//
|
||||
#if defined(WINAPI_FAMILY) && \
|
||||
(WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
# define BOOST_NO_ANSI_APIS
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_DISABLE_WIN32
|
||||
// WEK: Added
|
||||
#define BOOST_HAS_FTIME
|
||||
#define BOOST_WINDOWS 1
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,340 @@
|
||||
// Copyright (C) 2007 Trustees of Indiana University
|
||||
|
||||
// Authors: Douglas Gregor
|
||||
// Andrew Lumsdaine
|
||||
|
||||
// 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)
|
||||
|
||||
/** @file group.hpp
|
||||
*
|
||||
* This header defines the @c group class, which allows one to
|
||||
* manipulate and query groups of processes.
|
||||
*/
|
||||
#ifndef BOOST_MPI_GROUP_HPP
|
||||
#define BOOST_MPI_GROUP_HPP
|
||||
|
||||
#include <boost/mpi/exception.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace mpi {
|
||||
|
||||
/**
|
||||
* @brief A @c group is a representation of a subset of the processes
|
||||
* within a @c communicator.
|
||||
*
|
||||
* The @c group class allows one to create arbitrary subsets of the
|
||||
* processes within a communicator. One can compute the union,
|
||||
* intersection, or difference of two groups, or create new groups by
|
||||
* specifically including or excluding certain processes. Given a
|
||||
* group, one can create a new communicator containing only the
|
||||
* processes in that group.
|
||||
*/
|
||||
class BOOST_MPI_DECL group
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructs an empty group.
|
||||
*/
|
||||
group() : group_ptr() { }
|
||||
|
||||
/**
|
||||
* @brief Constructs a group from an @c MPI_Group.
|
||||
*
|
||||
* This routine allows one to construct a Boost.MPI @c group from a
|
||||
* C @c MPI_Group. The @c group object can (optionally) adopt the @c
|
||||
* MPI_Group, after which point the @c group object becomes
|
||||
* responsible for freeing the @c MPI_Group when the last copy of @c
|
||||
* group disappears.
|
||||
*
|
||||
* @param in_group The @c MPI_Group used to construct this @c group.
|
||||
*
|
||||
* @param adopt Whether the @c group should adopt the @c
|
||||
* MPI_Group. When true, the @c group object (or one of its copies)
|
||||
* will free the group (via @c MPI_Comm_free) when the last copy is
|
||||
* destroyed. Otherwise, the user is responsible for calling @c
|
||||
* MPI_Group_free.
|
||||
*/
|
||||
group(const MPI_Group& in_group, bool adopt);
|
||||
|
||||
/**
|
||||
* @brief Determine the rank of the calling process in the group.
|
||||
*
|
||||
* This routine is equivalent to @c MPI_Group_rank.
|
||||
*
|
||||
* @returns The rank of the calling process in the group, which will
|
||||
* be a value in [0, size()). If the calling process is not in the
|
||||
* group, returns an empty value.
|
||||
*/
|
||||
optional<int> rank() const;
|
||||
|
||||
/**
|
||||
* @brief Determine the number of processes in the group.
|
||||
*
|
||||
* This routine is equivalent to @c MPI_Group_size.
|
||||
*
|
||||
* @returns The number of processes in the group.
|
||||
*/
|
||||
int size() const;
|
||||
|
||||
/**
|
||||
* @brief Translates the ranks from one group into the ranks of the
|
||||
* same processes in another group.
|
||||
*
|
||||
* This routine translates each of the integer rank values in the
|
||||
* iterator range @c [first, last) from the current group into rank
|
||||
* values of the corresponding processes in @p to_group. The
|
||||
* corresponding rank values are written via the output iterator @c
|
||||
* out. When there is no correspondence between a rank in the
|
||||
* current group and a rank in @c to_group, the value @c
|
||||
* MPI_UNDEFINED is written to the output iterator.
|
||||
*
|
||||
* @param first Beginning of the iterator range of ranks in the
|
||||
* current group.
|
||||
*
|
||||
* @param last Past the end of the iterator range of ranks in the
|
||||
* current group.
|
||||
*
|
||||
* @param to_group The group that we are translating ranks to.
|
||||
*
|
||||
* @param out The output iterator to which the translated ranks will
|
||||
* be written.
|
||||
*
|
||||
* @returns the output iterator, which points one step past the last
|
||||
* rank written.
|
||||
*/
|
||||
template<typename InputIterator, typename OutputIterator>
|
||||
OutputIterator translate_ranks(InputIterator first, InputIterator last,
|
||||
const group& to_group, OutputIterator out);
|
||||
|
||||
/**
|
||||
* @brief Determines whether the group is non-empty.
|
||||
*
|
||||
* @returns True if the group is not empty, false if it is empty.
|
||||
*/
|
||||
operator bool() const { return (bool)group_ptr; }
|
||||
|
||||
/**
|
||||
* @brief Retrieves the underlying @c MPI_Group associated with this
|
||||
* group.
|
||||
*
|
||||
* @returns The @c MPI_Group handle manipulated by this object. If
|
||||
* this object represents the empty group, returns @c
|
||||
* MPI_GROUP_EMPTY.
|
||||
*/
|
||||
operator MPI_Group() const
|
||||
{
|
||||
if (group_ptr)
|
||||
return *group_ptr;
|
||||
else
|
||||
return MPI_GROUP_EMPTY;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Creates a new group including a subset of the processes
|
||||
* in the current group.
|
||||
*
|
||||
* This routine creates a new @c group which includes only those
|
||||
* processes in the current group that are listed in the integer
|
||||
* iterator range @c [first, last). Equivalent to @c
|
||||
* MPI_Group_incl.
|
||||
*
|
||||
* @c first The beginning of the iterator range of ranks to include.
|
||||
*
|
||||
* @c last Past the end of the iterator range of ranks to include.
|
||||
*
|
||||
* @returns A new group containing those processes with ranks @c
|
||||
* [first, last) in the current group.
|
||||
*/
|
||||
template<typename InputIterator>
|
||||
group include(InputIterator first, InputIterator last);
|
||||
|
||||
/**
|
||||
* @brief Creates a new group from all of the processes in the
|
||||
* current group, exluding a specific subset of the processes.
|
||||
*
|
||||
* This routine creates a new @c group which includes all of the
|
||||
* processes in the current group except those whose ranks are
|
||||
* listed in the integer iterator range @c [first,
|
||||
* last). Equivalent to @c MPI_Group_excl.
|
||||
*
|
||||
* @c first The beginning of the iterator range of ranks to exclude.
|
||||
*
|
||||
* @c last Past the end of the iterator range of ranks to exclude.
|
||||
*
|
||||
* @returns A new group containing all of the processes in the
|
||||
* current group except those processes with ranks @c [first, last)
|
||||
* in the current group.
|
||||
*/
|
||||
template<typename InputIterator>
|
||||
group exclude(InputIterator first, InputIterator last);
|
||||
|
||||
|
||||
protected:
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* Function object that frees an MPI group and deletes the
|
||||
* memory associated with it. Intended to be used as a deleter with
|
||||
* shared_ptr.
|
||||
*/
|
||||
struct group_free
|
||||
{
|
||||
void operator()(MPI_Group* comm) const
|
||||
{
|
||||
int finalized;
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Finalized, (&finalized));
|
||||
if (!finalized)
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Group_free, (comm));
|
||||
delete comm;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The underlying MPI group. This is a shared pointer, so the actual
|
||||
* MPI group which will be shared among all related instances of the
|
||||
* @c group class. When there are no more such instances, the group
|
||||
* will be automatically freed.
|
||||
*/
|
||||
shared_ptr<MPI_Group> group_ptr;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Determines whether two process groups are identical.
|
||||
*
|
||||
* Equivalent to calling @c MPI_Group_compare and checking whether the
|
||||
* result is @c MPI_IDENT.
|
||||
*
|
||||
* @returns True when the two process groups contain the same
|
||||
* processes in the same order.
|
||||
*/
|
||||
BOOST_MPI_DECL bool operator==(const group& g1, const group& g2);
|
||||
|
||||
/**
|
||||
* @brief Determines whether two process groups are not identical.
|
||||
*
|
||||
* Equivalent to calling @c MPI_Group_compare and checking whether the
|
||||
* result is not @c MPI_IDENT.
|
||||
*
|
||||
* @returns False when the two process groups contain the same
|
||||
* processes in the same order.
|
||||
*/
|
||||
inline bool operator!=(const group& g1, const group& g2)
|
||||
{
|
||||
return !(g1 == g2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Computes the union of two process groups.
|
||||
*
|
||||
* This routine returns a new @c group that contains all processes
|
||||
* that are either in group @c g1 or in group @c g2 (or both). The
|
||||
* processes that are in @c g1 will be first in the resulting group,
|
||||
* followed by the processes from @c g2 (but not also in @c
|
||||
* g1). Equivalent to @c MPI_Group_union.
|
||||
*/
|
||||
BOOST_MPI_DECL group operator|(const group& g1, const group& g2);
|
||||
|
||||
/**
|
||||
* @brief Computes the intersection of two process groups.
|
||||
*
|
||||
* This routine returns a new @c group that contains all processes
|
||||
* that are in group @c g1 and in group @c g2, ordered in the same way
|
||||
* as @c g1. Equivalent to @c MPI_Group_intersection.
|
||||
*/
|
||||
BOOST_MPI_DECL group operator&(const group& g1, const group& g2);
|
||||
|
||||
/**
|
||||
* @brief Computes the difference between two process groups.
|
||||
*
|
||||
* This routine returns a new @c group that contains all processes
|
||||
* that are in group @c g1 but not in group @c g2, ordered in the same way
|
||||
* as @c g1. Equivalent to @c MPI_Group_difference.
|
||||
*/
|
||||
BOOST_MPI_DECL group operator-(const group& g1, const group& g2);
|
||||
|
||||
/************************************************************************
|
||||
* Implementation details *
|
||||
************************************************************************/
|
||||
template<typename InputIterator, typename OutputIterator>
|
||||
OutputIterator
|
||||
group::translate_ranks(InputIterator first, InputIterator last,
|
||||
const group& to_group, OutputIterator out)
|
||||
{
|
||||
std::vector<int> in_array(first, last);
|
||||
if (in_array.empty())
|
||||
return out;
|
||||
|
||||
std::vector<int> out_array(in_array.size());
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Group_translate_ranks,
|
||||
((MPI_Group)*this,
|
||||
in_array.size(),
|
||||
&in_array[0],
|
||||
(MPI_Group)to_group,
|
||||
&out_array[0]));
|
||||
|
||||
for (std::vector<int>::size_type i = 0, n = out_array.size(); i < n; ++i)
|
||||
*out++ = out_array[i];
|
||||
return out;
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* Specialization of translate_ranks that handles the one case where
|
||||
* we can avoid any memory allocation or copying.
|
||||
*/
|
||||
template<>
|
||||
BOOST_MPI_DECL int*
|
||||
group::translate_ranks(int* first, int* last, const group& to_group, int* out);
|
||||
|
||||
template<typename InputIterator>
|
||||
group group::include(InputIterator first, InputIterator last)
|
||||
{
|
||||
if (first == last)
|
||||
return group();
|
||||
|
||||
std::vector<int> ranks(first, last);
|
||||
MPI_Group result;
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Group_incl,
|
||||
((MPI_Group)*this, ranks.size(), &ranks[0], &result));
|
||||
return group(result, /*adopt=*/true);
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* Specialization of group::include that handles the one case where we
|
||||
* can avoid any memory allocation or copying before creating the
|
||||
* group.
|
||||
*/
|
||||
template<> BOOST_MPI_DECL group group::include(int* first, int* last);
|
||||
|
||||
template<typename InputIterator>
|
||||
group group::exclude(InputIterator first, InputIterator last)
|
||||
{
|
||||
if (first == last)
|
||||
return group();
|
||||
|
||||
std::vector<int> ranks(first, last);
|
||||
MPI_Group result;
|
||||
BOOST_MPI_CHECK_RESULT(MPI_Group_excl,
|
||||
((MPI_Group)*this, ranks.size(), &ranks[0], &result));
|
||||
return group(result, /*adopt=*/true);
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* Specialization of group::exclude that handles the one case where we
|
||||
* can avoid any memory allocation or copying before creating the
|
||||
* group.
|
||||
*/
|
||||
template<> BOOST_MPI_DECL group group::exclude(int* first, int* last);
|
||||
|
||||
} } // end namespace boost::mpi
|
||||
|
||||
#endif // BOOST_MPI_GROUP_HPP
|
||||
Binary file not shown.
Reference in New Issue
Block a user