Initial Commit
This commit is contained in:
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
File name: wsprsim.c (first committed to wsjtx June 13, 2015)
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "wsprsim_utils.h"
|
||||
#include "wsprd_utils.h"
|
||||
#include "fano.h"
|
||||
|
||||
int printdata=0;
|
||||
|
||||
void usage() {
|
||||
printf("Usage: wsprsim [options] message\n");
|
||||
printf(" message format: \"K1ABC FN42 33\"\n");
|
||||
printf(" \"PJ4/K1ABC 33\"\n");
|
||||
printf(" \"<PJ4/K1ABC> FK52UD 33\"\n");
|
||||
printf("Options:\n");
|
||||
printf(" -c (print channel symbols)\n");
|
||||
printf(" -d (print packed data with zero tail - 11 bytes)\n");
|
||||
printf(" -o filename (write a c2 file with this name)\n");
|
||||
printf(" -s x (x is snr of signal that is written to .c2 file)\n");
|
||||
printf("\n");
|
||||
printf(" e.g. ./wsprsim -cds -28 -o 150613_1920.c2 \"K1ABC FN42 33\"\n");
|
||||
printf(" then ./wsprd 150613_1920.c2\n");
|
||||
}
|
||||
|
||||
int add_signal_vector(float f0, float t0, float amp, unsigned char* symbols
|
||||
, double* isig, double* qsig)
|
||||
{
|
||||
int i, j, ii, idelay;
|
||||
double phi=0.0, twopidt, df, dt, dphi;
|
||||
twopidt=8.0*atan(1.0)/375.0;
|
||||
df=375.0/256.0;
|
||||
dt=1/375.0;
|
||||
idelay=t0/dt;
|
||||
|
||||
for (i=0; i<162; i++) {
|
||||
dphi=twopidt*(f0 + ( (double)symbols[i]-1.5)*df );
|
||||
for ( j=0; j<256; j++ ) {
|
||||
ii=idelay+256*i+j;
|
||||
isig[ii]=isig[ii]+amp*cos(phi);
|
||||
qsig[ii]=qsig[ii]+amp*sin(phi);
|
||||
phi=phi+dphi;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
char* tobinary(int x)
|
||||
{
|
||||
static char b[33];
|
||||
b[0] = '\0';
|
||||
|
||||
long unsigned int z;
|
||||
for (z = 0x80000000; z > 0; z >>= 1)
|
||||
{
|
||||
strcat(b, ((x & z) == z) ? "1" : "0");
|
||||
}
|
||||
|
||||
return b;
|
||||
}
|
||||
|
||||
double gaussrand()
|
||||
{
|
||||
static double V1, V2, S;
|
||||
static int phase = 0;
|
||||
double X;
|
||||
|
||||
if(phase == 0) {
|
||||
do {
|
||||
double U1 = (double)rand() / RAND_MAX;
|
||||
double U2 = (double)rand() / RAND_MAX;
|
||||
|
||||
V1 = 2 * U1 - 1;
|
||||
V2 = 2 * U2 - 1;
|
||||
S = V1 * V1 + V2 * V2;
|
||||
} while(S >= 1 || S == 0);
|
||||
|
||||
X = V1 * sqrt(-2 * log(S) / S);
|
||||
} else
|
||||
X = V2 * sqrt(-2 * log(S) / S);
|
||||
|
||||
phase = 1 - phase;
|
||||
|
||||
return X;
|
||||
}
|
||||
|
||||
unsigned long writec2file(char *c2filename, int trmin, double freq
|
||||
, double *idat, double *qdat)
|
||||
{
|
||||
int i;
|
||||
float buffer[2*45000];
|
||||
memset(buffer,0,sizeof(float)*2*45000);
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen(c2filename,"wb");
|
||||
if( fp == NULL ) {
|
||||
fprintf(stderr, "Could not open c2 file '%s'\n", c2filename);
|
||||
return 0;
|
||||
}
|
||||
unsigned long nwrite = fwrite(c2filename,sizeof(char),14,fp);
|
||||
nwrite = fwrite(&trmin, sizeof(int), 1, fp);
|
||||
nwrite = fwrite(&freq, sizeof(double), 1, fp);
|
||||
|
||||
for(i=0; i<45000; i++) {
|
||||
buffer[2*i]=idat[i];
|
||||
buffer[2*i+1]=-qdat[i];
|
||||
}
|
||||
|
||||
nwrite = fwrite(buffer, sizeof(float), 2*45000, fp);
|
||||
if( nwrite == 2*45000 ) {
|
||||
return nwrite;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//********************************************************************
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
int i, c, printchannel=0, writec2=0;
|
||||
float snr=50.0;
|
||||
char *message, *c2filename, *hashtab;
|
||||
c2filename=malloc(sizeof(char)*15);
|
||||
hashtab=malloc(sizeof(char)*32768*13);
|
||||
memset(hashtab,0,sizeof(char)*32768*13);
|
||||
|
||||
// message length is 22 characters
|
||||
message=malloc(sizeof(char)*23);
|
||||
|
||||
strcpy(c2filename,"000000_0001.c2");
|
||||
|
||||
srand(getpid());
|
||||
|
||||
while ( (c = getopt(argc, argv, "cdo:s:")) !=-1 ) {
|
||||
switch (c) {
|
||||
case 'c':
|
||||
printchannel=1;
|
||||
break;
|
||||
case 'd':
|
||||
printdata=1;
|
||||
break;
|
||||
case 'o':
|
||||
c2filename = optarg;
|
||||
writec2=1;
|
||||
break;
|
||||
case 's':
|
||||
snr = (float)atoi(optarg);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( optind+1 > argc ) {
|
||||
usage();
|
||||
return 0;
|
||||
} else {
|
||||
message=argv[optind];
|
||||
}
|
||||
|
||||
unsigned char channel_symbols[162];
|
||||
get_wspr_channel_symbols(message, hashtab, channel_symbols);
|
||||
|
||||
if( printchannel ) {
|
||||
printf("Channel symbols:\n");
|
||||
for (i=0; i<162; i++) {
|
||||
printf("%d ",channel_symbols[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
// add noise, then signal
|
||||
double isig[45000], qsig[45000];
|
||||
memset(isig,0,sizeof(double)*45000);
|
||||
memset(qsig,0,sizeof(double)*45000);
|
||||
|
||||
if( snr < 40 ) {
|
||||
// snr in 375Hz is 8.2 dB higher than in 2500 Hz.
|
||||
snr=snr+8.2;
|
||||
snr=pow(10,snr/20.0)*pow(2,0.5);
|
||||
|
||||
for (i = 0; i<45000; i++) {
|
||||
isig[i]=isig[i]+gaussrand();
|
||||
qsig[i]=qsig[i]+gaussrand();
|
||||
}
|
||||
} else {
|
||||
snr=1.0;
|
||||
}
|
||||
|
||||
float f0, t0;
|
||||
f0=0.0;
|
||||
t0=1.0;
|
||||
add_signal_vector(f0, t0, snr, channel_symbols, isig, qsig);
|
||||
if( writec2) {
|
||||
// write a .c2 file
|
||||
double carrierfreq=10.1387;
|
||||
int wsprtype=2;
|
||||
printf("Writing %s\n",c2filename);
|
||||
writec2file(c2filename, wsprtype, carrierfreq, isig, qsig);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
@@ -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_FOR_EACH)
|
||||
#define FUSION_INCLUDE_FOR_EACH
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/for_each.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,241 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2005-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1, typename Context>
|
||||
struct result<This(A0 , A1, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2, typename Context>
|
||||
struct result<This(A0 , A1 , A2, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9, Context)>
|
||||
: detail::result_of::target<A0>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
typename detail::result_of::target<A0>::type
|
||||
operator()(
|
||||
A0 const&
|
||||
, A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
typename detail::result_of::target<A0>::type(
|
||||
boost::phoenix::eval(a1, ctx) , boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 Joel de Guzman
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(FUSION_END_IMPL_05062005_0906)
|
||||
#define FUSION_END_IMPL_05062005_0906
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct filter_view_tag;
|
||||
|
||||
template <typename Category, typename First, typename Last, typename Pred>
|
||||
struct filter_iterator;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct end_impl;
|
||||
|
||||
template <>
|
||||
struct end_impl<filter_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::last_type last_type;
|
||||
typedef typename Sequence::pred_type pred_type;
|
||||
typedef typename Sequence::category category;
|
||||
typedef filter_iterator<category,last_type, last_type, pred_type> type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Sequence& s)
|
||||
{
|
||||
return type(s.last());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,468 @@
|
||||
// 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)
|
||||
// (C) Copyright 2007 Anthony Williams
|
||||
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
|
||||
|
||||
#ifndef BOOST_THREAD_LOCK_ALGORITHMS_HPP
|
||||
#define BOOST_THREAD_LOCK_ALGORITHMS_HPP
|
||||
|
||||
#include <boost/thread/detail/config.hpp>
|
||||
#include <boost/thread/lock_types.hpp>
|
||||
#include <boost/thread/lockable_traits.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/config/abi_prefix.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
unsigned try_lock_internal(MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
|
||||
if (!l1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (!m2.try_lock())
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3>
|
||||
unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
|
||||
if (!l1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3))
|
||||
{
|
||||
return failed_lock + 1;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
|
||||
unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
|
||||
if (!l1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3,m4))
|
||||
{
|
||||
return failed_lock + 1;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
|
||||
unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
|
||||
if (!l1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5))
|
||||
{
|
||||
return failed_lock + 1;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
unsigned lock_helper(MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1);
|
||||
if (!m2.try_lock())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3>
|
||||
unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1);
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3))
|
||||
{
|
||||
return failed_lock;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
|
||||
unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1);
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3,m4))
|
||||
{
|
||||
return failed_lock;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
|
||||
unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
|
||||
{
|
||||
boost::unique_lock<MutexType1> l1(m1);
|
||||
if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5))
|
||||
{
|
||||
return failed_lock;
|
||||
}
|
||||
l1.release();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <bool x>
|
||||
struct is_mutex_type_wrapper
|
||||
{
|
||||
};
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
void lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper<true> )
|
||||
{
|
||||
unsigned const lock_count = 2;
|
||||
unsigned lock_first = 0;
|
||||
for (;;)
|
||||
{
|
||||
switch (lock_first)
|
||||
{
|
||||
case 0:
|
||||
lock_first = detail::lock_helper(m1, m2);
|
||||
if (!lock_first) return;
|
||||
break;
|
||||
case 1:
|
||||
lock_first = detail::lock_helper(m2, m1);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 1) % lock_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> );
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
void lock(MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
void lock(const MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
void lock(MutexType1& m1, const MutexType2& m2)
|
||||
{
|
||||
detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
void lock(const MutexType1& m1, const MutexType2& m2)
|
||||
{
|
||||
detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3>
|
||||
void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3)
|
||||
{
|
||||
unsigned const lock_count = 3;
|
||||
unsigned lock_first = 0;
|
||||
for (;;)
|
||||
{
|
||||
switch (lock_first)
|
||||
{
|
||||
case 0:
|
||||
lock_first = detail::lock_helper(m1, m2, m3);
|
||||
if (!lock_first) return;
|
||||
break;
|
||||
case 1:
|
||||
lock_first = detail::lock_helper(m2, m3, m1);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 1) % lock_count;
|
||||
break;
|
||||
case 2:
|
||||
lock_first = detail::lock_helper(m3, m1, m2);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 2) % lock_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
|
||||
void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
|
||||
{
|
||||
unsigned const lock_count = 4;
|
||||
unsigned lock_first = 0;
|
||||
for (;;)
|
||||
{
|
||||
switch (lock_first)
|
||||
{
|
||||
case 0:
|
||||
lock_first = detail::lock_helper(m1, m2, m3, m4);
|
||||
if (!lock_first) return;
|
||||
break;
|
||||
case 1:
|
||||
lock_first = detail::lock_helper(m2, m3, m4, m1);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 1) % lock_count;
|
||||
break;
|
||||
case 2:
|
||||
lock_first = detail::lock_helper(m3, m4, m1, m2);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 2) % lock_count;
|
||||
break;
|
||||
case 3:
|
||||
lock_first = detail::lock_helper(m4, m1, m2, m3);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 3) % lock_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
|
||||
void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
|
||||
{
|
||||
unsigned const lock_count = 5;
|
||||
unsigned lock_first = 0;
|
||||
for (;;)
|
||||
{
|
||||
switch (lock_first)
|
||||
{
|
||||
case 0:
|
||||
lock_first = detail::lock_helper(m1, m2, m3, m4, m5);
|
||||
if (!lock_first) return;
|
||||
break;
|
||||
case 1:
|
||||
lock_first = detail::lock_helper(m2, m3, m4, m5, m1);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 1) % lock_count;
|
||||
break;
|
||||
case 2:
|
||||
lock_first = detail::lock_helper(m3, m4, m5, m1, m2);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 2) % lock_count;
|
||||
break;
|
||||
case 3:
|
||||
lock_first = detail::lock_helper(m4, m5, m1, m2, m3);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 3) % lock_count;
|
||||
break;
|
||||
case 4:
|
||||
lock_first = detail::lock_helper(m5, m1, m2, m3, m4);
|
||||
if (!lock_first) return;
|
||||
lock_first = (lock_first + 4) % lock_count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename Mutex, bool x = is_mutex_type<Mutex>::value>
|
||||
struct try_lock_impl_return
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
struct try_lock_impl_return<Iterator, false>
|
||||
{
|
||||
typedef Iterator type;
|
||||
};
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
int try_lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper<true> )
|
||||
{
|
||||
return ((int) detail::try_lock_internal(m1, m2)) - 1;
|
||||
}
|
||||
|
||||
template <typename Iterator>
|
||||
Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> );
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
typename detail::try_lock_impl_return<MutexType1>::type try_lock(MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
typename detail::try_lock_impl_return<MutexType1>::type try_lock(const MutexType1& m1, MutexType2& m2)
|
||||
{
|
||||
return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
typename detail::try_lock_impl_return<MutexType1>::type try_lock(MutexType1& m1, const MutexType2& m2)
|
||||
{
|
||||
return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2>
|
||||
typename detail::try_lock_impl_return<MutexType1>::type try_lock(const MutexType1& m1, const MutexType2& m2)
|
||||
{
|
||||
return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3>
|
||||
int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3)
|
||||
{
|
||||
return ((int) detail::try_lock_internal(m1, m2, m3)) - 1;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
|
||||
int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
|
||||
{
|
||||
return ((int) detail::try_lock_internal(m1, m2, m3, m4)) - 1;
|
||||
}
|
||||
|
||||
template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
|
||||
int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
|
||||
{
|
||||
return ((int) detail::try_lock_internal(m1, m2, m3, m4, m5)) - 1;
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename Iterator>
|
||||
struct range_lock_guard
|
||||
{
|
||||
Iterator begin;
|
||||
Iterator end;
|
||||
|
||||
range_lock_guard(Iterator begin_, Iterator end_) :
|
||||
begin(begin_), end(end_)
|
||||
{
|
||||
boost::lock(begin, end);
|
||||
}
|
||||
|
||||
void release()
|
||||
{
|
||||
begin = end;
|
||||
}
|
||||
|
||||
~range_lock_guard()
|
||||
{
|
||||
for (; begin != end; ++begin)
|
||||
{
|
||||
begin->unlock();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
template <typename Iterator>
|
||||
Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> )
|
||||
|
||||
{
|
||||
if (begin == end)
|
||||
{
|
||||
return end;
|
||||
}
|
||||
typedef typename std::iterator_traits<Iterator>::value_type lock_type;
|
||||
unique_lock<lock_type> guard(*begin, try_to_lock);
|
||||
|
||||
if (!guard.owns_lock())
|
||||
{
|
||||
return begin;
|
||||
}
|
||||
Iterator const failed = boost::try_lock(++begin, end);
|
||||
if (failed == end)
|
||||
{
|
||||
guard.release();
|
||||
}
|
||||
|
||||
return failed;
|
||||
}
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
template <typename Iterator>
|
||||
void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> )
|
||||
{
|
||||
typedef typename std::iterator_traits<Iterator>::value_type lock_type;
|
||||
|
||||
if (begin == end)
|
||||
{
|
||||
return;
|
||||
}
|
||||
bool start_with_begin = true;
|
||||
Iterator second = begin;
|
||||
++second;
|
||||
Iterator next = second;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
unique_lock<lock_type> begin_lock(*begin, defer_lock);
|
||||
if (start_with_begin)
|
||||
{
|
||||
begin_lock.lock();
|
||||
Iterator const failed_lock = boost::try_lock(next, end);
|
||||
if (failed_lock == end)
|
||||
{
|
||||
begin_lock.release();
|
||||
return;
|
||||
}
|
||||
start_with_begin = false;
|
||||
next = failed_lock;
|
||||
}
|
||||
else
|
||||
{
|
||||
detail::range_lock_guard<Iterator> guard(next, end);
|
||||
if (begin_lock.try_lock())
|
||||
{
|
||||
Iterator const failed_lock = boost::try_lock(second, next);
|
||||
if (failed_lock == next)
|
||||
{
|
||||
begin_lock.release();
|
||||
guard.release();
|
||||
return;
|
||||
}
|
||||
start_with_begin = false;
|
||||
next = failed_lock;
|
||||
}
|
||||
else
|
||||
{
|
||||
start_with_begin = true;
|
||||
next = second;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#include <boost/config/abi_suffix.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,238 @@
|
||||
program ldpcsim120
|
||||
! End to end test of the (120,60)/crc10 encoder and decoder.
|
||||
use crc
|
||||
use packjt
|
||||
|
||||
parameter(NRECENT=10)
|
||||
character*12 recent_calls(NRECENT)
|
||||
character*22 msg,msgsent,msgreceived
|
||||
character*8 arg
|
||||
integer*1, allocatable :: codeword(:), decoded(:), message(:)
|
||||
integer*1, target:: i1Msg8BitBytes(9)
|
||||
integer*1, target:: i1Dec8BitBytes(9)
|
||||
integer*1 msgbits(60)
|
||||
integer*1 apmask(120)
|
||||
integer*1 cw(120)
|
||||
integer*2 checksum
|
||||
integer colorder(120)
|
||||
integer nerrtot(120),nerrdec(120),nmpcbad(60)
|
||||
logical checksumok,fsk,bpsk
|
||||
real*8, allocatable :: rxdata(:)
|
||||
real, allocatable :: llr(:)
|
||||
real dllr(120),llrd(120)
|
||||
|
||||
data colorder/ &
|
||||
0,1,2,21,3,4,5,6,7,8,20,10,9,11,12,23,13,28,14,31, &
|
||||
15,16,22,26,17,30,18,29,25,32,41,34,19,33,27,36,38,43,42,24, &
|
||||
37,39,45,40,35,44,47,46,50,51,53,48,52,56,54,57,55,49,58,61, &
|
||||
60,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, &
|
||||
80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99, &
|
||||
100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119/
|
||||
|
||||
do i=1,NRECENT
|
||||
recent_calls(i)=' '
|
||||
enddo
|
||||
nerrtot=0
|
||||
nerrdec=0
|
||||
nmpcbad=0 ! Used to collect the number of errors in the message+crc part of the codeword
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.3) then
|
||||
print*,'Usage: ldpcsim niter #trials s '
|
||||
print*,'eg: ldpcsim 10 1000 0.84'
|
||||
print*,'If s is negative, then value is ignored and sigma is calculated from SNR.'
|
||||
return
|
||||
endif
|
||||
call getarg(1,arg)
|
||||
read(arg,*) max_iterations
|
||||
call getarg(2,arg)
|
||||
read(arg,*) ntrials
|
||||
call getarg(3,arg)
|
||||
read(arg,*) s
|
||||
|
||||
fsk=.false.
|
||||
bpsk=.true.
|
||||
|
||||
! don't count crc bits as data bits
|
||||
N=120
|
||||
K=60
|
||||
! scale Eb/No for a (120,50) code
|
||||
rate=real(50)/real(N)
|
||||
|
||||
write(*,*) "rate: ",rate
|
||||
write(*,*) "niter= ",max_iterations," s= ",s
|
||||
|
||||
allocate ( codeword(N), decoded(K), message(K) )
|
||||
allocate ( rxdata(N), llr(N) )
|
||||
|
||||
! The message should be packed into the first 7 bytes
|
||||
i1Msg8BitBytes(1:6)=85
|
||||
i1Msg8BitBytes(7)=64
|
||||
! The CRC will be put into the last 2 bytes
|
||||
i1Msg8BitBytes(8:9)=0
|
||||
checksum = crc10 (c_loc (i1Msg8BitBytes), 9)
|
||||
! For reference, the next 3 lines show how to check the CRC
|
||||
i1Msg8BitBytes(8)=checksum/256
|
||||
i1Msg8BitBytes(9)=iand (checksum,255)
|
||||
checksumok = crc10_check(c_loc (i1Msg8BitBytes), 9)
|
||||
if( checksumok ) write(*,*) 'Good checksum'
|
||||
write(*,*) i1Msg8BitBytes(1:9)
|
||||
|
||||
mbit=0
|
||||
do i=1, 7
|
||||
i1=i1Msg8BitBytes(i)
|
||||
do ibit=1,8
|
||||
mbit=mbit+1
|
||||
msgbits(mbit)=iand(1,ishft(i1,ibit-8))
|
||||
enddo
|
||||
enddo
|
||||
i1=i1Msg8BitBytes(8) ! First 2 bits of crc10 are LSB of this byte
|
||||
do ibit=1,2
|
||||
msgbits(50+ibit)=iand(1,ishft(i1,ibit-2))
|
||||
enddo
|
||||
i1=i1Msg8BitBytes(9) ! Now shift in last 8 bits of the CRC
|
||||
do ibit=1,8
|
||||
msgbits(52+ibit)=iand(1,ishft(i1,ibit-8))
|
||||
enddo
|
||||
|
||||
write(*,*) 'message'
|
||||
write(*,'(9(8i1,1x))') msgbits
|
||||
|
||||
call encode120(msgbits,codeword)
|
||||
call init_random_seed()
|
||||
call sgran()
|
||||
|
||||
write(*,*) 'codeword'
|
||||
write(*,'(15(8i1,1x))') codeword
|
||||
|
||||
write(*,*) "Es/N0 SNR2500 ngood nundetected nbadcrc sigma"
|
||||
do idb = -10, 24
|
||||
db=idb/2.0-1.0
|
||||
! sigma=1/sqrt( 2*rate*(10**(db/10.0)) ) ! to make db represent Eb/No
|
||||
sigma=1/sqrt( 2*(10**(db/10.0)) ) ! db represents Es/No
|
||||
ngood=0
|
||||
nue=0
|
||||
nbadcrc=0
|
||||
nberr=0
|
||||
do itrial=1, ntrials
|
||||
! Create a realization of a noisy received word
|
||||
do i=1,N
|
||||
if( bpsk ) then
|
||||
rxdata(i) = 2.0*codeword(i)-1.0 + sigma*gran()
|
||||
elseif( fsk ) then
|
||||
if( codeword(i) .eq. 1 ) then
|
||||
r1=(1.0 + sigma*gran())**2 + (sigma*gran())**2
|
||||
r2=(sigma*gran())**2 + (sigma*gran())**2
|
||||
elseif( codeword(i) .eq. 0 ) then
|
||||
r2=(1.0 + sigma*gran())**2 + (sigma*gran())**2
|
||||
r1=(sigma*gran())**2 + (sigma*gran())**2
|
||||
endif
|
||||
rxdata(i)=0.35*(sqrt(r1)-sqrt(r2))
|
||||
! rxdata(i)=0.35*(exp(r1)-exp(r2))
|
||||
! rxdata(i)=0.12*(log(r1)-log(r2))
|
||||
endif
|
||||
enddo
|
||||
nerr=0
|
||||
do i=1,N
|
||||
if( rxdata(i)*(2*codeword(i)-1.0) .lt. 0 ) nerr=nerr+1
|
||||
enddo
|
||||
nerrtot(nerr)=nerrtot(nerr)+1
|
||||
nberr=nberr+nerr
|
||||
|
||||
! Correct signal normalization is important for this decoder.
|
||||
! rxav=sum(rxdata)/N
|
||||
! rx2av=sum(rxdata*rxdata)/N
|
||||
! rxsig=sqrt(rx2av-rxav*rxav)
|
||||
! rxdata=rxdata/rxsig
|
||||
! To match the metric to the channel, s should be set to the noise standard deviation.
|
||||
! For now, set s to the value that optimizes decode probability near threshold.
|
||||
! The s parameter can be tuned to trade a few tenth's dB of threshold for an order of
|
||||
! magnitude in UER
|
||||
if( s .lt. 0 ) then
|
||||
ss=sigma
|
||||
else
|
||||
ss=s
|
||||
endif
|
||||
|
||||
llr=2.0*rxdata/(ss*ss)
|
||||
apmask=0
|
||||
|
||||
! max_iterations is max number of belief propagation iterations
|
||||
call bpdecode120(llr, apmask, max_iterations, decoded, niterations, cw)
|
||||
n2err=0
|
||||
do i=1,N
|
||||
if( cw(i)*(2*codeword(i)-1.0) .lt. 0 ) n2err=n2err+1
|
||||
enddo
|
||||
!write(*,*) nerr,niterations,n2err
|
||||
damp=0.75
|
||||
ndither=0
|
||||
if( niterations .lt. 0 ) then
|
||||
do i=1, ndither
|
||||
do in=1,N
|
||||
dllr(in)=damp*gran()
|
||||
enddo
|
||||
llrd=llr+dllr
|
||||
call bpdecode120(llrd, apmask, max_iterations, decoded, niterations, cw)
|
||||
if( niterations .ge. 0 ) exit
|
||||
enddo
|
||||
endif
|
||||
|
||||
! If the decoder finds a valid codeword, niterations will be .ge. 0.
|
||||
if( niterations .ge. 0 ) then
|
||||
! Check the CRC
|
||||
do ibyte=1,6
|
||||
itmp=0
|
||||
do ibit=1,8
|
||||
itmp=ishft(itmp,1)+iand(1,decoded((ibyte-1)*8+ibit))
|
||||
enddo
|
||||
i1Dec8BitBytes(ibyte)=itmp
|
||||
enddo
|
||||
i1Dec8BitBytes(7)=decoded(49)*128+decoded(50)*64
|
||||
! Need to pack the received crc into bytes 8 and 9 for crc10_check
|
||||
i1Dec8BitBytes(8)=decoded(51)*2+decoded(52)
|
||||
i1Dec8BitBytes(9)=decoded(53)*128+decoded(54)*64+decoded(55)*32+decoded(56)*16
|
||||
i1Dec8BitBytes(9)=i1Dec8BitBytes(9)+decoded(57)*8+decoded(58)*4+decoded(59)*2+decoded(60)*1
|
||||
ncrcflag=0
|
||||
if( crc10_check( c_loc( i1Dec8BitBytes ), 9 ) ) ncrcflag=1
|
||||
|
||||
if( ncrcflag .ne. 1 ) then
|
||||
nbadcrc=nbadcrc+1
|
||||
endif
|
||||
nueflag=0
|
||||
|
||||
nerrmpc=0
|
||||
do i=1,K ! find number of errors in message+crc part of codeword
|
||||
if( msgbits(i) .ne. decoded(i) ) then
|
||||
nueflag=1
|
||||
nerrmpc=nerrmpc+1
|
||||
endif
|
||||
enddo
|
||||
nmpcbad(nerrmpc)=nmpcbad(nerrmpc)+1 ! This histogram should inform our selection of CRC poly
|
||||
if( ncrcflag .eq. 1 .and. nueflag .eq. 0 ) then
|
||||
ngood=ngood+1
|
||||
nerrdec(nerr)=nerrdec(nerr)+1
|
||||
else if( ncrcflag .eq. 1 .and. nueflag .eq. 1 ) then
|
||||
nue=nue+1;
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
snr2500=db+10*log10(0.4166/2500.0)
|
||||
pberr=real(nberr)/(real(ntrials*N))
|
||||
write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,8x,f5.2,8x,e10.3)") db,snr2500,ngood,nue,nbadcrc,ss,pberr
|
||||
|
||||
enddo
|
||||
|
||||
open(unit=23,file='nerrhisto.dat',status='unknown')
|
||||
do i=1,120
|
||||
write(23,'(i4,2x,i10,i10,f10.2)') i,nerrdec(i),nerrtot(i),real(nerrdec(i))/real(nerrtot(i)+1e-10)
|
||||
enddo
|
||||
close(23)
|
||||
open(unit=25,file='nmpcbad.dat',status='unknown')
|
||||
do i=1,60
|
||||
write(25,'(i4,2x,i10)') i,nmpcbad(i)
|
||||
enddo
|
||||
close(25)
|
||||
|
||||
|
||||
|
||||
end program ldpcsim120
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
// 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/greater.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct greater_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct greater_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct greater_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct greater_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct greater_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct greater
|
||||
|
||||
: greater_impl<
|
||||
typename greater_tag<N1>::type
|
||||
, typename greater_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, greater)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct greater_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,250 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// \file fold.hpp
|
||||
/// Contains definition of the fold<> and reverse_fold<> transforms.
|
||||
//
|
||||
// Copyright 2008 Eric Niebler. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_PROTO_TRANSFORM_FOLD_HPP_EAN_11_04_2007
|
||||
#define BOOST_PROTO_TRANSFORM_FOLD_HPP_EAN_11_04_2007
|
||||
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
#include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
#include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
#include <boost/preprocessor/repetition/repeat.hpp>
|
||||
#include <boost/fusion/include/fold.hpp>
|
||||
#include <boost/fusion/include/reverse_fold.hpp>
|
||||
#include <boost/proto/proto_fwd.hpp>
|
||||
#include <boost/proto/traits.hpp>
|
||||
#include <boost/proto/transform/impl.hpp>
|
||||
#include <boost/proto/transform/when.hpp>
|
||||
|
||||
namespace boost { namespace proto
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename Transform, typename Data>
|
||||
struct as_callable
|
||||
{
|
||||
as_callable(Data d)
|
||||
: d_(d)
|
||||
{}
|
||||
|
||||
template<typename Sig>
|
||||
struct result;
|
||||
|
||||
template<typename This, typename State, typename Expr>
|
||||
struct result<This(State, Expr)>
|
||||
{
|
||||
typedef
|
||||
typename when<_, Transform>::template impl<Expr, State, Data>::result_type
|
||||
type;
|
||||
};
|
||||
|
||||
template<typename State, typename Expr>
|
||||
typename when<_, Transform>::template impl<Expr &, State const &, Data>::result_type
|
||||
operator ()(State const &s, Expr &e) const
|
||||
{
|
||||
return typename when<_, Transform>::template impl<Expr &, State const &, Data>()(e, s, this->d_);
|
||||
}
|
||||
|
||||
private:
|
||||
Data d_;
|
||||
};
|
||||
|
||||
template<
|
||||
typename State0
|
||||
, typename Fun
|
||||
, typename Expr
|
||||
, typename State
|
||||
, typename Data
|
||||
, long Arity = arity_of<Expr>::value
|
||||
>
|
||||
struct fold_impl
|
||||
{};
|
||||
|
||||
template<
|
||||
typename State0
|
||||
, typename Fun
|
||||
, typename Expr
|
||||
, typename State
|
||||
, typename Data
|
||||
, long Arity = arity_of<Expr>::value
|
||||
>
|
||||
struct reverse_fold_impl
|
||||
{};
|
||||
|
||||
#include <boost/proto/transform/detail/fold_impl.hpp>
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/// \brief A PrimitiveTransform that invokes the <tt>fusion::fold\<\></tt>
|
||||
/// algorithm to accumulate
|
||||
template<typename Sequence, typename State0, typename Fun>
|
||||
struct fold : transform<fold<Sequence, State0, Fun> >
|
||||
{
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl : transform_impl<Expr, State, Data>
|
||||
{
|
||||
/// \brief A Fusion sequence.
|
||||
typedef
|
||||
typename remove_reference<
|
||||
typename when<_, Sequence>::template impl<Expr, State, Data>::result_type
|
||||
>::type
|
||||
sequence;
|
||||
|
||||
/// \brief An initial state for the fold.
|
||||
typedef
|
||||
typename remove_reference<
|
||||
typename when<_, State0>::template impl<Expr, State, Data>::result_type
|
||||
>::type
|
||||
state0;
|
||||
|
||||
/// \brief <tt>fun(d)(e,s) == when\<_,Fun\>()(e,s,d)</tt>
|
||||
typedef
|
||||
detail::as_callable<Fun, Data>
|
||||
fun;
|
||||
|
||||
typedef
|
||||
typename fusion::result_of::fold<
|
||||
sequence
|
||||
, state0
|
||||
, fun
|
||||
>::type
|
||||
result_type;
|
||||
|
||||
/// Let \c seq be <tt>when\<_, Sequence\>()(e, s, d)</tt>, let
|
||||
/// \c state0 be <tt>when\<_, State0\>()(e, s, d)</tt>, and
|
||||
/// let \c fun(d) be an object such that <tt>fun(d)(e, s)</tt>
|
||||
/// is equivalent to <tt>when\<_, Fun\>()(e, s, d)</tt>. Then, this
|
||||
/// function returns <tt>fusion::fold(seq, state0, fun(d))</tt>.
|
||||
///
|
||||
/// \param e The current expression
|
||||
/// \param s The current state
|
||||
/// \param d An arbitrary data
|
||||
result_type operator ()(
|
||||
typename impl::expr_param e
|
||||
, typename impl::state_param s
|
||||
, typename impl::data_param d
|
||||
) const
|
||||
{
|
||||
typename when<_, Sequence>::template impl<Expr, State, Data> seq;
|
||||
detail::as_callable<Fun, Data> f(d);
|
||||
return fusion::fold(
|
||||
seq(e, s, d)
|
||||
, typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d)
|
||||
, f
|
||||
);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/// \brief A PrimitiveTransform that is the same as the
|
||||
/// <tt>fold\<\></tt> transform, except that it folds
|
||||
/// back-to-front instead of front-to-back.
|
||||
template<typename Sequence, typename State0, typename Fun>
|
||||
struct reverse_fold : transform<reverse_fold<Sequence, State0, Fun> >
|
||||
{
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl : transform_impl<Expr, State, Data>
|
||||
{
|
||||
/// \brief A Fusion sequence.
|
||||
typedef
|
||||
typename remove_reference<
|
||||
typename when<_, Sequence>::template impl<Expr, State, Data>::result_type
|
||||
>::type
|
||||
sequence;
|
||||
|
||||
/// \brief An initial state for the fold.
|
||||
typedef
|
||||
typename remove_reference<
|
||||
typename when<_, State0>::template impl<Expr, State, Data>::result_type
|
||||
>::type
|
||||
state0;
|
||||
|
||||
/// \brief <tt>fun(d)(e,s) == when\<_,Fun\>()(e,s,d)</tt>
|
||||
typedef
|
||||
detail::as_callable<Fun, Data>
|
||||
fun;
|
||||
|
||||
typedef
|
||||
typename fusion::result_of::reverse_fold<
|
||||
sequence
|
||||
, state0
|
||||
, fun
|
||||
>::type
|
||||
result_type;
|
||||
|
||||
/// Let \c seq be <tt>when\<_, Sequence\>()(e, s, d)</tt>, let
|
||||
/// \c state0 be <tt>when\<_, State0\>()(e, s, d)</tt>, and
|
||||
/// let \c fun(d) be an object such that <tt>fun(d)(e, s)</tt>
|
||||
/// is equivalent to <tt>when\<_, Fun\>()(e, s, d)</tt>. Then, this
|
||||
/// function returns <tt>fusion::fold(seq, state0, fun(d))</tt>.
|
||||
///
|
||||
/// \param e The current expression
|
||||
/// \param s The current state
|
||||
/// \param d An arbitrary data
|
||||
result_type operator ()(
|
||||
typename impl::expr_param e
|
||||
, typename impl::state_param s
|
||||
, typename impl::data_param d
|
||||
) const
|
||||
{
|
||||
typename when<_, Sequence>::template impl<Expr, State, Data> seq;
|
||||
detail::as_callable<Fun, Data> f(d);
|
||||
return fusion::reverse_fold(
|
||||
seq(e, s, d)
|
||||
, typename when<_, State0>::template impl<Expr, State, Data>()(e, s, d)
|
||||
, f
|
||||
);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// This specialization is only for improved compile-time performance
|
||||
// in the commom case when the Sequence transform is \c proto::_.
|
||||
//
|
||||
/// INTERNAL ONLY
|
||||
///
|
||||
template<typename State0, typename Fun>
|
||||
struct fold<_, State0, Fun> : transform<fold<_, State0, Fun> >
|
||||
{
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl
|
||||
: detail::fold_impl<State0, Fun, Expr, State, Data>
|
||||
{};
|
||||
};
|
||||
|
||||
// This specialization is only for improved compile-time performance
|
||||
// in the commom case when the Sequence transform is \c proto::_.
|
||||
//
|
||||
/// INTERNAL ONLY
|
||||
///
|
||||
template<typename State0, typename Fun>
|
||||
struct reverse_fold<_, State0, Fun> : transform<reverse_fold<_, State0, Fun> >
|
||||
{
|
||||
template<typename Expr, typename State, typename Data>
|
||||
struct impl
|
||||
: detail::reverse_fold_impl<State0, Fun, Expr, State, Data>
|
||||
{};
|
||||
};
|
||||
|
||||
/// INTERNAL ONLY
|
||||
///
|
||||
template<typename Sequence, typename State, typename Fun>
|
||||
struct is_callable<fold<Sequence, State, Fun> >
|
||||
: mpl::true_
|
||||
{};
|
||||
|
||||
/// INTERNAL ONLY
|
||||
///
|
||||
template<typename Sequence, typename State, typename Fun>
|
||||
struct is_callable<reverse_fold<Sequence, State, Fun> >
|
||||
: mpl::true_
|
||||
{};
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,45 @@
|
||||
/*=============================================================================
|
||||
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_SEGMENTED_BEGIN_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp>
|
||||
#include <boost/fusion/iterator/segmented_iterator.hpp>
|
||||
#include <boost/fusion/view/iterator_range.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/end.hpp>
|
||||
#include <boost/fusion/sequence/intrinsic/empty.hpp>
|
||||
#include <boost/fusion/container/list/cons.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
//auto segmented_begin( seq )
|
||||
//{
|
||||
// return make_segmented_iterator( segmented_begin_impl( seq, nil_ ) );
|
||||
//}
|
||||
|
||||
template <typename Sequence, typename Nil_ = fusion::nil_>
|
||||
struct segmented_begin
|
||||
{
|
||||
typedef
|
||||
segmented_iterator<
|
||||
typename segmented_begin_impl<Sequence, Nil_>::type
|
||||
>
|
||||
type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& seq)
|
||||
{
|
||||
return type(
|
||||
segmented_begin_impl<Sequence, Nil_>::call(seq, Nil_()));
|
||||
}
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2013 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(BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821)
|
||||
#define BOOST_FUSION_MAP_DETAIL_VALUE_AT_IMPL_02042013_0821
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/utility/declval.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct map_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<map_tag>
|
||||
{
|
||||
template <typename Sequence, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef mpl::int_<N::value> index;
|
||||
typedef
|
||||
decltype(boost::declval<Sequence>().get_val(index()))
|
||||
type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
! LDPC (174,87) code
|
||||
parameter (KK=87) !Information bits (75 + CRC12)
|
||||
parameter (ND=58) !Data symbols
|
||||
parameter (NS=21) !Sync symbols (3 @ Costas 7x7)
|
||||
parameter (NN=NS+ND) !Total channel symbols (79)
|
||||
parameter (NSPS=1920) !Samples per symbol at 12000 S/s
|
||||
parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (151,680)
|
||||
parameter (NMAX=15*12000) !Samples in iwave (180,000)
|
||||
parameter (NFFT1=2*NSPS, NH1=NFFT1/2) !Length of FFTs for symbol spectra
|
||||
parameter (NHSYM=2*NMAX/NH1-1) !Number of symbol spectra (1/2-sym steps)
|
||||
parameter (NDOWN=60) !Downsample factor
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/algebra/norm_result_type.hpp
|
||||
|
||||
[begin_description]
|
||||
Calculates the type of the norm_inf operation for container types
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_ALGEBRA_NORM_RESULT_TYPE_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_ALGEBRA_NORM_RESULT_TYPE_HPP_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/algebra/detail/extract_value_type.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
template< typename S , typename Enabler = void >
|
||||
struct norm_result_type {
|
||||
typedef typename detail::extract_value_type< S >::type type;
|
||||
};
|
||||
|
||||
} } }
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,36 @@
|
||||
// Copyright Nikolay Mladenov 2007.
|
||||
// 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_SIGNATURE_20070531_HPP
|
||||
# define FUNCTION_SIGNATURE_20070531_HPP
|
||||
|
||||
#include <boost/python/object/function.hpp>
|
||||
#include <boost/python/converter/registrations.hpp>
|
||||
#include <boost/python/str.hpp>
|
||||
#include <boost/python/tuple.hpp>
|
||||
|
||||
#include <boost/python/detail/signature.hpp>
|
||||
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace boost { namespace python { namespace objects {
|
||||
|
||||
class function_doc_signature_generator{
|
||||
static const char * py_type_str(const python::detail::signature_element &s);
|
||||
static bool arity_cmp( function const *f1, function const *f2 );
|
||||
static bool are_seq_overloads( function const *f1, function const *f2 , bool check_docs);
|
||||
static std::vector<function const*> flatten(function const *f);
|
||||
static std::vector<function const*> split_seq_overloads( const std::vector<function const *> &funcs, bool split_on_doc_change);
|
||||
static str raw_function_pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false);
|
||||
static str parameter_string(py_function const &f, size_t n, object arg_names, bool cpp_types);
|
||||
static str pretty_signature(function const *f, size_t n_overloads, bool cpp_types = false);
|
||||
|
||||
public:
|
||||
static list function_doc_signatures( function const * f);
|
||||
};
|
||||
|
||||
}}}//end of namespace boost::python::objects
|
||||
|
||||
#endif //FUNCTION_SIGNATURE_20070531_HPP
|
||||
@@ -0,0 +1,866 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2005-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
|
||||
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)
|
||||
==============================================================================*/
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename Dummy = void>
|
||||
struct vector0
|
||||
{
|
||||
typedef mpl::int_<0> size_type;
|
||||
static const int size_value = 0;
|
||||
};
|
||||
template <int> struct vector_chooser;
|
||||
template <>
|
||||
struct vector_chooser<0>
|
||||
{
|
||||
template <typename Dummy = void>
|
||||
struct apply
|
||||
{
|
||||
typedef vector0<> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0>
|
||||
struct vector1
|
||||
{
|
||||
typedef A0 member_type0; A0 a0;
|
||||
|
||||
typedef mpl::int_<1> size_type;
|
||||
static const int size_value = 1;
|
||||
typedef
|
||||
vector0<>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<1>
|
||||
{
|
||||
template <typename A0>
|
||||
struct apply
|
||||
{
|
||||
typedef vector1<A0> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0)
|
||||
, ( boost::phoenix::vector1 ) (A0)
|
||||
, (A0, a0)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1>
|
||||
struct vector2
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1;
|
||||
|
||||
typedef mpl::int_<2> size_type;
|
||||
static const int size_value = 2;
|
||||
typedef
|
||||
vector1<A1>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<2>
|
||||
{
|
||||
template <typename A0 , typename A1>
|
||||
struct apply
|
||||
{
|
||||
typedef vector2<A0 , A1> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1)
|
||||
, ( boost::phoenix::vector2 ) (A0) (A1)
|
||||
, (A0, a0) (A1, a1)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2>
|
||||
struct vector3
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2;
|
||||
|
||||
typedef mpl::int_<3> size_type;
|
||||
static const int size_value = 3;
|
||||
typedef
|
||||
vector2<A1 , A2>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<3>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2>
|
||||
struct apply
|
||||
{
|
||||
typedef vector3<A0 , A1 , A2> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2)
|
||||
, ( boost::phoenix::vector3 ) (A0) (A1) (A2)
|
||||
, (A0, a0) (A1, a1) (A2, a2)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3>
|
||||
struct vector4
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3;
|
||||
|
||||
typedef mpl::int_<4> size_type;
|
||||
static const int size_value = 4;
|
||||
typedef
|
||||
vector3<A1 , A2 , A3>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<4>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3>
|
||||
struct apply
|
||||
{
|
||||
typedef vector4<A0 , A1 , A2 , A3> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3)
|
||||
, ( boost::phoenix::vector4 ) (A0) (A1) (A2) (A3)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
struct vector5
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4;
|
||||
|
||||
typedef mpl::int_<5> size_type;
|
||||
static const int size_value = 5;
|
||||
typedef
|
||||
vector4<A1 , A2 , A3 , A4>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<5>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
|
||||
struct apply
|
||||
{
|
||||
typedef vector5<A0 , A1 , A2 , A3 , A4> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4)
|
||||
, ( boost::phoenix::vector5 ) (A0) (A1) (A2) (A3) (A4)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
struct vector6
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5;
|
||||
|
||||
typedef mpl::int_<6> size_type;
|
||||
static const int size_value = 6;
|
||||
typedef
|
||||
vector5<A1 , A2 , A3 , A4 , A5>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<6>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
|
||||
struct apply
|
||||
{
|
||||
typedef vector6<A0 , A1 , A2 , A3 , A4 , A5> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5)
|
||||
, ( boost::phoenix::vector6 ) (A0) (A1) (A2) (A3) (A4) (A5)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
struct vector7
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6;
|
||||
|
||||
typedef mpl::int_<7> size_type;
|
||||
static const int size_value = 7;
|
||||
typedef
|
||||
vector6<A1 , A2 , A3 , A4 , A5 , A6>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<7>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
|
||||
struct apply
|
||||
{
|
||||
typedef vector7<A0 , A1 , A2 , A3 , A4 , A5 , A6> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6)
|
||||
, ( boost::phoenix::vector7 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
struct vector8
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7;
|
||||
|
||||
typedef mpl::int_<8> size_type;
|
||||
static const int size_value = 8;
|
||||
typedef
|
||||
vector7<A1 , A2 , A3 , A4 , A5 , A6 , A7>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<8>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
|
||||
struct apply
|
||||
{
|
||||
typedef vector8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7)
|
||||
, ( boost::phoenix::vector8 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
struct vector9
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8;
|
||||
|
||||
typedef mpl::int_<9> size_type;
|
||||
static const int size_value = 9;
|
||||
typedef
|
||||
vector8<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<9>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
|
||||
struct apply
|
||||
{
|
||||
typedef vector9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8)
|
||||
, ( boost::phoenix::vector9 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
|
||||
struct vector10
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9;
|
||||
|
||||
typedef mpl::int_<10> size_type;
|
||||
static const int size_value = 10;
|
||||
typedef
|
||||
vector9<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<10>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
|
||||
struct apply
|
||||
{
|
||||
typedef vector10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9)
|
||||
, ( boost::phoenix::vector10 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
|
||||
struct vector11
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10;
|
||||
|
||||
typedef mpl::int_<11> size_type;
|
||||
static const int size_value = 11;
|
||||
typedef
|
||||
vector10<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<11>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
|
||||
struct apply
|
||||
{
|
||||
typedef vector11<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10)
|
||||
, ( boost::phoenix::vector11 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
|
||||
struct vector12
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11;
|
||||
|
||||
typedef mpl::int_<12> size_type;
|
||||
static const int size_value = 12;
|
||||
typedef
|
||||
vector11<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<12>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
|
||||
struct apply
|
||||
{
|
||||
typedef vector12<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11)
|
||||
, ( boost::phoenix::vector12 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
|
||||
struct vector13
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12;
|
||||
|
||||
typedef mpl::int_<13> size_type;
|
||||
static const int size_value = 13;
|
||||
typedef
|
||||
vector12<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<13>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
|
||||
struct apply
|
||||
{
|
||||
typedef vector13<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12)
|
||||
, ( boost::phoenix::vector13 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
|
||||
struct vector14
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13;
|
||||
|
||||
typedef mpl::int_<14> size_type;
|
||||
static const int size_value = 14;
|
||||
typedef
|
||||
vector13<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<14>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
|
||||
struct apply
|
||||
{
|
||||
typedef vector14<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13)
|
||||
, ( boost::phoenix::vector14 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
|
||||
struct vector15
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14;
|
||||
|
||||
typedef mpl::int_<15> size_type;
|
||||
static const int size_value = 15;
|
||||
typedef
|
||||
vector14<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<15>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
|
||||
struct apply
|
||||
{
|
||||
typedef vector15<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14)
|
||||
, ( boost::phoenix::vector15 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
|
||||
struct vector16
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15;
|
||||
|
||||
typedef mpl::int_<16> size_type;
|
||||
static const int size_value = 16;
|
||||
typedef
|
||||
vector15<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<16>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
|
||||
struct apply
|
||||
{
|
||||
typedef vector16<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15)
|
||||
, ( boost::phoenix::vector16 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
|
||||
struct vector17
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15; typedef A16 member_type16; A16 a16;
|
||||
|
||||
typedef mpl::int_<17> size_type;
|
||||
static const int size_value = 17;
|
||||
typedef
|
||||
vector16<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<17>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
|
||||
struct apply
|
||||
{
|
||||
typedef vector17<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16)
|
||||
, ( boost::phoenix::vector17 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15) (A16, a16)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
|
||||
struct vector18
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15; typedef A16 member_type16; A16 a16; typedef A17 member_type17; A17 a17;
|
||||
|
||||
typedef mpl::int_<18> size_type;
|
||||
static const int size_value = 18;
|
||||
typedef
|
||||
vector17<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<18>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
|
||||
struct apply
|
||||
{
|
||||
typedef vector18<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17)
|
||||
, ( boost::phoenix::vector18 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15) (A16, a16) (A17, a17)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
|
||||
struct vector19
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15; typedef A16 member_type16; A16 a16; typedef A17 member_type17; A17 a17; typedef A18 member_type18; A18 a18;
|
||||
|
||||
typedef mpl::int_<19> size_type;
|
||||
static const int size_value = 19;
|
||||
typedef
|
||||
vector18<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<19>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
|
||||
struct apply
|
||||
{
|
||||
typedef vector19<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18)
|
||||
, ( boost::phoenix::vector19 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15) (A16, a16) (A17, a17) (A18, a18)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
|
||||
struct vector20
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15; typedef A16 member_type16; A16 a16; typedef A17 member_type17; A17 a17; typedef A18 member_type18; A18 a18; typedef A19 member_type19; A19 a19;
|
||||
|
||||
typedef mpl::int_<20> size_type;
|
||||
static const int size_value = 20;
|
||||
typedef
|
||||
vector19<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<20>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19>
|
||||
struct apply
|
||||
{
|
||||
typedef vector20<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18) (A19)
|
||||
, ( boost::phoenix::vector20 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18) (A19)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15) (A16, a16) (A17, a17) (A18, a18) (A19, a19)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace boost { namespace phoenix
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20>
|
||||
struct vector21
|
||||
{
|
||||
typedef A0 member_type0; A0 a0; typedef A1 member_type1; A1 a1; typedef A2 member_type2; A2 a2; typedef A3 member_type3; A3 a3; typedef A4 member_type4; A4 a4; typedef A5 member_type5; A5 a5; typedef A6 member_type6; A6 a6; typedef A7 member_type7; A7 a7; typedef A8 member_type8; A8 a8; typedef A9 member_type9; A9 a9; typedef A10 member_type10; A10 a10; typedef A11 member_type11; A11 a11; typedef A12 member_type12; A12 a12; typedef A13 member_type13; A13 a13; typedef A14 member_type14; A14 a14; typedef A15 member_type15; A15 a15; typedef A16 member_type16; A16 a16; typedef A17 member_type17; A17 a17; typedef A18 member_type18; A18 a18; typedef A19 member_type19; A19 a19; typedef A20 member_type20; A20 a20;
|
||||
|
||||
typedef mpl::int_<21> size_type;
|
||||
static const int size_value = 21;
|
||||
typedef
|
||||
vector20<A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20>
|
||||
args_type;
|
||||
args_type args() const
|
||||
{
|
||||
args_type r = {a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18 , a19 , a20};
|
||||
return r;
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct vector_chooser<21>
|
||||
{
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19 , typename A20>
|
||||
struct apply
|
||||
{
|
||||
typedef vector21<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19 , A20> type;
|
||||
};
|
||||
};
|
||||
}}
|
||||
BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
|
||||
(A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18) (A19) (A20)
|
||||
, ( boost::phoenix::vector21 ) (A0) (A1) (A2) (A3) (A4) (A5) (A6) (A7) (A8) (A9) (A10) (A11) (A12) (A13) (A14) (A15) (A16) (A17) (A18) (A19) (A20)
|
||||
, (A0, a0) (A1, a1) (A2, a2) (A3, a3) (A4, a4) (A5, a5) (A6, a6) (A7, a7) (A8, a8) (A9, a9) (A10, a10) (A11, a11) (A12, a12) (A13, a13) (A14, a14) (A15, a15) (A16, a16) (A17, a17) (A18, a18) (A19, a19) (A20, a20)
|
||||
)
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Boost interval/detail/bcc_rounding_control.hpp file
|
||||
*
|
||||
* Copyright 2000 Jens Maurer
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* 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_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
# error This header is only intended for Borland C++.
|
||||
#endif
|
||||
|
||||
#ifndef _M_IX86
|
||||
# error This header only works on x86 CPUs.
|
||||
#endif
|
||||
|
||||
#include <float.h> // Borland C++ rounding control
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
namespace detail {
|
||||
|
||||
#ifndef BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
extern "C" { unsigned int _RTLENTRY _fm_init(void); }
|
||||
|
||||
struct borland_workaround {
|
||||
borland_workaround() { _fm_init(); }
|
||||
};
|
||||
|
||||
static borland_workaround borland_workaround_exec;
|
||||
#endif // BOOST_NUMERIC_INTERVAL_KEEP_EXCEPTIONS_FOR_BCC
|
||||
|
||||
__inline double rint(double)
|
||||
{ __emit__(0xD9); __emit__(0xFC); /* asm FRNDINT */ }
|
||||
|
||||
struct x86_rounding
|
||||
{
|
||||
typedef unsigned int rounding_mode;
|
||||
static void get_rounding_mode(rounding_mode& mode)
|
||||
{ mode = _control87(0, 0); }
|
||||
static void set_rounding_mode(const rounding_mode mode)
|
||||
{ _control87(mode, 0xffff); }
|
||||
static double to_int(const double& x) { return rint(x); }
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif /* BOOST_NUMERIC_INTERVAL_DETAIL_BCC_ROUNDING_CONTROL_HPP */
|
||||
@@ -0,0 +1,7 @@
|
||||
-25.7 30 $10^5$
|
||||
-25.25 36 $10^4$
|
||||
-24.5 44 $10^3$
|
||||
-24.15 48 $10^2$
|
||||
-23.7 44 10
|
||||
-22.5 48 BM
|
||||
-25.2 24 KV
|
||||
@@ -0,0 +1,23 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// 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_HAS_UNARY_PLUS_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_UNARY_PLUS_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_unary_plus
|
||||
#define BOOST_TT_TRAIT_OP +
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
false
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
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_LIBRARY_STD_SGI_H
|
||||
#define BOOST_PREDEF_LIBRARY_STD_SGI_H
|
||||
|
||||
#include <boost/predef/library/std/_prefix.h>
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_LIB_STD_SGI`]
|
||||
|
||||
[@http://www.sgi.com/tech/stl/ SGI] Standard C++ library.
|
||||
If available version number as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__STL_CONFIG_H`] [__predef_detection__]]
|
||||
|
||||
[[`__SGI_STL`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__STL_CONFIG_H)
|
||||
# undef BOOST_LIB_STD_SGI
|
||||
# if defined(__SGI_STL)
|
||||
# define BOOST_LIB_STD_SGI BOOST_PREDEF_MAKE_0X_VRP(__SGI_STL)
|
||||
# else
|
||||
# define BOOST_LIB_STD_SGI BOOST_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BOOST_LIB_STD_SGI
|
||||
# define BOOST_LIB_STD_SGI_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define BOOST_LIB_STD_SGI_NAME "SGI"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_STD_SGI,BOOST_LIB_STD_SGI_NAME)
|
||||
@@ -0,0 +1,150 @@
|
||||
|
||||
// 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/times.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
|
||||
>
|
||||
struct times_impl
|
||||
: if_c<
|
||||
( tag1_ > tag2_ )
|
||||
, aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct times_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct times_impl< na,integral_c_tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct times_impl< integral_c_tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct times_tag
|
||||
: tag< T,na >
|
||||
{
|
||||
};
|
||||
|
||||
/// forward declaration
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct times2;
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
, typename N3 = na, typename N4 = na, typename N5 = na
|
||||
>
|
||||
struct times
|
||||
|
||||
: aux::msvc_eti_base< typename if_<
|
||||
|
||||
is_na<N3>
|
||||
, times2< N1,N2 >
|
||||
, times<
|
||||
times2< N1,N2 >
|
||||
, N3, N4, N5
|
||||
>
|
||||
>::type
|
||||
|
||||
>
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(
|
||||
5
|
||||
, times
|
||||
, ( N1, N2, N3, N4, N5 )
|
||||
)
|
||||
};
|
||||
|
||||
template<
|
||||
typename N1
|
||||
, typename N2
|
||||
>
|
||||
struct times2
|
||||
: aux::msvc_eti_base< typename apply_wrap2<
|
||||
times_impl<
|
||||
typename times_tag<N1>::type
|
||||
, typename times_tag<N2>::type
|
||||
>
|
||||
, N1
|
||||
, N2
|
||||
>::type >::type
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 5, times)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
namespace aux {
|
||||
template< typename T, T n1, T n2 >
|
||||
struct times_wknd
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(T, value = (n1 * n2));
|
||||
typedef integral_c< T,value > type;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
struct times_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
: aux::times_wknd<
|
||||
typename aux::largest_int<
|
||||
typename N1::value_type
|
||||
, typename N2::value_type
|
||||
>::type
|
||||
, N1::value
|
||||
, N2::value
|
||||
>::type
|
||||
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,105 @@
|
||||
// Copyright John Maddock 2007.
|
||||
// Copyright Paul A. Bristow 2007.
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt
|
||||
// or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_TOOLS_USER_HPP
|
||||
#define BOOST_MATH_TOOLS_USER_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
// This file can be modified by the user to change the default policies.
|
||||
// See "Changing the Policy Defaults" in documentation.
|
||||
|
||||
// define this if the platform has no long double functions,
|
||||
// or if the long double versions have only double precision:
|
||||
//
|
||||
// #define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
|
||||
//
|
||||
// Performance tuning options:
|
||||
//
|
||||
// #define BOOST_MATH_POLY_METHOD 3
|
||||
// #define BOOST_MATH_RATIONAL_METHOD 3
|
||||
//
|
||||
// The maximum order of polynomial that will be evaluated
|
||||
// via an unrolled specialisation:
|
||||
//
|
||||
// #define BOOST_MATH_MAX_POLY_ORDER 17
|
||||
//
|
||||
// decide whether to store constants as integers or reals:
|
||||
//
|
||||
// #define BOOST_MATH_INT_TABLE_TYPE(RT, IT) IT
|
||||
|
||||
//
|
||||
// Default policies follow:
|
||||
//
|
||||
// Domain errors:
|
||||
//
|
||||
// #define BOOST_MATH_DOMAIN_ERROR_POLICY throw_on_error
|
||||
//
|
||||
// Pole errors:
|
||||
//
|
||||
// #define BOOST_MATH_POLE_ERROR_POLICY throw_on_error
|
||||
//
|
||||
// Overflow Errors:
|
||||
//
|
||||
// #define BOOST_MATH_OVERFLOW_ERROR_POLICY throw_on_error
|
||||
//
|
||||
// Internal Evaluation Errors:
|
||||
//
|
||||
// #define BOOST_MATH_EVALUATION_ERROR_POLICY throw_on_error
|
||||
//
|
||||
// Underfow:
|
||||
//
|
||||
// #define BOOST_MATH_UNDERFLOW_ERROR_POLICY ignore_error
|
||||
//
|
||||
// Denorms:
|
||||
//
|
||||
// #define BOOST_MATH_DENORM_ERROR_POLICY ignore_error
|
||||
//
|
||||
// Max digits to use for internal calculations:
|
||||
//
|
||||
// #define BOOST_MATH_DIGITS10_POLICY 0
|
||||
//
|
||||
// Promote floats to doubles internally?
|
||||
//
|
||||
// #define BOOST_MATH_PROMOTE_FLOAT_POLICY true
|
||||
//
|
||||
// Promote doubles to long double internally:
|
||||
//
|
||||
// #define BOOST_MATH_PROMOTE_DOUBLE_POLICY true
|
||||
//
|
||||
// What do discrete quantiles return?
|
||||
//
|
||||
// #define BOOST_MATH_DISCRETE_QUANTILE_POLICY integer_round_outwards
|
||||
//
|
||||
// If a function is mathematically undefined
|
||||
// (for example the Cauchy distribution has no mean),
|
||||
// then do we stop the code from compiling?
|
||||
//
|
||||
// #define BOOST_MATH_ASSERT_UNDEFINED_POLICY true
|
||||
//
|
||||
// Maximum series iterstions permitted:
|
||||
//
|
||||
// #define BOOST_MATH_MAX_SERIES_ITERATION_POLICY 1000000
|
||||
//
|
||||
// Maximum root finding steps permitted:
|
||||
//
|
||||
// define BOOST_MATH_MAX_ROOT_ITERATION_POLICY 200
|
||||
//
|
||||
// Enable use of __float128 in numeric constants:
|
||||
//
|
||||
// #define BOOST_MATH_USE_FLOAT128
|
||||
//
|
||||
// Disable use of __float128 in numeric_constants even if the compiler looks to support it:
|
||||
//
|
||||
// #define BOOST_MATH_DISABLE_FLOAT128
|
||||
|
||||
#endif // BOOST_MATH_TOOLS_USER_HPP
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
|
||||
// unit/quantity manipulation and conversion
|
||||
//
|
||||
// Copyright (C) 2003-2008 Matthias Christian Schabel
|
||||
// Copyright (C) 2008 Steven Watanabe
|
||||
//
|
||||
// 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_UNITS_TORQUE_DERIVED_DIMENSION_HPP
|
||||
#define BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP
|
||||
|
||||
#include <boost/units/derived_dimension.hpp>
|
||||
#include <boost/units/physical_dimensions/length.hpp>
|
||||
#include <boost/units/physical_dimensions/mass.hpp>
|
||||
#include <boost/units/physical_dimensions/plane_angle.hpp>
|
||||
#include <boost/units/physical_dimensions/time.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
/// derived dimension for torque : L^2 M T^-2 QP^-1
|
||||
typedef derived_dimension<length_base_dimension,2,
|
||||
mass_base_dimension,1,
|
||||
time_base_dimension,-2,
|
||||
plane_angle_base_dimension,-1>::type torque_dimension;
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_TORQUE_DERIVED_DIMENSION_HPP
|
||||
@@ -0,0 +1,62 @@
|
||||
|
||||
// Copyright 2005-2009 Daniel James.
|
||||
// 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)
|
||||
//
|
||||
// On some platforms std::limits gives incorrect values for long double.
|
||||
// This tries to work around them.
|
||||
|
||||
#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER)
|
||||
#define BOOST_FUNCTIONAL_HASH_DETAIL_LIMITS_HEADER
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
// On OpenBSD, numeric_limits is not reliable for long doubles, but
|
||||
// the macros defined in <float.h> are and support long double when STLport
|
||||
// doesn't.
|
||||
|
||||
#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
|
||||
#include <float.h>
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace hash_detail
|
||||
{
|
||||
template <class T>
|
||||
struct limits : std::numeric_limits<T> {};
|
||||
|
||||
#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE)
|
||||
template <>
|
||||
struct limits<long double>
|
||||
: std::numeric_limits<long double>
|
||||
{
|
||||
static long double epsilon() {
|
||||
return LDBL_EPSILON;
|
||||
}
|
||||
|
||||
static long double (max)() {
|
||||
return LDBL_MAX;
|
||||
}
|
||||
|
||||
static long double (min)() {
|
||||
return LDBL_MIN;
|
||||
}
|
||||
|
||||
BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG);
|
||||
BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP);
|
||||
BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP);
|
||||
#if defined(_STLP_NO_LONG_DOUBLE)
|
||||
BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX);
|
||||
#endif
|
||||
};
|
||||
#endif // __OpenBSD__
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,122 @@
|
||||
// Copyright Daniel Wallin, David Abrahams 2005. 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)
|
||||
|
||||
#ifndef KEYWORD_050328_HPP
|
||||
#define KEYWORD_050328_HPP
|
||||
|
||||
#include <boost/parameter/aux_/unwrap_cv_reference.hpp>
|
||||
#include <boost/parameter/aux_/tag.hpp>
|
||||
#include <boost/parameter/aux_/default.hpp>
|
||||
|
||||
namespace boost { namespace parameter {
|
||||
|
||||
// Instances of unique specializations of keyword<...> serve to
|
||||
// associate arguments with parameter names. For example:
|
||||
//
|
||||
// struct rate_; // parameter names
|
||||
// struct skew_;
|
||||
// namespace
|
||||
// {
|
||||
// keyword<rate_> rate; // keywords
|
||||
// keyword<skew_> skew;
|
||||
// }
|
||||
//
|
||||
// ...
|
||||
//
|
||||
// f(rate = 1, skew = 2.4);
|
||||
//
|
||||
template <class Tag>
|
||||
struct keyword
|
||||
{
|
||||
template <class T>
|
||||
typename aux::tag<Tag, T>::type const
|
||||
operator=(T& x) const
|
||||
{
|
||||
typedef typename aux::tag<Tag, T>::type result;
|
||||
return result(x);
|
||||
}
|
||||
|
||||
template <class Default>
|
||||
aux::default_<Tag, Default>
|
||||
operator|(Default& default_) const
|
||||
{
|
||||
return aux::default_<Tag, Default>(default_);
|
||||
}
|
||||
|
||||
template <class Default>
|
||||
aux::lazy_default<Tag, Default>
|
||||
operator||(Default& default_) const
|
||||
{
|
||||
return aux::lazy_default<Tag, Default>(default_);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
typename aux::tag<Tag, T const>::type const
|
||||
operator=(T const& x) const
|
||||
{
|
||||
typedef typename aux::tag<Tag, T const>::type result;
|
||||
return result(x);
|
||||
}
|
||||
|
||||
template <class Default>
|
||||
aux::default_<Tag, const Default>
|
||||
operator|(const Default& default_) const
|
||||
{
|
||||
return aux::default_<Tag, const Default>(default_);
|
||||
}
|
||||
|
||||
template <class Default>
|
||||
aux::lazy_default<Tag, Default>
|
||||
operator||(Default const& default_) const
|
||||
{
|
||||
return aux::lazy_default<Tag, Default>(default_);
|
||||
}
|
||||
|
||||
public: // Insurance against ODR violations
|
||||
|
||||
// People will need to define these keywords in header files. To
|
||||
// prevent ODR violations, it's important that the keyword used in
|
||||
// every instantiation of a function template is the same object.
|
||||
// We provide a reference to a common instance of each keyword
|
||||
// object and prevent construction by users.
|
||||
static keyword<Tag> const instance;
|
||||
|
||||
// This interface is deprecated
|
||||
static keyword<Tag>& get()
|
||||
{
|
||||
return const_cast<keyword<Tag>&>(instance);
|
||||
}
|
||||
};
|
||||
|
||||
template <class Tag>
|
||||
keyword<Tag> const keyword<Tag>::instance = {};
|
||||
|
||||
// Reduces boilerplate required to declare and initialize keywords
|
||||
// without violating ODR. Declares a keyword tag type with the given
|
||||
// name in namespace tag_namespace, and declares and initializes a
|
||||
// reference in an anonymous namespace to a singleton instance of that
|
||||
// type.
|
||||
|
||||
#define BOOST_PARAMETER_KEYWORD(tag_namespace,name) \
|
||||
namespace tag_namespace \
|
||||
{ \
|
||||
struct name \
|
||||
{ \
|
||||
static char const* keyword_name() \
|
||||
{ \
|
||||
return #name; \
|
||||
} \
|
||||
}; \
|
||||
} \
|
||||
namespace \
|
||||
{ \
|
||||
::boost::parameter::keyword<tag_namespace::name> const& name \
|
||||
= ::boost::parameter::keyword<tag_namespace::name>::instance;\
|
||||
}
|
||||
|
||||
}} // namespace boost::parameter
|
||||
|
||||
#endif // KEYWORD_050328_HPP
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
/* Boost interval/checking.hpp template implementation file
|
||||
*
|
||||
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
||||
*
|
||||
* 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_INTERVAL_CHECKING_HPP
|
||||
#define BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include <boost/limits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace interval_lib {
|
||||
|
||||
struct exception_create_empty
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::runtime_error("boost::interval: empty interval created");
|
||||
}
|
||||
};
|
||||
|
||||
struct exception_invalid_number
|
||||
{
|
||||
void operator()()
|
||||
{
|
||||
throw std::invalid_argument("boost::interval: invalid number");
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_base
|
||||
{
|
||||
static T pos_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T neg_inf()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_infinity);
|
||||
return -std::numeric_limits<T>::infinity();
|
||||
}
|
||||
static T nan()
|
||||
{
|
||||
assert(std::numeric_limits<T>::has_quiet_NaN);
|
||||
return std::numeric_limits<T>::quiet_NaN();
|
||||
}
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
return std::numeric_limits<T>::has_quiet_NaN && (x != x);
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(1));
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
return (std::numeric_limits<T>::has_quiet_NaN ?
|
||||
std::numeric_limits<T>::quiet_NaN() : static_cast<T>(0));
|
||||
}
|
||||
static bool is_empty(const T& l, const T& u)
|
||||
{
|
||||
return !(l <= u); // safety for partial orders
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_create_empty>
|
||||
struct checking_no_empty: Checking
|
||||
{
|
||||
static T nan()
|
||||
{
|
||||
assert(false);
|
||||
return Checking::nan();
|
||||
}
|
||||
static T empty_lower()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_lower();
|
||||
}
|
||||
static T empty_upper()
|
||||
{
|
||||
Exception()();
|
||||
return Checking::empty_upper();
|
||||
}
|
||||
static bool is_empty(const T&, const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T> >
|
||||
struct checking_no_nan: Checking
|
||||
{
|
||||
static bool is_nan(const T&)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T, class Checking = checking_base<T>,
|
||||
class Exception = exception_invalid_number>
|
||||
struct checking_catch_nan: Checking
|
||||
{
|
||||
static bool is_nan(const T& x)
|
||||
{
|
||||
if (Checking::is_nan(x)) Exception()();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct checking_strict:
|
||||
checking_no_nan<T, checking_no_empty<T> >
|
||||
{};
|
||||
|
||||
} // namespace interval_lib
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_NUMERIC_INTERVAL_CHECKING_HPP
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/stepper/generation/make_dense_output.hpp
|
||||
|
||||
[begin_description]
|
||||
Factory function to simplify the creation of dense output steppers from error steppers.
|
||||
[end_description]
|
||||
|
||||
Copyright 2011-2012 Karsten Ahnert
|
||||
Copyright 2011-2012 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_MAKE_DENSE_OUTPUT_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_MAKE_DENSE_OUTPUT_HPP_INCLUDED
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
|
||||
|
||||
// default template for the dense output
|
||||
template< class Stepper > struct get_dense_output { };
|
||||
|
||||
|
||||
|
||||
// default dense output factory
|
||||
template< class Stepper , class DenseOutput >
|
||||
struct dense_output_factory
|
||||
{
|
||||
DenseOutput operator()(
|
||||
typename Stepper::value_type abs_error ,
|
||||
typename Stepper::value_type rel_error ,
|
||||
const Stepper &stepper )
|
||||
{
|
||||
return DenseOutput( abs_error , rel_error , stepper );
|
||||
}
|
||||
|
||||
DenseOutput operator()(
|
||||
typename Stepper::value_type abs_error ,
|
||||
typename Stepper::value_type rel_error ,
|
||||
typename Stepper::time_type max_dt ,
|
||||
const Stepper &stepper )
|
||||
{
|
||||
return DenseOutput( abs_error , rel_error , max_dt , stepper );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
namespace result_of
|
||||
{
|
||||
template< class Stepper >
|
||||
struct make_dense_output
|
||||
{
|
||||
typedef typename get_dense_output< Stepper >::type type;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
template< class Stepper >
|
||||
typename result_of::make_dense_output< Stepper >::type make_dense_output(
|
||||
typename Stepper::value_type abs_error ,
|
||||
typename Stepper::value_type rel_error ,
|
||||
const Stepper &stepper = Stepper() )
|
||||
{
|
||||
typedef Stepper stepper_type;
|
||||
typedef typename result_of::make_dense_output< stepper_type >::type dense_output_type;
|
||||
typedef dense_output_factory< stepper_type , dense_output_type > factory_type;
|
||||
factory_type factory;
|
||||
return factory( abs_error , rel_error , stepper );
|
||||
}
|
||||
|
||||
|
||||
template< class Stepper >
|
||||
typename result_of::make_dense_output< Stepper >::type make_dense_output(
|
||||
typename Stepper::value_type abs_error ,
|
||||
typename Stepper::value_type rel_error ,
|
||||
typename Stepper::time_type max_dt ,
|
||||
const Stepper &stepper = Stepper() )
|
||||
{
|
||||
typedef Stepper stepper_type;
|
||||
typedef typename result_of::make_dense_output< stepper_type >::type dense_output_type;
|
||||
typedef dense_output_factory< stepper_type , dense_output_type > factory_type;
|
||||
factory_type factory;
|
||||
return factory( abs_error , rel_error , max_dt, stepper );
|
||||
}
|
||||
|
||||
|
||||
} // odeint
|
||||
} // numeric
|
||||
} // boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_STEPPER_GENERATION_MAKE_DENSE_OUTPUT_HPP_INCLUDED
|
||||
@@ -0,0 +1,269 @@
|
||||
/* boost random/shuffle_order.hpp header file
|
||||
*
|
||||
* Copyright Jens Maurer 2000-2001
|
||||
* Copyright Steven Watanabe 2010
|
||||
* Distributed under the Boost Software License, Version 1.0. (See
|
||||
* accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* See http://www.boost.org for most recent version including documentation.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BOOST_RANDOM_SHUFFLE_ORDER_HPP
|
||||
#define BOOST_RANDOM_SHUFFLE_ORDER_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm> // std::copy
|
||||
#include <cassert>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/random/detail/operators.hpp>
|
||||
#include <boost/random/detail/seed.hpp>
|
||||
#include <boost/random/detail/signed_unsigned_tools.hpp>
|
||||
#include <boost/random/linear_congruential.hpp>
|
||||
|
||||
#include <boost/random/detail/disable_warnings.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace random {
|
||||
|
||||
/**
|
||||
* Instatiations of class template @c shuffle_order_engine model a
|
||||
* \pseudo_random_number_generator. It mixes the output
|
||||
* of some (usually \linear_congruential_engine)
|
||||
* \uniform_random_number_generator to get better statistical properties.
|
||||
* The algorithm is described in
|
||||
*
|
||||
* @blockquote
|
||||
* "Improving a poor random number generator", Carter Bays
|
||||
* and S.D. Durham, ACM Transactions on Mathematical Software,
|
||||
* Vol 2, No. 1, March 1976, pp. 59-64.
|
||||
* http://doi.acm.org/10.1145/355666.355670
|
||||
* @endblockquote
|
||||
*
|
||||
* The output of the base generator is buffered in an array of
|
||||
* length k. Every output X(n) has a second role: It gives an
|
||||
* index into the array where X(n+1) will be retrieved. Used
|
||||
* array elements are replaced with fresh output from the base
|
||||
* generator.
|
||||
*
|
||||
* Template parameters are the base generator and the array
|
||||
* length k, which should be around 100.
|
||||
*/
|
||||
template<class UniformRandomNumberGenerator, std::size_t k>
|
||||
class shuffle_order_engine
|
||||
{
|
||||
public:
|
||||
typedef UniformRandomNumberGenerator base_type;
|
||||
typedef typename base_type::result_type result_type;
|
||||
|
||||
BOOST_STATIC_CONSTANT(bool, has_fixed_range = false);
|
||||
BOOST_STATIC_CONSTANT(std::size_t, buffer_size = k);
|
||||
BOOST_STATIC_CONSTANT(std::size_t, table_size = k);
|
||||
|
||||
BOOST_STATIC_ASSERT(std::numeric_limits<result_type>::is_integer);
|
||||
BOOST_STATIC_ASSERT(k > 0);
|
||||
|
||||
/**
|
||||
* Constructs a @c shuffle_order_engine by invoking the
|
||||
* default constructor of the base generator.
|
||||
*
|
||||
* Complexity: Exactly k+1 invocations of the base generator.
|
||||
*/
|
||||
shuffle_order_engine() : _rng() { init(); }
|
||||
/**
|
||||
* Constructs a @c shuffle_output_engine by invoking the one-argument
|
||||
* constructor of the base generator with the parameter seed.
|
||||
*
|
||||
* Complexity: Exactly k+1 invocations of the base generator.
|
||||
*/
|
||||
BOOST_RANDOM_DETAIL_ARITHMETIC_CONSTRUCTOR(shuffle_order_engine,
|
||||
result_type, s)
|
||||
{ _rng.seed(s); init(); }
|
||||
BOOST_RANDOM_DETAIL_SEED_SEQ_CONSTRUCTOR(shuffle_order_engine, SeedSeq, seq)
|
||||
{ _rng.seed(seq); init(); }
|
||||
/**
|
||||
* Constructs a @c shuffle_output_engine by using a copy
|
||||
* of the provided generator.
|
||||
*
|
||||
* Precondition: The template argument UniformRandomNumberGenerator
|
||||
* shall denote a CopyConstructible type.
|
||||
*
|
||||
* Complexity: Exactly k+1 invocations of the base generator.
|
||||
*/
|
||||
explicit shuffle_order_engine(const base_type & rng) : _rng(rng) { init(); }
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
explicit shuffle_order_engine(base_type&& rng) : _rng(rng) { init(); }
|
||||
#endif
|
||||
|
||||
template<class It> shuffle_order_engine(It& first, It last)
|
||||
: _rng(first, last) { init(); }
|
||||
void seed() { _rng.seed(); init(); }
|
||||
/**
|
||||
* Invokes the one-argument seed method of the base generator
|
||||
* with the parameter seed and re-initializes the internal buffer array.
|
||||
*
|
||||
* Complexity: Exactly k+1 invocations of the base generator.
|
||||
*/
|
||||
BOOST_RANDOM_DETAIL_ARITHMETIC_SEED(shuffle_order_engine,
|
||||
result_type, seed_arg)
|
||||
{ _rng.seed(seed_arg); init(); }
|
||||
/**
|
||||
* Invokes the one-argument seed method of the base generator
|
||||
* with the parameter seq and re-initializes the internal buffer array.
|
||||
*
|
||||
* Complexity: Exactly k+1 invocations of the base generator.
|
||||
*/
|
||||
BOOST_RANDOM_DETAIL_SEED_SEQ_SEED(shuffle_order_engine, SeedSeq, seq)
|
||||
{ _rng.seed(seq); init(); }
|
||||
template<class It> void seed(It& first, It last)
|
||||
{ _rng.seed(first, last); init(); }
|
||||
|
||||
const base_type& base() const { return _rng; }
|
||||
|
||||
result_type operator()() {
|
||||
// calculating the range every time may seem wasteful. However, this
|
||||
// makes the information locally available for the optimizer.
|
||||
typedef typename boost::random::traits::make_unsigned<result_type>::type base_unsigned;
|
||||
const base_unsigned brange =
|
||||
detail::subtract<result_type>()((max)(), (min)());
|
||||
const base_unsigned off =
|
||||
detail::subtract<result_type>()(y, (min)());
|
||||
|
||||
base_unsigned j;
|
||||
if(k == 1) {
|
||||
j = 0;
|
||||
} else if(brange < (std::numeric_limits<base_unsigned>::max)() / k) {
|
||||
// try to do it in the native type if we know that it won't
|
||||
// overflow
|
||||
j = k * off / (brange + 1);
|
||||
} else if(brange < (std::numeric_limits<uintmax_t>::max)() / k) {
|
||||
// Otherwise try to use uint64_t
|
||||
j = static_cast<base_unsigned>(
|
||||
static_cast<uintmax_t>(off) * k /
|
||||
(static_cast<uintmax_t>(brange) + 1));
|
||||
} else {
|
||||
boost::uintmax_t divisor =
|
||||
static_cast<boost::uintmax_t>(brange) + 1;
|
||||
j = static_cast<base_unsigned>(detail::muldiv(off, k, divisor));
|
||||
}
|
||||
// assert(0 <= j && j < k);
|
||||
y = v[j];
|
||||
v[j] = _rng();
|
||||
return y;
|
||||
}
|
||||
|
||||
/** Advances the generator by z steps. */
|
||||
void discard(boost::uintmax_t z)
|
||||
{
|
||||
for(boost::uintmax_t j = 0; j < z; ++j) {
|
||||
(*this)();
|
||||
}
|
||||
}
|
||||
|
||||
/** Fills a range with pseudo-random values. */
|
||||
template<class Iter>
|
||||
void generate(Iter first, Iter last)
|
||||
{ detail::generate_from_int(*this, first, last); }
|
||||
|
||||
/** Returns the smallest value that the generator can produce. */
|
||||
static result_type min BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{ return (base_type::min)(); }
|
||||
/** Returns the largest value that the generator can produce. */
|
||||
static result_type max BOOST_PREVENT_MACRO_SUBSTITUTION ()
|
||||
{ return (base_type::max)(); }
|
||||
|
||||
/** Writes a @c shuffle_order_engine to a @c std::ostream. */
|
||||
BOOST_RANDOM_DETAIL_OSTREAM_OPERATOR(os, shuffle_order_engine, s)
|
||||
{
|
||||
os << s._rng;
|
||||
for(std::size_t i = 0; i < k; ++i)
|
||||
os << ' ' << s.v[i];
|
||||
os << ' ' << s.y;
|
||||
return os;
|
||||
}
|
||||
|
||||
/** Reads a @c shuffle_order_engine from a @c std::istream. */
|
||||
BOOST_RANDOM_DETAIL_ISTREAM_OPERATOR(is, shuffle_order_engine, s)
|
||||
{
|
||||
is >> s._rng;
|
||||
for(std::size_t i = 0; i < k; ++i)
|
||||
is >> std::ws >> s.v[i];
|
||||
is >> std::ws >> s.y;
|
||||
return is;
|
||||
}
|
||||
|
||||
/** Returns true if the two generators will produce identical sequences. */
|
||||
BOOST_RANDOM_DETAIL_EQUALITY_OPERATOR(shuffle_order_engine, x, y)
|
||||
{ return x._rng == y._rng && x.y == y.y && std::equal(x.v, x.v+k, y.v); }
|
||||
/** Returns true if the two generators will produce different sequences. */
|
||||
BOOST_RANDOM_DETAIL_INEQUALITY_OPERATOR(shuffle_order_engine)
|
||||
|
||||
private:
|
||||
|
||||
/// \cond show_private
|
||||
|
||||
void init()
|
||||
{
|
||||
// we cannot use std::generate, because it uses pass-by-value for _rng
|
||||
for(result_type * p = v; p != v+k; ++p)
|
||||
*p = _rng();
|
||||
y = _rng();
|
||||
}
|
||||
|
||||
/// \endcond
|
||||
|
||||
base_type _rng;
|
||||
result_type v[k];
|
||||
result_type y;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
|
||||
// A definition is required even for integral static constants
|
||||
template<class URNG, std::size_t k>
|
||||
const bool shuffle_order_engine<URNG, k>::has_fixed_range;
|
||||
template<class URNG, std::size_t k>
|
||||
const std::size_t shuffle_order_engine<URNG, k>::table_size;
|
||||
template<class URNG, std::size_t k>
|
||||
const std::size_t shuffle_order_engine<URNG, k>::buffer_size;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* According to Harry Erwin (private e-mail), the specialization
|
||||
* @c kreutzer1986 was suggested in:
|
||||
*
|
||||
* @blockquote
|
||||
* "System Simulation: Programming Styles and Languages (International
|
||||
* Computer Science Series)", Wolfgang Kreutzer, Addison-Wesley, December 1986.
|
||||
* @endblockquote
|
||||
*/
|
||||
typedef shuffle_order_engine<
|
||||
linear_congruential_engine<uint32_t, 1366, 150889, 714025>,
|
||||
97> kreutzer1986;
|
||||
|
||||
/**
|
||||
* The specialization @c knuth_b is specified by the C++ standard.
|
||||
* It is described in
|
||||
*
|
||||
* @blockquote
|
||||
* "The Art of Computer Programming, Second Edition, Volume 2,
|
||||
* Seminumerical Algorithms", Donald Knuth, Addison-Wesley, 1981.
|
||||
* @endblockquote
|
||||
*/
|
||||
typedef shuffle_order_engine<minstd_rand0, 256> knuth_b;
|
||||
|
||||
} // namespace random
|
||||
|
||||
using random::kreutzer1986;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/random/detail/enable_warnings.hpp>
|
||||
|
||||
#endif // BOOST_RANDOM_SHUFFLE_OUTPUT_HPP
|
||||
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Copyright (c) 2000-2004
|
||||
// Joerg Walter, Mathias Koch
|
||||
//
|
||||
// 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)
|
||||
//
|
||||
// The authors gratefully acknowledge the support of
|
||||
// GeNeSys mbH & Co. KG in producing this work.
|
||||
//
|
||||
|
||||
// this file should not contain any code, but the documentation
|
||||
// global to all files
|
||||
|
||||
/** \namespace boost::numeric::ublas
|
||||
\brief contains all important classes and functions of uBLAS
|
||||
|
||||
all ublas definitions ...
|
||||
\todo expand this section
|
||||
*/
|
||||
|
||||
/** \defgroup blas1 Level 1 BLAS
|
||||
\brief level 1 basic linear algebra subroutines
|
||||
*/
|
||||
|
||||
/** \defgroup blas2 Level 2 BLAS
|
||||
\brief level 2 basic linear algebra subroutines
|
||||
*/
|
||||
|
||||
/** \defgroup blas3 Level 3 BLAS
|
||||
\brief level 3 basic linear algebra subroutines
|
||||
*/
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,137 @@
|
||||
#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
|
||||
#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic
|
||||
//
|
||||
// Copyright (c) 2007, 2013 Peter Dimov
|
||||
//
|
||||
// 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
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
inline void atomic_increment( std::atomic_int_least32_t * pw )
|
||||
{
|
||||
pw->fetch_add( 1, std::memory_order_relaxed );
|
||||
}
|
||||
|
||||
inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw )
|
||||
{
|
||||
return pw->fetch_sub( 1, std::memory_order_acq_rel );
|
||||
}
|
||||
|
||||
inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw )
|
||||
{
|
||||
// long r = *pw;
|
||||
// if( r != 0 ) ++*pw;
|
||||
// return r;
|
||||
|
||||
std::int_least32_t r = pw->load( std::memory_order_relaxed );
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
if( r == 0 )
|
||||
{
|
||||
return r;
|
||||
}
|
||||
|
||||
if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) )
|
||||
{
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class sp_counted_base
|
||||
{
|
||||
private:
|
||||
|
||||
sp_counted_base( sp_counted_base const & );
|
||||
sp_counted_base & operator= ( sp_counted_base const & );
|
||||
|
||||
std::atomic_int_least32_t use_count_; // #shared
|
||||
std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
|
||||
|
||||
public:
|
||||
|
||||
sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~sp_counted_base() // nothrow
|
||||
{
|
||||
}
|
||||
|
||||
// dispose() is called when use_count_ drops to zero, to release
|
||||
// the resources managed by *this.
|
||||
|
||||
virtual void dispose() = 0; // nothrow
|
||||
|
||||
// destroy() is called when weak_count_ drops to zero.
|
||||
|
||||
virtual void destroy() // nothrow
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
{
|
||||
atomic_increment( &use_count_ );
|
||||
}
|
||||
|
||||
bool add_ref_lock() // true on success
|
||||
{
|
||||
return atomic_conditional_increment( &use_count_ ) != 0;
|
||||
}
|
||||
|
||||
void release() // nothrow
|
||||
{
|
||||
if( atomic_decrement( &use_count_ ) == 1 )
|
||||
{
|
||||
dispose();
|
||||
weak_release();
|
||||
}
|
||||
}
|
||||
|
||||
void weak_add_ref() // nothrow
|
||||
{
|
||||
atomic_increment( &weak_count_ );
|
||||
}
|
||||
|
||||
void weak_release() // nothrow
|
||||
{
|
||||
if( atomic_decrement( &weak_count_ ) == 1 )
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
long use_count() const // nothrow
|
||||
{
|
||||
return use_count_.load( std::memory_order_acquire );
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
|
||||
@@ -0,0 +1,94 @@
|
||||
Notes on WSJT-X Installation for Mac OS X
|
||||
-----------------------------------------
|
||||
|
||||
If you have already downloaded a previous version of WSJT-X then I suggest
|
||||
you change the name in the Applications folder from WSJT-X to WSJT-X_previous
|
||||
before proceeding.
|
||||
|
||||
If you have installed a previous version of WSJT-X before then there is no
|
||||
need to change anything on your system so proceed to NEXT.
|
||||
|
||||
BEGIN:
|
||||
|
||||
There are some system matters you must deal with first. Open a Terminal window
|
||||
by going to Applications->Utilities and clicking on Terminal.
|
||||
|
||||
Along with this ReadMe file there is a file: sysctl.conf. Drag this file to your Desktop.
|
||||
|
||||
WSJT-X makes use of a block of memory which is shared between different parts of
|
||||
the code. The normal allocation of shared memory on a Mac is insufficient and this
|
||||
has to be increased. You can check the current allocation on your Mac by typing:
|
||||
|
||||
sysctl -a | grep sysv.shm
|
||||
|
||||
If your shmmax is already at least 33554432 (32 MB) then you can close the Terminal
|
||||
window and skip the next steps and go to (NEXT).
|
||||
|
||||
Now move this file into place for the system to use by typing: (Note this assumes that
|
||||
you really did drag this file to your Desktop as required earlier.)
|
||||
|
||||
sudo cp $HOME/Desktop/sysctl.conf /etc/
|
||||
sudo chmod 664 /etc/sysctl.conf
|
||||
sudo chown root:wheel /etc/sysctl.conf
|
||||
|
||||
and then reboot your Mac. This is necessary to install the changes. After the
|
||||
reboot you should re-open the Terminal window as before and you can check that the
|
||||
change has been made by typing:
|
||||
|
||||
sysctl -a | grep sysv.shm
|
||||
|
||||
If shmmax is not shown as 33554432 then contact me since WSJT-X will fail to load with
|
||||
an error message: "Unable to create shared memory segment".
|
||||
|
||||
You are now finished with system changes. You should make certain that NO error messages
|
||||
have been produced during these steps. You can now close the Terminal window. It will
|
||||
not be necessary to repeat this procedure again, even when you download an updated
|
||||
version of WSJT-X.
|
||||
|
||||
NEXT:
|
||||
|
||||
Drag the WSJT-X app to your preferred location, such as Applications.
|
||||
|
||||
You need to configure your sound card. Visit Applications > Utilities > Audio MIDI
|
||||
Setup and select your sound card and then set Format to be "48000Hz 2ch-16bit" for
|
||||
input and output.
|
||||
|
||||
Now double-click on the WSJT-X app and two windows will appear. Select Preferences
|
||||
under the WSJT-X Menu and fill in various station details on the General panel.
|
||||
I recommend checking the 4 boxes under the Display heading and the first 4 boxes under
|
||||
the Behaviour heading.
|
||||
|
||||
Next visit the Audio panel and select the Audio Codec you use to communicate between
|
||||
WSJT-X and your rig. There are so many audio interfaces available that it is not
|
||||
possible to give detailed advice on selection. If you have difficulties contact me.
|
||||
Note the location of the Save Directory. Decoded wave forms are located here.
|
||||
|
||||
Look at the Reporting panel. If you check the "Prompt me" box, a logging panel will appear
|
||||
at the end of the QSO. Two log files are provided in Library/Application Support/WSJT-X.
|
||||
These are a simple wsjtx.log file and wsjtx_log.adi which is formatted for use with
|
||||
logging databases. The "File" menu bar items include a button "Open log directory"
|
||||
to open the log directory in Finder for you, ready for processing by any logging
|
||||
application you use.
|
||||
|
||||
Finally, visit the Radio panel. WSJT-X is most effective when operated with CAT
|
||||
control. You will need to install the relevant Mac driver for your rig. This must
|
||||
be located in the device driver directory /dev. You should install your driver
|
||||
and then re-launch WSJT-X. Return to the the Radio panel in Preferences and in
|
||||
the "Serial port" panel select your driver from the list that is presented. If
|
||||
for some reason your driver is not shown, then insert the full name
|
||||
of your driver in the Serial Port panel. Such as: /dev/tty.PL2303-00002226 or
|
||||
whatever driver you have. The /dev/ prefix is mandatory. Set the relevant
|
||||
communication parameters as required by your transceiver and click "Test CAT" to
|
||||
check.
|
||||
|
||||
WSJT-X needs the Mac clock to be accurate. Visit System Preferences > Date & Time
|
||||
and make sure that date and time are set automatically. The drop-down menu will
|
||||
normally offer you several time servers to choose from.
|
||||
|
||||
On the Help menu, have a look at the new Online User's Guide for operational hints
|
||||
and tips.
|
||||
|
||||
Please email me if you have problems.
|
||||
|
||||
--- John G4KLA (g4kla@rmnjmn.co.uk)
|
||||
|
||||
@@ -0,0 +1,312 @@
|
||||
// Boost string_algo library classification.hpp header file ---------------------------//
|
||||
|
||||
// Copyright Pavol Droba 2002-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)
|
||||
|
||||
// See http://www.boost.org/ for updates, documentation, and revision history.
|
||||
|
||||
#ifndef BOOST_STRING_CLASSIFICATION_HPP
|
||||
#define BOOST_STRING_CLASSIFICATION_HPP
|
||||
|
||||
#include <algorithm>
|
||||
#include <locale>
|
||||
#include <boost/range/value_type.hpp>
|
||||
#include <boost/range/as_literal.hpp>
|
||||
#include <boost/algorithm/string/detail/classification.hpp>
|
||||
#include <boost/algorithm/string/predicate_facade.hpp>
|
||||
|
||||
|
||||
/*! \file
|
||||
Classification predicates are included in the library to give
|
||||
some more convenience when using algorithms like \c trim() and \c all().
|
||||
They wrap functionality of STL classification functions ( e.g. \c std::isspace() )
|
||||
into generic functors.
|
||||
*/
|
||||
|
||||
namespace boost {
|
||||
namespace algorithm {
|
||||
|
||||
// classification functor generator -------------------------------------//
|
||||
|
||||
//! is_classified predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate. This predicate holds if the input is
|
||||
of specified \c std::ctype category.
|
||||
|
||||
\param Type A \c std::ctype category
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_classified(std::ctype_base::mask Type, const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(Type, Loc);
|
||||
}
|
||||
|
||||
//! is_space predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::space category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_space(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::space, Loc);
|
||||
}
|
||||
|
||||
//! is_alnum predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::alnum category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_alnum(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::alnum, Loc);
|
||||
}
|
||||
|
||||
//! is_alpha predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::alpha category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_alpha(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::alpha, Loc);
|
||||
}
|
||||
|
||||
//! is_cntrl predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::cntrl category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_cntrl(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::cntrl, Loc);
|
||||
}
|
||||
|
||||
//! is_digit predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::digit category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_digit(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::digit, Loc);
|
||||
}
|
||||
|
||||
//! is_graph predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::graph category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_graph(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::graph, Loc);
|
||||
}
|
||||
|
||||
//! is_lower predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::lower category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_lower(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::lower, Loc);
|
||||
}
|
||||
|
||||
//! is_print predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::print category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_print(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::print, Loc);
|
||||
}
|
||||
|
||||
//! is_punct predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::punct category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_punct(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::punct, Loc);
|
||||
}
|
||||
|
||||
//! is_upper predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::upper category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_upper(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::upper, Loc);
|
||||
}
|
||||
|
||||
//! is_xdigit predicate
|
||||
/*!
|
||||
Construct the \c is_classified predicate for the \c ctype_base::xdigit category.
|
||||
|
||||
\param Loc A locale used for classification
|
||||
\return An instance of the \c is_classified predicate
|
||||
*/
|
||||
inline detail::is_classifiedF
|
||||
is_xdigit(const std::locale& Loc=std::locale())
|
||||
{
|
||||
return detail::is_classifiedF(std::ctype_base::xdigit, Loc);
|
||||
}
|
||||
|
||||
//! is_any_of predicate
|
||||
/*!
|
||||
Construct the \c is_any_of predicate. The predicate holds if the input
|
||||
is included in the specified set of characters.
|
||||
|
||||
\param Set A set of characters to be recognized
|
||||
\return An instance of the \c is_any_of predicate
|
||||
*/
|
||||
template<typename RangeT>
|
||||
inline detail::is_any_ofF<
|
||||
BOOST_STRING_TYPENAME range_value<RangeT>::type>
|
||||
is_any_of( const RangeT& Set )
|
||||
{
|
||||
iterator_range<BOOST_STRING_TYPENAME range_const_iterator<RangeT>::type> lit_set(boost::as_literal(Set));
|
||||
return detail::is_any_ofF<BOOST_STRING_TYPENAME range_value<RangeT>::type>(lit_set);
|
||||
}
|
||||
|
||||
//! is_from_range predicate
|
||||
/*!
|
||||
Construct the \c is_from_range predicate. The predicate holds if the input
|
||||
is included in the specified range. (i.e. From <= Ch <= To )
|
||||
|
||||
\param From The start of the range
|
||||
\param To The end of the range
|
||||
\return An instance of the \c is_from_range predicate
|
||||
*/
|
||||
template<typename CharT>
|
||||
inline detail::is_from_rangeF<CharT> is_from_range(CharT From, CharT To)
|
||||
{
|
||||
return detail::is_from_rangeF<CharT>(From,To);
|
||||
}
|
||||
|
||||
// predicate combinators ---------------------------------------------------//
|
||||
|
||||
//! predicate 'and' composition predicate
|
||||
/*!
|
||||
Construct the \c class_and predicate. This predicate can be used
|
||||
to logically combine two classification predicates. \c class_and holds,
|
||||
if both predicates return true.
|
||||
|
||||
\param Pred1 The first predicate
|
||||
\param Pred2 The second predicate
|
||||
\return An instance of the \c class_and predicate
|
||||
*/
|
||||
template<typename Pred1T, typename Pred2T>
|
||||
inline detail::pred_andF<Pred1T, Pred2T>
|
||||
operator&&(
|
||||
const predicate_facade<Pred1T>& Pred1,
|
||||
const predicate_facade<Pred2T>& Pred2 )
|
||||
{
|
||||
// Doing the static_cast with the pointer instead of the reference
|
||||
// is a workaround for some compilers which have problems with
|
||||
// static_cast's of template references, i.e. CW8. /grafik/
|
||||
return detail::pred_andF<Pred1T,Pred2T>(
|
||||
*static_cast<const Pred1T*>(&Pred1),
|
||||
*static_cast<const Pred2T*>(&Pred2) );
|
||||
}
|
||||
|
||||
//! predicate 'or' composition predicate
|
||||
/*!
|
||||
Construct the \c class_or predicate. This predicate can be used
|
||||
to logically combine two classification predicates. \c class_or holds,
|
||||
if one of the predicates return true.
|
||||
|
||||
\param Pred1 The first predicate
|
||||
\param Pred2 The second predicate
|
||||
\return An instance of the \c class_or predicate
|
||||
*/
|
||||
template<typename Pred1T, typename Pred2T>
|
||||
inline detail::pred_orF<Pred1T, Pred2T>
|
||||
operator||(
|
||||
const predicate_facade<Pred1T>& Pred1,
|
||||
const predicate_facade<Pred2T>& Pred2 )
|
||||
{
|
||||
// Doing the static_cast with the pointer instead of the reference
|
||||
// is a workaround for some compilers which have problems with
|
||||
// static_cast's of template references, i.e. CW8. /grafik/
|
||||
return detail::pred_orF<Pred1T,Pred2T>(
|
||||
*static_cast<const Pred1T*>(&Pred1),
|
||||
*static_cast<const Pred2T*>(&Pred2));
|
||||
}
|
||||
|
||||
//! predicate negation operator
|
||||
/*!
|
||||
Construct the \c class_not predicate. This predicate represents a negation.
|
||||
\c class_or holds if of the predicates return false.
|
||||
|
||||
\param Pred The predicate to be negated
|
||||
\return An instance of the \c class_not predicate
|
||||
*/
|
||||
template<typename PredT>
|
||||
inline detail::pred_notF<PredT>
|
||||
operator!( const predicate_facade<PredT>& Pred )
|
||||
{
|
||||
// Doing the static_cast with the pointer instead of the reference
|
||||
// is a workaround for some compilers which have problems with
|
||||
// static_cast's of template references, i.e. CW8. /grafik/
|
||||
return detail::pred_notF<PredT>(*static_cast<const PredT*>(&Pred));
|
||||
}
|
||||
|
||||
} // namespace algorithm
|
||||
|
||||
// pull names to the boost namespace
|
||||
using algorithm::is_classified;
|
||||
using algorithm::is_space;
|
||||
using algorithm::is_alnum;
|
||||
using algorithm::is_alpha;
|
||||
using algorithm::is_cntrl;
|
||||
using algorithm::is_digit;
|
||||
using algorithm::is_graph;
|
||||
using algorithm::is_lower;
|
||||
using algorithm::is_upper;
|
||||
using algorithm::is_print;
|
||||
using algorithm::is_punct;
|
||||
using algorithm::is_xdigit;
|
||||
using algorithm::is_any_of;
|
||||
using algorithm::is_from_range;
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_STRING_PREDICATE_HPP
|
||||
@@ -0,0 +1,69 @@
|
||||
// (C) Copyright John Maddock 2007.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// This file is machine generated, do not edit by hand
|
||||
|
||||
// Polynomial evaluation using second order Horners rule
|
||||
#ifndef BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
|
||||
#define BOOST_MATH_TOOLS_POLY_EVAL_7_HPP
|
||||
|
||||
namespace boost{ namespace math{ namespace tools{ namespace detail{
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T*, const V&, const mpl::int_<0>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(0);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V&, const mpl::int_<1>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<2>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(a[1] * x + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<3>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>((a[2] * x + a[1]) * x + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<4>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
return static_cast<V>(((a[3] * x + a[2]) * x + a[1]) * x + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<5>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
return static_cast<V>((a[4] * x2 + a[2]) * x2 + a[0] + (a[3] * x2 + a[1]) * x);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<6>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
return static_cast<V>(((a[5] * x2 + a[3]) * x2 + a[1]) * x + (a[4] * x2 + a[2]) * x2 + a[0]);
|
||||
}
|
||||
|
||||
template <class T, class V>
|
||||
inline V evaluate_polynomial_c_imp(const T* a, const V& x, const mpl::int_<7>*) BOOST_MATH_NOEXCEPT(V)
|
||||
{
|
||||
V x2 = x * x;
|
||||
return static_cast<V>(((a[6] * x2 + a[4]) * x2 + a[2]) * x2 + a[0] + ((a[5] * x2 + a[3]) * x2 + a[1]) * x);
|
||||
}
|
||||
|
||||
|
||||
}}}} // namespaces
|
||||
|
||||
#endif // include guard
|
||||
|
||||
Reference in New Issue
Block a user