Initial Commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_COMPILER_HP_ACC_H
|
||||
#define BOOST_PREDEF_COMPILER_HP_ACC_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_COMP_HPACC`]
|
||||
|
||||
HP aC++ compiler.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__HP_aCC`] [__predef_detection__]]
|
||||
|
||||
[[`__HP_aCC`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_COMP_HPACC BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__HP_aCC)
|
||||
# if !defined(BOOST_COMP_HPACC_DETECTION) && (__HP_aCC > 1)
|
||||
# define BOOST_COMP_HPACC_DETECTION BOOST_PREDEF_MAKE_10_VVRRPP(__HP_aCC)
|
||||
# endif
|
||||
# if !defined(BOOST_COMP_HPACC_DETECTION)
|
||||
# define BOOST_COMP_HPACC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_COMP_HPACC_DETECTION
|
||||
# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
|
||||
# define BOOST_COMP_HPACC_EMULATED BOOST_COMP_HPACC_DETECTION
|
||||
# else
|
||||
# undef BOOST_COMP_HPACC
|
||||
# define BOOST_COMP_HPACC BOOST_COMP_HPACC_DETECTION
|
||||
# endif
|
||||
# define BOOST_COMP_HPACC_AVAILABLE
|
||||
# include <boost/predef/detail/comp_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_COMP_HPACC_NAME "HP aC++"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC,BOOST_COMP_HPACC_NAME)
|
||||
|
||||
#ifdef BOOST_COMP_HPACC_EMULATED
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_HPACC_EMULATED,BOOST_COMP_HPACC_NAME)
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,91 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/intrusive for documentation.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP
|
||||
#define BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/intrusive/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace intrusive {
|
||||
namespace detail {
|
||||
|
||||
template<bool ConstantSize, class SizeType, class Tag = void>
|
||||
struct size_holder
|
||||
{
|
||||
static const bool constant_time_size = ConstantSize;
|
||||
typedef SizeType size_type;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE SizeType get_size() const
|
||||
{ return size_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void set_size(SizeType size)
|
||||
{ size_ = size; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void decrement()
|
||||
{ --size_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void increment()
|
||||
{ ++size_; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void increase(SizeType n)
|
||||
{ size_ += n; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType n)
|
||||
{ size_ -= n; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void swap(size_holder &other)
|
||||
{ SizeType tmp(size_); size_ = other.size_; other.size_ = tmp; }
|
||||
|
||||
SizeType size_;
|
||||
};
|
||||
|
||||
template<class SizeType, class Tag>
|
||||
struct size_holder<false, SizeType, Tag>
|
||||
{
|
||||
static const bool constant_time_size = false;
|
||||
typedef SizeType size_type;
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE size_type get_size() const
|
||||
{ return 0; }
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void set_size(size_type)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void decrement()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void increment()
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void increase(SizeType)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void decrease(SizeType)
|
||||
{}
|
||||
|
||||
BOOST_INTRUSIVE_FORCEINLINE void swap(size_holder){}
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
} //namespace intrusive{
|
||||
} //namespace boost{
|
||||
|
||||
#endif //BOOST_INTRUSIVE_DETAIL_SIZE_HOLDER_HPP
|
||||
@@ -0,0 +1,151 @@
|
||||
// Copyright Vladimir Prus 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)
|
||||
|
||||
#ifndef BOOST_PARSERS_HPP_VP_2004_05_06
|
||||
#define BOOST_PARSERS_HPP_VP_2004_05_06
|
||||
|
||||
#include <boost/program_options/detail/convert.hpp>
|
||||
|
||||
#include <iterator>
|
||||
|
||||
namespace boost { namespace program_options {
|
||||
|
||||
namespace detail {
|
||||
template<class charT, class Iterator>
|
||||
std::vector<std::basic_string<charT> >
|
||||
make_vector(Iterator i, Iterator e)
|
||||
{
|
||||
std::vector<std::basic_string<charT> > result;
|
||||
// Some compilers don't have templated constructor for
|
||||
// vector, so we can't create vector from (argv+1, argv+argc) range
|
||||
for(; i != e; ++i)
|
||||
result.push_back(*i);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>::
|
||||
basic_command_line_parser(const std::vector<
|
||||
std::basic_string<charT> >& xargs)
|
||||
: detail::cmdline(to_internal(xargs))
|
||||
{}
|
||||
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>::
|
||||
basic_command_line_parser(int argc, const charT* const argv[])
|
||||
: detail::cmdline(
|
||||
// Explicit template arguments are required by gcc 3.3.1
|
||||
// (at least mingw version), and do no harm on other compilers.
|
||||
to_internal(detail::make_vector<charT, const charT* const*>(argv+1, argv+argc+!argc))),
|
||||
m_desc()
|
||||
{}
|
||||
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::options(const options_description& desc)
|
||||
{
|
||||
detail::cmdline::set_options_description(desc);
|
||||
m_desc = &desc;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::positional(
|
||||
const positional_options_description& desc)
|
||||
{
|
||||
detail::cmdline::set_positional_options(desc);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::style(int xstyle)
|
||||
{
|
||||
detail::cmdline::style(xstyle);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::extra_parser(ext_parser ext)
|
||||
{
|
||||
detail::cmdline::set_additional_parser(ext);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::allow_unregistered()
|
||||
{
|
||||
detail::cmdline::allow_unregistered();
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
basic_command_line_parser<charT>&
|
||||
basic_command_line_parser<charT>::extra_style_parser(style_parser s)
|
||||
{
|
||||
detail::cmdline::extra_style_parser(s);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<class charT>
|
||||
basic_parsed_options<charT>
|
||||
basic_command_line_parser<charT>::run()
|
||||
{
|
||||
// save the canonical prefixes which were used by this cmdline parser
|
||||
// eventually inside the parsed results
|
||||
// This will be handy to format recognisable options
|
||||
// for diagnostic messages if everything blows up much later on
|
||||
parsed_options result(m_desc, detail::cmdline::get_canonical_option_prefix());
|
||||
result.options = detail::cmdline::run();
|
||||
|
||||
// Presense of parsed_options -> wparsed_options conversion
|
||||
// does the trick.
|
||||
return basic_parsed_options<charT>(result);
|
||||
}
|
||||
|
||||
|
||||
template<class charT>
|
||||
basic_parsed_options<charT>
|
||||
parse_command_line(int argc, const charT* const argv[],
|
||||
const options_description& desc,
|
||||
int style,
|
||||
function1<std::pair<std::string, std::string>,
|
||||
const std::string&> ext)
|
||||
{
|
||||
return basic_command_line_parser<charT>(argc, argv).options(desc).
|
||||
style(style).extra_parser(ext).run();
|
||||
}
|
||||
|
||||
template<class charT>
|
||||
std::vector< std::basic_string<charT> >
|
||||
collect_unrecognized(const std::vector< basic_option<charT> >& options,
|
||||
enum collect_unrecognized_mode mode)
|
||||
{
|
||||
std::vector< std::basic_string<charT> > result;
|
||||
for(unsigned i = 0; i < options.size(); ++i)
|
||||
{
|
||||
if (options[i].unregistered ||
|
||||
(mode == include_positional && options[i].position_key != -1))
|
||||
{
|
||||
copy(options[i].original_tokens.begin(),
|
||||
options[i].original_tokens.end(),
|
||||
back_inserter(result));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,64 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013-2014 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_FUNCTIONAL_IDENTITY_HPP
|
||||
#define BOOST_COMPUTE_FUNCTIONAL_IDENTITY_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class T, class Arg>
|
||||
struct invoked_identity
|
||||
{
|
||||
typedef T result_type;
|
||||
|
||||
invoked_identity(const Arg &arg)
|
||||
: m_arg(arg)
|
||||
{
|
||||
}
|
||||
|
||||
Arg m_arg;
|
||||
};
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// Identity function which simply returns its input.
|
||||
///
|
||||
/// For example, to directly copy values using the transform() algorithm:
|
||||
/// \code
|
||||
/// transform(input.begin(), input.end(), output.begin(), identity<int>(), queue);
|
||||
/// \endcode
|
||||
///
|
||||
/// \see \ref as "as<T>", \ref convert "convert<T>"
|
||||
template<class T>
|
||||
class identity
|
||||
{
|
||||
public:
|
||||
/// Identity function result type.
|
||||
typedef T result_type;
|
||||
|
||||
/// Creates a new identity function.
|
||||
identity()
|
||||
{
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
template<class Arg>
|
||||
detail::invoked_identity<T, Arg> operator()(const Arg &arg) const
|
||||
{
|
||||
return detail::invoked_identity<T, Arg>(arg);
|
||||
}
|
||||
};
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_FUNCTIONAL_IDENTITY_HPP
|
||||
@@ -0,0 +1,180 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
/// forward declaration
|
||||
|
||||
template<
|
||||
int N
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl;
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< 0,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef state0 state;
|
||||
typedef iter0 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< 1,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
|
||||
|
||||
typedef state1 state;
|
||||
typedef iter1 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< 2,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
|
||||
|
||||
typedef state2 state;
|
||||
typedef iter2 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< 3,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
|
||||
typedef typename mpl::next<iter2>::type iter3;
|
||||
|
||||
|
||||
typedef state3 state;
|
||||
typedef iter3 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< 4,First,Last,State,ForwardOp >
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State state0;
|
||||
typedef typename apply2< ForwardOp,state0,iter0 >::type state1;
|
||||
typedef typename mpl::next<iter0>::type iter1;
|
||||
typedef typename apply2< ForwardOp,state1,iter1 >::type state2;
|
||||
typedef typename mpl::next<iter1>::type iter2;
|
||||
typedef typename apply2< ForwardOp,state2,iter2 >::type state3;
|
||||
typedef typename mpl::next<iter2>::type iter3;
|
||||
typedef typename apply2< ForwardOp,state3,iter3 >::type state4;
|
||||
typedef typename mpl::next<iter3>::type iter4;
|
||||
|
||||
|
||||
typedef state4 state;
|
||||
typedef iter4 iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
int N
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl
|
||||
{
|
||||
typedef iter_fold_impl<
|
||||
4
|
||||
, First
|
||||
, Last
|
||||
, State
|
||||
, ForwardOp
|
||||
> chunk_;
|
||||
|
||||
typedef iter_fold_impl<
|
||||
( (N - 4) < 0 ? 0 : N - 4 )
|
||||
, typename chunk_::iterator
|
||||
, Last
|
||||
, typename chunk_::state
|
||||
, ForwardOp
|
||||
> res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< -1,First,Last,State,ForwardOp >
|
||||
: iter_fold_impl<
|
||||
-1
|
||||
, typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2< ForwardOp,State,First >::type
|
||||
, ForwardOp
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct iter_fold_impl< -1,Last,Last,State,ForwardOp >
|
||||
{
|
||||
typedef State state;
|
||||
typedef Last iterator;
|
||||
};
|
||||
|
||||
}}}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
||||
/* default stylesheet for the message aggregator application */
|
||||
|
||||
[transmitting="true"] {
|
||||
background-color: yellow
|
||||
}
|
||||
|
||||
[decoding="true"] {
|
||||
background-color: cyan
|
||||
}
|
||||
|
||||
[watchdog_timeout="true"] {
|
||||
background-color: red
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
// Copyright David Abrahams 2001.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef FUNCTION_DWA20011214_HPP
|
||||
# define FUNCTION_DWA20011214_HPP
|
||||
|
||||
# include <boost/python/detail/prefix.hpp>
|
||||
# include <boost/python/args_fwd.hpp>
|
||||
# include <boost/python/handle.hpp>
|
||||
# include <boost/function/function2.hpp>
|
||||
# include <boost/python/object_core.hpp>
|
||||
# include <boost/python/object/py_function.hpp>
|
||||
|
||||
namespace boost { namespace python { namespace objects {
|
||||
|
||||
|
||||
struct BOOST_PYTHON_DECL function : PyObject
|
||||
{
|
||||
function(
|
||||
py_function const&
|
||||
, python::detail::keyword const* names_and_defaults
|
||||
, unsigned num_keywords);
|
||||
|
||||
~function();
|
||||
|
||||
PyObject* call(PyObject*, PyObject*) const;
|
||||
|
||||
// Add an attribute to the name_space with the given name. If it is
|
||||
// a function object (this class), and an existing function is
|
||||
// already there, add it as an overload.
|
||||
static void add_to_namespace(
|
||||
object const& name_space, char const* name, object const& attribute);
|
||||
|
||||
static void add_to_namespace(
|
||||
object const& name_space, char const* name, object const& attribute, char const* doc);
|
||||
|
||||
object const& doc() const;
|
||||
void doc(object const& x);
|
||||
|
||||
object const& name() const;
|
||||
|
||||
object const& get_namespace() const { return m_namespace; }
|
||||
|
||||
private: // helper functions
|
||||
object signature(bool show_return_type=false) const;
|
||||
object signatures(bool show_return_type=false) const;
|
||||
void argument_error(PyObject* args, PyObject* keywords) const;
|
||||
void add_overload(handle<function> const&);
|
||||
|
||||
private: // data members
|
||||
py_function m_fn;
|
||||
handle<function> m_overloads;
|
||||
object m_name;
|
||||
object m_namespace;
|
||||
object m_doc;
|
||||
object m_arg_names;
|
||||
unsigned m_nkeyword_values;
|
||||
friend class function_doc_signature_generator;
|
||||
};
|
||||
|
||||
//
|
||||
// implementations
|
||||
//
|
||||
inline object const& function::doc() const
|
||||
{
|
||||
return this->m_doc;
|
||||
}
|
||||
|
||||
inline void function::doc(object const& x)
|
||||
{
|
||||
this->m_doc = x;
|
||||
}
|
||||
|
||||
inline object const& function::name() const
|
||||
{
|
||||
return this->m_name;
|
||||
}
|
||||
|
||||
}}} // namespace boost::python::objects
|
||||
|
||||
#endif // FUNCTION_DWA20011214_HPP
|
||||
@@ -0,0 +1,87 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// 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_DETAIL_COUNT_IF_WITH_REDUCE_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_DETAIL_COUNT_IF_WITH_REDUCE_HPP
|
||||
|
||||
#include <boost/compute/algorithm/reduce.hpp>
|
||||
#include <boost/compute/iterator/transform_iterator.hpp>
|
||||
#include <boost/compute/types/fundamental.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
template<class Predicate, class Arg>
|
||||
struct invoked_countable_predicate
|
||||
{
|
||||
invoked_countable_predicate(Predicate p, Arg a)
|
||||
: predicate(p), arg(a)
|
||||
{
|
||||
}
|
||||
|
||||
Predicate predicate;
|
||||
Arg arg;
|
||||
};
|
||||
|
||||
template<class Predicate, class Arg>
|
||||
inline meta_kernel& operator<<(meta_kernel &kernel,
|
||||
const invoked_countable_predicate<Predicate, Arg> &expr)
|
||||
{
|
||||
return kernel << "(" << expr.predicate(expr.arg) << " ? 1 : 0)";
|
||||
}
|
||||
|
||||
// the countable_predicate wraps Predicate and converts its result from
|
||||
// bool to ulong so that it can be used with reduce()
|
||||
template<class Predicate>
|
||||
struct countable_predicate
|
||||
{
|
||||
typedef ulong_ result_type;
|
||||
|
||||
countable_predicate(Predicate predicate)
|
||||
: m_predicate(predicate)
|
||||
{
|
||||
}
|
||||
|
||||
template<class Arg>
|
||||
invoked_countable_predicate<Predicate, Arg> operator()(const Arg &arg) const
|
||||
{
|
||||
return invoked_countable_predicate<Predicate, Arg>(m_predicate, arg);
|
||||
}
|
||||
|
||||
Predicate m_predicate;
|
||||
};
|
||||
|
||||
// counts the number of elements matching predicate using reduce()
|
||||
template<class InputIterator, class Predicate>
|
||||
inline size_t count_if_with_reduce(InputIterator first,
|
||||
InputIterator last,
|
||||
Predicate predicate,
|
||||
command_queue &queue)
|
||||
{
|
||||
countable_predicate<Predicate> reduce_predicate(predicate);
|
||||
|
||||
ulong_ count = 0;
|
||||
::boost::compute::reduce(
|
||||
::boost::compute::make_transform_iterator(first, reduce_predicate),
|
||||
::boost::compute::make_transform_iterator(last, reduce_predicate),
|
||||
&count,
|
||||
::boost::compute::plus<ulong_>(),
|
||||
queue
|
||||
);
|
||||
|
||||
return static_cast<size_t>(count);
|
||||
}
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_COUNT_IF_WITH_REDUCE_HPP
|
||||
Binary file not shown.
@@ -0,0 +1,115 @@
|
||||
// -*- Mode: C++ -*-
|
||||
#ifndef WIDEGRAPH_H
|
||||
#define WIDEGRAPH_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
#include <QDir>
|
||||
#include <QHash>
|
||||
#include <QVariant>
|
||||
#include "WFPalette.hpp"
|
||||
|
||||
#define MAX_SCREENSIZE 2048
|
||||
|
||||
namespace Ui {
|
||||
class WideGraph;
|
||||
}
|
||||
|
||||
class QSettings;
|
||||
class Configuration;
|
||||
|
||||
class WideGraph : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WideGraph(QSettings *, QWidget *parent = 0);
|
||||
~WideGraph ();
|
||||
|
||||
void dataSink2(float s[], float df3, int ihsym, int ndiskdata);
|
||||
void setRxFreq(int n);
|
||||
int rxFreq();
|
||||
int nStartFreq();
|
||||
int Fmin();
|
||||
int Fmax();
|
||||
int fSpan();
|
||||
void saveSettings();
|
||||
void setFsample(int n);
|
||||
void setPeriod(int ntrperiod, int nsps);
|
||||
void setTxFreq(int n);
|
||||
void setMode(QString mode);
|
||||
void setSubMode(int n);
|
||||
void setModeTx(QString modeTx);
|
||||
bool flatten();
|
||||
bool useRef();
|
||||
void setTol(int n);
|
||||
int smoothYellow();
|
||||
void setRxBand (QString const& band);
|
||||
void setWSPRtransmitted();
|
||||
void drawRed(int ia, int ib);
|
||||
void setVHF(bool bVHF);
|
||||
void setRedFile(QString fRed);
|
||||
|
||||
signals:
|
||||
void freezeDecode2(int n);
|
||||
void f11f12(int n);
|
||||
void setXIT2(int n);
|
||||
void setFreq3(int rxFreq, int txFreq);
|
||||
|
||||
public slots:
|
||||
void wideFreezeDecode(int n);
|
||||
void setFreq2(int rxFreq, int txFreq);
|
||||
void setDialFreq(double d);
|
||||
|
||||
protected:
|
||||
void keyPressEvent (QKeyEvent *e) override;
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
|
||||
private slots:
|
||||
void on_waterfallAvgSpinBox_valueChanged(int arg1);
|
||||
void on_bppSpinBox_valueChanged(int arg1);
|
||||
void on_spec2dComboBox_currentIndexChanged(const QString &arg1);
|
||||
void on_fSplitSpinBox_valueChanged(int n);
|
||||
void on_fStartSpinBox_valueChanged(int n);
|
||||
void on_paletteComboBox_activated(const QString &palette);
|
||||
void on_cbFlatten_toggled(bool b);
|
||||
void on_cbRef_toggled(bool b);
|
||||
void on_cbControls_toggled(bool b);
|
||||
void on_adjust_palette_push_button_clicked (bool);
|
||||
void on_gainSlider_valueChanged(int value);
|
||||
void on_zeroSlider_valueChanged(int value);
|
||||
void on_gain2dSlider_valueChanged(int value);
|
||||
void on_zero2dSlider_valueChanged(int value);
|
||||
void on_smoSpinBox_valueChanged(int n);
|
||||
void on_sbPercent2dPlot_valueChanged(int n);
|
||||
|
||||
private:
|
||||
void readPalette ();
|
||||
void setRxRange ();
|
||||
|
||||
QScopedPointer<Ui::WideGraph> ui;
|
||||
|
||||
QSettings * m_settings;
|
||||
QDir m_palettes_path;
|
||||
WFPalette m_userPalette;
|
||||
|
||||
qint32 m_waterfallAvg;
|
||||
qint32 m_TRperiod;
|
||||
qint32 m_nsps;
|
||||
qint32 m_ntr0;
|
||||
QHash<QString, QVariant> m_fMinPerBand;
|
||||
qint32 m_fMax;
|
||||
QString m_rxBand;
|
||||
qint32 m_nSubMode;
|
||||
qint32 m_nsmo;
|
||||
qint32 m_Percent2DScreen;
|
||||
bool m_bFlatten;
|
||||
bool m_bRef;
|
||||
bool m_bHaveTransmitted; //Set true at end of a WSPR transmission
|
||||
QString m_mode;
|
||||
QString m_modeTx;
|
||||
QString m_waterfallPalette;
|
||||
int m_n;
|
||||
};
|
||||
|
||||
#endif // WIDEGRAPH_H
|
||||
@@ -0,0 +1,367 @@
|
||||
subroutine ft8b(dd0,newdat,nQSOProgress,nfqso,nftx,ndepth,lapon,napwid, &
|
||||
lsubtract,nagain,iaptype,mygrid6,bcontest,sync0,f1,xdt,xbase,apsym, &
|
||||
nharderrors,dmin,nbadcrc,ipass,iera,message,xsnr)
|
||||
|
||||
use timer_module, only: timer
|
||||
include 'ft8_params.f90'
|
||||
parameter(NRECENT=10,NP2=2812)
|
||||
character message*22,msgsent*22
|
||||
character*12 recent_calls(NRECENT)
|
||||
character*6 mygrid6
|
||||
logical bcontest
|
||||
real a(5)
|
||||
real s1(0:7,ND),s2(0:7,NN)
|
||||
real ps(0:7)
|
||||
real bmeta(3*ND),bmetap(3*ND)
|
||||
real llr(3*ND),llra(3*ND),llr0(3*ND),llrap(3*ND) !Soft symbols
|
||||
real dd0(15*12000)
|
||||
integer*1 decoded(KK),apmask(3*ND),cw(3*ND)
|
||||
integer*1 msgbits(KK)
|
||||
integer apsym(KK)
|
||||
integer mcq(28),mde(28),mrrr(16),m73(16),mrr73(16)
|
||||
integer itone(NN)
|
||||
integer icos7(0:6),ip(1)
|
||||
integer nappasses(0:5) ! the number of decoding passes to use for each QSO state
|
||||
integer naptypes(0:5,4) ! (nQSOProgress, decoding pass) maximum of 4 passes for now
|
||||
complex cd0(3200)
|
||||
complex ctwk(32)
|
||||
complex csymb(32)
|
||||
logical first,newdat,lsubtract,lapon,nagain
|
||||
data icos7/2,5,6,0,4,1,3/
|
||||
data mcq/1,1,1,1,1,0,1,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,1,1,0,0,1/
|
||||
data mrrr/0,1,1,1,1,1,1,0,1,1,0,0,1,1,1,1/
|
||||
data m73/0,1,1,1,1,1,1,0,1,1,0,1,0,0,0,0/
|
||||
data mde/1,1,1,1,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,1,1,1,0,1,0,0,0,1/
|
||||
data mrr73/0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,1/
|
||||
data first/.true./
|
||||
save nappasses,naptypes
|
||||
|
||||
if(first) then
|
||||
mcq=2*mcq-1
|
||||
mde=2*mde-1
|
||||
mrrr=2*mrrr-1
|
||||
m73=2*m73-1
|
||||
mrr73=2*mrr73-1
|
||||
nappasses(0)=2
|
||||
nappasses(1)=2
|
||||
nappasses(2)=2
|
||||
nappasses(3)=4
|
||||
nappasses(4)=4
|
||||
nappasses(5)=3
|
||||
|
||||
! iaptype
|
||||
!------------------------
|
||||
! 1 CQ ??? ???
|
||||
! 2 MyCall ??? ???
|
||||
! 3 MyCall DxCall ???
|
||||
! 4 MyCall DxCall RRR
|
||||
! 5 MyCall DxCall 73
|
||||
! 6 MyCall DxCall RR73
|
||||
! 7 ??? DxCall ???
|
||||
|
||||
naptypes(0,1:4)=(/1,2,0,0/)
|
||||
naptypes(1,1:4)=(/2,3,0,0/)
|
||||
naptypes(2,1:4)=(/2,3,0,0/)
|
||||
naptypes(3,1:4)=(/3,4,5,6/)
|
||||
naptypes(4,1:4)=(/3,4,5,6/)
|
||||
naptypes(5,1:4)=(/3,1,2,0/) !?
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
max_iterations=30
|
||||
nharderrors=-1
|
||||
fs2=12000.0/NDOWN
|
||||
dt2=1.0/fs2
|
||||
twopi=8.0*atan(1.0)
|
||||
delfbest=0.
|
||||
ibest=0
|
||||
|
||||
call timer('ft8_down',0)
|
||||
call ft8_downsample(dd0,newdat,f1,cd0) !Mix f1 to baseband and downsample
|
||||
call timer('ft8_down',1)
|
||||
|
||||
i0=nint((xdt+0.5)*fs2) !Initial guess for start of signal
|
||||
smax=0.0
|
||||
do idt=i0-8,i0+8 !Search over +/- one quarter symbol
|
||||
call sync8d(cd0,idt,ctwk,0,sync)
|
||||
if(sync.gt.smax) then
|
||||
smax=sync
|
||||
ibest=idt
|
||||
endif
|
||||
enddo
|
||||
xdt2=ibest*dt2 !Improved estimate for DT
|
||||
|
||||
! Now peak up in frequency
|
||||
i0=nint(xdt2*fs2)
|
||||
smax=0.0
|
||||
do ifr=-5,5 !Search over +/- 2.5 Hz
|
||||
delf=ifr*0.5
|
||||
dphi=twopi*delf*dt2
|
||||
phi=0.0
|
||||
do i=1,32
|
||||
ctwk(i)=cmplx(cos(phi),sin(phi))
|
||||
phi=mod(phi+dphi,twopi)
|
||||
enddo
|
||||
call sync8d(cd0,i0,ctwk,1,sync)
|
||||
if( sync .gt. smax ) then
|
||||
smax=sync
|
||||
delfbest=delf
|
||||
endif
|
||||
enddo
|
||||
a=0.0
|
||||
a(1)=-delfbest
|
||||
call twkfreq1(cd0,NP2,fs2,a,cd0)
|
||||
xdt=xdt2
|
||||
f1=f1+delfbest !Improved estimate of DF
|
||||
|
||||
call sync8d(cd0,i0,ctwk,2,sync)
|
||||
|
||||
j=0
|
||||
do k=1,NN
|
||||
i1=ibest+(k-1)*32
|
||||
csymb=cmplx(0.0,0.0)
|
||||
if( i1.ge.1 .and. i1+31 .le. NP2 ) csymb=cd0(i1:i1+31)
|
||||
call four2a(csymb,32,1,-1,1)
|
||||
s2(0:7,k)=abs(csymb(1:8))/1e3
|
||||
enddo
|
||||
|
||||
! sync quality check
|
||||
is1=0
|
||||
is2=0
|
||||
is3=0
|
||||
do k=1,7
|
||||
ip=maxloc(s2(:,k))
|
||||
if(icos7(k-1).eq.(ip(1)-1)) is1=is1+1
|
||||
ip=maxloc(s2(:,k+36))
|
||||
if(icos7(k-1).eq.(ip(1)-1)) is2=is2+1
|
||||
ip=maxloc(s2(:,k+72))
|
||||
if(icos7(k-1).eq.(ip(1)-1)) is3=is3+1
|
||||
enddo
|
||||
! hard sync sum - max is 21
|
||||
nsync=is1+is2+is3
|
||||
if(nsync .le. 6) then ! bail out
|
||||
nbadcrc=1
|
||||
return
|
||||
endif
|
||||
|
||||
j=0
|
||||
do k=1,NN
|
||||
if(k.le.7) cycle
|
||||
if(k.ge.37 .and. k.le.43) cycle
|
||||
if(k.gt.72) cycle
|
||||
j=j+1
|
||||
s1(0:7,j)=s2(0:7,k)
|
||||
enddo
|
||||
|
||||
do j=1,ND
|
||||
i4=3*j-2
|
||||
i2=3*j-1
|
||||
i1=3*j
|
||||
ps=s1(0:7,j)
|
||||
r1=max(ps(1),ps(3),ps(5),ps(7))-max(ps(0),ps(2),ps(4),ps(6))
|
||||
r2=max(ps(2),ps(3),ps(6),ps(7))-max(ps(0),ps(1),ps(4),ps(5))
|
||||
r4=max(ps(4),ps(5),ps(6),ps(7))-max(ps(0),ps(1),ps(2),ps(3))
|
||||
bmeta(i4)=r4
|
||||
bmeta(i2)=r2
|
||||
bmeta(i1)=r1
|
||||
bmetap(i4)=r4
|
||||
bmetap(i2)=r2
|
||||
bmetap(i1)=r1
|
||||
|
||||
if(nQSOProgress .eq. 0 .or. nQSOProgress .eq. 5) then
|
||||
! When bits 88:115 are set as ap bits, bit 115 lives in symbol 39 along
|
||||
! with no-ap bits 116 and 117. Take care of metrics for bits 116 and 117.
|
||||
if(j.eq.39) then ! take care of bits that live in symbol 39
|
||||
if(apsym(28).lt.0) then
|
||||
bmetap(i2)=max(ps(2),ps(3))-max(ps(0),ps(1))
|
||||
bmetap(i1)=max(ps(1),ps(3))-max(ps(0),ps(2))
|
||||
else
|
||||
bmetap(i2)=max(ps(6),ps(7))-max(ps(4),ps(5))
|
||||
bmetap(i1)=max(ps(5),ps(7))-max(ps(4),ps(6))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
! When bits 116:143 are set as ap bits, bit 115 lives in symbol 39 along
|
||||
! with ap bits 116 and 117. Take care of metric for bit 115.
|
||||
! if(j.eq.39) then ! take care of bit 115
|
||||
! iii=2*(apsym(29)+1)/2 + (apsym(30)+1)/2 ! known values of bits 116 & 117
|
||||
! if(iii.eq.0) bmetap(i4)=ps(4)-ps(0)
|
||||
! if(iii.eq.1) bmetap(i4)=ps(5)-ps(1)
|
||||
! if(iii.eq.2) bmetap(i4)=ps(6)-ps(2)
|
||||
! if(iii.eq.3) bmetap(i4)=ps(7)-ps(3)
|
||||
! endif
|
||||
|
||||
! bit 144 lives in symbol 48 and will be 1 if it is set as an ap bit.
|
||||
! take care of metrics for bits 142 and 143
|
||||
if(j.eq.48) then ! bit 144 is always 1
|
||||
bmetap(i4)=max(ps(5),ps(7))-max(ps(1),ps(3))
|
||||
bmetap(i2)=max(ps(3),ps(7))-max(ps(1),ps(5))
|
||||
endif
|
||||
|
||||
! bit 154 lives in symbol 52 and will be 0 if it is set as an ap bit
|
||||
! take care of metrics for bits 155 and 156
|
||||
if(j.eq.52) then ! bit 154 will be 0 if it is set as an ap bit.
|
||||
bmetap(i2)=max(ps(2),ps(3))-max(ps(0),ps(1))
|
||||
bmetap(i1)=max(ps(1),ps(3))-max(ps(0),ps(2))
|
||||
endif
|
||||
|
||||
enddo
|
||||
|
||||
call normalizebmet(bmeta,3*ND)
|
||||
call normalizebmet(bmetap,3*ND)
|
||||
|
||||
ss=0.84
|
||||
llr0=2.0*bmeta/(ss*ss)
|
||||
llra=2.0*bmetap/(ss*ss) ! llr's for use with ap
|
||||
apmag=4.0
|
||||
|
||||
! pass #
|
||||
!------------------------------
|
||||
! 1 regular decoding
|
||||
! 2 erase 24
|
||||
! 3 erase 48
|
||||
! 4 ap pass 1
|
||||
! 5 ap pass 2
|
||||
! 6 ap pass 3
|
||||
! 7 ap pass 4, etc.
|
||||
|
||||
if(lapon) then
|
||||
npasses=3+nappasses(nQSOProgress)
|
||||
else
|
||||
npasses=3
|
||||
endif
|
||||
|
||||
do ipass=1,npasses
|
||||
|
||||
llr=llr0
|
||||
if(ipass.eq.2) llr(1:24)=0.
|
||||
if(ipass.eq.3) llr(1:48)=0.
|
||||
if(ipass.le.3) then
|
||||
apmask=0
|
||||
llrap=llr
|
||||
iaptype=0
|
||||
endif
|
||||
|
||||
if(ipass .gt. 3) then
|
||||
iaptype=naptypes(nQSOProgress,ipass-3)
|
||||
if(iaptype.ge.3 .and. (abs(f1-nfqso).gt.napwid .and. abs(f1-nftx).gt.napwid) ) cycle
|
||||
if(iaptype.eq.1 .or. iaptype.eq.2 ) then ! AP,???,???
|
||||
apmask=0
|
||||
apmask(88:115)=1 ! first 28 bits are AP
|
||||
apmask(144)=1 ! not free text
|
||||
llrap=llr
|
||||
if(iaptype.eq.1) llrap(88:115)=apmag*mcq/ss
|
||||
if(iaptype.eq.2) llrap(88:115)=apmag*apsym(1:28)/ss
|
||||
llrap(116:117)=llra(116:117)
|
||||
llrap(142:143)=llra(142:143)
|
||||
llrap(144)=-apmag/ss
|
||||
endif
|
||||
if(iaptype.eq.3) then ! mycall, dxcall, ???
|
||||
apmask=0
|
||||
apmask(88:115)=1 ! mycall
|
||||
apmask(116:143)=1 ! hiscall
|
||||
apmask(144)=1 ! not free text
|
||||
llrap=llr
|
||||
llrap(88:143)=apmag*apsym(1:56)/ss
|
||||
llrap(144)=-apmag/ss
|
||||
endif
|
||||
if(iaptype.eq.4 .or. iaptype.eq.5 .or. iaptype.eq.6) then
|
||||
apmask=0
|
||||
apmask(88:115)=1 ! mycall
|
||||
apmask(116:143)=1 ! hiscall
|
||||
apmask(144:159)=1 ! RRR or 73 or RR73
|
||||
llrap=llr
|
||||
llrap(88:143)=apmag*apsym(1:56)/ss
|
||||
if(iaptype.eq.4) llrap(144:159)=apmag*mrrr/ss
|
||||
if(iaptype.eq.5) llrap(144:159)=apmag*m73/ss
|
||||
if(iaptype.eq.6) llrap(144:159)=apmag*mrr73/ss
|
||||
endif
|
||||
if(iaptype.eq.7) then ! ???, dxcall, ???
|
||||
apmask=0
|
||||
apmask(116:143)=1 ! hiscall
|
||||
apmask(144)=1 ! not free text
|
||||
llrap=llr
|
||||
llrap(115)=llra(115)
|
||||
llrap(116:143)=apmag*apsym(29:56)/ss
|
||||
llrap(144)=-apmag/ss
|
||||
endif
|
||||
endif
|
||||
|
||||
cw=0
|
||||
call timer('bpd174 ',0)
|
||||
call bpdecode174(llrap,apmask,max_iterations,decoded,cw,nharderrors, &
|
||||
niterations)
|
||||
call timer('bpd174 ',1)
|
||||
dmin=0.0
|
||||
if(ndepth.eq.3 .and. nharderrors.lt.0) then
|
||||
ndeep=3
|
||||
if(abs(nfqso-f1).le.napwid .or. abs(nftx-f1).le.napwid) then
|
||||
if((ipass.eq.2 .or. ipass.eq.3) .and. .not.nagain) then
|
||||
ndeep=3
|
||||
else
|
||||
ndeep=4
|
||||
endif
|
||||
endif
|
||||
if(nagain) ndeep=5
|
||||
call timer('osd174 ',0)
|
||||
call osd174(llrap,apmask,ndeep,decoded,cw,nharderrors,dmin)
|
||||
call timer('osd174 ',1)
|
||||
endif
|
||||
nbadcrc=1
|
||||
message=' '
|
||||
xsnr=-99.0
|
||||
if(count(cw.eq.0).eq.174) cycle !Reject the all-zero codeword
|
||||
if(any(decoded(73:75).ne.0)) cycle !Reject if any of the 3 extra bits are nonzero
|
||||
if(nharderrors.ge.0 .and. nharderrors+dmin.lt.60.0 .and. &
|
||||
.not.(sync.lt.2.0 .and. nharderrors.gt.35) .and. &
|
||||
.not.(ipass.gt.1 .and. nharderrors.gt.39) .and. &
|
||||
.not.(ipass.eq.3 .and. nharderrors.gt.30) &
|
||||
) then
|
||||
call chkcrc12a(decoded,nbadcrc)
|
||||
else
|
||||
nharderrors=-1
|
||||
cycle
|
||||
endif
|
||||
if(nbadcrc.eq.0) then
|
||||
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
||||
call genft8(message,mygrid6,bcontest,msgsent,msgbits,itone)
|
||||
if(lsubtract) call subtractft8(dd0,itone,f1,xdt2)
|
||||
xsig=0.0
|
||||
xnoi=0.0
|
||||
do i=1,79
|
||||
xsig=xsig+s2(itone(i),i)**2
|
||||
ios=mod(itone(i)+4,7)
|
||||
xnoi=xnoi+s2(ios,i)**2
|
||||
enddo
|
||||
xsnr=0.001
|
||||
if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0
|
||||
xsnr=10.0*log10(xsnr)-27.0
|
||||
!###
|
||||
xsnr2=db(xsig/xbase - 1.0) - 32.0
|
||||
! write(52,3052) f1,xdt,xsig,xnoi,xbase,xsnr,xsnr2
|
||||
!3052 format(7f10.2)
|
||||
xsnr=xsnr2
|
||||
!###
|
||||
if(xsnr .lt. -24.0) xsnr=-24.0
|
||||
return
|
||||
endif
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine ft8b
|
||||
|
||||
subroutine normalizebmet(bmet,n)
|
||||
real bmet(n)
|
||||
|
||||
bmetav=sum(bmet)/real(n)
|
||||
bmet2av=sum(bmet*bmet)/real(n)
|
||||
var=bmet2av-bmetav*bmetav
|
||||
if( var .gt. 0.0 ) then
|
||||
bmetsig=sqrt(var)
|
||||
else
|
||||
bmetsig=sqrt(bmet2av)
|
||||
endif
|
||||
bmet=bmet/bmetsig
|
||||
return
|
||||
end subroutine normalizebmet
|
||||
@@ -0,0 +1,173 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/vector/vector30_c.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
>
|
||||
struct vector21_c
|
||||
: v_item<
|
||||
integral_c< T,C20 >
|
||||
, vector20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >
|
||||
>
|
||||
{
|
||||
typedef vector21_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21
|
||||
>
|
||||
struct vector22_c
|
||||
: v_item<
|
||||
integral_c< T,C21 >
|
||||
, vector21_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 >
|
||||
>
|
||||
{
|
||||
typedef vector22_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22
|
||||
>
|
||||
struct vector23_c
|
||||
: v_item<
|
||||
integral_c< T,C22 >
|
||||
, vector22_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 >
|
||||
>
|
||||
{
|
||||
typedef vector23_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23
|
||||
>
|
||||
struct vector24_c
|
||||
: v_item<
|
||||
integral_c< T,C23 >
|
||||
, vector23_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 >
|
||||
>
|
||||
{
|
||||
typedef vector24_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24
|
||||
>
|
||||
struct vector25_c
|
||||
: v_item<
|
||||
integral_c< T,C24 >
|
||||
, vector24_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 >
|
||||
>
|
||||
{
|
||||
typedef vector25_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25
|
||||
>
|
||||
struct vector26_c
|
||||
: v_item<
|
||||
integral_c< T,C25 >
|
||||
, vector25_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 >
|
||||
>
|
||||
{
|
||||
typedef vector26_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26
|
||||
>
|
||||
struct vector27_c
|
||||
: v_item<
|
||||
integral_c< T,C26 >
|
||||
, vector26_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 >
|
||||
>
|
||||
{
|
||||
typedef vector27_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27
|
||||
>
|
||||
struct vector28_c
|
||||
: v_item<
|
||||
integral_c< T,C27 >
|
||||
, vector27_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 >
|
||||
>
|
||||
{
|
||||
typedef vector28_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28
|
||||
>
|
||||
struct vector29_c
|
||||
: v_item<
|
||||
integral_c< T,C28 >
|
||||
, vector28_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 >
|
||||
>
|
||||
{
|
||||
typedef vector29_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename T
|
||||
, T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10
|
||||
, T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20
|
||||
, T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29
|
||||
>
|
||||
struct vector30_c
|
||||
: v_item<
|
||||
integral_c< T,C29 >
|
||||
, vector29_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 >
|
||||
>
|
||||
{
|
||||
typedef vector30_c type;
|
||||
typedef T value_type;
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,138 @@
|
||||
subroutine fano232(symbol,nbits,mettab,ndelta,maxcycles,dat, &
|
||||
ncycles,metric,ierr)
|
||||
|
||||
! Sequential decoder for K=32, r=1/2 convolutional code using
|
||||
! the Fano algorithm. Translated from C routine for same purpose
|
||||
! written by Phil Karn, KA9Q.
|
||||
|
||||
parameter (MAXBITS=103)
|
||||
parameter (MAXBYTES=(MAXBITS+7)/8)
|
||||
integer*1 symbol(0:2*MAXBITS-1) !Soft symbols (as unsigned i*1)
|
||||
integer*1 dat(MAXBYTES) !Decoded user data, 8 bits per byte
|
||||
integer mettab(-128:127,0:1) !Metric table
|
||||
|
||||
! These were the "node" structure in Karn's C code:
|
||||
integer nstate(0:MAXBITS) !Encoder state of next node
|
||||
integer gamma(0:MAXBITS) !Cumulative metric to this node
|
||||
integer metrics(0:3,0:MAXBITS) !Metrics indexed by all possible Tx syms
|
||||
integer tm(0:1,0:MAXBITS) !Sorted metrics for current hypotheses
|
||||
integer ii(0:MAXBITS) !Current branch being tested
|
||||
|
||||
logical noback
|
||||
include 'conv232.f90' !Polynomials defined here
|
||||
|
||||
ntail=nbits-31
|
||||
|
||||
! Compute all possible branch metrics for each symbol pair.
|
||||
! This is the only place we actually look at the raw input symbols
|
||||
i4a=0
|
||||
i4b=0
|
||||
do np=0,nbits-1
|
||||
j=2*np
|
||||
i4a=symbol(j)
|
||||
i4b=symbol(j+1)
|
||||
metrics(0,np) = mettab(i4a,0) + mettab(i4b,0)
|
||||
metrics(1,np) = mettab(i4a,0) + mettab(i4b,1)
|
||||
metrics(2,np) = mettab(i4a,1) + mettab(i4b,0)
|
||||
metrics(3,np) = mettab(i4a,1) + mettab(i4b,1)
|
||||
enddo
|
||||
|
||||
np=0
|
||||
nstate(np)=0
|
||||
|
||||
n=iand(nstate(np),npoly1) !Compute and sort branch metrics
|
||||
n=ieor(n,ishft(n,-16)) !from the root node
|
||||
lsym=partab(iand(ieor(n,ishft(n,-8)),255))
|
||||
n=iand(nstate(np),npoly2)
|
||||
n=ieor(n,ishft(n,-16))
|
||||
lsym=lsym+lsym+partab(iand(ieor(n,ishft(n,-8)),255))
|
||||
m0=metrics(lsym,np)
|
||||
m1=metrics(ieor(3,lsym),np)
|
||||
if(m0.gt.m1) then
|
||||
tm(0,np)=m0 !0-branch has better metric
|
||||
tm(1,np)=m1
|
||||
else
|
||||
tm(0,np)=m1 !1-branch is better
|
||||
tm(1,np)=m0
|
||||
nstate(np)=nstate(np) + 1 !Set low bit
|
||||
endif
|
||||
|
||||
ii(np)=0 !Start with best branch
|
||||
gamma(np)=0
|
||||
nt=0
|
||||
|
||||
do i=1,nbits*maxcycles !Start the Fano decoder
|
||||
ngamma=gamma(np) + tm(ii(np),np) !Look forward
|
||||
if(ngamma.ge.nt) then
|
||||
! Node is acceptable. If first time visiting this node, tighten threshold:
|
||||
if(gamma(np).lt.(nt+ndelta)) nt=nt + ndelta * ((ngamma-nt)/ndelta)
|
||||
gamma(np+1)=ngamma !Move forward
|
||||
nstate(np+1)=ishft(nstate(np),1)
|
||||
np=np+1
|
||||
if(np.eq.nbits) go to 100 !We're done!
|
||||
|
||||
n=iand(nstate(np),npoly1)
|
||||
n=ieor(n,ishft(n,-16))
|
||||
lsym=partab(iand(ieor(n,ishft(n,-8)),255))
|
||||
n=iand(nstate(np),npoly2)
|
||||
n=ieor(n,ishft(n,-16))
|
||||
lsym=lsym+lsym+partab(iand(ieor(n,ishft(n,-8)),255))
|
||||
|
||||
if(np.ge.ntail) then
|
||||
tm(0,np)=metrics(lsym,np) !We're in the tail, now all zeros
|
||||
else
|
||||
m0=metrics(lsym,np)
|
||||
m1=metrics(ieor(3,lsym),np)
|
||||
if(m0.gt.m1) then
|
||||
tm(0,np)=m0 !0-branch has better metric
|
||||
tm(1,np)=m1
|
||||
else
|
||||
tm(0,np)=m1 !1-branch is better
|
||||
tm(1,np)=m0
|
||||
nstate(np)=nstate(np) + 1 !Set low bit
|
||||
endif
|
||||
endif
|
||||
ii(np)=0 !Start with best branch
|
||||
else
|
||||
do while(.true.)
|
||||
noback=.false. !Threshold violated, can't go forward
|
||||
if(np.eq.0) noback=.true.
|
||||
if(np.gt.0) then
|
||||
if(gamma(np-1).lt.nt) noback=.true.
|
||||
endif
|
||||
|
||||
if(noback) then !Can't back up, either
|
||||
nt=nt-ndelta !Relax threshold and look forward again
|
||||
if(ii(np).ne.0) then
|
||||
ii(np)=0
|
||||
nstate(np)=ieor(nstate(np),1)
|
||||
endif
|
||||
exit
|
||||
endif
|
||||
|
||||
np=np-1 !Back up
|
||||
if(np.lt.ntail .and. ii(np).ne.1) then
|
||||
ii(np)=ii(np)+1 !Search the next best branch
|
||||
nstate(np)=ieor(nstate(np),1)
|
||||
exit
|
||||
endif
|
||||
enddo
|
||||
endif
|
||||
enddo
|
||||
i=nbits*maxcycles
|
||||
|
||||
100 metric=gamma(np) !Final path metric
|
||||
nbytes=(nbits+7)/8 !Copy decoded data to user's buffer
|
||||
np=7
|
||||
do j=1,nbytes-1
|
||||
i4a=nstate(np)
|
||||
dat(j)=i4a
|
||||
np=np+8
|
||||
enddo
|
||||
dat(nbytes)=0
|
||||
ncycles=i+1
|
||||
ierr=0
|
||||
if(i.ge.maxcycles*nbits) ierr=-1
|
||||
|
||||
return
|
||||
end subroutine fano232
|
||||
@@ -0,0 +1,69 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_SINGLE_VIEW_ITERATOR_05052005_0340)
|
||||
#define BOOST_FUSION_SINGLE_VIEW_ITERATOR_05052005_0340
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/support/iterator_base.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/next_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/prior_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/advance_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/distance_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/equal_to_impl.hpp>
|
||||
#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning (disable: 4512) // assignment operator could not be generated.
|
||||
#endif
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct single_view_iterator_tag;
|
||||
struct random_access_traversal_tag;
|
||||
|
||||
template <typename SingleView, typename Pos>
|
||||
struct single_view_iterator
|
||||
: iterator_base<single_view_iterator<SingleView, Pos> >
|
||||
{
|
||||
typedef single_view_iterator_tag fusion_tag;
|
||||
typedef random_access_traversal_tag category;
|
||||
typedef typename SingleView::value_type value_type;
|
||||
typedef Pos position;
|
||||
typedef SingleView single_view_type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit single_view_iterator(single_view_type& in_view)
|
||||
: view(in_view) {}
|
||||
|
||||
SingleView& view;
|
||||
|
||||
private:
|
||||
single_view_iterator& operator=(single_view_iterator const&);
|
||||
};
|
||||
}}
|
||||
|
||||
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
|
||||
namespace std
|
||||
{
|
||||
template <typename SingleView, typename Pos>
|
||||
struct iterator_traits< ::boost::fusion::single_view_iterator<SingleView, Pos> >
|
||||
{ };
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
subroutine encode_msk144(message,codeword)
|
||||
! Encode an 80-bit message and return a 128-bit codeword.
|
||||
! The generator matrix has dimensions (48,80).
|
||||
! The code is a (128,80) regular ldpc code with column weight 3.
|
||||
! The code was generated using the PEG algorithm.
|
||||
! After creating the codeword, the columns are re-ordered according to
|
||||
! "colorder" to make the codeword compatible with the parity-check
|
||||
! matrix stored in Radford Neal's "pchk" format.
|
||||
!
|
||||
character*20 g(48)
|
||||
integer*1 codeword(128)
|
||||
integer*1 colorder(128)
|
||||
integer*1 gen144(48,80)
|
||||
integer*1 itmp(128)
|
||||
integer*1 message(80)
|
||||
integer*1 pchecks(48)
|
||||
logical first
|
||||
data first/.true./
|
||||
data g/ & !parity-check generator matrix for (128,80) code
|
||||
"24084000800020008000", &
|
||||
"b39678f7ccdb1baf5f4c", &
|
||||
"10001000400408012000", &
|
||||
"08104000100002010800", &
|
||||
"dc9c18f61ea0e4b7f05c", &
|
||||
"42c040160909ca002c00", &
|
||||
"cc50b52b9a80db0d7f9e", &
|
||||
"dde5ace80780bae74740", &
|
||||
"00800080020000890080", &
|
||||
"01020040010400400040", &
|
||||
"20008010020000100030", &
|
||||
"80400008004000040050", &
|
||||
"a4b397810915126f5604", &
|
||||
"04040100001040200008", &
|
||||
"00800006000888000800", &
|
||||
"00010c00000104040001", &
|
||||
"cc7cd7d953cdc204eba0", &
|
||||
"0094abe7dd146beb16ce", &
|
||||
"5af2aec8c7b051c7544a", &
|
||||
"14040508801840200088", &
|
||||
"7392f5e720f8f5a62c1e", &
|
||||
"503cc2a06bff4e684ec9", &
|
||||
"5a2efd46f1efbb513b80", &
|
||||
"ac06e9513fd411f1de03", &
|
||||
"16a31be3dd3082ca2bd6", &
|
||||
"28542e0daf62fe1d9332", &
|
||||
"00210c002001540c0401", &
|
||||
"0ed90d56f84298706a98", &
|
||||
"939670f7ecdf9baf4f4c", &
|
||||
"cfe41dec47a433e66240", &
|
||||
"16d2179c2d5888222630", &
|
||||
"408000160108ca002800", &
|
||||
"808000830a00018900a0", &
|
||||
"9ae2ed8ef3afbf8c3a52", &
|
||||
"5aaafd86f3efbfc83b02", &
|
||||
"f39658f68cdb0baf1f4c", &
|
||||
"9414bb6495106261366a", &
|
||||
"71ba18670c08411bf682", &
|
||||
"7298f1a7217cf5c62e5e", &
|
||||
"86d7a4864396a981369b", &
|
||||
"a8042c01ae22fe191362", &
|
||||
"9235ae108b2d60d0e306", &
|
||||
"dfe5ade807a03be74640", &
|
||||
"d2451588e6e27ccd9bc4", &
|
||||
"12b51ae39d20e2ea3bde", &
|
||||
"a49387810d95136fd604", &
|
||||
"467e7578e51d5b3b8a0e", &
|
||||
"f6ad1ac7cc3aaa3fe580"/
|
||||
|
||||
data colorder/0,1,2,3,4,5,6,7,8,9, &
|
||||
10,11,12,13,14,15,24,26,29,30, &
|
||||
32,43,44,47,60,77,79,97,101,111, &
|
||||
96,38,64,53,93,34,59,94,74,90, &
|
||||
108,123,85,57,70,25,69,62,48,49, &
|
||||
50,51,52,33,54,55,56,21,58,36, &
|
||||
16,61,23,63,20,65,66,67,68,46, &
|
||||
22,71,72,73,31,75,76,45,78,17, &
|
||||
80,81,82,83,84,42,86,87,88,89, &
|
||||
39,91,92,35,37,95,19,27,98,99, &
|
||||
100,28,102,103,104,105,106,107,40,109, &
|
||||
110,18,112,113,114,115,116,117,118,119, &
|
||||
120,121,122,41,124,125,126,127/
|
||||
|
||||
save first,gen144
|
||||
|
||||
if( first ) then ! fill the generator matrix
|
||||
gen144=0
|
||||
do i=1,48
|
||||
do j=1,5
|
||||
read(g(i)( (j-1)*4+1:(j-1)*4+4 ),"(Z4)") istr
|
||||
do jj=1,16
|
||||
icol=(j-1)*16+jj
|
||||
if( btest(istr,16-jj) ) gen144(i,icol)=1
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
first=.false.
|
||||
endif
|
||||
|
||||
do i=1,48
|
||||
nsum=0
|
||||
do j=1,80
|
||||
nsum=nsum+message(j)*gen144(i,j)
|
||||
enddo
|
||||
pchecks(i)=mod(nsum,2)
|
||||
enddo
|
||||
itmp(1:48)=pchecks
|
||||
itmp(49:128)=message(1:80)
|
||||
codeword(colorder+1)=itmp(1:128)
|
||||
|
||||
return
|
||||
end subroutine encode_msk144
|
||||
Reference in New Issue
Block a user