Initial Commit
This commit is contained in:
@@ -0,0 +1,125 @@
|
||||
// Copyright 2002 The Trustees of Indiana University.
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Boost.MultiArray Library
|
||||
// Authors: Ronald Garcia
|
||||
// Jeremy Siek
|
||||
// Andrew Lumsdaine
|
||||
// See http://www.boost.org/libs/multi_array for documentation.
|
||||
|
||||
#ifndef BOOST_STORAGE_ORDER_RG071801_HPP
|
||||
#define BOOST_STORAGE_ORDER_RG071801_HPP
|
||||
|
||||
#include "boost/multi_array/types.hpp"
|
||||
#include "boost/array.hpp"
|
||||
#include "boost/multi_array/algorithm.hpp"
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <numeric>
|
||||
#include <vector>
|
||||
|
||||
namespace boost {
|
||||
|
||||
// RG - This is to make things work with VC++. So sad, so sad.
|
||||
class c_storage_order;
|
||||
class fortran_storage_order;
|
||||
|
||||
template <std::size_t NumDims>
|
||||
class general_storage_order
|
||||
{
|
||||
public:
|
||||
typedef detail::multi_array::size_type size_type;
|
||||
template <typename OrderingIter, typename AscendingIter>
|
||||
general_storage_order(OrderingIter ordering,
|
||||
AscendingIter ascending) {
|
||||
boost::detail::multi_array::copy_n(ordering,NumDims,ordering_.begin());
|
||||
boost::detail::multi_array::copy_n(ascending,NumDims,ascending_.begin());
|
||||
}
|
||||
|
||||
// RG - ideally these would not be necessary, but some compilers
|
||||
// don't like template conversion operators. I suspect that not
|
||||
// too many folk will feel the need to use customized
|
||||
// storage_order objects, I sacrifice that feature for compiler support.
|
||||
general_storage_order(const c_storage_order&) {
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering_[i] = NumDims - 1 - i;
|
||||
}
|
||||
ascending_.assign(true);
|
||||
}
|
||||
|
||||
general_storage_order(const fortran_storage_order&) {
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering_[i] = i;
|
||||
}
|
||||
ascending_.assign(true);
|
||||
}
|
||||
|
||||
size_type ordering(size_type dim) const { return ordering_[dim]; }
|
||||
bool ascending(size_type dim) const { return ascending_[dim]; }
|
||||
|
||||
bool all_dims_ascending() const {
|
||||
return std::accumulate(ascending_.begin(),ascending_.end(),true,
|
||||
std::logical_and<bool>());
|
||||
}
|
||||
|
||||
bool operator==(general_storage_order const& rhs) const {
|
||||
return (ordering_ == rhs.ordering_) &&
|
||||
(ascending_ == rhs.ascending_);
|
||||
}
|
||||
|
||||
protected:
|
||||
boost::array<size_type,NumDims> ordering_;
|
||||
boost::array<bool,NumDims> ascending_;
|
||||
};
|
||||
|
||||
class c_storage_order
|
||||
{
|
||||
typedef detail::multi_array::size_type size_type;
|
||||
public:
|
||||
// This is the idiom for creating your own custom storage orders.
|
||||
// Not supported by all compilers though!
|
||||
#ifndef __MWERKS__ // Metrowerks screams "ambiguity!"
|
||||
template <std::size_t NumDims>
|
||||
operator general_storage_order<NumDims>() const {
|
||||
boost::array<size_type,NumDims> ordering;
|
||||
boost::array<bool,NumDims> ascending;
|
||||
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering[i] = NumDims - 1 - i;
|
||||
ascending[i] = true;
|
||||
}
|
||||
return general_storage_order<NumDims>(ordering.begin(),
|
||||
ascending.begin());
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
class fortran_storage_order
|
||||
{
|
||||
typedef detail::multi_array::size_type size_type;
|
||||
public:
|
||||
// This is the idiom for creating your own custom storage orders.
|
||||
// Not supported by all compilers though!
|
||||
#ifndef __MWERKS__ // Metrowerks screams "ambiguity!"
|
||||
template <std::size_t NumDims>
|
||||
operator general_storage_order<NumDims>() const {
|
||||
boost::array<size_type,NumDims> ordering;
|
||||
boost::array<bool,NumDims> ascending;
|
||||
|
||||
for (size_type i=0; i != NumDims; ++i) {
|
||||
ordering[i] = i;
|
||||
ascending[i] = true;
|
||||
}
|
||||
return general_storage_order<NumDims>(ordering.begin(),
|
||||
ascending.begin());
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ARRAY_STORAGE_RG071801_HPP
|
||||
@@ -0,0 +1,97 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_SERIAL_MERGE_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_SERIAL_MERGE_HPP
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class InputIterator1,
|
||||
class InputIterator2,
|
||||
class OutputIterator,
|
||||
class Compare>
|
||||
inline OutputIterator serial_merge(InputIterator1 first1,
|
||||
InputIterator1 last1,
|
||||
InputIterator2 first2,
|
||||
InputIterator2 last2,
|
||||
OutputIterator result,
|
||||
Compare comp,
|
||||
command_queue &queue)
|
||||
{
|
||||
typedef typename
|
||||
std::iterator_traits<InputIterator1>::value_type
|
||||
input_type1;
|
||||
typedef typename
|
||||
std::iterator_traits<InputIterator2>::value_type
|
||||
input_type2;
|
||||
typedef typename
|
||||
std::iterator_traits<OutputIterator>::difference_type
|
||||
result_difference_type;
|
||||
|
||||
std::ptrdiff_t size1 = std::distance(first1, last1);
|
||||
std::ptrdiff_t size2 = std::distance(first2, last2);
|
||||
|
||||
meta_kernel k("serial_merge");
|
||||
k.add_set_arg<uint_>("size1", static_cast<uint_>(size1));
|
||||
k.add_set_arg<uint_>("size2", static_cast<uint_>(size2));
|
||||
|
||||
k <<
|
||||
"uint i = 0;\n" << // index in result range
|
||||
"uint j = 0;\n" << // index in first input range
|
||||
"uint k = 0;\n" << // index in second input range
|
||||
|
||||
// fetch initial values from each range
|
||||
k.decl<input_type1>("j_value") << " = " << first1[0] << ";\n" <<
|
||||
k.decl<input_type2>("k_value") << " = " << first2[0] << ";\n" <<
|
||||
|
||||
// merge values from both input ranges to the result range
|
||||
"while(j < size1 && k < size2){\n" <<
|
||||
" if(" << comp(k.var<input_type1>("j_value"),
|
||||
k.var<input_type2>("k_value")) << "){\n" <<
|
||||
" " << result[k.var<uint_>("i++")] << " = j_value;\n" <<
|
||||
" j_value = " << first1[k.var<uint_>("++j")] << ";\n" <<
|
||||
" }\n" <<
|
||||
" else{\n"
|
||||
" " << result[k.var<uint_>("i++")] << " = k_value;\n"
|
||||
" k_value = " << first2[k.var<uint_>("++k")] << ";\n" <<
|
||||
" }\n"
|
||||
"}\n"
|
||||
|
||||
// copy any remaining values from first range
|
||||
"while(j < size1){\n" <<
|
||||
result[k.var<uint_>("i++")] << " = " <<
|
||||
first1[k.var<uint_>("j++")] << ";\n" <<
|
||||
"}\n"
|
||||
|
||||
// copy any remaining values from second range
|
||||
"while(k < size2){\n" <<
|
||||
result[k.var<uint_>("i++")] << " = " <<
|
||||
first2[k.var<uint_>("k++")] << ";\n" <<
|
||||
"}\n";
|
||||
|
||||
// run kernel
|
||||
k.exec(queue);
|
||||
|
||||
return result + static_cast<result_difference_type>(size1 + size2);
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_SERIAL_MERGE_HPP
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
#ifndef BOOST_MPL_CONTAINS_HPP_INCLUDED
|
||||
#define BOOST_MPL_CONTAINS_HPP_INCLUDED
|
||||
|
||||
// Copyright Eric Friedman 2002
|
||||
// Copyright Aleksey Gurtovoy 2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/contains_fwd.hpp>
|
||||
#include <boost/mpl/sequence_tag.hpp>
|
||||
#include <boost/mpl/aux_/contains_impl.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(T)
|
||||
>
|
||||
struct contains
|
||||
: contains_impl< typename sequence_tag<Sequence>::type >
|
||||
::template apply< Sequence,T >
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,contains,(Sequence,T))
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, contains)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_CONTAINS_HPP_INCLUDED
|
||||
@@ -0,0 +1,132 @@
|
||||
#include "Detector.hpp"
|
||||
#include <QDateTime>
|
||||
#include <QtAlgorithms>
|
||||
#include <QDebug>
|
||||
#include "commons.h"
|
||||
|
||||
#include "moc_Detector.cpp"
|
||||
|
||||
extern "C" {
|
||||
void fil4_(qint16*, qint32*, qint16*, qint32*);
|
||||
}
|
||||
|
||||
Detector::Detector (unsigned frameRate, unsigned periodLengthInSeconds,
|
||||
unsigned downSampleFactor, QObject * parent)
|
||||
: AudioDevice (parent)
|
||||
, m_frameRate (frameRate)
|
||||
, m_period (periodLengthInSeconds)
|
||||
, m_downSampleFactor (downSampleFactor)
|
||||
, m_samplesPerFFT {max_buffer_size}
|
||||
, m_ns (999)
|
||||
, m_buffer ((downSampleFactor > 1) ?
|
||||
new short [max_buffer_size * downSampleFactor] : nullptr)
|
||||
, m_bufferPos (0)
|
||||
{
|
||||
(void)m_frameRate; // quell compiler warning
|
||||
clear ();
|
||||
}
|
||||
|
||||
void Detector::setBlockSize (unsigned n)
|
||||
{
|
||||
m_samplesPerFFT = n;
|
||||
}
|
||||
|
||||
bool Detector::reset ()
|
||||
{
|
||||
clear ();
|
||||
// don't call base call reset because it calls seek(0) which causes
|
||||
// a warning
|
||||
return isOpen ();
|
||||
}
|
||||
|
||||
void Detector::clear ()
|
||||
{
|
||||
// set index to roughly where we are in time (1ms resolution)
|
||||
// qint64 now (QDateTime::currentMSecsSinceEpoch ());
|
||||
// unsigned msInPeriod ((now % 86400000LL) % (m_period * 1000));
|
||||
// dec_data.params.kin = qMin ((msInPeriod * m_frameRate) / 1000, static_cast<unsigned> (sizeof (dec_data.d2) / sizeof (dec_data.d2[0])));
|
||||
dec_data.params.kin = 0;
|
||||
m_bufferPos = 0;
|
||||
|
||||
// fill buffer with zeros (G4WJS commented out because it might cause decoder hangs)
|
||||
// qFill (dec_data.d2, dec_data.d2 + sizeof (dec_data.d2) / sizeof (dec_data.d2[0]), 0);
|
||||
}
|
||||
|
||||
qint64 Detector::writeData (char const * data, qint64 maxSize)
|
||||
{
|
||||
int ns=secondInPeriod();
|
||||
if(ns < m_ns) { // When ns has wrapped around to zero, restart the buffers
|
||||
dec_data.params.kin = 0;
|
||||
m_bufferPos = 0;
|
||||
}
|
||||
m_ns=ns;
|
||||
|
||||
// no torn frames
|
||||
Q_ASSERT (!(maxSize % static_cast<qint64> (bytesPerFrame ())));
|
||||
// these are in terms of input frames (not down sampled)
|
||||
size_t framesAcceptable ((sizeof (dec_data.d2) /
|
||||
sizeof (dec_data.d2[0]) - dec_data.params.kin) * m_downSampleFactor);
|
||||
size_t framesAccepted (qMin (static_cast<size_t> (maxSize /
|
||||
bytesPerFrame ()), framesAcceptable));
|
||||
|
||||
if (framesAccepted < static_cast<size_t> (maxSize / bytesPerFrame ())) {
|
||||
qDebug () << "dropped " << maxSize / bytesPerFrame () - framesAccepted
|
||||
<< " frames of data on the floor!"
|
||||
<< dec_data.params.kin << ns;
|
||||
}
|
||||
|
||||
for (unsigned remaining = framesAccepted; remaining; ) {
|
||||
size_t numFramesProcessed (qMin (m_samplesPerFFT *
|
||||
m_downSampleFactor - m_bufferPos, remaining));
|
||||
|
||||
if(m_downSampleFactor > 1) {
|
||||
store (&data[(framesAccepted - remaining) * bytesPerFrame ()],
|
||||
numFramesProcessed, &m_buffer[m_bufferPos]);
|
||||
m_bufferPos += numFramesProcessed;
|
||||
|
||||
if(m_bufferPos==m_samplesPerFFT*m_downSampleFactor) {
|
||||
qint32 framesToProcess (m_samplesPerFFT * m_downSampleFactor);
|
||||
qint32 framesAfterDownSample (m_samplesPerFFT);
|
||||
if(m_downSampleFactor > 1 && dec_data.params.kin>=0 &&
|
||||
dec_data.params.kin < (NTMAX*12000 - framesAfterDownSample)) {
|
||||
fil4_(&m_buffer[0], &framesToProcess, &dec_data.d2[dec_data.params.kin],
|
||||
&framesAfterDownSample);
|
||||
dec_data.params.kin += framesAfterDownSample;
|
||||
} else {
|
||||
// qDebug() << "framesToProcess = " << framesToProcess;
|
||||
// qDebug() << "dec_data.params.kin = " << dec_data.params.kin;
|
||||
// qDebug() << "secondInPeriod = " << secondInPeriod();
|
||||
// qDebug() << "framesAfterDownSample" << framesAfterDownSample;
|
||||
}
|
||||
Q_EMIT framesWritten (dec_data.params.kin);
|
||||
m_bufferPos = 0;
|
||||
}
|
||||
|
||||
} else {
|
||||
store (&data[(framesAccepted - remaining) * bytesPerFrame ()],
|
||||
numFramesProcessed, &dec_data.d2[dec_data.params.kin]);
|
||||
m_bufferPos += numFramesProcessed;
|
||||
dec_data.params.kin += numFramesProcessed;
|
||||
if (m_bufferPos == static_cast<unsigned> (m_samplesPerFFT)) {
|
||||
Q_EMIT framesWritten (dec_data.params.kin);
|
||||
m_bufferPos = 0;
|
||||
}
|
||||
}
|
||||
remaining -= numFramesProcessed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return maxSize; // we drop any data past the end of the buffer on
|
||||
// the floor until the next period starts
|
||||
}
|
||||
|
||||
unsigned Detector::secondInPeriod () const
|
||||
{
|
||||
// we take the time of the data as the following assuming no latency
|
||||
// delivering it to us (not true but close enough for us)
|
||||
qint64 now (QDateTime::currentMSecsSinceEpoch ());
|
||||
|
||||
unsigned secondInToday ((now % 86400000LL) / 1000);
|
||||
return secondInToday % m_period;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
// Copyright Neil Groves 2009. 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_ALGORITHM_FIND_END_HPP_INCLUDED
|
||||
#define BOOST_RANGE_ALGORITHM_FIND_END_HPP_INCLUDED
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/detail/range_return.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range
|
||||
{
|
||||
|
||||
/// \brief template function find_end
|
||||
///
|
||||
/// range-based version of the find_end std algorithm
|
||||
///
|
||||
/// \pre ForwardRange1 is a model of the ForwardRangeConcept
|
||||
/// \pre ForwardRange2 is a model of the ForwardRangeConcept
|
||||
/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
|
||||
template< class ForwardRange1, class ForwardRange2 >
|
||||
inline BOOST_DEDUCED_TYPENAME disable_if<
|
||||
is_const<ForwardRange1>,
|
||||
BOOST_DEDUCED_TYPENAME range_iterator< ForwardRange1 >::type
|
||||
>::type
|
||||
find_end(ForwardRange1 & rng1, const ForwardRange2& rng2)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return std::find_end(boost::begin(rng1),boost::end(rng1),
|
||||
boost::begin(rng2),boost::end(rng2));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< class ForwardRange1, class ForwardRange2 >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator< const ForwardRange1 >::type
|
||||
find_end(const ForwardRange1 & rng1, const ForwardRange2& rng2)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return std::find_end(boost::begin(rng1),boost::end(rng1),
|
||||
boost::begin(rng2),boost::end(rng2));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME disable_if<
|
||||
is_const<ForwardRange1>,
|
||||
BOOST_DEDUCED_TYPENAME range_iterator<ForwardRange1>::type
|
||||
>::type
|
||||
find_end(ForwardRange1 & rng1, const ForwardRange2& rng2, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return std::find_end(boost::begin(rng1),boost::end(rng1),
|
||||
boost::begin(rng2),boost::end(rng2),pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< class ForwardRange1, class ForwardRange2, class BinaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME range_iterator<const ForwardRange1>::type
|
||||
find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return std::find_end(boost::begin(rng1),boost::end(rng1),
|
||||
boost::begin(rng2),boost::end(rng2),pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, class ForwardRange1, class ForwardRange2 >
|
||||
inline BOOST_DEDUCED_TYPENAME disable_if<
|
||||
is_const<ForwardRange1>,
|
||||
BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
|
||||
>::type
|
||||
find_end(ForwardRange1& rng1, const ForwardRange2& rng2)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return range_return<ForwardRange1,re>::
|
||||
pack(std::find_end(boost::begin(rng1), boost::end(rng1),
|
||||
boost::begin(rng2), boost::end(rng2)),
|
||||
rng1);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, class ForwardRange1, class ForwardRange2 >
|
||||
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
|
||||
find_end(const ForwardRange1& rng1, const ForwardRange2& rng2)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return range_return<const ForwardRange1,re>::
|
||||
pack(std::find_end(boost::begin(rng1), boost::end(rng1),
|
||||
boost::begin(rng2), boost::end(rng2)),
|
||||
rng1);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, class ForwardRange1, class ForwardRange2,
|
||||
class BinaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME disable_if<
|
||||
is_const<ForwardRange1>,
|
||||
BOOST_DEDUCED_TYPENAME range_return<ForwardRange1,re>::type
|
||||
>::type
|
||||
find_end(ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return range_return<ForwardRange1,re>::
|
||||
pack(std::find_end(boost::begin(rng1), boost::end(rng1),
|
||||
boost::begin(rng2), boost::end(rng2), pred),
|
||||
rng1);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, class ForwardRange1, class ForwardRange2,
|
||||
class BinaryPredicate >
|
||||
inline BOOST_DEDUCED_TYPENAME range_return<const ForwardRange1,re>::type
|
||||
find_end(const ForwardRange1& rng1, const ForwardRange2& rng2, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange1> ));
|
||||
BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange2> ));
|
||||
|
||||
return range_return<const ForwardRange1,re>::
|
||||
pack(std::find_end(boost::begin(rng1), boost::end(rng1),
|
||||
boost::begin(rng2), boost::end(rng2), pred),
|
||||
rng1);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::find_end;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,166 @@
|
||||
subroutine hint65(s3,mrs,mrs2,nadd,nflip,mycall,hiscall,hisgrid,qual,decoded)
|
||||
|
||||
use packjt
|
||||
use prog_args
|
||||
parameter (MAXCALLS=10000,MAXRPT=63)
|
||||
parameter (MAXMSG=2*MAXCALLS + 2 + MAXRPT)
|
||||
real s3(64,63)
|
||||
integer*1 sym1(0:62,MAXMSG)
|
||||
integer*1 sym2(0:62,MAXMSG)
|
||||
integer mrs(63),mrs2(63)
|
||||
integer dgen(12),sym(0:62),sym_rev(0:62)
|
||||
character*6 mycall,hiscall,hisgrid,call2(MAXCALLS)
|
||||
character*4 grid2(MAXCALLS),rpt(MAXRPT)
|
||||
character callsign*12,grid*4
|
||||
character*180 line
|
||||
character ceme*3,msg*22,msg00*22
|
||||
character*22 msg0(MAXMSG),decoded
|
||||
logical*1 eme(MAXCALLS)
|
||||
logical first
|
||||
data first/.true./
|
||||
data rpt/'-01','-02','-03','-04','-05', &
|
||||
'-06','-07','-08','-09','-10', &
|
||||
'-11','-12','-13','-14','-15', &
|
||||
'-16','-17','-18','-19','-20', &
|
||||
'-21','-22','-23','-24','-25', &
|
||||
'-26','-27','-28','-29','-30', &
|
||||
'R-01','R-02','R-03','R-04','R-05', &
|
||||
'R-06','R-07','R-08','R-09','R-10', &
|
||||
'R-11','R-12','R-13','R-14','R-15', &
|
||||
'R-16','R-17','R-18','R-19','R-20', &
|
||||
'R-21','R-22','R-23','R-24','R-25', &
|
||||
'R-26','R-27','R-28','R-29','R-30', &
|
||||
'RO','RRR','73'/
|
||||
save first,sym1,nused,msg0,sym2
|
||||
|
||||
first=.true. !### For now, at least: always recompute hypothetical messages
|
||||
if(first) then
|
||||
neme=0
|
||||
open(23,file=trim(data_dir)//'/CALL3.TXT',status='unknown')
|
||||
icall=0
|
||||
j=0
|
||||
do i=1,MAXCALLS
|
||||
read(23,1002,end=10) line
|
||||
1002 format(a80)
|
||||
if(line(1:4).eq.'ZZZZ') cycle
|
||||
if(line(1:2).eq.'//') cycle
|
||||
i1=index(line,',')
|
||||
if(i1.lt.4) cycle
|
||||
i2=index(line(i1+1:),',')
|
||||
if(i2.lt.5) cycle
|
||||
i2=i2+i1
|
||||
i3=index(line(i2+1:),',')
|
||||
if(i3.lt.1) i3=index(line(i2+1:),' ')
|
||||
i3=i2+i3
|
||||
callsign=line(1:i1-1)
|
||||
grid=line(i1+1:i1+4)
|
||||
ceme=line(i2+1:i3-1)
|
||||
eme(i)=ceme.eq.'EME'
|
||||
if(neme.eq.1 .and. (.not.eme(i))) cycle
|
||||
j=j+1
|
||||
call2(j)=callsign(1:6) !### Fix for compound callsigns!
|
||||
grid2(j)=grid
|
||||
enddo
|
||||
10 ncalls=j
|
||||
if(ncalls.lt.10) then
|
||||
write(*,1010) ncalls
|
||||
1010 format('CALL3.TXT very short (N =',i2,') or missing?')
|
||||
endif
|
||||
close(23)
|
||||
|
||||
! NB: generation of test messages is not yet complete!
|
||||
j=0
|
||||
do i=-1,ncalls
|
||||
if(i.eq.0 .and. hiscall.eq.' ' .and. hisgrid(1:4).eq.' ') cycle
|
||||
mz=2
|
||||
if(i.eq.-1) mz=1
|
||||
if(i.eq.0) mz=65
|
||||
do m=1,mz
|
||||
j=j+1
|
||||
if(i.eq.-1) then
|
||||
msg='0123456789ABC'
|
||||
else if(i.eq.0) then
|
||||
if(m.eq.1) msg=mycall//' '//hiscall//' '//hisgrid(1:4)
|
||||
if(m.eq.2) msg='CQ '//hiscall//' '//hisgrid(1:4)
|
||||
if(m.ge.3) msg=mycall//' '//hiscall//' '//rpt(m-2)
|
||||
else
|
||||
if(m.eq.1) msg=mycall//' '//call2(i)//' '//grid2(i)
|
||||
if(m.eq.2) msg='CQ '//call2(i)//' '//grid2(i)
|
||||
endif
|
||||
call fmtmsg(msg,iz)
|
||||
call packmsg(msg,dgen,itype,.false.) !Pack message into 72 bits
|
||||
call rs_encode(dgen,sym_rev) !RS encode
|
||||
sym(0:62)=sym_rev(62:0:-1)
|
||||
sym1(0:62,j)=sym
|
||||
|
||||
call interleave63(sym_rev,1) !Interleave channel symbols
|
||||
call graycode(sym_rev,63,1,sym_rev) !Apply Gray code
|
||||
sym2(0:62,j)=sym_rev(0:62)
|
||||
msg0(j)=msg
|
||||
enddo
|
||||
enddo
|
||||
nused=j
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
ref0=0.
|
||||
do j=1,63
|
||||
ref0=ref0 + s3(mrs(j)+1,j)
|
||||
enddo
|
||||
|
||||
u1=0.
|
||||
u1=-99.0
|
||||
u2=u1
|
||||
|
||||
! Find u1 and u2 (best and second-best) codeword from a list, using
|
||||
! a bank of matched filters on the symbol spectra s3(i,j).
|
||||
ipk=1
|
||||
ipk2=0
|
||||
msg00=' '
|
||||
do k=1,nused
|
||||
if(k.ge.2 .and. k.le.64 .and. nflip.lt.0) cycle
|
||||
! Test all messages if nflip=+1; skip the CQ messages if nflip=-1.
|
||||
if(nflip.gt.0 .or. msg0(k)(1:3).ne.'CQ ') then
|
||||
psum=0.
|
||||
ref=ref0
|
||||
do j=1,63
|
||||
i=sym2(j-1,k)+1
|
||||
psum=psum + s3(i,j)
|
||||
if(i.eq.mrs(j)+1) ref=ref - s3(i,j) + s3(mrs2(j)+1,j)
|
||||
enddo
|
||||
p=psum/ref
|
||||
|
||||
if(p.gt.u1) then
|
||||
if(msg0(k).ne.msg00) then
|
||||
ipk2=ipk
|
||||
u2=u1
|
||||
endif
|
||||
u1=p
|
||||
ipk=k
|
||||
msg00=msg0(k)
|
||||
endif
|
||||
if(msg0(k).ne.msg00 .and. p.gt.u2) then
|
||||
u2=p
|
||||
ipk2=k
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
|
||||
!### Just in case ???
|
||||
! rewind 77
|
||||
! write(77,*) u1,u2,ipk,ipk2
|
||||
! call flush(77)
|
||||
!###
|
||||
|
||||
decoded=' '
|
||||
bias=max(1.12*u2,0.35)
|
||||
if(nadd.ge.4) bias=max(1.08*u2,0.45)
|
||||
if(nadd.ge.8) bias=max(1.04*u2,0.60)
|
||||
qual=100.0*(u1-bias)
|
||||
! write(*,3301) u1,u2,u1/u2,bias,qual,nadd,ipk,ipk2
|
||||
!3301 format(5f6.2,i3,2i6)
|
||||
qmin=1.0
|
||||
if(qual.ge.qmin) decoded=msg0(ipk)
|
||||
|
||||
return
|
||||
end subroutine hint65
|
||||
@@ -0,0 +1,97 @@
|
||||
// (c) Copyright Fernando Luis Cacciola Carballal 2000-2004
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See library home page at http://www.boost.org/libs/numeric/conversion
|
||||
//
|
||||
// Contact the author at: fernando_cacciola@hotmail.com
|
||||
//
|
||||
#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
|
||||
#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERSION_TRAITS_FLC_12NOV2002_HPP
|
||||
|
||||
#include "boost/type_traits/is_arithmetic.hpp"
|
||||
#include "boost/type_traits/is_same.hpp"
|
||||
#include "boost/type_traits/remove_cv.hpp"
|
||||
|
||||
#include "boost/numeric/conversion/detail/meta.hpp"
|
||||
#include "boost/numeric/conversion/detail/int_float_mixture.hpp"
|
||||
#include "boost/numeric/conversion/detail/sign_mixture.hpp"
|
||||
#include "boost/numeric/conversion/detail/udt_builtin_mixture.hpp"
|
||||
#include "boost/numeric/conversion/detail/is_subranged.hpp"
|
||||
|
||||
namespace boost { namespace numeric { namespace convdetail
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Implementation of the Conversion Traits for T != S
|
||||
//
|
||||
// This is a VISIBLE base class of the user-level conversion_traits<> class.
|
||||
//-------------------------------------------------------------------
|
||||
template<class T,class S>
|
||||
struct non_trivial_traits_impl
|
||||
{
|
||||
typedef typename get_int_float_mixture <T,S>::type int_float_mixture ;
|
||||
typedef typename get_sign_mixture <T,S>::type sign_mixture ;
|
||||
typedef typename get_udt_builtin_mixture <T,S>::type udt_builtin_mixture ;
|
||||
|
||||
typedef typename get_is_subranged<T,S>::type subranged ;
|
||||
|
||||
typedef mpl::false_ trivial ;
|
||||
|
||||
typedef T target_type ;
|
||||
typedef S source_type ;
|
||||
typedef T result_type ;
|
||||
|
||||
typedef typename mpl::if_< is_arithmetic<S>, S, S const&>::type argument_type ;
|
||||
|
||||
typedef typename mpl::if_<subranged,S,T>::type supertype ;
|
||||
typedef typename mpl::if_<subranged,T,S>::type subtype ;
|
||||
} ;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Implementation of the Conversion Traits for T == S
|
||||
//
|
||||
// This is a VISIBLE base class of the user-level conversion_traits<> class.
|
||||
//-------------------------------------------------------------------
|
||||
template<class N>
|
||||
struct trivial_traits_impl
|
||||
{
|
||||
typedef typename get_int_float_mixture <N,N>::type int_float_mixture ;
|
||||
typedef typename get_sign_mixture <N,N>::type sign_mixture ;
|
||||
typedef typename get_udt_builtin_mixture<N,N>::type udt_builtin_mixture ;
|
||||
|
||||
typedef mpl::false_ subranged ;
|
||||
typedef mpl::true_ trivial ;
|
||||
|
||||
typedef N target_type ;
|
||||
typedef N source_type ;
|
||||
typedef N const& result_type ;
|
||||
typedef N const& argument_type ;
|
||||
|
||||
typedef N supertype ;
|
||||
typedef N subtype ;
|
||||
|
||||
} ;
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Top level implementation selector.
|
||||
//-------------------------------------------------------------------
|
||||
template<class T, class S>
|
||||
struct get_conversion_traits
|
||||
{
|
||||
typedef typename remove_cv<T>::type target_type ;
|
||||
typedef typename remove_cv<S>::type source_type ;
|
||||
|
||||
typedef typename is_same<target_type,source_type>::type is_trivial ;
|
||||
|
||||
typedef trivial_traits_impl <target_type> trivial_imp ;
|
||||
typedef non_trivial_traits_impl<target_type,source_type> non_trivial_imp ;
|
||||
|
||||
typedef typename mpl::if_<is_trivial,trivial_imp,non_trivial_imp>::type type ;
|
||||
} ;
|
||||
|
||||
} } } // namespace boost::numeric::convdetail
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
subroutine analytic(d,npts,nfft,c,pc,beq)
|
||||
|
||||
! Convert real data to analytic signal
|
||||
|
||||
parameter (NFFTMAX=1024*1024)
|
||||
|
||||
real d(npts) ! passband signal
|
||||
real h(NFFTMAX/2) ! real BPF magnitude
|
||||
real*8 pc(5),pclast(5) ! static phase coeffs
|
||||
real*8 ac(5),aclast(5) ! amp coeffs
|
||||
real*8 fp
|
||||
|
||||
complex corr(NFFTMAX/2) ! complex frequency-dependent correction
|
||||
complex c(NFFTMAX) ! analytic signal
|
||||
|
||||
logical*1 beq ! boolean static equalizer flag
|
||||
|
||||
data nfft0/0/
|
||||
data aclast/0.0,0.0,0.0,0.0,0.0/
|
||||
data pclast/0.0,0.0,0.0,0.0,0.0/
|
||||
! data ac/1.0,0.05532,0.11438,0.12918,0.09274/ ! amp coeffs for TS2000
|
||||
data ac/1.0,0.0,0.0,0.0,0.0/
|
||||
|
||||
save corr,nfft0,h,ac,aclast,pclast,pi,t,beta
|
||||
|
||||
df=12000.0/nfft
|
||||
nh=nfft/2
|
||||
if( nfft.ne.nfft0 ) then
|
||||
pi=4.0*atan(1.0)
|
||||
t=1.0/2000.0
|
||||
beta=0.1
|
||||
do i=1,nh+1
|
||||
ff=(i-1)*df
|
||||
f=ff-1500.0
|
||||
h(i)=1.0
|
||||
if(abs(f).gt.(1-beta)/(2*t) .and. abs(f).le.(1+beta)/(2*t)) then
|
||||
h(i)=h(i)*0.5*(1+cos((pi*t/beta )*(abs(f)-(1-beta)/(2*t))))
|
||||
elseif( abs(f) .gt. (1+beta)/(2*t) ) then
|
||||
h(i)=0.0
|
||||
endif
|
||||
enddo
|
||||
nfft0=nfft
|
||||
endif
|
||||
|
||||
if( any(aclast .ne. ac) .or. any(pclast .ne. pc) ) then
|
||||
aclast=ac
|
||||
pclast=pc
|
||||
! write(*,3001) pc
|
||||
!3001 format('Phase coeffs:',5f12.6)
|
||||
do i=1,nh+1
|
||||
ff=(i-1)*df
|
||||
f=ff-1500.0
|
||||
fp=f/1000.0
|
||||
corr(i)=ac(1)+fp*(ac(2)+fp*(ac(3)+fp*(ac(4)+fp*ac(5))))
|
||||
pd=fp*fp*(pc(3)+fp*(pc(4)+fp*pc(5))) ! ignore 1st two terms
|
||||
corr(i)=corr(i)*cmplx(cos(pd),sin(pd))
|
||||
enddo
|
||||
endif
|
||||
|
||||
fac=2.0/nfft
|
||||
c(1:npts)=fac*d(1:npts)
|
||||
c(npts+1:nfft)=0.
|
||||
call four2a(c,nfft,1,-1,1) !Forward c2c FFT
|
||||
|
||||
if( beq ) then
|
||||
c(1:nh+1)=h(1:nh+1)*corr(1:nh+1)*c(1:nh+1)
|
||||
else
|
||||
c(1:nh+1)=h(1:nh+1)*c(1:nh+1)
|
||||
endif
|
||||
|
||||
c(1)=0.5*c(1) !Half of DC term
|
||||
c(nh+2:nfft)=0. !Zero the negative frequencies
|
||||
call four2a(c,nfft,1,1,1) !Inverse c2c FFT
|
||||
return
|
||||
end subroutine analytic
|
||||
@@ -0,0 +1,34 @@
|
||||
subroutine decode65b(s2,nflip,nadd,mode65,ntrials,naggressive,ndepth, &
|
||||
mycall,hiscall,hisgrid,nexp_decode,nqd,nft,qual,nhist,decoded)
|
||||
|
||||
use jt65_mod
|
||||
real s2(66,126)
|
||||
real s3(64,63)
|
||||
logical ltext
|
||||
character decoded*22
|
||||
character mycall*12,hiscall*12,hisgrid*6
|
||||
save
|
||||
|
||||
if(nqd.eq.-99) stop !Silence compiler warning
|
||||
do j=1,63
|
||||
k=mdat(j) !Points to data symbol
|
||||
if(nflip.lt.0) k=mdat2(j)
|
||||
do i=1,64
|
||||
s3(i,j)=s2(i+2,k)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
call extract(s3,nadd,mode65,ntrials,naggressive,ndepth,nflip,mycall, &
|
||||
hiscall,hisgrid,nexp_decode,ncount,nhist,decoded,ltext,nft,qual)
|
||||
|
||||
! Suppress "birdie messages" and other garbage decodes:
|
||||
if(decoded(1:7).eq.'000AAA ') ncount=-1
|
||||
if(decoded(1:7).eq.'0L6MWK ') ncount=-1
|
||||
if(nflip.lt.0 .and. ltext) ncount=-1
|
||||
if(ncount.lt.0) then
|
||||
nft=0
|
||||
decoded=' '
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine decode65b
|
||||
@@ -0,0 +1,232 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/stepper/runge_kutta4_classic.hpp
|
||||
|
||||
[begin_description]
|
||||
Implementation for the classical Runge Kutta stepper.
|
||||
[end_description]
|
||||
|
||||
Copyright 2010-2013 Karsten Ahnert
|
||||
Copyright 2010-2013 Mario Mulansky
|
||||
Copyright 2012 Christoph Koke
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_RUNGE_KUTTA4_CLASSIC_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_RUNGE_KUTTA4_CLASSIC_HPP_INCLUDED
|
||||
|
||||
|
||||
|
||||
#include <boost/numeric/odeint/stepper/base/explicit_stepper_base.hpp>
|
||||
#include <boost/numeric/odeint/algebra/range_algebra.hpp>
|
||||
#include <boost/numeric/odeint/algebra/default_operations.hpp>
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/algebra/operations_dispatcher.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/util/state_wrapper.hpp>
|
||||
#include <boost/numeric/odeint/util/is_resizeable.hpp>
|
||||
#include <boost/numeric/odeint/util/resizer.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
template<
|
||||
class State ,
|
||||
class Value = double ,
|
||||
class Deriv = State ,
|
||||
class Time = Value ,
|
||||
class Algebra = typename algebra_dispatcher< State >::algebra_type ,
|
||||
class Operations = typename operations_dispatcher< State >::operations_type ,
|
||||
class Resizer = initially_resizer
|
||||
>
|
||||
#ifndef DOXYGEN_SKIP
|
||||
class runge_kutta4_classic
|
||||
: public explicit_stepper_base<
|
||||
runge_kutta4_classic< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
|
||||
4 , State , Value , Deriv , Time , Algebra , Operations , Resizer >
|
||||
#else
|
||||
class runge_kutta4_classic : public explicit_stepper_base
|
||||
#endif
|
||||
{
|
||||
|
||||
public :
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
typedef explicit_stepper_base<
|
||||
runge_kutta4_classic< State , Value , Deriv , Time , Algebra , Operations , Resizer > ,
|
||||
4 , State , Value , Deriv , Time , Algebra , Operations , Resizer > stepper_base_type;
|
||||
#else
|
||||
typedef explicit_stepper_base< runge_kutta4_classic< ... > , ... > stepper_base_type;
|
||||
#endif
|
||||
|
||||
typedef typename stepper_base_type::state_type state_type;
|
||||
typedef typename stepper_base_type::value_type value_type;
|
||||
typedef typename stepper_base_type::deriv_type deriv_type;
|
||||
typedef typename stepper_base_type::time_type time_type;
|
||||
typedef typename stepper_base_type::algebra_type algebra_type;
|
||||
typedef typename stepper_base_type::operations_type operations_type;
|
||||
typedef typename stepper_base_type::resizer_type resizer_type;
|
||||
|
||||
#ifndef DOXYGEN_SKIP
|
||||
typedef typename stepper_base_type::stepper_type stepper_type;
|
||||
typedef typename stepper_base_type::wrapped_state_type wrapped_state_type;
|
||||
typedef typename stepper_base_type::wrapped_deriv_type wrapped_deriv_type;
|
||||
#endif // DOXYGEN_SKIP
|
||||
|
||||
|
||||
|
||||
runge_kutta4_classic( const algebra_type &algebra = algebra_type() ) : stepper_base_type( algebra )
|
||||
{ }
|
||||
|
||||
|
||||
template< class System , class StateIn , class DerivIn , class StateOut >
|
||||
void do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
|
||||
{
|
||||
// ToDo : check if size of in,dxdt,out are equal?
|
||||
|
||||
static const value_type val1 = static_cast< value_type >( 1 );
|
||||
|
||||
m_resizer.adjust_size( in , detail::bind( &stepper_type::template resize_impl< StateIn > , detail::ref( *this ) , detail::_1 ) );
|
||||
|
||||
typename odeint::unwrap_reference< System >::type &sys = system;
|
||||
|
||||
const time_type dh = dt / static_cast< value_type >( 2 );
|
||||
const time_type th = t + dh;
|
||||
|
||||
// dt * dxdt = k1
|
||||
// m_x_tmp = x + dh*dxdt
|
||||
stepper_base_type::m_algebra.for_each3( m_x_tmp.m_v , in , dxdt ,
|
||||
typename operations_type::template scale_sum2< value_type , time_type >( val1 , dh ) );
|
||||
|
||||
|
||||
// dt * m_dxt = k2
|
||||
sys( m_x_tmp.m_v , m_dxt.m_v , th );
|
||||
|
||||
// m_x_tmp = x + dh*m_dxt
|
||||
stepper_base_type::m_algebra.for_each3( m_x_tmp.m_v , in , m_dxt.m_v ,
|
||||
typename operations_type::template scale_sum2< value_type , time_type >( val1 , dh ) );
|
||||
|
||||
|
||||
// dt * m_dxm = k3
|
||||
sys( m_x_tmp.m_v , m_dxm.m_v , th );
|
||||
//m_x_tmp = x + dt*m_dxm
|
||||
stepper_base_type::m_algebra.for_each3( m_x_tmp.m_v , in , m_dxm.m_v ,
|
||||
typename operations_type::template scale_sum2< value_type , time_type >( val1 , dt ) );
|
||||
|
||||
|
||||
// dt * m_dxh = k4
|
||||
sys( m_x_tmp.m_v , m_dxh.m_v , t + dt );
|
||||
|
||||
//x += dt/6 * ( m_dxdt + m_dxt + val2*m_dxm )
|
||||
time_type dt6 = dt / static_cast< value_type >( 6 );
|
||||
time_type dt3 = dt / static_cast< value_type >( 3 );
|
||||
stepper_base_type::m_algebra.for_each6( out , in , dxdt , m_dxt.m_v , m_dxm.m_v , m_dxh.m_v ,
|
||||
typename operations_type::template scale_sum5< value_type , time_type , time_type , time_type , time_type >( 1.0 , dt6 , dt3 , dt3 , dt6 ) );
|
||||
|
||||
// x += dt/6 * m_dxdt + dt/3 * m_dxt )
|
||||
// stepper_base_type::m_algebra.for_each4( out , in , dxdt , m_dxt.m_v ,
|
||||
// typename operations_type::template scale_sum3< value_type , time_type , time_type >( 1.0 , dt6 , dt3 ) );
|
||||
// // x += dt/3 * m_dxm + dt/6 * m_dxh )
|
||||
// stepper_base_type::m_algebra.for_each4( out , out , m_dxm.m_v , m_dxh.m_v ,
|
||||
// typename operations_type::template scale_sum3< value_type , time_type , time_type >( 1.0 , dt3 , dt6 ) );
|
||||
|
||||
}
|
||||
|
||||
template< class StateType >
|
||||
void adjust_size( const StateType &x )
|
||||
{
|
||||
resize_impl( x );
|
||||
stepper_base_type::adjust_size( x );
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
template< class StateIn >
|
||||
bool resize_impl( const StateIn &x )
|
||||
{
|
||||
bool resized = false;
|
||||
resized |= adjust_size_by_resizeability( m_x_tmp , x , typename is_resizeable<state_type>::type() );
|
||||
resized |= adjust_size_by_resizeability( m_dxm , x , typename is_resizeable<deriv_type>::type() );
|
||||
resized |= adjust_size_by_resizeability( m_dxt , x , typename is_resizeable<deriv_type>::type() );
|
||||
resized |= adjust_size_by_resizeability( m_dxh , x , typename is_resizeable<deriv_type>::type() );
|
||||
return resized;
|
||||
}
|
||||
|
||||
|
||||
resizer_type m_resizer;
|
||||
|
||||
wrapped_deriv_type m_dxt;
|
||||
wrapped_deriv_type m_dxm;
|
||||
wrapped_deriv_type m_dxh;
|
||||
wrapped_state_type m_x_tmp;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/********* DOXYGEN *********/
|
||||
|
||||
/**
|
||||
* \class runge_kutta4_classic
|
||||
* \brief The classical Runge-Kutta stepper of fourth order.
|
||||
*
|
||||
* The Runge-Kutta method of fourth order is one standard method for
|
||||
* solving ordinary differential equations and is widely used, see also
|
||||
* <a href="http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods">en.wikipedia.org/wiki/Runge-Kutta_methods</a>
|
||||
* The method is explicit and fulfills the Stepper concept. Step size control
|
||||
* or continuous output are not provided. This class implements the method directly, hence the
|
||||
* generic Runge-Kutta algorithm is not used.
|
||||
*
|
||||
* This class derives from explicit_stepper_base and inherits its interface via
|
||||
* CRTP (current recurring template pattern). For more details see
|
||||
* explicit_stepper_base.
|
||||
*
|
||||
* \tparam State The state type.
|
||||
* \tparam Value The value type.
|
||||
* \tparam Deriv The type representing the time derivative of the state.
|
||||
* \tparam Time The time representing the independent variable - the time.
|
||||
* \tparam Algebra The algebra type.
|
||||
* \tparam Operations The operations type.
|
||||
* \tparam Resizer The resizer policy type.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn runge_kutta4_classic::runge_kutta4_classic( const algebra_type &algebra )
|
||||
* \brief Constructs the runge_kutta4_classic class. This constructor can be used as a default
|
||||
* constructor if the algebra has a default constructor.
|
||||
* \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \fn runge_kutta4_classic::do_step_impl( System system , const StateIn &in , const DerivIn &dxdt , time_type t , StateOut &out , time_type dt )
|
||||
* \brief This method performs one step. The derivative `dxdt` of `in` at the time `t` is passed to the method.
|
||||
* The result is updated out of place, hence the input is in `in` and the output in `out`.
|
||||
* Access to this step functionality is provided by explicit_stepper_base and
|
||||
* `do_step_impl` should not be called directly.
|
||||
*
|
||||
* \param system The system function to solve, hence the r.h.s. of the ODE. It must fulfill the
|
||||
* Simple System concept.
|
||||
* \param in The state of the ODE which should be solved. in is not modified in this method
|
||||
* \param dxdt The derivative of x at t.
|
||||
* \param t The value of the time, at which the step should be performed.
|
||||
* \param out The result of the step is written in out.
|
||||
* \param dt The step size.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \fn runge_kutta4_classic::adjust_size( const StateType &x )
|
||||
* \brief Adjust the size of all temporaries in the stepper manually.
|
||||
* \param x A state from which the size of the temporaries to be resized is deduced.
|
||||
*/
|
||||
|
||||
} // odeint
|
||||
} // numeric
|
||||
} // boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_STEPPER_RUNGE_KUTTA4_CLASSIC_HPP_INCLUDED
|
||||
@@ -0,0 +1,114 @@
|
||||
#ifndef BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP
|
||||
#define BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// escape.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <cstddef> // NULL
|
||||
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
namespace iterators {
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// insert escapes into text
|
||||
|
||||
template<class Derived, class Base>
|
||||
class escape :
|
||||
public boost::iterator_adaptor<
|
||||
Derived,
|
||||
Base,
|
||||
typename boost::iterator_value<Base>::type,
|
||||
single_pass_traversal_tag,
|
||||
typename boost::iterator_value<Base>::type
|
||||
>
|
||||
{
|
||||
typedef typename boost::iterator_value<Base>::type base_value_type;
|
||||
typedef typename boost::iterator_reference<Base>::type reference_type;
|
||||
friend class boost::iterator_core_access;
|
||||
|
||||
typedef typename boost::iterator_adaptor<
|
||||
Derived,
|
||||
Base,
|
||||
base_value_type,
|
||||
single_pass_traversal_tag,
|
||||
base_value_type
|
||||
> super_t;
|
||||
|
||||
typedef escape<Derived, Base> this_t;
|
||||
|
||||
void dereference_impl() {
|
||||
m_current_value = static_cast<Derived *>(this)->fill(m_bnext, m_bend);
|
||||
m_full = true;
|
||||
}
|
||||
|
||||
//Access the value referred to
|
||||
reference_type dereference() const {
|
||||
if(!m_full)
|
||||
const_cast<this_t *>(this)->dereference_impl();
|
||||
return m_current_value;
|
||||
}
|
||||
|
||||
bool equal(const this_t & rhs) const {
|
||||
if(m_full){
|
||||
if(! rhs.m_full)
|
||||
const_cast<this_t *>(& rhs)->dereference_impl();
|
||||
}
|
||||
else{
|
||||
if(rhs.m_full)
|
||||
const_cast<this_t *>(this)->dereference_impl();
|
||||
}
|
||||
if(m_bnext != rhs.m_bnext)
|
||||
return false;
|
||||
if(this->base_reference() != rhs.base_reference())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void increment(){
|
||||
if(++m_bnext < m_bend){
|
||||
m_current_value = *m_bnext;
|
||||
return;
|
||||
}
|
||||
++(this->base_reference());
|
||||
m_bnext = NULL;
|
||||
m_bend = NULL;
|
||||
m_full = false;
|
||||
}
|
||||
|
||||
// buffer to handle pending characters
|
||||
const base_value_type *m_bnext;
|
||||
const base_value_type *m_bend;
|
||||
bool m_full;
|
||||
base_value_type m_current_value;
|
||||
public:
|
||||
escape(Base base) :
|
||||
super_t(base),
|
||||
m_bnext(NULL),
|
||||
m_bend(NULL),
|
||||
m_full(false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace iterators
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP
|
||||
@@ -0,0 +1,148 @@
|
||||
#include "logqso.h"
|
||||
|
||||
#include <QString>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
|
||||
#include "logbook/adif.h"
|
||||
#include "MessageBox.hpp"
|
||||
|
||||
#include "ui_logqso.h"
|
||||
#include "moc_logqso.cpp"
|
||||
|
||||
LogQSO::LogQSO(QString const& programTitle, QSettings * settings, QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::LogQSO)
|
||||
, m_settings (settings)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle(programTitle + " - Log QSO");
|
||||
loadSettings ();
|
||||
}
|
||||
|
||||
LogQSO::~LogQSO ()
|
||||
{
|
||||
}
|
||||
|
||||
void LogQSO::loadSettings ()
|
||||
{
|
||||
m_settings->beginGroup ("LogQSO");
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
ui->cbTxPower->setChecked (m_settings->value ("SaveTxPower", false).toBool ());
|
||||
ui->cbComments->setChecked (m_settings->value ("SaveComments", false).toBool ());
|
||||
m_txPower = m_settings->value ("TxPower", "").toString ();
|
||||
m_comments = m_settings->value ("LogComments", "").toString();
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
|
||||
void LogQSO::storeSettings () const
|
||||
{
|
||||
m_settings->beginGroup ("LogQSO");
|
||||
m_settings->setValue ("geometry", saveGeometry ());
|
||||
m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ());
|
||||
m_settings->setValue ("SaveComments", ui->cbComments->isChecked ());
|
||||
m_settings->setValue ("TxPower", m_txPower);
|
||||
m_settings->setValue ("LogComments", m_comments);
|
||||
m_settings->endGroup ();
|
||||
}
|
||||
|
||||
void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString mode,
|
||||
QString const& rptSent, QString const& rptRcvd,
|
||||
QDateTime const& dateTimeOn, QDateTime const& dateTimeOff,
|
||||
Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid,
|
||||
bool noSuffix, bool toRTTY, bool dBtoComments)
|
||||
{
|
||||
if(!isHidden()) return;
|
||||
ui->call->setText(hisCall);
|
||||
ui->grid->setText(hisGrid);
|
||||
ui->name->setText("");
|
||||
ui->txPower->setText("");
|
||||
ui->comments->setText("");
|
||||
if (ui->cbTxPower->isChecked ()) ui->txPower->setText(m_txPower);
|
||||
if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments);
|
||||
if(dBtoComments) {
|
||||
QString t=mode;
|
||||
if(rptSent!="") t+=" Sent: " + rptSent;
|
||||
if(rptRcvd!="") t+=" Rcvd: " + rptRcvd;
|
||||
ui->comments->setText(t);
|
||||
}
|
||||
if(noSuffix and mode.mid(0,3)=="JT9") mode="JT9";
|
||||
if(toRTTY and mode.mid(0,3)=="JT9") mode="RTTY";
|
||||
ui->mode->setText(mode);
|
||||
ui->sent->setText(rptSent);
|
||||
ui->rcvd->setText(rptRcvd);
|
||||
ui->start_date_time->setDateTime (dateTimeOn);
|
||||
ui->end_date_time->setDateTime (dateTimeOff);
|
||||
m_dialFreq=dialFreq;
|
||||
m_myCall=myCall;
|
||||
m_myGrid=myGrid;
|
||||
QString band= ADIF::bandFromFrequency(dialFreq / 1.e6);
|
||||
ui->band->setText(band);
|
||||
|
||||
show ();
|
||||
}
|
||||
|
||||
void LogQSO::accept()
|
||||
{
|
||||
QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band;
|
||||
QString comments,name;
|
||||
|
||||
hisCall=ui->call->text();
|
||||
hisGrid=ui->grid->text();
|
||||
mode=ui->mode->text();
|
||||
rptSent=ui->sent->text();
|
||||
rptRcvd=ui->rcvd->text();
|
||||
m_dateTimeOn = ui->start_date_time->dateTime ();
|
||||
m_dateTimeOff = ui->end_date_time->dateTime ();
|
||||
band=ui->band->text();
|
||||
name=ui->name->text();
|
||||
m_txPower=ui->txPower->text();
|
||||
comments=ui->comments->text();
|
||||
m_comments=comments;
|
||||
QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6));
|
||||
|
||||
//Log this QSO to ADIF file "wsjtx_log.adi"
|
||||
QString filename = "wsjtx_log.adi"; // TODO allow user to set
|
||||
ADIF adifile;
|
||||
auto adifilePath = QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("wsjtx_log.adi");
|
||||
adifile.init(adifilePath);
|
||||
if (!adifile.addQSOToFile(hisCall,hisGrid,mode,rptSent,rptRcvd,m_dateTimeOn,m_dateTimeOff,band,comments,name,strDialFreq,m_myCall,m_myGrid,m_txPower))
|
||||
{
|
||||
MessageBox::warning_message (this, tr ("Log file error"),
|
||||
tr ("Cannot open \"%1\"").arg (adifilePath));
|
||||
}
|
||||
|
||||
//Log this QSO to file "wsjtx.log"
|
||||
static QFile f {QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("wsjtx.log")};
|
||||
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
||||
MessageBox::warning_message (this, tr ("Log file error"),
|
||||
tr ("Cannot open \"%1\" for append").arg (f.fileName ()),
|
||||
tr ("Error: %1").arg (f.errorString ()));
|
||||
} else {
|
||||
QString logEntry=m_dateTimeOn.date().toString("yyyy-MM-dd,") +
|
||||
m_dateTimeOn.time().toString("hh:mm:ss,") +
|
||||
m_dateTimeOff.date().toString("yyyy-MM-dd,") +
|
||||
m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," +
|
||||
hisGrid + "," + strDialFreq + "," + mode +
|
||||
"," + rptSent + "," + rptRcvd + "," + m_txPower +
|
||||
"," + comments + "," + name;
|
||||
QTextStream out(&f);
|
||||
out << logEntry << endl;
|
||||
f.close();
|
||||
}
|
||||
|
||||
//Clean up and finish logging
|
||||
Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn);
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
// closeEvent is only called from the system menu close widget for a
|
||||
// modeless dialog so we use the hideEvent override to store the
|
||||
// window settings
|
||||
void LogQSO::hideEvent (QHideEvent * e)
|
||||
{
|
||||
storeSettings ();
|
||||
QDialog::hideEvent (e);
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef ITERATOR_DWA122600_HPP_
|
||||
#define ITERATOR_DWA122600_HPP_
|
||||
|
||||
// This header is obsolete and will be deprecated.
|
||||
|
||||
#include <iterator>
|
||||
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
#include <cstddef>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
using std::iterator_traits;
|
||||
using std::distance;
|
||||
|
||||
#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
|
||||
// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters
|
||||
// when one of the arguments is an array and the other one is a pointer.
|
||||
template< typename T, std::size_t N >
|
||||
inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right)
|
||||
{
|
||||
return std::distance(static_cast< T* >(left), right);
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // ITERATOR_DWA122600_HPP_
|
||||
@@ -0,0 +1,190 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
// Copyright David Abrahams 2003-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/map/map30.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20
|
||||
>
|
||||
struct map21
|
||||
: m_item<
|
||||
typename P20::first
|
||||
, typename P20::second
|
||||
, map20< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19 >
|
||||
>
|
||||
{
|
||||
typedef map21 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21
|
||||
>
|
||||
struct map22
|
||||
: m_item<
|
||||
typename P21::first
|
||||
, typename P21::second
|
||||
, map21< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20 >
|
||||
>
|
||||
{
|
||||
typedef map22 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22
|
||||
>
|
||||
struct map23
|
||||
: m_item<
|
||||
typename P22::first
|
||||
, typename P22::second
|
||||
, map22< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21 >
|
||||
>
|
||||
{
|
||||
typedef map23 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23
|
||||
>
|
||||
struct map24
|
||||
: m_item<
|
||||
typename P23::first
|
||||
, typename P23::second
|
||||
, map23< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22 >
|
||||
>
|
||||
{
|
||||
typedef map24 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
>
|
||||
struct map25
|
||||
: m_item<
|
||||
typename P24::first
|
||||
, typename P24::second
|
||||
, map24< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23 >
|
||||
>
|
||||
{
|
||||
typedef map25 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
, typename P25
|
||||
>
|
||||
struct map26
|
||||
: m_item<
|
||||
typename P25::first
|
||||
, typename P25::second
|
||||
, map25< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24 >
|
||||
>
|
||||
{
|
||||
typedef map26 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
, typename P25, typename P26
|
||||
>
|
||||
struct map27
|
||||
: m_item<
|
||||
typename P26::first
|
||||
, typename P26::second
|
||||
, map26< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25 >
|
||||
>
|
||||
{
|
||||
typedef map27 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
, typename P25, typename P26, typename P27
|
||||
>
|
||||
struct map28
|
||||
: m_item<
|
||||
typename P27::first
|
||||
, typename P27::second
|
||||
, map27< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26 >
|
||||
>
|
||||
{
|
||||
typedef map28 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
, typename P25, typename P26, typename P27, typename P28
|
||||
>
|
||||
struct map29
|
||||
: m_item<
|
||||
typename P28::first
|
||||
, typename P28::second
|
||||
, map28< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27 >
|
||||
>
|
||||
{
|
||||
typedef map29 type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename P0, typename P1, typename P2, typename P3, typename P4
|
||||
, typename P5, typename P6, typename P7, typename P8, typename P9
|
||||
, typename P10, typename P11, typename P12, typename P13, typename P14
|
||||
, typename P15, typename P16, typename P17, typename P18, typename P19
|
||||
, typename P20, typename P21, typename P22, typename P23, typename P24
|
||||
, typename P25, typename P26, typename P27, typename P28, typename P29
|
||||
>
|
||||
struct map30
|
||||
: m_item<
|
||||
typename P29::first
|
||||
, typename P29::second
|
||||
, map29< P0,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12,P13,P14,P15,P16,P17,P18,P19,P20,P21,P22,P23,P24,P25,P26,P27,P28 >
|
||||
>
|
||||
{
|
||||
typedef map30 type;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,125 @@
|
||||
// Copyright Neil Groves 2009. 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_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
|
||||
#define BOOST_RANGE_ALGORITHM_ADJACENT_FIND_HPP_INCLUDED
|
||||
|
||||
#include <boost/concept_check.hpp>
|
||||
#include <boost/range/begin.hpp>
|
||||
#include <boost/range/end.hpp>
|
||||
#include <boost/range/concepts.hpp>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/range/detail/range_return.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace range
|
||||
{
|
||||
|
||||
/// \brief template function adjacent_find
|
||||
///
|
||||
/// range-based version of the adjacent_find std algorithm
|
||||
///
|
||||
/// \pre ForwardRange is a model of the ForwardRangeConcept
|
||||
/// \pre BinaryPredicate is a model of the BinaryPredicateConcept
|
||||
template< typename ForwardRange >
|
||||
inline typename range_iterator<ForwardRange>::type
|
||||
adjacent_find(ForwardRange & rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
return std::adjacent_find(boost::begin(rng),boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< typename ForwardRange >
|
||||
inline typename range_iterator<const ForwardRange>::type
|
||||
adjacent_find(const ForwardRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
return std::adjacent_find(boost::begin(rng),boost::end(rng));
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< typename ForwardRange, typename BinaryPredicate >
|
||||
inline typename range_iterator<ForwardRange>::type
|
||||
adjacent_find(ForwardRange & rng, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
|
||||
typename range_value<ForwardRange>::type,
|
||||
typename range_value<ForwardRange>::type>));
|
||||
return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< typename ForwardRange, typename BinaryPredicate >
|
||||
inline typename range_iterator<const ForwardRange>::type
|
||||
adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
|
||||
typename range_value<const ForwardRange>::type,
|
||||
typename range_value<const ForwardRange>::type>));
|
||||
return std::adjacent_find(boost::begin(rng),boost::end(rng),pred);
|
||||
}
|
||||
|
||||
// range_return overloads
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, typename ForwardRange >
|
||||
inline typename range_return<ForwardRange,re>::type
|
||||
adjacent_find(ForwardRange & rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
return range_return<ForwardRange,re>::
|
||||
pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
|
||||
rng);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, typename ForwardRange >
|
||||
inline typename range_return<const ForwardRange,re>::type
|
||||
adjacent_find(const ForwardRange& rng)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
return range_return<const ForwardRange,re>::
|
||||
pack(std::adjacent_find(boost::begin(rng),boost::end(rng)),
|
||||
rng);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
|
||||
inline typename range_return<ForwardRange,re>::type
|
||||
adjacent_find(ForwardRange& rng, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
BOOST_RANGE_CONCEPT_ASSERT((BinaryPredicateConcept<BinaryPredicate,
|
||||
typename range_value<ForwardRange>::type,
|
||||
typename range_value<ForwardRange>::type>));
|
||||
return range_return<ForwardRange,re>::
|
||||
pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
|
||||
rng);
|
||||
}
|
||||
|
||||
/// \overload
|
||||
template< range_return_value re, typename ForwardRange, typename BinaryPredicate >
|
||||
inline typename range_return<const ForwardRange,re>::type
|
||||
adjacent_find(const ForwardRange& rng, BinaryPredicate pred)
|
||||
{
|
||||
BOOST_RANGE_CONCEPT_ASSERT((ForwardRangeConcept<ForwardRange>));
|
||||
return range_return<const ForwardRange,re>::
|
||||
pack(std::adjacent_find(boost::begin(rng),boost::end(rng),pred),
|
||||
rng);
|
||||
}
|
||||
|
||||
} // namespace range
|
||||
using range::adjacent_find;
|
||||
} // namespace boost
|
||||
|
||||
#endif // include guard
|
||||
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/external/mpi/mpi_state.hpp
|
||||
|
||||
[begin_description]
|
||||
A generic split state, storing partial data on each node.
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
Copyright 2013 Pascal Germroth
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_EXTERNAL_MPI_MPI_STATE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_EXTERNAL_MPI_MPI_STATE_HPP_INCLUDED
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <boost/mpi.hpp>
|
||||
#include <boost/numeric/odeint/util/copy.hpp>
|
||||
#include <boost/numeric/odeint/util/split.hpp>
|
||||
#include <boost/numeric/odeint/util/resize.hpp>
|
||||
#include <boost/numeric/odeint/util/same_size.hpp>
|
||||
#include <boost/numeric/odeint/algebra/algebra_dispatcher.hpp>
|
||||
#include <boost/numeric/odeint/external/mpi/mpi_nested_algebra.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
/** \brief A container which has its contents distributed among the nodes.
|
||||
*/
|
||||
template< class InnerState >
|
||||
struct mpi_state
|
||||
{
|
||||
typedef InnerState value_type;
|
||||
|
||||
// the node's local data.
|
||||
InnerState m_data;
|
||||
|
||||
boost::mpi::communicator world;
|
||||
|
||||
mpi_state() {}
|
||||
mpi_state(boost::mpi::communicator comm) : world(comm) {}
|
||||
|
||||
inline InnerState &operator()() { return m_data; }
|
||||
inline const InnerState &operator()() const { return m_data; }
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
template< class InnerState >
|
||||
struct is_resizeable< mpi_state< InnerState > >
|
||||
: is_resizeable< InnerState > { };
|
||||
|
||||
|
||||
template< class InnerState1 , class InnerState2 >
|
||||
struct same_size_impl< mpi_state< InnerState1 > , mpi_state< InnerState2 > >
|
||||
{
|
||||
static bool same_size( const mpi_state< InnerState1 > &x , const mpi_state< InnerState2 > &y )
|
||||
{
|
||||
const bool local = boost::numeric::odeint::same_size(x(), y());
|
||||
return boost::mpi::all_reduce(x.world, local, mpi::bitwise_and<bool>());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template< class InnerState1 , class InnerState2 >
|
||||
struct resize_impl< mpi_state< InnerState1 > , mpi_state< InnerState2 > >
|
||||
{
|
||||
static void resize( mpi_state< InnerState1 > &x , const mpi_state< InnerState2 > &y )
|
||||
{
|
||||
// resize local parts on each node.
|
||||
boost::numeric::odeint::resize(x(), y());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/** \brief Copy data between mpi_states of same size. */
|
||||
template< class InnerState1 , class InnerState2 >
|
||||
struct copy_impl< mpi_state< InnerState1 > , mpi_state< InnerState2 > >
|
||||
{
|
||||
static void copy( const mpi_state< InnerState1 > &from , mpi_state< InnerState2 > &to )
|
||||
{
|
||||
// copy local parts on each node.
|
||||
boost::numeric::odeint::copy(from(), to());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/** \brief Use `mpi_algebra` for `mpi_state`. */
|
||||
template< class InnerState >
|
||||
struct algebra_dispatcher< mpi_state< InnerState > >
|
||||
{
|
||||
typedef mpi_nested_algebra<
|
||||
typename algebra_dispatcher< InnerState >::algebra_type
|
||||
> algebra_type;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,58 @@
|
||||
// Status=review
|
||||
.Receiver Noise Level
|
||||
|
||||
- If it is not already highlighted in green, click the *Monitor*
|
||||
button to start normal receive operation.
|
||||
|
||||
- Be sure your transceiver is set to *USB* (or *USB Data*) mode.
|
||||
|
||||
- Use the receiver gain controls and/or the computer's audio mixer
|
||||
controls to set the background noise level (scale at lower left of
|
||||
main window) to around 30 dB when no signals are present. It is
|
||||
usually best to turn AGC off or reduce the RF gain control to minimize
|
||||
AGC action.
|
||||
|
||||
.Bandwidth and Frequency Setting
|
||||
|
||||
- If your transceiver offers more than one bandwidth setting in USB
|
||||
mode, you should normally choose the widest one possible, up to about
|
||||
5 kHz. This choice has the desirable effect of allowing the *Wide
|
||||
Graph* (waterfall and 2D spectrum) to display the conventional JT65
|
||||
and JT9 sub-bands simultaneously on most HF bands. Further details
|
||||
are provided in the <<TUTORIAL,Basic Operating Tutorial>>. A wider
|
||||
displayed bandwidth may also be helpful at VHF and above, where JT4,
|
||||
JT65, and QRA64 signals are found over much wider ranges of
|
||||
frequencies.
|
||||
|
||||
- If you have only a standard SSB filter you won’t be able to display
|
||||
more than about 2.7 kHz bandwidth. Depending on the exact dial
|
||||
frequency setting, on HF bands you can display the full sub-band
|
||||
generally used for one mode (JT65 or JT9) and part of the sub-band for
|
||||
the other mode.
|
||||
|
||||
- Of course, you might prefer to concentrate on one mode at a time,
|
||||
setting your dial frequency to (say) 14.076 for JT65 or 14.078 for
|
||||
JT9. Present conventions have the nominal JT9 dial frequency 2 kHz
|
||||
higher than the JT65 dial frequency on most bands.
|
||||
|
||||
.Transmitter Audio Level
|
||||
|
||||
* Click the *Tune* button on the main screen to switch the
|
||||
radio into transmit mode and generate a steady audio tone.
|
||||
|
||||
* Listen to the generated audio tone using your radio’s *Monitor*
|
||||
facility. The transmitted tone should be perfectly smooth, with no
|
||||
clicks or glitches. Make sure that this is true even when you
|
||||
simultaneously use the computer to do other tasks such as email, web
|
||||
browsing, etc.
|
||||
|
||||
* Open the computer's audio mixer controls for output ("`Playback`")
|
||||
devices and adjust the volume slider downward from its maximum until
|
||||
the RF output from your transmitter falls slightly. This is generally
|
||||
a good level for audio drive.
|
||||
|
||||
* Alternatively, you can make the Tx audio level adjustment using the
|
||||
digital slider labeled *Pwr* at the right edge of the main window.
|
||||
|
||||
* Toggle the *Tune* button once more or click *Halt Tx* to stop your
|
||||
test transmission.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
@@ -0,0 +1,2 @@
|
||||
TAGS
|
||||
tags
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2011-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_LANGUAGE_STDC_H
|
||||
#define BOOST_PREDEF_LANGUAGE_STDC_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_LANG_STDC`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/C_(programming_language) Standard C] language.
|
||||
If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__STDC__`] [__predef_detection__]]
|
||||
|
||||
[[`__STDC_VERSION__`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_LANG_STDC BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__STDC__)
|
||||
# undef BOOST_LANG_STDC
|
||||
# if defined(__STDC_VERSION__)
|
||||
# if (__STDC_VERSION__ > 100)
|
||||
# define BOOST_LANG_STDC BOOST_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
|
||||
# else
|
||||
# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# else
|
||||
# define BOOST_LANG_STDC BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_LANG_STDC
|
||||
# define BOOST_LANG_STDC_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_LANG_STDC_NAME "Standard C"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_LANG_STDC,BOOST_LANG_STDC_NAME)
|
||||
@@ -0,0 +1,40 @@
|
||||
// local_free_on_exit.hpp ------------------------------------------------------------//
|
||||
|
||||
// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
|
||||
// Copyright (c) 2010 Beman Dawes
|
||||
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
// This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid
|
||||
// a dependency on asio. Thanks to Chris Kohlhoff for pointing it out.
|
||||
|
||||
#ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
|
||||
#define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace system {
|
||||
namespace detail {
|
||||
|
||||
class local_free_on_destruction
|
||||
{
|
||||
public:
|
||||
explicit local_free_on_destruction(void* p)
|
||||
: p_(p) {}
|
||||
|
||||
~local_free_on_destruction()
|
||||
{
|
||||
::LocalFree(p_);
|
||||
}
|
||||
|
||||
private:
|
||||
void* p_;
|
||||
local_free_on_destruction(const local_free_on_destruction&); // = deleted
|
||||
local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace system
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
|
||||
@@ -0,0 +1,105 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
// Copyright Peter Dimov 2001-2003
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "placeholders.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg< -1 > _;
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_;
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
/// agurt, 17/mar/02: one more placeholder for the last 'apply#'
|
||||
/// specialization
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<1> _1;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1;
|
||||
}
|
||||
|
||||
}}
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<2> _2;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2;
|
||||
}
|
||||
|
||||
}}
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<3> _3;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3;
|
||||
}
|
||||
|
||||
}}
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<4> _4;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4;
|
||||
}
|
||||
|
||||
}}
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<5> _5;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5;
|
||||
}
|
||||
|
||||
}}
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
|
||||
typedef arg<6> _6;
|
||||
|
||||
BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6)
|
||||
|
||||
namespace placeholders {
|
||||
using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6;
|
||||
}
|
||||
|
||||
}}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,21 @@
|
||||
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
|
||||
#define BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/remove_extent.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
template <class T> struct remove_bounds : public remove_extent<T> {};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED
|
||||
@@ -0,0 +1,42 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_AT_IMPL_31122005_1642)
|
||||
#define BOOST_FUSION_AT_IMPL_31122005_1642
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct mpl_sequence_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template<typename Tag>
|
||||
struct at_impl;
|
||||
|
||||
template <>
|
||||
struct at_impl<mpl_sequence_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename mpl::at<Sequence, N>::type type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Sequence)
|
||||
{
|
||||
return type();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,13 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2007 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_INCLUDE_MAKE_DEQUE)
|
||||
#define FUSION_INCLUDE_MAKE_DEQUE
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/generation/make_deque.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,117 @@
|
||||
// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
|
||||
// Copyright (C) 2015 Andrzej Krzemienski.
|
||||
//
|
||||
// Use, modification, and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/optional for documentation.
|
||||
//
|
||||
// You are welcome to contact the author at:
|
||||
// akrzemi1@gmail.com
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_OPTIONAL_SWAP_AJK_28JAN2015_HPP
|
||||
#define BOOST_OPTIONAL_DETAIL_OPTIONAL_SWAP_AJK_28JAN2015_HPP
|
||||
|
||||
#include <boost/core/swap.hpp>
|
||||
#include <boost/optional/optional_fwd.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace optional_detail {
|
||||
|
||||
template <bool use_default_constructor> struct swap_selector;
|
||||
|
||||
template <>
|
||||
struct swap_selector<true>
|
||||
{
|
||||
template <class T>
|
||||
static void optional_swap ( optional<T>& x, optional<T>& y )
|
||||
{
|
||||
const bool hasX = !!x;
|
||||
const bool hasY = !!y;
|
||||
|
||||
if ( !hasX && !hasY )
|
||||
return;
|
||||
|
||||
if( !hasX )
|
||||
x.emplace();
|
||||
else if ( !hasY )
|
||||
y.emplace();
|
||||
|
||||
// Boost.Utility.Swap will take care of ADL and workarounds for broken compilers
|
||||
boost::swap(x.get(), y.get());
|
||||
|
||||
if( !hasX )
|
||||
y = boost::none ;
|
||||
else if( !hasY )
|
||||
x = boost::none ;
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef BOOST_OPTIONAL_DETAIL_MOVE
|
||||
# undef BOOST_OPTIONAL_DETAIL_MOVE
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
|
||||
# define BOOST_OPTIONAL_DETAIL_MOVE(EXPR_) boost::move(EXPR_)
|
||||
#else
|
||||
# define BOOST_OPTIONAL_DETAIL_MOVE(EXPR_) EXPR_
|
||||
#endif
|
||||
|
||||
template <>
|
||||
struct swap_selector<false>
|
||||
{
|
||||
template <class T>
|
||||
static void optional_swap ( optional<T>& x, optional<T>& y )
|
||||
//BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
|
||||
{
|
||||
if (x)
|
||||
{
|
||||
if (y)
|
||||
{
|
||||
boost::swap(*x, *y);
|
||||
}
|
||||
else
|
||||
{
|
||||
y = BOOST_OPTIONAL_DETAIL_MOVE(*x);
|
||||
x = boost::none;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (y)
|
||||
{
|
||||
x = BOOST_OPTIONAL_DETAIL_MOVE(*y);
|
||||
y = boost::none;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace optional_detail
|
||||
|
||||
#if (!defined BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined BOOST_CONFIG_RESTORE_OBSOLETE_SWAP_IMPLEMENTATION)
|
||||
|
||||
template<class T>
|
||||
struct optional_swap_should_use_default_constructor : boost::false_type {} ;
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
struct optional_swap_should_use_default_constructor : has_nothrow_default_constructor<T> {} ;
|
||||
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline void swap ( optional<T>& x, optional<T>& y )
|
||||
//BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && BOOST_NOEXCEPT_EXPR(boost::swap(*x, *y)))
|
||||
{
|
||||
optional_detail::swap_selector<optional_swap_should_use_default_constructor<T>::value>::optional_swap(x, y);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#undef BOOST_OPTIONAL_DETAIL_MOVE
|
||||
|
||||
#endif // header guard
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2013-2015
|
||||
Copyright (c) Microsoft Corporation 2014
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#if !defined(BOOST_PREDEF_PLATFORM_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
|
||||
#ifndef BOOST_PREDEF_PLATFORM_H
|
||||
#define BOOST_PREDEF_PLATFORM_H
|
||||
#endif
|
||||
|
||||
#include <boost/predef/platform/mingw.h>
|
||||
#include <boost/predef/platform/windows_desktop.h>
|
||||
#include <boost/predef/platform/windows_store.h>
|
||||
#include <boost/predef/platform/windows_phone.h>
|
||||
#include <boost/predef/platform/windows_runtime.h>
|
||||
/*#include <boost/predef/platform/.h>*/
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,9 @@
|
||||
0; 0; 0
|
||||
31; 31; 0
|
||||
63; 63; 0
|
||||
95; 95; 0
|
||||
127;127; 0
|
||||
159;159; 0
|
||||
191;191; 0
|
||||
223;223; 0
|
||||
255;255; 0
|
||||
Reference in New Issue
Block a user