Initial Commit
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
|
||||
#define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// binary_iarchive_impl.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
#include <istream>
|
||||
#include <boost/archive/basic_binary_iprimitive.hpp>
|
||||
#include <boost/archive/basic_binary_iarchive.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
namespace detail {
|
||||
template<class Archive> class interface_iarchive;
|
||||
} // namespace detail
|
||||
|
||||
template<class Archive, class Elem, class Tr>
|
||||
class BOOST_SYMBOL_VISIBLE binary_iarchive_impl :
|
||||
public basic_binary_iprimitive<Archive, Elem, Tr>,
|
||||
public basic_binary_iarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
public:
|
||||
#else
|
||||
protected:
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
||||
// for some inexplicable reason insertion of "class" generates compile erro
|
||||
// on msvc 7.1
|
||||
friend detail::interface_iarchive<Archive>;
|
||||
friend basic_binary_iarchive<Archive>;
|
||||
friend load_access;
|
||||
#else
|
||||
friend class detail::interface_iarchive<Archive>;
|
||||
friend class basic_binary_iarchive<Archive>;
|
||||
friend class load_access;
|
||||
#endif
|
||||
#endif
|
||||
template<class T>
|
||||
void load_override(T & t){
|
||||
this->basic_binary_iarchive<Archive>::load_override(t);
|
||||
}
|
||||
void init(unsigned int flags){
|
||||
if(0 != (flags & no_header)){
|
||||
return;
|
||||
}
|
||||
#if ! defined(__MWERKS__)
|
||||
this->basic_binary_iarchive<Archive>::init();
|
||||
this->basic_binary_iprimitive<Archive, Elem, Tr>::init();
|
||||
#else
|
||||
basic_binary_iarchive<Archive>::init();
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>::init();
|
||||
#endif
|
||||
}
|
||||
binary_iarchive_impl(
|
||||
std::basic_streambuf<Elem, Tr> & bsb,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>(
|
||||
bsb,
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_iarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
binary_iarchive_impl(
|
||||
std::basic_istream<Elem, Tr> & is,
|
||||
unsigned int flags
|
||||
) :
|
||||
basic_binary_iprimitive<Archive, Elem, Tr>(
|
||||
* is.rdbuf(),
|
||||
0 != (flags & no_codecvt)
|
||||
),
|
||||
basic_binary_iarchive<Archive>(flags)
|
||||
{
|
||||
init(flags);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP
|
||||
@@ -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=2048) !Samples per symbol at 12000 S/s
|
||||
parameter (N7=7*NSPS) !Samples in Costas 7x7 array (14,336)
|
||||
parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (161,792)
|
||||
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/NSPS-1) !Number of symbol spectra (half-symbol steps)
|
||||
@@ -0,0 +1,233 @@
|
||||
program ldpcsim168
|
||||
! End to end test of the (168,84)/crc12 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(11)
|
||||
integer*1 msgbits(84)
|
||||
integer*1 apmask(168), cw(168)
|
||||
integer*2 checksum
|
||||
integer*4 i4Msg6BitWords(13)
|
||||
integer colorder(168)
|
||||
integer nerrtot(168),nerrdec(168),nmpcbad(84)
|
||||
logical checksumok,fsk,bpsk
|
||||
real*8, allocatable :: rxdata(:)
|
||||
real, allocatable :: llr(:)
|
||||
|
||||
data colorder/0,1,2,3,28,4,5,6,7,8,9,10,11,34,12,32,13,14,15,16,17, &
|
||||
18,36,29,42,31,20,21,41,40,30,38,22,19,47,37,46,35,44,33,49,24, &
|
||||
43,51,25,26,27,50,52,57,69,54,55,45,59,58,56,61,60,53,48,23,62, &
|
||||
63,64,67,66,65,68,39,70,71,72,74,73,75,76,77,80,81,78,82,79,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,120,121,122,123,124,125, &
|
||||
126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146, &
|
||||
147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167/
|
||||
|
||||
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=168
|
||||
K=84
|
||||
! scale Eb/No for a (168,72) code
|
||||
rate=real(72)/real(N)
|
||||
|
||||
write(*,*) "rate: ",rate
|
||||
write(*,*) "niter= ",max_iterations," s= ",s
|
||||
|
||||
allocate ( codeword(N), decoded(K), message(K) )
|
||||
allocate ( rxdata(N), llr(N) )
|
||||
|
||||
! msg="K1JT K9AN EN50"
|
||||
msg="G4WJS K9AN EN50"
|
||||
call packmsg(msg,i4Msg6BitWords,itype,.false.) !Pack into 12 6-bit bytes
|
||||
call unpackmsg(i4Msg6BitWords,msgsent,.false.,'') !Unpack to get msgsent
|
||||
write(*,*) "message sent ",msgsent
|
||||
|
||||
i4=0
|
||||
ik=0
|
||||
im=0
|
||||
do i=1,12
|
||||
nn=i4Msg6BitWords(i)
|
||||
do j=1, 6
|
||||
ik=ik+1
|
||||
i4=i4+i4+iand(1,ishft(nn,j-6))
|
||||
i4=iand(i4,255)
|
||||
if(ik.eq.8) then
|
||||
im=im+1
|
||||
! if(i4.gt.127) i4=i4-256
|
||||
i1Msg8BitBytes(im)=i4
|
||||
ik=0
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
|
||||
i1Msg8BitBytes(10:11)=0
|
||||
checksum = crc12 (c_loc (i1Msg8BitBytes), 11)
|
||||
! For reference, the next 3 lines show how to check the CRC
|
||||
i1Msg8BitBytes(10)=checksum/256
|
||||
i1Msg8BitBytes(11)=iand (checksum,255)
|
||||
checksumok = crc12_check(c_loc (i1Msg8BitBytes), 11)
|
||||
if( checksumok ) write(*,*) 'Good checksum'
|
||||
|
||||
mbit=0
|
||||
do i=1, 9
|
||||
i1=i1Msg8BitBytes(i)
|
||||
do ibit=1,8
|
||||
mbit=mbit+1
|
||||
msgbits(mbit)=iand(1,ishft(i1,ibit-8))
|
||||
enddo
|
||||
enddo
|
||||
i1=i1Msg8BitBytes(10) ! First 4 bits of crc12 are LSB of this byte
|
||||
do ibit=1,4
|
||||
msgbits(72+ibit)=iand(1,ishft(i1,ibit-4))
|
||||
enddo
|
||||
i1=i1Msg8BitBytes(11) ! Now shift in last 8 bits of the CRC
|
||||
do ibit=1,8
|
||||
msgbits(76+ibit)=iand(1,ishft(i1,ibit-8))
|
||||
enddo
|
||||
|
||||
write(*,*) 'message'
|
||||
write(*,'(11(8i1,1x))') msgbits
|
||||
|
||||
call encode168(msgbits,codeword)
|
||||
call init_random_seed()
|
||||
call sgran()
|
||||
|
||||
write(*,*) 'codeword'
|
||||
write(*,'(21(8i1,1x))') codeword
|
||||
|
||||
write(*,*) "Es/N0 SNR2500 ngood nundetected nbadcrc sigma"
|
||||
do idb = 6,-6,-1
|
||||
db=idb/2.0-1.0
|
||||
sigma=1/sqrt( 2*(10**(db/10.0)) )
|
||||
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)
|
||||
nap=0 ! number of AP bits
|
||||
llr(colorder(168-84+1:168-84+nap)+1)=5*(2.0*msgbits(1:nap)-1.0)
|
||||
apmask=0
|
||||
apmask(colorder(168-84+1:168-84+nap)+1)=1
|
||||
|
||||
! max_iterations is max number of belief propagation iterations
|
||||
call bpdecode168(llr, apmask, max_iterations, decoded, niterations)
|
||||
! if( niterations .eq. -1 ) then
|
||||
! norder=3
|
||||
! call osd168(llr, norder, decoded, niterations, cw)
|
||||
! endif
|
||||
! If the decoder finds a valid codeword, niterations will be .ge. 0.
|
||||
if( niterations .ge. 0 ) then
|
||||
call extractmessage168(decoded,msgreceived,ncrcflag,recent_calls,nrecent)
|
||||
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
|
||||
|
||||
write(37,*) niterations, ncrcflag, nueflag
|
||||
nmpcbad(nerrmpc)=nmpcbad(nerrmpc)+1
|
||||
if( ncrcflag .eq. 1 ) then
|
||||
if( nueflag .eq. 0 ) then
|
||||
ngood=ngood+1
|
||||
nerrdec(nerr)=nerrdec(nerr)+1
|
||||
else if( nueflag .eq. 1 ) then
|
||||
nue=nue+1;
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
snr2500=db+10*log10(10.417/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,168
|
||||
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,84
|
||||
write(25,'(i4,2x,i10)') i,nmpcbad(i)
|
||||
enddo
|
||||
close(25)
|
||||
|
||||
|
||||
|
||||
end program ldpcsim168
|
||||
@@ -0,0 +1,77 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2001-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Eric Niebler
|
||||
Copyright (c) 2014-2015 John Fletcher
|
||||
Copyright (c) 2016 Kohei Takahashi
|
||||
|
||||
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_PHOENIX_CONFIG_HPP
|
||||
#define BOOST_PHOENIX_CONFIG_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// This section is to sort out whether hash types or unordered types
|
||||
// are available. This depends on whether stdlib or libc++ is being used
|
||||
// and also whether C++11 or C++03 is being used.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// The idea is to set up the configuration without including the actual
|
||||
// headers unless that is unavoidable.
|
||||
//
|
||||
// The client code should contain the following to include headers
|
||||
//
|
||||
// #ifdef BOOST_PHOENIX_HAS_HASH
|
||||
// #include BOOST_PHOENIX_HASH_SET_HEADER
|
||||
// #include BOOST_PHOENIX_HASH_MAP_HEADER
|
||||
// #endif
|
||||
//
|
||||
// #ifdef BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
|
||||
// #include BOOST_PHOENIX_UNORDERED_SET_HEADER
|
||||
// #include BOOST_PHOENIX_UNORDERED_MAP_HEADER
|
||||
// #endif
|
||||
//
|
||||
// The client code can then chose the implementation provided.
|
||||
// See the example in test/stl/querying_find2.cpp
|
||||
|
||||
// There is no specific thing in Boost Config for libc++
|
||||
#ifdef _LIBCPP_VERSION
|
||||
#define BOOST_PHOENIX_USING_LIBCPP
|
||||
#endif
|
||||
|
||||
// This may not be true for some very old version of libc++
|
||||
// Current libc++ supports unordered_set and unordered_map without C++11.
|
||||
#if defined(BOOST_PHOENIX_USING_LIBCPP) \
|
||||
&& !(defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined(BOOST_NO_CXX11_HDR_UNORDERED_SET))
|
||||
// This is either libc++ or C++11 or later
|
||||
#define BOOST_PHOENIX_HAS_UNORDERED_SET_AND_MAP
|
||||
#define BOOST_PHOENIX_UNORDERED_SET_HEADER <unordered_set>
|
||||
#define BOOST_PHOENIX_UNORDERED_MAP_HEADER <unordered_map>
|
||||
#define BOOST_PHOENIX_UNORDERED_NAMESPACE std
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_HASH)
|
||||
// This is to sort out case of Clang when using stdlib from gcc
|
||||
// as Clang thinks it is gcc 4.2.1
|
||||
// This prevents the failure to include a header with a warning.
|
||||
#define _GLIBCXX_PERMIT_BACKWARD_HASH
|
||||
#define BOOST_PHOENIX_HASH_SET_HEADER BOOST_HASH_SET_HEADER
|
||||
#define BOOST_PHOENIX_HASH_MAP_HEADER BOOST_HASH_MAP_HEADER
|
||||
#define BOOST_PHOENIX_HAS_HASH
|
||||
#define BOOST_PHOENIX_HASH_NAMESPACE BOOST_STD_EXTENSION_NAMESPACE
|
||||
#elif defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB < 610)
|
||||
#define BOOST_PHOENIX_HASH_SET_HEADER <hash_set>
|
||||
#define BOOST_PHOENIX_HASH_MAP_HEADER <hash_map>
|
||||
#define BOOST_PHOENIX_HAS_HASH
|
||||
#define BOOST_PHOENIX_HASH_NAMESPACE stdext
|
||||
#endif
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_GCC, < 40100)
|
||||
#define BOOST_PHOENIX_SFINAE_AND_OVERLOADS , void* = 0
|
||||
#else
|
||||
#define BOOST_PHOENIX_SFINAE_AND_OVERLOADS
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,115 @@
|
||||
// (C) Copyright Bryce Lelbach 2011
|
||||
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
// PathScale EKOPath C++ Compiler
|
||||
|
||||
#ifndef BOOST_COMPILER
|
||||
# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__
|
||||
#endif
|
||||
|
||||
#if __PATHCC__ >= 4
|
||||
# define BOOST_MSVC6_MEMBER_TEMPLATES
|
||||
# define BOOST_HAS_UNISTD_H
|
||||
# define BOOST_HAS_STDINT_H
|
||||
# define BOOST_HAS_SIGACTION
|
||||
# define BOOST_HAS_SCHED_YIELD
|
||||
# define BOOST_HAS_THREADS
|
||||
# define BOOST_HAS_PTHREADS
|
||||
# define BOOST_HAS_PTHREAD_YIELD
|
||||
# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
|
||||
# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
|
||||
# define BOOST_HAS_NRVO
|
||||
# define BOOST_HAS_NL_TYPES_H
|
||||
# define BOOST_HAS_NANOSLEEP
|
||||
# define BOOST_HAS_LONG_LONG
|
||||
# define BOOST_HAS_LOG1P
|
||||
# define BOOST_HAS_GETTIMEOFDAY
|
||||
# define BOOST_HAS_EXPM1
|
||||
# define BOOST_HAS_DIRENT_H
|
||||
# define BOOST_HAS_CLOCK_GETTIME
|
||||
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
# define BOOST_NO_CXX11_UNICODE_LITERALS
|
||||
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
|
||||
# define BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# define BOOST_NO_SFINAE_EXPR
|
||||
# define BOOST_NO_CXX11_SCOPED_ENUMS
|
||||
# define BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
# define BOOST_NO_CXX11_RANGE_BASED_FOR
|
||||
# define BOOST_NO_CXX11_RAW_LITERALS
|
||||
# define BOOST_NO_CXX11_NULLPTR
|
||||
# define BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
# define BOOST_NO_CXX11_NOEXCEPT
|
||||
# define BOOST_NO_CXX11_LAMBDAS
|
||||
# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
|
||||
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
|
||||
# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
|
||||
# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
|
||||
# define BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
|
||||
# define BOOST_NO_CXX11_DECLTYPE
|
||||
# define BOOST_NO_CXX11_DECLTYPE_N3276
|
||||
# define BOOST_NO_CXX11_CONSTEXPR
|
||||
# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
|
||||
# define BOOST_NO_CXX11_CHAR32_T
|
||||
# define BOOST_NO_CXX11_CHAR16_T
|
||||
# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
|
||||
# define BOOST_NO_CXX11_AUTO_DECLARATIONS
|
||||
# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
|
||||
# define BOOST_NO_CXX11_ALIGNAS
|
||||
# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
|
||||
# define BOOST_NO_CXX11_INLINE_NAMESPACES
|
||||
# define BOOST_NO_CXX11_REF_QUALIFIERS
|
||||
# define BOOST_NO_CXX11_FINAL
|
||||
# define BOOST_NO_CXX11_THREAD_LOCAL
|
||||
|
||||
// C++ 14:
|
||||
#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
|
||||
# define BOOST_NO_CXX14_AGGREGATE_NSDMI
|
||||
#endif
|
||||
#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
|
||||
# define BOOST_NO_CXX14_BINARY_LITERALS
|
||||
#endif
|
||||
#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
|
||||
# define BOOST_NO_CXX14_CONSTEXPR
|
||||
#endif
|
||||
#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
|
||||
# define BOOST_NO_CXX14_DECLTYPE_AUTO
|
||||
#endif
|
||||
#if (__cplusplus < 201304) // There's no SD6 check for this....
|
||||
# define BOOST_NO_CXX14_DIGIT_SEPARATORS
|
||||
#endif
|
||||
#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
|
||||
# define BOOST_NO_CXX14_GENERIC_LAMBDAS
|
||||
#endif
|
||||
#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
|
||||
# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
|
||||
#endif
|
||||
#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
|
||||
# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
|
||||
#endif
|
||||
#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
|
||||
# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
#ifndef BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
|
||||
#define BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/mpl for documentation.
|
||||
|
||||
// $Id$
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/aux_/transform_iter.hpp>
|
||||
#include <boost/mpl/aux_/na_spec.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(F)
|
||||
>
|
||||
struct transform_view
|
||||
{
|
||||
private:
|
||||
typedef typename lambda<F>::type f_;
|
||||
typedef typename begin<Sequence>::type first_;
|
||||
typedef typename end<Sequence>::type last_;
|
||||
|
||||
public:
|
||||
struct tag;
|
||||
typedef transform_view type;
|
||||
typedef aux::transform_iter< first_,last_,f_ > begin;
|
||||
typedef aux::transform_iter< last_,last_,f_ > end;
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC(2, transform_view)
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_TRANSFORM_VIEW_HPP_INCLUDED
|
||||
@@ -0,0 +1,42 @@
|
||||
program testfast9
|
||||
|
||||
parameter (NMAX=359424)
|
||||
integer*2 id2(NMAX)
|
||||
integer narg(0:11)
|
||||
character*80 line(100)
|
||||
character submode*1,infile*80
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.2) then
|
||||
print*,'Usage: testfast9 submode infile'
|
||||
print*,'Example: testfast9 E /data/VE1SKY/K1JT/JT9E/150806_123300.wav'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,submode)
|
||||
call getarg(2,infile)
|
||||
|
||||
open(10,file=infile,access='stream',status='old')
|
||||
read(10) id2(1:22) !Skip 44 header bytes
|
||||
npts=NMAX
|
||||
read(10,end=1) id2(1:npts) !Read the raw data
|
||||
|
||||
1 i1=index(infile,'.wav')
|
||||
read(infile(i1-6:i1-1),*) narg(0)
|
||||
narg(1)=NMAX
|
||||
n=ichar(submode)
|
||||
narg(2)=n-ichar('A')
|
||||
if(n.ge.97 .and. n.le.104) narg(2)=n-ichar('a')
|
||||
narg(3)=1
|
||||
narg(4)=0
|
||||
narg(5)=0
|
||||
narg(6)=0
|
||||
narg(7)=29951
|
||||
narg(8)=1
|
||||
narg(9)=102
|
||||
narg(10)=700
|
||||
narg(11)=500
|
||||
|
||||
call fast9(id2,narg,line)
|
||||
print*,line(1)
|
||||
|
||||
999 end program testfast9
|
||||
@@ -0,0 +1,60 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2003 Jonathan de Halleux (dehalleux@pelikhan.com)
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
=============================================================================*/
|
||||
#ifndef BOOST_SPIRIT_ACTOR_DECREMENT_ACTOR_HPP
|
||||
#define BOOST_SPIRIT_ACTOR_DECREMENT_ACTOR_HPP
|
||||
|
||||
#include <boost/spirit/home/classic/namespace.hpp>
|
||||
#include <boost/spirit/home/classic/actor/ref_actor.hpp>
|
||||
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// Summary:
|
||||
// A semantic action policy that calls the -- operator on a reference.
|
||||
// (This doc uses convention available in actors.hpp)
|
||||
//
|
||||
// Actions:
|
||||
// --ref;
|
||||
//
|
||||
// Policy name:
|
||||
// decrement_action
|
||||
//
|
||||
// Policy holder, corresponding helper method:
|
||||
// ref_actor, decrement_a( ref );
|
||||
//
|
||||
// () operators: both.
|
||||
//
|
||||
// See also ref_actor for more details.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
struct decrement_action
|
||||
{
|
||||
template<
|
||||
typename T
|
||||
>
|
||||
void act(T& ref_) const
|
||||
{
|
||||
--ref_;
|
||||
}
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// helper method that creates a and_assign_actor.
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template<typename T>
|
||||
inline ref_actor<T,decrement_action> decrement_a(T& ref_)
|
||||
{
|
||||
return ref_actor<T,decrement_action>(ref_);
|
||||
}
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,461 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_DETAIL_RADIX_SORT_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_DETAIL_RADIX_SORT_HPP
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/type_traits/is_signed.hpp>
|
||||
#include <boost/type_traits/is_floating_point.hpp>
|
||||
|
||||
#include <boost/compute/kernel.hpp>
|
||||
#include <boost/compute/program.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/exclusive_scan.hpp>
|
||||
#include <boost/compute/container/vector.hpp>
|
||||
#include <boost/compute/detail/iterator_range_size.hpp>
|
||||
#include <boost/compute/detail/parameter_cache.hpp>
|
||||
#include <boost/compute/type_traits/type_name.hpp>
|
||||
#include <boost/compute/type_traits/is_fundamental.hpp>
|
||||
#include <boost/compute/type_traits/is_vector_type.hpp>
|
||||
#include <boost/compute/utility/program_cache.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
namespace detail {
|
||||
|
||||
// meta-function returning true if type T is radix-sortable
|
||||
template<class T>
|
||||
struct is_radix_sortable :
|
||||
boost::mpl::and_<
|
||||
typename ::boost::compute::is_fundamental<T>::type,
|
||||
typename boost::mpl::not_<typename is_vector_type<T>::type>::type
|
||||
>
|
||||
{
|
||||
};
|
||||
|
||||
template<size_t N>
|
||||
struct radix_sort_value_type
|
||||
{
|
||||
};
|
||||
|
||||
template<>
|
||||
struct radix_sort_value_type<1>
|
||||
{
|
||||
typedef uchar_ type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct radix_sort_value_type<2>
|
||||
{
|
||||
typedef ushort_ type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct radix_sort_value_type<4>
|
||||
{
|
||||
typedef uint_ type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct radix_sort_value_type<8>
|
||||
{
|
||||
typedef ulong_ type;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline const char* enable_double()
|
||||
{
|
||||
return " -DT2_double=0";
|
||||
}
|
||||
|
||||
template<>
|
||||
inline const char* enable_double<double>()
|
||||
{
|
||||
return " -DT2_double=1";
|
||||
}
|
||||
|
||||
const char radix_sort_source[] =
|
||||
"#if T2_double\n"
|
||||
"#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n"
|
||||
"#endif\n"
|
||||
"#define K2_BITS (1 << K_BITS)\n"
|
||||
"#define RADIX_MASK ((((T)(1)) << K_BITS) - 1)\n"
|
||||
"#define SIGN_BIT ((sizeof(T) * CHAR_BIT) - 1)\n"
|
||||
|
||||
"#if defined(ASC)\n" // asc order
|
||||
|
||||
"inline uint radix(const T x, const uint low_bit)\n"
|
||||
"{\n"
|
||||
"#if defined(IS_FLOATING_POINT)\n"
|
||||
" const T mask = -(x >> SIGN_BIT) | (((T)(1)) << SIGN_BIT);\n"
|
||||
" return ((x ^ mask) >> low_bit) & RADIX_MASK;\n"
|
||||
"#elif defined(IS_SIGNED)\n"
|
||||
" return ((x ^ (((T)(1)) << SIGN_BIT)) >> low_bit) & RADIX_MASK;\n"
|
||||
"#else\n"
|
||||
" return (x >> low_bit) & RADIX_MASK;\n"
|
||||
"#endif\n"
|
||||
"}\n"
|
||||
|
||||
"#else\n" // desc order
|
||||
|
||||
// For signed types we just negate the x and for unsigned types we
|
||||
// subtract the x from max value of its type ((T)(-1) is a max value
|
||||
// of type T when T is an unsigned type).
|
||||
"inline uint radix(const T x, const uint low_bit)\n"
|
||||
"{\n"
|
||||
"#if defined(IS_FLOATING_POINT)\n"
|
||||
" const T mask = -(x >> SIGN_BIT) | (((T)(1)) << SIGN_BIT);\n"
|
||||
" return (((-x) ^ mask) >> low_bit) & RADIX_MASK;\n"
|
||||
"#elif defined(IS_SIGNED)\n"
|
||||
" return (((-x) ^ (((T)(1)) << SIGN_BIT)) >> low_bit) & RADIX_MASK;\n"
|
||||
"#else\n"
|
||||
" return (((T)(-1) - x) >> low_bit) & RADIX_MASK;\n"
|
||||
"#endif\n"
|
||||
"}\n"
|
||||
|
||||
"#endif\n" // #if defined(ASC)
|
||||
|
||||
"__kernel void count(__global const T *input,\n"
|
||||
" const uint input_offset,\n"
|
||||
" const uint input_size,\n"
|
||||
" __global uint *global_counts,\n"
|
||||
" __global uint *global_offsets,\n"
|
||||
" __local uint *local_counts,\n"
|
||||
" const uint low_bit)\n"
|
||||
"{\n"
|
||||
// work-item parameters
|
||||
" const uint gid = get_global_id(0);\n"
|
||||
" const uint lid = get_local_id(0);\n"
|
||||
|
||||
// zero local counts
|
||||
" if(lid < K2_BITS){\n"
|
||||
" local_counts[lid] = 0;\n"
|
||||
" }\n"
|
||||
" barrier(CLK_LOCAL_MEM_FENCE);\n"
|
||||
|
||||
// reduce local counts
|
||||
" if(gid < input_size){\n"
|
||||
" T value = input[input_offset+gid];\n"
|
||||
" uint bucket = radix(value, low_bit);\n"
|
||||
" atomic_inc(local_counts + bucket);\n"
|
||||
" }\n"
|
||||
" barrier(CLK_LOCAL_MEM_FENCE);\n"
|
||||
|
||||
// write block-relative offsets
|
||||
" if(lid < K2_BITS){\n"
|
||||
" global_counts[K2_BITS*get_group_id(0) + lid] = local_counts[lid];\n"
|
||||
|
||||
// write global offsets
|
||||
" if(get_group_id(0) == (get_num_groups(0) - 1)){\n"
|
||||
" global_offsets[lid] = local_counts[lid];\n"
|
||||
" }\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
|
||||
"__kernel void scan(__global const uint *block_offsets,\n"
|
||||
" __global uint *global_offsets,\n"
|
||||
" const uint block_count)\n"
|
||||
"{\n"
|
||||
" __global const uint *last_block_offsets =\n"
|
||||
" block_offsets + K2_BITS * (block_count - 1);\n"
|
||||
|
||||
// calculate and scan global_offsets
|
||||
" uint sum = 0;\n"
|
||||
" for(uint i = 0; i < K2_BITS; i++){\n"
|
||||
" uint x = global_offsets[i] + last_block_offsets[i];\n"
|
||||
" global_offsets[i] = sum;\n"
|
||||
" sum += x;\n"
|
||||
" }\n"
|
||||
"}\n"
|
||||
|
||||
"__kernel void scatter(__global const T *input,\n"
|
||||
" const uint input_offset,\n"
|
||||
" const uint input_size,\n"
|
||||
" const uint low_bit,\n"
|
||||
" __global const uint *counts,\n"
|
||||
" __global const uint *global_offsets,\n"
|
||||
"#ifndef SORT_BY_KEY\n"
|
||||
" __global T *output,\n"
|
||||
" const uint output_offset)\n"
|
||||
"#else\n"
|
||||
" __global T *keys_output,\n"
|
||||
" const uint keys_output_offset,\n"
|
||||
" __global T2 *values_input,\n"
|
||||
" const uint values_input_offset,\n"
|
||||
" __global T2 *values_output,\n"
|
||||
" const uint values_output_offset)\n"
|
||||
"#endif\n"
|
||||
"{\n"
|
||||
// work-item parameters
|
||||
" const uint gid = get_global_id(0);\n"
|
||||
" const uint lid = get_local_id(0);\n"
|
||||
|
||||
// copy input to local memory
|
||||
" T value;\n"
|
||||
" uint bucket;\n"
|
||||
" __local uint local_input[BLOCK_SIZE];\n"
|
||||
" if(gid < input_size){\n"
|
||||
" value = input[input_offset+gid];\n"
|
||||
" bucket = radix(value, low_bit);\n"
|
||||
" local_input[lid] = bucket;\n"
|
||||
" }\n"
|
||||
|
||||
// copy block counts to local memory
|
||||
" __local uint local_counts[(1 << K_BITS)];\n"
|
||||
" if(lid < K2_BITS){\n"
|
||||
" local_counts[lid] = counts[get_group_id(0) * K2_BITS + lid];\n"
|
||||
" }\n"
|
||||
|
||||
// wait until local memory is ready
|
||||
" barrier(CLK_LOCAL_MEM_FENCE);\n"
|
||||
|
||||
" if(gid >= input_size){\n"
|
||||
" return;\n"
|
||||
" }\n"
|
||||
|
||||
// get global offset
|
||||
" uint offset = global_offsets[bucket] + local_counts[bucket];\n"
|
||||
|
||||
// calculate local offset
|
||||
" uint local_offset = 0;\n"
|
||||
" for(uint i = 0; i < lid; i++){\n"
|
||||
" if(local_input[i] == bucket)\n"
|
||||
" local_offset++;\n"
|
||||
" }\n"
|
||||
|
||||
"#ifndef SORT_BY_KEY\n"
|
||||
// write value to output
|
||||
" output[output_offset + offset + local_offset] = value;\n"
|
||||
"#else\n"
|
||||
// write key and value if doing sort_by_key
|
||||
" keys_output[keys_output_offset+offset + local_offset] = value;\n"
|
||||
" values_output[values_output_offset+offset + local_offset] =\n"
|
||||
" values_input[values_input_offset+gid];\n"
|
||||
"#endif\n"
|
||||
"}\n";
|
||||
|
||||
template<class T, class T2>
|
||||
inline void radix_sort_impl(const buffer_iterator<T> first,
|
||||
const buffer_iterator<T> last,
|
||||
const buffer_iterator<T2> values_first,
|
||||
const bool ascending,
|
||||
command_queue &queue)
|
||||
{
|
||||
|
||||
typedef T value_type;
|
||||
typedef typename radix_sort_value_type<sizeof(T)>::type sort_type;
|
||||
|
||||
const device &device = queue.get_device();
|
||||
const context &context = queue.get_context();
|
||||
|
||||
|
||||
// if we have a valid values iterator then we are doing a
|
||||
// sort by key and have to set up the values buffer
|
||||
bool sort_by_key = (values_first.get_buffer().get() != 0);
|
||||
|
||||
// load (or create) radix sort program
|
||||
std::string cache_key =
|
||||
std::string("__boost_radix_sort_") + type_name<value_type>();
|
||||
|
||||
if(sort_by_key){
|
||||
cache_key += std::string("_with_") + type_name<T2>();
|
||||
}
|
||||
|
||||
boost::shared_ptr<program_cache> cache =
|
||||
program_cache::get_global_cache(context);
|
||||
boost::shared_ptr<parameter_cache> parameters =
|
||||
detail::parameter_cache::get_global_cache(device);
|
||||
|
||||
// sort parameters
|
||||
const uint_ k = parameters->get(cache_key, "k", 4);
|
||||
const uint_ k2 = 1 << k;
|
||||
const uint_ block_size = parameters->get(cache_key, "tpb", 128);
|
||||
|
||||
// sort program compiler options
|
||||
std::stringstream options;
|
||||
options << "-DK_BITS=" << k;
|
||||
options << " -DT=" << type_name<sort_type>();
|
||||
options << " -DBLOCK_SIZE=" << block_size;
|
||||
|
||||
if(boost::is_floating_point<value_type>::value){
|
||||
options << " -DIS_FLOATING_POINT";
|
||||
}
|
||||
|
||||
if(boost::is_signed<value_type>::value){
|
||||
options << " -DIS_SIGNED";
|
||||
}
|
||||
|
||||
if(sort_by_key){
|
||||
options << " -DSORT_BY_KEY";
|
||||
options << " -DT2=" << type_name<T2>();
|
||||
options << enable_double<T2>();
|
||||
}
|
||||
|
||||
if(ascending){
|
||||
options << " -DASC";
|
||||
}
|
||||
|
||||
// load radix sort program
|
||||
program radix_sort_program = cache->get_or_build(
|
||||
cache_key, options.str(), radix_sort_source, context
|
||||
);
|
||||
|
||||
kernel count_kernel(radix_sort_program, "count");
|
||||
kernel scan_kernel(radix_sort_program, "scan");
|
||||
kernel scatter_kernel(radix_sort_program, "scatter");
|
||||
|
||||
size_t count = detail::iterator_range_size(first, last);
|
||||
|
||||
uint_ block_count = static_cast<uint_>(count / block_size);
|
||||
if(block_count * block_size != count){
|
||||
block_count++;
|
||||
}
|
||||
|
||||
// setup temporary buffers
|
||||
vector<value_type> output(count, context);
|
||||
vector<T2> values_output(sort_by_key ? count : 0, context);
|
||||
vector<uint_> offsets(k2, context);
|
||||
vector<uint_> counts(block_count * k2, context);
|
||||
|
||||
const buffer *input_buffer = &first.get_buffer();
|
||||
uint_ input_offset = static_cast<uint_>(first.get_index());
|
||||
const buffer *output_buffer = &output.get_buffer();
|
||||
uint_ output_offset = 0;
|
||||
const buffer *values_input_buffer = &values_first.get_buffer();
|
||||
uint_ values_input_offset = static_cast<uint_>(values_first.get_index());
|
||||
const buffer *values_output_buffer = &values_output.get_buffer();
|
||||
uint_ values_output_offset = 0;
|
||||
|
||||
for(uint_ i = 0; i < sizeof(sort_type) * CHAR_BIT / k; i++){
|
||||
// write counts
|
||||
count_kernel.set_arg(0, *input_buffer);
|
||||
count_kernel.set_arg(1, input_offset);
|
||||
count_kernel.set_arg(2, static_cast<uint_>(count));
|
||||
count_kernel.set_arg(3, counts);
|
||||
count_kernel.set_arg(4, offsets);
|
||||
count_kernel.set_arg(5, block_size * sizeof(uint_), 0);
|
||||
count_kernel.set_arg(6, i * k);
|
||||
queue.enqueue_1d_range_kernel(count_kernel,
|
||||
0,
|
||||
block_count * block_size,
|
||||
block_size);
|
||||
|
||||
// scan counts
|
||||
if(k == 1){
|
||||
typedef uint2_ counter_type;
|
||||
::boost::compute::exclusive_scan(
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), 0),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), counts.size() / 2),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer()),
|
||||
queue
|
||||
);
|
||||
}
|
||||
else if(k == 2){
|
||||
typedef uint4_ counter_type;
|
||||
::boost::compute::exclusive_scan(
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), 0),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), counts.size() / 4),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer()),
|
||||
queue
|
||||
);
|
||||
}
|
||||
else if(k == 4){
|
||||
typedef uint16_ counter_type;
|
||||
::boost::compute::exclusive_scan(
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), 0),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer(), counts.size() / 16),
|
||||
make_buffer_iterator<counter_type>(counts.get_buffer()),
|
||||
queue
|
||||
);
|
||||
}
|
||||
else {
|
||||
BOOST_ASSERT(false && "unknown k");
|
||||
break;
|
||||
}
|
||||
|
||||
// scan global offsets
|
||||
scan_kernel.set_arg(0, counts);
|
||||
scan_kernel.set_arg(1, offsets);
|
||||
scan_kernel.set_arg(2, block_count);
|
||||
queue.enqueue_task(scan_kernel);
|
||||
|
||||
// scatter values
|
||||
scatter_kernel.set_arg(0, *input_buffer);
|
||||
scatter_kernel.set_arg(1, input_offset);
|
||||
scatter_kernel.set_arg(2, static_cast<uint_>(count));
|
||||
scatter_kernel.set_arg(3, i * k);
|
||||
scatter_kernel.set_arg(4, counts);
|
||||
scatter_kernel.set_arg(5, offsets);
|
||||
scatter_kernel.set_arg(6, *output_buffer);
|
||||
scatter_kernel.set_arg(7, output_offset);
|
||||
if(sort_by_key){
|
||||
scatter_kernel.set_arg(8, *values_input_buffer);
|
||||
scatter_kernel.set_arg(9, values_input_offset);
|
||||
scatter_kernel.set_arg(10, *values_output_buffer);
|
||||
scatter_kernel.set_arg(11, values_output_offset);
|
||||
}
|
||||
queue.enqueue_1d_range_kernel(scatter_kernel,
|
||||
0,
|
||||
block_count * block_size,
|
||||
block_size);
|
||||
|
||||
// swap buffers
|
||||
std::swap(input_buffer, output_buffer);
|
||||
std::swap(values_input_buffer, values_output_buffer);
|
||||
std::swap(input_offset, output_offset);
|
||||
std::swap(values_input_offset, values_output_offset);
|
||||
}
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
inline void radix_sort(Iterator first,
|
||||
Iterator last,
|
||||
command_queue &queue)
|
||||
{
|
||||
radix_sort_impl(first, last, buffer_iterator<int>(), true, queue);
|
||||
}
|
||||
|
||||
template<class KeyIterator, class ValueIterator>
|
||||
inline void radix_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
command_queue &queue)
|
||||
{
|
||||
radix_sort_impl(keys_first, keys_last, values_first, true, queue);
|
||||
}
|
||||
|
||||
template<class Iterator>
|
||||
inline void radix_sort(Iterator first,
|
||||
Iterator last,
|
||||
const bool ascending,
|
||||
command_queue &queue)
|
||||
{
|
||||
radix_sort_impl(first, last, buffer_iterator<int>(), ascending, queue);
|
||||
}
|
||||
|
||||
template<class KeyIterator, class ValueIterator>
|
||||
inline void radix_sort_by_key(KeyIterator keys_first,
|
||||
KeyIterator keys_last,
|
||||
ValueIterator values_first,
|
||||
const bool ascending,
|
||||
command_queue &queue)
|
||||
{
|
||||
radix_sort_impl(keys_first, keys_last, values_first, ascending, queue);
|
||||
}
|
||||
|
||||
|
||||
} // end detail namespace
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_DETAIL_RADIX_SORT_HPP
|
||||
@@ -0,0 +1,209 @@
|
||||
// (C) Copyright 2006 Douglas Gregor <doug.gregor -at- gmail.com>
|
||||
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Authors: Douglas Gregor
|
||||
#ifndef BOOST_MPI_PYTHON_SKELETON_AND_CONTENT_HPP
|
||||
#define BOOST_MPI_PYTHON_SKELETON_AND_CONTENT_HPP
|
||||
|
||||
/** @file skeleton_and_content.hpp
|
||||
*
|
||||
* This file reflects the skeleton/content facilities into Python.
|
||||
*/
|
||||
#include <boost/python.hpp>
|
||||
#include <boost/mpi.hpp>
|
||||
#include <boost/function/function1.hpp>
|
||||
#define BOOST_MPI_PYTHON_FORWARD_ONLY
|
||||
#include <boost/mpi/python.hpp>
|
||||
#include <boost/mpi/python/serialize.hpp>
|
||||
|
||||
|
||||
namespace boost { namespace mpi { namespace python {
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* This @c content class is a wrapper around the C++ "content"
|
||||
* retrieved from get_content. This wrapper is only needed to store a
|
||||
* copy of the Python object on which get_content() was called.
|
||||
*/
|
||||
class content : public boost::mpi::content
|
||||
{
|
||||
typedef boost::mpi::content inherited;
|
||||
|
||||
public:
|
||||
content(const inherited& base, boost::python::object object)
|
||||
: inherited(base), object(object) { }
|
||||
|
||||
inherited& base() { return *this; }
|
||||
const inherited& base() const { return *this; }
|
||||
|
||||
boost::python::object object;
|
||||
};
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* A class specific to the Python bindings that mimics the behavior of
|
||||
* the skeleton_proxy<T> template. In the case of Python skeletons, we
|
||||
* only need to know the object (and its type) to transmit the
|
||||
* skeleton. This is the only user-visible skeleton proxy type,
|
||||
* although instantiations of its derived classes (@c
|
||||
* skeleton_proxy<T>) will be returned from the Python skeleton()
|
||||
* function.
|
||||
*/
|
||||
class skeleton_proxy_base
|
||||
{
|
||||
public:
|
||||
skeleton_proxy_base(const boost::python::object& object) : object(object) { }
|
||||
|
||||
boost::python::object object;
|
||||
};
|
||||
|
||||
/**
|
||||
* INTERNAL ONLY
|
||||
*
|
||||
* The templated @c skeleton_proxy class represents a skeleton proxy
|
||||
* in Python. The only data is stored in the @c skeleton_proxy_base
|
||||
* class (which is the type actually exposed as @c skeleton_proxy in
|
||||
* Python). However, the type of @c skeleton_proxy<T> is important for
|
||||
* (de-)serialization of @c skeleton_proxy<T>'s for transmission.
|
||||
*/
|
||||
template<typename T>
|
||||
class skeleton_proxy : public skeleton_proxy_base
|
||||
{
|
||||
public:
|
||||
skeleton_proxy(const boost::python::object& object)
|
||||
: skeleton_proxy_base(object) { }
|
||||
};
|
||||
|
||||
namespace detail {
|
||||
using boost::python::object;
|
||||
using boost::python::extract;
|
||||
|
||||
extern BOOST_MPI_DECL boost::python::object skeleton_proxy_base_type;
|
||||
|
||||
template<typename T>
|
||||
struct skeleton_saver
|
||||
{
|
||||
void
|
||||
operator()(packed_oarchive& ar, const object& obj, const unsigned int)
|
||||
{
|
||||
packed_skeleton_oarchive pso(ar);
|
||||
pso << extract<T&>(obj.attr("object"))();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct skeleton_loader
|
||||
{
|
||||
void
|
||||
operator()(packed_iarchive& ar, object& obj, const unsigned int)
|
||||
{
|
||||
packed_skeleton_iarchive psi(ar);
|
||||
extract<skeleton_proxy<T>&> proxy(obj);
|
||||
if (!proxy.check())
|
||||
obj = object(skeleton_proxy<T>(object(T())));
|
||||
|
||||
psi >> extract<T&>(obj.attr("object"))();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The @c skeleton_content_handler structure contains all of the
|
||||
* information required to extract a skeleton and content from a
|
||||
* Python object with a certain C++ type.
|
||||
*/
|
||||
struct skeleton_content_handler {
|
||||
function1<object, const object&> get_skeleton_proxy;
|
||||
function1<content, const object&> get_content;
|
||||
};
|
||||
|
||||
/**
|
||||
* A function object that extracts the skeleton from of a Python
|
||||
* object, which is actually a wrapped C++ object of type T.
|
||||
*/
|
||||
template<typename T>
|
||||
struct do_get_skeleton_proxy
|
||||
{
|
||||
object operator()(object value) {
|
||||
return object(skeleton_proxy<T>(value));
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* A function object that extracts the content of a Python object,
|
||||
* which is actually a wrapped C++ object of type T.
|
||||
*/
|
||||
template<typename T>
|
||||
struct do_get_content
|
||||
{
|
||||
content operator()(object value_obj) {
|
||||
T& value = extract<T&>(value_obj)();
|
||||
return content(boost::mpi::get_content(value), value_obj);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine if a skeleton and content handler for @p type has
|
||||
* already been registered.
|
||||
*/
|
||||
BOOST_MPI_PYTHON_DECL bool
|
||||
skeleton_and_content_handler_registered(PyTypeObject* type);
|
||||
|
||||
/**
|
||||
* Register a skeleton/content handler with a particular Python type
|
||||
* (which actually wraps a C++ type).
|
||||
*/
|
||||
BOOST_MPI_PYTHON_DECL void
|
||||
register_skeleton_and_content_handler(PyTypeObject*,
|
||||
const skeleton_content_handler&);
|
||||
} // end namespace detail
|
||||
|
||||
template<typename T>
|
||||
void register_skeleton_and_content(const T& value, PyTypeObject* type)
|
||||
{
|
||||
using boost::python::detail::direct_serialization_table;
|
||||
using boost::python::detail::get_direct_serialization_table;
|
||||
using namespace boost::python;
|
||||
|
||||
// Determine the type
|
||||
if (!type)
|
||||
type = object(value).ptr()->ob_type;
|
||||
|
||||
// Don't re-register the same type.
|
||||
if (detail::skeleton_and_content_handler_registered(type))
|
||||
return;
|
||||
|
||||
// Register the skeleton proxy type
|
||||
{
|
||||
boost::python::scope proxy_scope(detail::skeleton_proxy_base_type);
|
||||
std::string name("skeleton_proxy<");
|
||||
name += typeid(T).name();
|
||||
name += ">";
|
||||
class_<skeleton_proxy<T>, bases<skeleton_proxy_base> >(name.c_str(),
|
||||
no_init);
|
||||
}
|
||||
|
||||
// Register the saver and loader for the associated skeleton and
|
||||
// proxy, to allow (de-)serialization of skeletons via the proxy.
|
||||
direct_serialization_table<packed_iarchive, packed_oarchive>& table =
|
||||
get_direct_serialization_table<packed_iarchive, packed_oarchive>();
|
||||
table.register_type(detail::skeleton_saver<T>(),
|
||||
detail::skeleton_loader<T>(),
|
||||
skeleton_proxy<T>(object(value)));
|
||||
|
||||
// Register the rest of the skeleton/content mechanism, including
|
||||
// handlers that extract a skeleton proxy from a Python object and
|
||||
// extract the content from a Python object.
|
||||
detail::skeleton_content_handler handler;
|
||||
handler.get_skeleton_proxy = detail::do_get_skeleton_proxy<T>();
|
||||
handler.get_content = detail::do_get_content<T>();
|
||||
detail::register_skeleton_and_content_handler(type, handler);
|
||||
}
|
||||
|
||||
} } } // end namespace boost::mpi::python
|
||||
|
||||
#endif // BOOST_MPI_PYTHON_SKELETON_AND_CONTENT_HPP
|
||||
@@ -0,0 +1,44 @@
|
||||
// Boost string_algo library string_traits.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_STD_STRING_TRAITS_HPP
|
||||
#define BOOST_STRING_STD_STRING_TRAITS_HPP
|
||||
|
||||
#include <boost/algorithm/string/yes_no_type.hpp>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string/sequence_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace algorithm {
|
||||
|
||||
// std::basic_string<> traits -----------------------------------------------//
|
||||
|
||||
|
||||
// native replace trait
|
||||
template<typename T, typename TraitsT, typename AllocT>
|
||||
class has_native_replace< std::basic_string<T, TraitsT, AllocT> >
|
||||
{
|
||||
public:
|
||||
#if BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
||||
enum { value = true } ;
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value=true);
|
||||
#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 )
|
||||
|
||||
typedef mpl::bool_<has_native_replace<T>::value> type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace algorithm
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_STRING_LIST_TRAITS_HPP
|
||||
@@ -0,0 +1,830 @@
|
||||
//
|
||||
// Copyright (c) 2000-2002
|
||||
// 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.
|
||||
//
|
||||
|
||||
#ifndef _BOOST_UBLAS_OPERATION_
|
||||
#define _BOOST_UBLAS_OPERATION_
|
||||
|
||||
#include <boost/numeric/ublas/matrix_proxy.hpp>
|
||||
|
||||
/** \file operation.hpp
|
||||
* \brief This file contains some specialized products.
|
||||
*/
|
||||
|
||||
// axpy-based products
|
||||
// Alexei Novakov had a lot of ideas to improve these. Thanks.
|
||||
// Hendrik Kueck proposed some new kernel. Thanks again.
|
||||
|
||||
namespace boost { namespace numeric { namespace ublas {
|
||||
|
||||
template<class V, class T1, class L1, class IA1, class TA1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const compressed_matrix<T1, L1, 0, IA1, TA1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, row_major_tag) {
|
||||
typedef typename V::size_type size_type;
|
||||
typedef typename V::value_type value_type;
|
||||
|
||||
for (size_type i = 0; i < e1.filled1 () -1; ++ i) {
|
||||
size_type begin = e1.index1_data () [i];
|
||||
size_type end = e1.index1_data () [i + 1];
|
||||
value_type t (v (i));
|
||||
for (size_type j = begin; j < end; ++ j)
|
||||
t += e1.value_data () [j] * e2 () (e1.index2_data () [j]);
|
||||
v (i) = t;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class T1, class L1, class IA1, class TA1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const compressed_matrix<T1, L1, 0, IA1, TA1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, column_major_tag) {
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
for (size_type j = 0; j < e1.filled1 () -1; ++ j) {
|
||||
size_type begin = e1.index1_data () [j];
|
||||
size_type end = e1.index1_data () [j + 1];
|
||||
for (size_type i = begin; i < end; ++ i)
|
||||
v (e1.index2_data () [i]) += e1.value_data () [i] * e2 () (j);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
template<class V, class T1, class L1, class IA1, class TA1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const compressed_matrix<T1, L1, 0, IA1, TA1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, bool init = true) {
|
||||
typedef typename V::value_type value_type;
|
||||
typedef typename L1::orientation_category orientation_category;
|
||||
|
||||
if (init)
|
||||
v.assign (zero_vector<value_type> (e1.size1 ()));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
vector<value_type> cv (v);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type verrorbound (norm_1 (v) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_vector_assign<scalar_plus_assign> (cv, prod (e1, e2));
|
||||
#endif
|
||||
axpy_prod (e1, e2, v, orientation_category ());
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (v - cv) <= 2 * std::numeric_limits<real_type>::epsilon () * verrorbound, internal_logic ());
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
template<class V, class T1, class L1, class IA1, class TA1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V
|
||||
axpy_prod (const compressed_matrix<T1, L1, 0, IA1, TA1> &e1,
|
||||
const vector_expression<E2> &e2) {
|
||||
typedef V vector_type;
|
||||
|
||||
vector_type v (e1.size1 ());
|
||||
return axpy_prod (e1, e2, v, true);
|
||||
}
|
||||
|
||||
template<class V, class T1, class L1, class IA1, class TA1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const coordinate_matrix<T1, L1, 0, IA1, TA1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, bool init = true) {
|
||||
typedef typename V::size_type size_type;
|
||||
typedef typename V::value_type value_type;
|
||||
typedef L1 layout_type;
|
||||
|
||||
size_type size1 = e1.size1();
|
||||
size_type size2 = e1.size2();
|
||||
|
||||
if (init) {
|
||||
noalias(v) = zero_vector<value_type>(size1);
|
||||
}
|
||||
|
||||
for (size_type i = 0; i < e1.nnz(); ++i) {
|
||||
size_type row_index = layout_type::index_M( e1.index1_data () [i], e1.index2_data () [i] );
|
||||
size_type col_index = layout_type::index_m( e1.index1_data () [i], e1.index2_data () [i] );
|
||||
v( row_index ) += e1.value_data () [i] * e2 () (col_index);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag, row_major_tag) {
|
||||
typedef const E1 expression1_type;
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
typename expression1_type::const_iterator1 it1 (e1 ().begin1 ());
|
||||
typename expression1_type::const_iterator1 it1_end (e1 ().end1 ());
|
||||
while (it1 != it1_end) {
|
||||
size_type index1 (it1.index1 ());
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression1_type::const_iterator2 it2 (it1.begin ());
|
||||
typename expression1_type::const_iterator2 it2_end (it1.end ());
|
||||
#else
|
||||
typename expression1_type::const_iterator2 it2 (boost::numeric::ublas::begin (it1, iterator1_tag ()));
|
||||
typename expression1_type::const_iterator2 it2_end (boost::numeric::ublas::end (it1, iterator1_tag ()));
|
||||
#endif
|
||||
while (it2 != it2_end) {
|
||||
v (index1) += *it2 * e2 () (it2.index2 ());
|
||||
++ it2;
|
||||
}
|
||||
++ it1;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag, column_major_tag) {
|
||||
typedef const E1 expression1_type;
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
typename expression1_type::const_iterator2 it2 (e1 ().begin2 ());
|
||||
typename expression1_type::const_iterator2 it2_end (e1 ().end2 ());
|
||||
while (it2 != it2_end) {
|
||||
size_type index2 (it2.index2 ());
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression1_type::const_iterator1 it1 (it2.begin ());
|
||||
typename expression1_type::const_iterator1 it1_end (it2.end ());
|
||||
#else
|
||||
typename expression1_type::const_iterator1 it1 (boost::numeric::ublas::begin (it2, iterator2_tag ()));
|
||||
typename expression1_type::const_iterator1 it1_end (boost::numeric::ublas::end (it2, iterator2_tag ()));
|
||||
#endif
|
||||
while (it1 != it1_end) {
|
||||
v (it1.index1 ()) += *it1 * e2 () (index2);
|
||||
++ it1;
|
||||
}
|
||||
++ it2;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, sparse_bidirectional_iterator_tag) {
|
||||
typedef const E2 expression2_type;
|
||||
|
||||
typename expression2_type::const_iterator it (e2 ().begin ());
|
||||
typename expression2_type::const_iterator it_end (e2 ().end ());
|
||||
while (it != it_end) {
|
||||
v.plus_assign (column (e1 (), it.index ()) * *it);
|
||||
++ it;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag) {
|
||||
typedef typename E1::orientation_category orientation_category;
|
||||
return axpy_prod (e1, e2, v, packed_random_access_iterator_tag (), orientation_category ());
|
||||
}
|
||||
|
||||
|
||||
/** \brief computes <tt>v += A x</tt> or <tt>v = A x</tt> in an
|
||||
optimized fashion.
|
||||
|
||||
\param e1 the matrix expression \c A
|
||||
\param e2 the vector expression \c x
|
||||
\param v the result vector \c v
|
||||
\param init a boolean parameter
|
||||
|
||||
<tt>axpy_prod(A, x, v, init)</tt> implements the well known
|
||||
axpy-product. Setting \a init to \c true is equivalent to call
|
||||
<tt>v.clear()</tt> before <tt>axpy_prod</tt>. Currently \a init
|
||||
defaults to \c true, but this may change in the future.
|
||||
|
||||
Up to now there are some specialisation for compressed
|
||||
matrices that give a large speed up compared to prod.
|
||||
|
||||
\ingroup blas2
|
||||
|
||||
\internal
|
||||
|
||||
template parameters:
|
||||
\param V type of the result vector \c v
|
||||
\param E1 type of a matrix expression \c A
|
||||
\param E2 type of a vector expression \c x
|
||||
*/
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2,
|
||||
V &v, bool init = true) {
|
||||
typedef typename V::value_type value_type;
|
||||
typedef typename E2::const_iterator::iterator_category iterator_category;
|
||||
|
||||
if (init)
|
||||
v.assign (zero_vector<value_type> (e1 ().size1 ()));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
vector<value_type> cv (v);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type verrorbound (norm_1 (v) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_vector_assign<scalar_plus_assign> (cv, prod (e1, e2));
|
||||
#endif
|
||||
axpy_prod (e1, e2, v, iterator_category ());
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (v - cv) <= 2 * std::numeric_limits<real_type>::epsilon () * verrorbound, internal_logic ());
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const vector_expression<E2> &e2) {
|
||||
typedef V vector_type;
|
||||
|
||||
vector_type v (e1 ().size1 ());
|
||||
return axpy_prod (e1, e2, v, true);
|
||||
}
|
||||
|
||||
template<class V, class E1, class T2, class IA2, class TA2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const compressed_matrix<T2, column_major, 0, IA2, TA2> &e2,
|
||||
V &v, column_major_tag) {
|
||||
typedef typename V::size_type size_type;
|
||||
typedef typename V::value_type value_type;
|
||||
|
||||
for (size_type j = 0; j < e2.filled1 () -1; ++ j) {
|
||||
size_type begin = e2.index1_data () [j];
|
||||
size_type end = e2.index1_data () [j + 1];
|
||||
value_type t (v (j));
|
||||
for (size_type i = begin; i < end; ++ i)
|
||||
t += e2.value_data () [i] * e1 () (e2.index2_data () [i]);
|
||||
v (j) = t;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class T2, class IA2, class TA2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const compressed_matrix<T2, row_major, 0, IA2, TA2> &e2,
|
||||
V &v, row_major_tag) {
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
for (size_type i = 0; i < e2.filled1 () -1; ++ i) {
|
||||
size_type begin = e2.index1_data () [i];
|
||||
size_type end = e2.index1_data () [i + 1];
|
||||
for (size_type j = begin; j < end; ++ j)
|
||||
v (e2.index2_data () [j]) += e2.value_data () [j] * e1 () (i);
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
template<class V, class E1, class T2, class L2, class IA2, class TA2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const compressed_matrix<T2, L2, 0, IA2, TA2> &e2,
|
||||
V &v, bool init = true) {
|
||||
typedef typename V::value_type value_type;
|
||||
typedef typename L2::orientation_category orientation_category;
|
||||
|
||||
if (init)
|
||||
v.assign (zero_vector<value_type> (e2.size2 ()));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
vector<value_type> cv (v);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type verrorbound (norm_1 (v) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_vector_assign<scalar_plus_assign> (cv, prod (e1, e2));
|
||||
#endif
|
||||
axpy_prod (e1, e2, v, orientation_category ());
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (v - cv) <= 2 * std::numeric_limits<real_type>::epsilon () * verrorbound, internal_logic ());
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
template<class V, class E1, class T2, class L2, class IA2, class TA2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const compressed_matrix<T2, L2, 0, IA2, TA2> &e2) {
|
||||
typedef V vector_type;
|
||||
|
||||
vector_type v (e2.size2 ());
|
||||
return axpy_prod (e1, e2, v, true);
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag, column_major_tag) {
|
||||
typedef const E2 expression2_type;
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
typename expression2_type::const_iterator2 it2 (e2 ().begin2 ());
|
||||
typename expression2_type::const_iterator2 it2_end (e2 ().end2 ());
|
||||
while (it2 != it2_end) {
|
||||
size_type index2 (it2.index2 ());
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression2_type::const_iterator1 it1 (it2.begin ());
|
||||
typename expression2_type::const_iterator1 it1_end (it2.end ());
|
||||
#else
|
||||
typename expression2_type::const_iterator1 it1 (boost::numeric::ublas::begin (it2, iterator2_tag ()));
|
||||
typename expression2_type::const_iterator1 it1_end (boost::numeric::ublas::end (it2, iterator2_tag ()));
|
||||
#endif
|
||||
while (it1 != it1_end) {
|
||||
v (index2) += *it1 * e1 () (it1.index1 ());
|
||||
++ it1;
|
||||
}
|
||||
++ it2;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag, row_major_tag) {
|
||||
typedef const E2 expression2_type;
|
||||
typedef typename V::size_type size_type;
|
||||
|
||||
typename expression2_type::const_iterator1 it1 (e2 ().begin1 ());
|
||||
typename expression2_type::const_iterator1 it1_end (e2 ().end1 ());
|
||||
while (it1 != it1_end) {
|
||||
size_type index1 (it1.index1 ());
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression2_type::const_iterator2 it2 (it1.begin ());
|
||||
typename expression2_type::const_iterator2 it2_end (it1.end ());
|
||||
#else
|
||||
typename expression2_type::const_iterator2 it2 (boost::numeric::ublas::begin (it1, iterator1_tag ()));
|
||||
typename expression2_type::const_iterator2 it2_end (boost::numeric::ublas::end (it1, iterator1_tag ()));
|
||||
#endif
|
||||
while (it2 != it2_end) {
|
||||
v (it2.index2 ()) += *it2 * e1 () (index1);
|
||||
++ it2;
|
||||
}
|
||||
++ it1;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
V &v, sparse_bidirectional_iterator_tag) {
|
||||
typedef const E1 expression1_type;
|
||||
|
||||
typename expression1_type::const_iterator it (e1 ().begin ());
|
||||
typename expression1_type::const_iterator it_end (e1 ().end ());
|
||||
while (it != it_end) {
|
||||
v.plus_assign (*it * row (e2 (), it.index ()));
|
||||
++ it;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
V &v, packed_random_access_iterator_tag) {
|
||||
typedef typename E2::orientation_category orientation_category;
|
||||
return axpy_prod (e1, e2, v, packed_random_access_iterator_tag (), orientation_category ());
|
||||
}
|
||||
|
||||
|
||||
/** \brief computes <tt>v += A<sup>T</sup> x</tt> or <tt>v = A<sup>T</sup> x</tt> in an
|
||||
optimized fashion.
|
||||
|
||||
\param e1 the vector expression \c x
|
||||
\param e2 the matrix expression \c A
|
||||
\param v the result vector \c v
|
||||
\param init a boolean parameter
|
||||
|
||||
<tt>axpy_prod(x, A, v, init)</tt> implements the well known
|
||||
axpy-product. Setting \a init to \c true is equivalent to call
|
||||
<tt>v.clear()</tt> before <tt>axpy_prod</tt>. Currently \a init
|
||||
defaults to \c true, but this may change in the future.
|
||||
|
||||
Up to now there are some specialisation for compressed
|
||||
matrices that give a large speed up compared to prod.
|
||||
|
||||
\ingroup blas2
|
||||
|
||||
\internal
|
||||
|
||||
template parameters:
|
||||
\param V type of the result vector \c v
|
||||
\param E1 type of a vector expression \c x
|
||||
\param E2 type of a matrix expression \c A
|
||||
*/
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V &
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
V &v, bool init = true) {
|
||||
typedef typename V::value_type value_type;
|
||||
typedef typename E1::const_iterator::iterator_category iterator_category;
|
||||
|
||||
if (init)
|
||||
v.assign (zero_vector<value_type> (e2 ().size2 ()));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
vector<value_type> cv (v);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type verrorbound (norm_1 (v) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_vector_assign<scalar_plus_assign> (cv, prod (e1, e2));
|
||||
#endif
|
||||
axpy_prod (e1, e2, v, iterator_category ());
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (v - cv) <= 2 * std::numeric_limits<real_type>::epsilon () * verrorbound, internal_logic ());
|
||||
#endif
|
||||
return v;
|
||||
}
|
||||
template<class V, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
V
|
||||
axpy_prod (const vector_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2) {
|
||||
typedef V vector_type;
|
||||
|
||||
vector_type v (e2 ().size2 ());
|
||||
return axpy_prod (e1, e2, v, true);
|
||||
}
|
||||
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, TRI,
|
||||
dense_proxy_tag, row_major_tag) {
|
||||
|
||||
typedef typename M::size_type size_type;
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
typedef typename M::value_type value_type;
|
||||
matrix<value_type, row_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), row_major_tag ());
|
||||
#endif
|
||||
size_type size1 (e1 ().size1 ());
|
||||
size_type size2 (e1 ().size2 ());
|
||||
for (size_type i = 0; i < size1; ++ i)
|
||||
for (size_type j = 0; j < size2; ++ j)
|
||||
row (m, i).plus_assign (e1 () (i, j) * row (e2 (), j));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, TRI,
|
||||
sparse_proxy_tag, row_major_tag) {
|
||||
|
||||
typedef TRI triangular_restriction;
|
||||
typedef const E1 expression1_type;
|
||||
typedef const E2 expression2_type;
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
typedef typename M::value_type value_type;
|
||||
matrix<value_type, row_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), row_major_tag ());
|
||||
#endif
|
||||
typename expression1_type::const_iterator1 it1 (e1 ().begin1 ());
|
||||
typename expression1_type::const_iterator1 it1_end (e1 ().end1 ());
|
||||
while (it1 != it1_end) {
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression1_type::const_iterator2 it2 (it1.begin ());
|
||||
typename expression1_type::const_iterator2 it2_end (it1.end ());
|
||||
#else
|
||||
typename expression1_type::const_iterator2 it2 (boost::numeric::ublas::begin (it1, iterator1_tag ()));
|
||||
typename expression1_type::const_iterator2 it2_end (boost::numeric::ublas::end (it1, iterator1_tag ()));
|
||||
#endif
|
||||
while (it2 != it2_end) {
|
||||
// row (m, it1.index1 ()).plus_assign (*it2 * row (e2 (), it2.index2 ()));
|
||||
matrix_row<expression2_type> mr (e2 (), it2.index2 ());
|
||||
typename matrix_row<expression2_type>::const_iterator itr (mr.begin ());
|
||||
typename matrix_row<expression2_type>::const_iterator itr_end (mr.end ());
|
||||
while (itr != itr_end) {
|
||||
if (triangular_restriction::other (it1.index1 (), itr.index ()))
|
||||
m (it1.index1 (), itr.index ()) += *it2 * *itr;
|
||||
++ itr;
|
||||
}
|
||||
++ it2;
|
||||
}
|
||||
++ it1;
|
||||
}
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, TRI,
|
||||
dense_proxy_tag, column_major_tag) {
|
||||
typedef typename M::size_type size_type;
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
typedef typename M::value_type value_type;
|
||||
matrix<value_type, column_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), column_major_tag ());
|
||||
#endif
|
||||
size_type size1 (e2 ().size1 ());
|
||||
size_type size2 (e2 ().size2 ());
|
||||
for (size_type j = 0; j < size2; ++ j)
|
||||
for (size_type i = 0; i < size1; ++ i)
|
||||
column (m, j).plus_assign (e2 () (i, j) * column (e1 (), i));
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, TRI,
|
||||
sparse_proxy_tag, column_major_tag) {
|
||||
typedef TRI triangular_restriction;
|
||||
typedef const E1 expression1_type;
|
||||
typedef const E2 expression2_type;
|
||||
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
typedef typename M::value_type value_type;
|
||||
matrix<value_type, column_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), column_major_tag ());
|
||||
#endif
|
||||
typename expression2_type::const_iterator2 it2 (e2 ().begin2 ());
|
||||
typename expression2_type::const_iterator2 it2_end (e2 ().end2 ());
|
||||
while (it2 != it2_end) {
|
||||
#ifndef BOOST_UBLAS_NO_NESTED_CLASS_RELATION
|
||||
typename expression2_type::const_iterator1 it1 (it2.begin ());
|
||||
typename expression2_type::const_iterator1 it1_end (it2.end ());
|
||||
#else
|
||||
typename expression2_type::const_iterator1 it1 (boost::numeric::ublas::begin (it2, iterator2_tag ()));
|
||||
typename expression2_type::const_iterator1 it1_end (boost::numeric::ublas::end (it2, iterator2_tag ()));
|
||||
#endif
|
||||
while (it1 != it1_end) {
|
||||
// column (m, it2.index2 ()).plus_assign (*it1 * column (e1 (), it1.index1 ()));
|
||||
matrix_column<expression1_type> mc (e1 (), it1.index1 ());
|
||||
typename matrix_column<expression1_type>::const_iterator itc (mc.begin ());
|
||||
typename matrix_column<expression1_type>::const_iterator itc_end (mc.end ());
|
||||
while (itc != itc_end) {
|
||||
if(triangular_restriction::other (itc.index (), it2.index2 ()))
|
||||
m (itc.index (), it2.index2 ()) += *it1 * *itc;
|
||||
++ itc;
|
||||
}
|
||||
++ it1;
|
||||
}
|
||||
++ it2;
|
||||
}
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, TRI, bool init = true) {
|
||||
typedef typename M::value_type value_type;
|
||||
typedef typename M::storage_category storage_category;
|
||||
typedef typename M::orientation_category orientation_category;
|
||||
typedef TRI triangular_restriction;
|
||||
|
||||
if (init)
|
||||
m.assign (zero_matrix<value_type> (e1 ().size1 (), e2 ().size2 ()));
|
||||
return axpy_prod (e1, e2, m, triangular_restriction (), storage_category (), orientation_category ());
|
||||
}
|
||||
template<class M, class E1, class E2, class TRI>
|
||||
BOOST_UBLAS_INLINE
|
||||
M
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
TRI) {
|
||||
typedef M matrix_type;
|
||||
typedef TRI triangular_restriction;
|
||||
|
||||
matrix_type m (e1 ().size1 (), e2 ().size2 ());
|
||||
return axpy_prod (e1, e2, m, triangular_restriction (), true);
|
||||
}
|
||||
|
||||
/** \brief computes <tt>M += A X</tt> or <tt>M = A X</tt> in an
|
||||
optimized fashion.
|
||||
|
||||
\param e1 the matrix expression \c A
|
||||
\param e2 the matrix expression \c X
|
||||
\param m the result matrix \c M
|
||||
\param init a boolean parameter
|
||||
|
||||
<tt>axpy_prod(A, X, M, init)</tt> implements the well known
|
||||
axpy-product. Setting \a init to \c true is equivalent to call
|
||||
<tt>M.clear()</tt> before <tt>axpy_prod</tt>. Currently \a init
|
||||
defaults to \c true, but this may change in the future.
|
||||
|
||||
Up to now there are no specialisations.
|
||||
|
||||
\ingroup blas3
|
||||
|
||||
\internal
|
||||
|
||||
template parameters:
|
||||
\param M type of the result matrix \c M
|
||||
\param E1 type of a matrix expression \c A
|
||||
\param E2 type of a matrix expression \c X
|
||||
*/
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, bool init = true) {
|
||||
typedef typename M::value_type value_type;
|
||||
typedef typename M::storage_category storage_category;
|
||||
typedef typename M::orientation_category orientation_category;
|
||||
|
||||
if (init)
|
||||
m.assign (zero_matrix<value_type> (e1 ().size1 (), e2 ().size2 ()));
|
||||
return axpy_prod (e1, e2, m, full (), storage_category (), orientation_category ());
|
||||
}
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M
|
||||
axpy_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2) {
|
||||
typedef M matrix_type;
|
||||
|
||||
matrix_type m (e1 ().size1 (), e2 ().size2 ());
|
||||
return axpy_prod (e1, e2, m, full (), true);
|
||||
}
|
||||
|
||||
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
opb_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m,
|
||||
dense_proxy_tag, row_major_tag) {
|
||||
typedef typename M::size_type size_type;
|
||||
typedef typename M::value_type value_type;
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
matrix<value_type, row_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), row_major_tag ());
|
||||
#endif
|
||||
size_type size (BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ()));
|
||||
for (size_type k = 0; k < size; ++ k) {
|
||||
vector<value_type> ce1 (column (e1 (), k));
|
||||
vector<value_type> re2 (row (e2 (), k));
|
||||
m.plus_assign (outer_prod (ce1, re2));
|
||||
}
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
opb_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m,
|
||||
dense_proxy_tag, column_major_tag) {
|
||||
typedef typename M::size_type size_type;
|
||||
typedef typename M::value_type value_type;
|
||||
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
matrix<value_type, column_major> cm (m);
|
||||
typedef typename type_traits<value_type>::real_type real_type;
|
||||
real_type merrorbound (norm_1 (m) + norm_1 (e1) * norm_1 (e2));
|
||||
indexing_matrix_assign<scalar_plus_assign> (cm, prod (e1, e2), column_major_tag ());
|
||||
#endif
|
||||
size_type size (BOOST_UBLAS_SAME (e1 ().size2 (), e2 ().size1 ()));
|
||||
for (size_type k = 0; k < size; ++ k) {
|
||||
vector<value_type> ce1 (column (e1 (), k));
|
||||
vector<value_type> re2 (row (e2 (), k));
|
||||
m.plus_assign (outer_prod (ce1, re2));
|
||||
}
|
||||
#if BOOST_UBLAS_TYPE_CHECK
|
||||
BOOST_UBLAS_CHECK (norm_1 (m - cm) <= 2 * std::numeric_limits<real_type>::epsilon () * merrorbound, internal_logic ());
|
||||
#endif
|
||||
return m;
|
||||
}
|
||||
|
||||
// Dispatcher
|
||||
|
||||
/** \brief computes <tt>M += A X</tt> or <tt>M = A X</tt> in an
|
||||
optimized fashion.
|
||||
|
||||
\param e1 the matrix expression \c A
|
||||
\param e2 the matrix expression \c X
|
||||
\param m the result matrix \c M
|
||||
\param init a boolean parameter
|
||||
|
||||
<tt>opb_prod(A, X, M, init)</tt> implements the well known
|
||||
axpy-product. Setting \a init to \c true is equivalent to call
|
||||
<tt>M.clear()</tt> before <tt>opb_prod</tt>. Currently \a init
|
||||
defaults to \c true, but this may change in the future.
|
||||
|
||||
This function may give a speedup if \c A has less columns than
|
||||
rows, because the product is computed as a sum of outer
|
||||
products.
|
||||
|
||||
\ingroup blas3
|
||||
|
||||
\internal
|
||||
|
||||
template parameters:
|
||||
\param M type of the result matrix \c M
|
||||
\param E1 type of a matrix expression \c A
|
||||
\param E2 type of a matrix expression \c X
|
||||
*/
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M &
|
||||
opb_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2,
|
||||
M &m, bool init = true) {
|
||||
typedef typename M::value_type value_type;
|
||||
typedef typename M::storage_category storage_category;
|
||||
typedef typename M::orientation_category orientation_category;
|
||||
|
||||
if (init)
|
||||
m.assign (zero_matrix<value_type> (e1 ().size1 (), e2 ().size2 ()));
|
||||
return opb_prod (e1, e2, m, storage_category (), orientation_category ());
|
||||
}
|
||||
template<class M, class E1, class E2>
|
||||
BOOST_UBLAS_INLINE
|
||||
M
|
||||
opb_prod (const matrix_expression<E1> &e1,
|
||||
const matrix_expression<E2> &e2) {
|
||||
typedef M matrix_type;
|
||||
|
||||
matrix_type m (e1 ().size1 (), e2 ().size2 ());
|
||||
return opb_prod (e1, e2, m, true);
|
||||
}
|
||||
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,37 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ALGORITHM_PARTIAL_SUM_HPP
|
||||
#define BOOST_COMPUTE_ALGORITHM_PARTIAL_SUM_HPP
|
||||
|
||||
#include <boost/compute/system.hpp>
|
||||
#include <boost/compute/command_queue.hpp>
|
||||
#include <boost/compute/algorithm/inclusive_scan.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
/// Calculates the cumulative sum of the elements in the range [\p first,
|
||||
/// \p last) and writes the resulting values to the range beginning at
|
||||
/// \p result.
|
||||
template<class InputIterator, class OutputIterator>
|
||||
inline OutputIterator
|
||||
partial_sum(InputIterator first,
|
||||
InputIterator last,
|
||||
OutputIterator result,
|
||||
command_queue &queue = system::default_queue())
|
||||
{
|
||||
return ::boost::compute::inclusive_scan(first, last, result, queue);
|
||||
}
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ALGORITHM_PARTIAL_SUM_HPP
|
||||
@@ -0,0 +1,814 @@
|
||||
# /* Copyright (C) 2001
|
||||
# * Housemarque Oy
|
||||
# * http://www.housemarque.com
|
||||
# *
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP
|
||||
# define BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
#
|
||||
# /* BOOST_PP_NOT_EQUAL */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
|
||||
# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_I(x, y)
|
||||
# else
|
||||
# define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_OO((x, y))
|
||||
# define BOOST_PP_NOT_EQUAL_OO(par) BOOST_PP_NOT_EQUAL_I ## par
|
||||
# endif
|
||||
#
|
||||
# define BOOST_PP_NOT_EQUAL_I(x, y) BOOST_PP_CAT(BOOST_PP_NOT_EQUAL_CHECK_, BOOST_PP_NOT_EQUAL_ ## x(0, BOOST_PP_NOT_EQUAL_ ## y))
|
||||
#
|
||||
# /* BOOST_PP_NOT_EQUAL_D */
|
||||
#
|
||||
# define BOOST_PP_NOT_EQUAL_D(d, x, y) BOOST_PP_NOT_EQUAL(x, y)
|
||||
#
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NIL 1
|
||||
#
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_0(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_1(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_2(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_3(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_4(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_5(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_6(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_7(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_8(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_9(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_10(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_11(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_12(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_13(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_14(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_15(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_16(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_17(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_18(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_19(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_20(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_21(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_22(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_23(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_24(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_25(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_26(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_27(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_28(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_29(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_30(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_31(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_32(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_33(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_34(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_35(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_36(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_37(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_38(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_39(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_40(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_41(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_42(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_43(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_44(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_45(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_46(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_47(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_48(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_49(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_50(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_51(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_52(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_53(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_54(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_55(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_56(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_57(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_58(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_59(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_60(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_61(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_62(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_63(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_64(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_65(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_66(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_67(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_68(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_69(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_70(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_71(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_72(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_73(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_74(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_75(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_76(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_77(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_78(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_79(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_80(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_81(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_82(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_83(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_84(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_85(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_86(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_87(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_88(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_89(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_90(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_91(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_92(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_93(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_94(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_95(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_96(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_97(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_98(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_99(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_100(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_101(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_102(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_103(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_104(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_105(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_106(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_107(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_108(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_109(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_110(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_111(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_112(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_113(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_114(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_115(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_116(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_117(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_118(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_119(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_120(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_121(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_122(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_123(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_124(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_125(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_126(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_127(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_128(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_129(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_130(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_131(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_132(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_133(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_134(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_135(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_136(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_137(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_138(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_139(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_140(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_141(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_142(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_143(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_144(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_145(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_146(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_147(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_148(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_149(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_150(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_151(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_152(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_153(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_154(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_155(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_156(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_157(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_158(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_159(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_160(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_161(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_162(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_163(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_164(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_165(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_166(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_167(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_168(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_169(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_170(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_171(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_172(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_173(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_174(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_175(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_176(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_177(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_178(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_179(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_180(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_181(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_182(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_183(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_184(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_185(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_186(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_187(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_188(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_189(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_190(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_191(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_192(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_193(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_194(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_195(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_196(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_197(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_198(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_199(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_200(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_201(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_202(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_203(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_204(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_205(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_206(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_207(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_208(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_209(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_210(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_211(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_212(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_213(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_214(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_215(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_216(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_217(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_218(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_219(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_220(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_221(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_222(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_223(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_224(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_225(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_226(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_227(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_228(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_229(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_230(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_231(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_232(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_233(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_234(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_235(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_236(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_237(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_238(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_239(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_240(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_241(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_242(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_243(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_244(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_245(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_246(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_247(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_248(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_249(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_250(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_251(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_252(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_253(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_254(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_255(c, y) 0
|
||||
# define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_256(c, y) 0
|
||||
#
|
||||
#if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC()
|
||||
# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL))
|
||||
# else
|
||||
# define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL))
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,30 @@
|
||||
// Copyright 2005 Daniel Wallin.
|
||||
// Copyright 2005 Joel de Guzman.
|
||||
//
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Modeled after range_ex, Copyright 2004 Eric Niebler
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_remove.hpp
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_PHOENIX_HAS_REMOVE_EN_14_12_2004
|
||||
#define BOOST_PHOENIX_HAS_REMOVE_EN_14_12_2004
|
||||
|
||||
#include "./is_std_list.hpp"
|
||||
|
||||
namespace boost
|
||||
{
|
||||
// Specialize this for user-defined types
|
||||
template<typename T>
|
||||
struct has_remove
|
||||
: is_std_list<T>
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,168 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/interprocess for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_INTERPROCESS_DETAIL_WINAPI_SEMAPHORE_WRAPPER_HPP
|
||||
#define BOOST_INTERPROCESS_DETAIL_WINAPI_SEMAPHORE_WRAPPER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/interprocess/detail/config_begin.hpp>
|
||||
#include <boost/interprocess/detail/workaround.hpp>
|
||||
#include <boost/interprocess/creation_tags.hpp>
|
||||
#include <boost/interprocess/permissions.hpp>
|
||||
#include <boost/interprocess/detail/win32_api.hpp>
|
||||
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
|
||||
#include <boost/interprocess/sync/windows/winapi_wrapper_common.hpp>
|
||||
#include <boost/interprocess/errors.hpp>
|
||||
#include <boost/interprocess/exceptions.hpp>
|
||||
#include <limits>
|
||||
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
namespace ipcdetail {
|
||||
|
||||
class winapi_semaphore_functions
|
||||
{
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
|
||||
//Non-copyable
|
||||
winapi_semaphore_functions(const winapi_semaphore_functions &);
|
||||
winapi_semaphore_functions &operator=(const winapi_semaphore_functions &);
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
|
||||
public:
|
||||
winapi_semaphore_functions(void *hnd)
|
||||
: m_sem_hnd(hnd)
|
||||
{}
|
||||
|
||||
void post(long count = 1)
|
||||
{
|
||||
long prev_count;
|
||||
winapi::release_semaphore(m_sem_hnd, count, &prev_count);
|
||||
}
|
||||
|
||||
void wait()
|
||||
{ return winapi_wrapper_wait_for_single_object(m_sem_hnd); }
|
||||
|
||||
bool try_wait()
|
||||
{ return winapi_wrapper_try_wait_for_single_object(m_sem_hnd); }
|
||||
|
||||
bool timed_wait(const boost::posix_time::ptime &abs_time)
|
||||
{ return winapi_wrapper_timed_wait_for_single_object(m_sem_hnd, abs_time); }
|
||||
|
||||
long value() const
|
||||
{
|
||||
long l_count, l_limit;
|
||||
if(!winapi::get_semaphore_info(m_sem_hnd, l_count, l_limit))
|
||||
return 0;
|
||||
return l_count;
|
||||
}
|
||||
|
||||
long limit() const
|
||||
{
|
||||
long l_count, l_limit;
|
||||
if(!winapi::get_semaphore_info(m_sem_hnd, l_count, l_limit))
|
||||
return 0;
|
||||
return l_limit;
|
||||
}
|
||||
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
protected:
|
||||
void *m_sem_hnd;
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
};
|
||||
|
||||
|
||||
//Swappable semaphore wrapper
|
||||
class winapi_semaphore_wrapper
|
||||
: public winapi_semaphore_functions
|
||||
{
|
||||
winapi_semaphore_wrapper(const winapi_semaphore_wrapper &);
|
||||
winapi_semaphore_wrapper &operator=(const winapi_semaphore_wrapper &);
|
||||
|
||||
public:
|
||||
|
||||
//Long is 32 bits in windows
|
||||
static const long MaxCount = long(0x7FFFFFFF);
|
||||
|
||||
winapi_semaphore_wrapper(void *hnd = winapi::invalid_handle_value)
|
||||
: winapi_semaphore_functions(hnd)
|
||||
{}
|
||||
|
||||
~winapi_semaphore_wrapper()
|
||||
{ this->close(); }
|
||||
|
||||
void *release()
|
||||
{
|
||||
void *hnd = m_sem_hnd;
|
||||
m_sem_hnd = winapi::invalid_handle_value;
|
||||
return hnd;
|
||||
}
|
||||
|
||||
void *handle() const
|
||||
{ return m_sem_hnd; }
|
||||
|
||||
bool open_or_create( const char *name
|
||||
, long sem_count
|
||||
, long max_count
|
||||
, const permissions &perm
|
||||
, bool &created)
|
||||
{
|
||||
if(m_sem_hnd == winapi::invalid_handle_value){
|
||||
m_sem_hnd = winapi::open_or_create_semaphore
|
||||
( name
|
||||
, sem_count
|
||||
, max_count
|
||||
, (winapi::interprocess_security_attributes*)perm.get_permissions()
|
||||
);
|
||||
created = winapi::get_last_error() != winapi::error_already_exists;
|
||||
return m_sem_hnd != winapi::invalid_handle_value;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool open_semaphore(const char *name)
|
||||
{
|
||||
if(m_sem_hnd == winapi::invalid_handle_value){
|
||||
m_sem_hnd = winapi::open_semaphore(name);
|
||||
return m_sem_hnd != winapi::invalid_handle_value;
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void close()
|
||||
{
|
||||
if(m_sem_hnd != winapi::invalid_handle_value){
|
||||
winapi::close_handle(m_sem_hnd);
|
||||
m_sem_hnd = winapi::invalid_handle_value;
|
||||
}
|
||||
}
|
||||
|
||||
void swap(winapi_semaphore_wrapper &other)
|
||||
{ void *tmp = m_sem_hnd; m_sem_hnd = other.m_sem_hnd; other.m_sem_hnd = tmp; }
|
||||
};
|
||||
|
||||
} //namespace ipcdetail {
|
||||
} //namespace interprocess {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_INTERPROCESS_DETAIL_WINAPI_SEMAPHORE_WRAPPER_HPP
|
||||
@@ -0,0 +1,71 @@
|
||||
// (C) Copyright John Maddock 2015.
|
||||
// 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_SPECIAL_ULP_HPP
|
||||
#define BOOST_MATH_SPECIAL_ULP_HPP
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/math/special_functions/math_fwd.hpp>
|
||||
#include <boost/math/policies/error_handling.hpp>
|
||||
#include <boost/math/special_functions/fpclassify.hpp>
|
||||
#include <boost/math/special_functions/next.hpp>
|
||||
|
||||
namespace boost{ namespace math{ namespace detail{
|
||||
|
||||
template <class T, class Policy>
|
||||
T ulp_imp(const T& val, const Policy& pol)
|
||||
{
|
||||
BOOST_MATH_STD_USING
|
||||
int expon;
|
||||
static const char* function = "ulp<%1%>(%1%)";
|
||||
|
||||
int fpclass = (boost::math::fpclassify)(val);
|
||||
|
||||
if(fpclass == (int)FP_NAN)
|
||||
{
|
||||
return policies::raise_domain_error<T>(
|
||||
function,
|
||||
"Argument must be finite, but got %1%", val, pol);
|
||||
}
|
||||
else if((fpclass == (int)FP_INFINITE) || (fabs(val) >= tools::max_value<T>()))
|
||||
{
|
||||
return (val < 0 ? -1 : 1) * policies::raise_overflow_error<T>(function, 0, pol);
|
||||
}
|
||||
else if(fpclass == FP_ZERO)
|
||||
return detail::get_smallest_value<T>();
|
||||
//
|
||||
// This code is almost the same as that for float_next, except for negative integers,
|
||||
// where we preserve the relation ulp(x) == ulp(-x) as does Java:
|
||||
//
|
||||
frexp(fabs(val), &expon);
|
||||
T diff = ldexp(T(1), expon - tools::digits<T>());
|
||||
if(diff == 0)
|
||||
diff = detail::get_smallest_value<T>();
|
||||
return diff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template <class T, class Policy>
|
||||
inline typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol)
|
||||
{
|
||||
typedef typename tools::promote_args<T>::type result_type;
|
||||
return detail::ulp_imp(static_cast<result_type>(val), pol);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline typename tools::promote_args<T>::type ulp(const T& val)
|
||||
{
|
||||
return ulp(val, policies::policy<>());
|
||||
}
|
||||
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif // BOOST_MATH_SPECIAL_ULP_HPP
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
// (C) Copyright David Abrahams 2001, Howard Hinnant 2001.
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Template class numeric_traits<Number> --
|
||||
//
|
||||
// Supplies:
|
||||
//
|
||||
// typedef difference_type -- a type used to represent the difference
|
||||
// between any two values of Number.
|
||||
//
|
||||
// Support:
|
||||
// 1. Not all specializations are supplied
|
||||
//
|
||||
// 2. Use of specializations that are not supplied will cause a
|
||||
// compile-time error
|
||||
//
|
||||
// 3. Users are free to specialize numeric_traits for any type.
|
||||
//
|
||||
// 4. Right now, specializations are only supplied for integer types.
|
||||
//
|
||||
// 5. On implementations which do not supply compile-time constants in
|
||||
// std::numeric_limits<>, only specializations for built-in integer types
|
||||
// are supplied.
|
||||
//
|
||||
// 6. Handling of numbers whose range of representation is at least as
|
||||
// great as boost::intmax_t can cause some differences to be
|
||||
// unrepresentable in difference_type:
|
||||
//
|
||||
// Number difference_type
|
||||
// ------ ---------------
|
||||
// signed Number
|
||||
// unsigned intmax_t
|
||||
//
|
||||
// template <class Number> typename numeric_traits<Number>::difference_type
|
||||
// numeric_distance(Number x, Number y)
|
||||
// computes (y - x), attempting to avoid overflows.
|
||||
//
|
||||
|
||||
// See http://www.boost.org for most recent version including documentation.
|
||||
|
||||
// Revision History
|
||||
// 11 Feb 2001 - Use BOOST_STATIC_CONSTANT (David Abrahams)
|
||||
// 11 Feb 2001 - Rolled back ineffective Borland-specific code
|
||||
// (David Abrahams)
|
||||
// 10 Feb 2001 - Rolled in supposed Borland fixes from John Maddock, but
|
||||
// not seeing any improvement yet (David Abrahams)
|
||||
// 06 Feb 2001 - Factored if_true out into boost/detail/select_type.hpp
|
||||
// (David Abrahams)
|
||||
// 23 Jan 2001 - Fixed logic of difference_type selection, which was
|
||||
// completely wack. In the process, added digit_traits<>
|
||||
// to compute the number of digits in intmax_t even when
|
||||
// not supplied by numeric_limits<>. (David Abrahams)
|
||||
// 21 Jan 2001 - Created (David Abrahams)
|
||||
|
||||
#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
# define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
|
||||
# include <boost/config.hpp>
|
||||
# include <boost/cstdint.hpp>
|
||||
# include <boost/static_assert.hpp>
|
||||
# include <boost/type_traits.hpp>
|
||||
# include <boost/detail/select_type.hpp>
|
||||
# include <boost/limits.hpp>
|
||||
|
||||
namespace boost { namespace detail {
|
||||
|
||||
// Template class is_signed -- determine whether a numeric type is signed
|
||||
// Requires that T is constructable from the literals -1 and 0. Compile-time
|
||||
// error results if that requirement is not met (and thus signedness is not
|
||||
// likely to have meaning for that type).
|
||||
template <class Number>
|
||||
struct is_signed
|
||||
{
|
||||
#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
|
||||
BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0)));
|
||||
#else
|
||||
BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<Number>::is_signed);
|
||||
#endif
|
||||
};
|
||||
|
||||
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
// digit_traits - compute the number of digits in a built-in integer
|
||||
// type. Needed for implementations on which numeric_limits is not specialized
|
||||
// for intmax_t (e.g. VC6).
|
||||
template <bool is_specialized> struct digit_traits_select;
|
||||
|
||||
// numeric_limits is specialized; just select that version of digits
|
||||
template <> struct digit_traits_select<true>
|
||||
{
|
||||
template <class T> struct traits
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
|
||||
};
|
||||
};
|
||||
|
||||
// numeric_limits is not specialized; compute digits from sizeof(T)
|
||||
template <> struct digit_traits_select<false>
|
||||
{
|
||||
template <class T> struct traits
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(int, digits = (
|
||||
sizeof(T) * std::numeric_limits<unsigned char>::digits
|
||||
- (is_signed<T>::value ? 1 : 0))
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
// here's the "usable" template
|
||||
template <class T> struct digit_traits
|
||||
{
|
||||
typedef digit_traits_select<
|
||||
::std::numeric_limits<T>::is_specialized> selector;
|
||||
typedef typename selector::template traits<T> traits;
|
||||
BOOST_STATIC_CONSTANT(int, digits = traits::digits);
|
||||
};
|
||||
#endif
|
||||
|
||||
// Template class integer_traits<Integer> -- traits of various integer types
|
||||
// This should probably be rolled into boost::integer_traits one day, but I
|
||||
// need it to work without <limits>
|
||||
template <class Integer>
|
||||
struct integer_traits
|
||||
{
|
||||
# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||
private:
|
||||
typedef Integer integer_type;
|
||||
typedef std::numeric_limits<integer_type> x;
|
||||
public:
|
||||
typedef typename
|
||||
if_true<(int(x::is_signed)
|
||||
&& (!int(x::is_bounded)
|
||||
// digits is the number of no-sign bits
|
||||
|| (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits)))>::template then<
|
||||
Integer,
|
||||
|
||||
typename if_true<(int(x::digits) + 1 < digit_traits<signed int>::digits)>::template then<
|
||||
signed int,
|
||||
|
||||
typename if_true<(int(x::digits) + 1 < digit_traits<signed long>::digits)>::template then<
|
||||
signed long,
|
||||
|
||||
// else
|
||||
intmax_t
|
||||
>::type>::type>::type difference_type;
|
||||
#else
|
||||
BOOST_STATIC_ASSERT(boost::is_integral<Integer>::value);
|
||||
|
||||
typedef typename
|
||||
if_true<(sizeof(Integer) >= sizeof(intmax_t))>::template then<
|
||||
|
||||
typename if_true<(is_signed<Integer>::value)>::template then<
|
||||
Integer,
|
||||
intmax_t
|
||||
>::type,
|
||||
|
||||
typename if_true<(sizeof(Integer) < sizeof(std::ptrdiff_t))>::template then<
|
||||
std::ptrdiff_t,
|
||||
intmax_t
|
||||
>::type
|
||||
>::type difference_type;
|
||||
# endif
|
||||
};
|
||||
|
||||
// Right now, only supports integers, but should be expanded.
|
||||
template <class Number>
|
||||
struct numeric_traits
|
||||
{
|
||||
typedef typename integer_traits<Number>::difference_type difference_type;
|
||||
};
|
||||
|
||||
template <class Number>
|
||||
typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
|
||||
{
|
||||
typedef typename numeric_traits<Number>::difference_type difference_type;
|
||||
return difference_type(y) - difference_type(x);
|
||||
}
|
||||
}}
|
||||
|
||||
#endif // BOOST_NUMERIC_TRAITS_HPP_DWA20001901
|
||||
@@ -0,0 +1,44 @@
|
||||
// (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_PRE_DECREMENT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
|
||||
|
||||
#include <boost/type_traits/is_array.hpp>
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_pre_decrement
|
||||
#define BOOST_TT_TRAIT_OP --
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
(\
|
||||
/* bool */\
|
||||
::boost::is_same< bool, Rhs_nocv >::value || \
|
||||
/* void* */\
|
||||
(\
|
||||
::boost::is_pointer< Rhs_noref >::value && \
|
||||
::boost::is_void< Rhs_noptr >::value\
|
||||
) || \
|
||||
/* (fundamental or pointer) and const */\
|
||||
(\
|
||||
( \
|
||||
::boost::is_fundamental< Rhs_nocv >::value || \
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
) && \
|
||||
::boost::is_const< Rhs_noref >::value\
|
||||
)||\
|
||||
/* Arrays */ \
|
||||
::boost::is_array<Rhs_noref>::value\
|
||||
)
|
||||
|
||||
|
||||
#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,457 @@
|
||||
/*=============================================================================
|
||||
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)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)));
|
||||
}
|
||||
template <typename F, typename A0, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3 , typename A4
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3 , A4, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A4 , Context ) >::type >::type >::type a4;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3 , a4)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3 , A4 , A5, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A4 , Context ) >::type >::type >::type a4; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A5 , Context ) >::type >::type >::type a5;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3 , a4 , a5)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3 , A4 , A5 , A6, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A4 , Context ) >::type >::type >::type a4; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A5 , Context ) >::type >::type >::type a5; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A6 , Context ) >::type >::type >::type a6;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3 , a4 , a5 , a6)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A4 , Context ) >::type >::type >::type a4; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A5 , Context ) >::type >::type >::type a5; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A6 , Context ) >::type >::type >::type a6; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A7 , Context ) >::type >::type >::type a7;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a7, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a7, ctx)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <
|
||||
typename This
|
||||
, typename F
|
||||
, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8
|
||||
, typename Context
|
||||
>
|
||||
struct result<This(F, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8, Context)>
|
||||
{
|
||||
typedef typename
|
||||
remove_reference<
|
||||
typename boost::result_of<evaluator(F, Context)>::type
|
||||
>::type
|
||||
fn;
|
||||
typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A0 , Context ) >::type >::type >::type a0; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A1 , Context ) >::type >::type >::type a1; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A2 , Context ) >::type >::type >::type a2; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A3 , Context ) >::type >::type >::type a3; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A4 , Context ) >::type >::type >::type a4; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A5 , Context ) >::type >::type >::type a5; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A6 , Context ) >::type >::type >::type a6; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A7 , Context ) >::type >::type >::type a7; typedef typename boost::add_reference< typename boost::add_const< typename boost::result_of< boost::phoenix::evaluator( A8 , Context ) >::type >::type >::type a8;
|
||||
typedef typename
|
||||
boost::result_of<fn(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8)>::type
|
||||
type;
|
||||
|
||||
};
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F const &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F const & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a7, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a8, ctx)));
|
||||
}
|
||||
template <typename F, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
typename result<
|
||||
function_eval(
|
||||
F &
|
||||
, A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 &
|
||||
, Context const &
|
||||
)
|
||||
>::type
|
||||
operator()(F & f, A0 & a0 , A1 & a1 , A2 & a2 , A3 & a3 , A4 & a4 , A5 & a5 , A6 & a6 , A7 & a7 , A8 & a8, Context const & ctx) const
|
||||
{
|
||||
return boost::phoenix::eval(f, ctx)(help_rvalue_deduction(boost::phoenix::eval(a0, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a1, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a2, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a3, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a4, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a5, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a6, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a7, ctx)) , help_rvalue_deduction(boost::phoenix::eval(a8, ctx)));
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*=============================================================================
|
||||
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_BEGIN_IMPL_05062005_0903)
|
||||
#define FUSION_BEGIN_IMPL_05062005_0903
|
||||
|
||||
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 begin_impl;
|
||||
|
||||
template <>
|
||||
struct begin_impl<filter_view_tag>
|
||||
{
|
||||
template <typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Sequence::first_type first_type;
|
||||
typedef typename Sequence::last_type last_type;
|
||||
typedef typename Sequence::pred_type pred_type;
|
||||
typedef typename Sequence::category category;
|
||||
typedef filter_iterator<category, first_type, last_type, pred_type> type;
|
||||
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type
|
||||
call(Sequence& s)
|
||||
{
|
||||
return type(s.first());
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
//---------------------------------------------------------------------------//
|
||||
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
// See http://boostorg.github.com/compute for more information.
|
||||
//---------------------------------------------------------------------------//
|
||||
|
||||
#ifndef BOOST_COMPUTE_ITERATOR_CONSTANT_ITERATOR_HPP
|
||||
#define BOOST_COMPUTE_ITERATOR_CONSTANT_ITERATOR_HPP
|
||||
|
||||
#include <string>
|
||||
#include <cstddef>
|
||||
#include <iterator>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/iterator/iterator_facade.hpp>
|
||||
|
||||
#include <boost/compute/detail/meta_kernel.hpp>
|
||||
#include <boost/compute/type_traits/is_device_iterator.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace compute {
|
||||
|
||||
// forward declaration for constant_iterator<T>
|
||||
template<class T> class constant_iterator;
|
||||
|
||||
namespace detail {
|
||||
|
||||
// helper class which defines the iterator_facade super-class
|
||||
// type for constant_iterator<T>
|
||||
template<class T>
|
||||
class constant_iterator_base
|
||||
{
|
||||
public:
|
||||
typedef ::boost::iterator_facade<
|
||||
::boost::compute::constant_iterator<T>,
|
||||
T,
|
||||
::std::random_access_iterator_tag
|
||||
> type;
|
||||
};
|
||||
|
||||
} // end detail namespace
|
||||
|
||||
/// \class constant_iterator
|
||||
/// \brief An iterator with a constant value.
|
||||
///
|
||||
/// The constant_iterator class provides an iterator which returns a constant
|
||||
/// value when dereferenced.
|
||||
///
|
||||
/// For example, this could be used to implement the fill() algorithm in terms
|
||||
/// of the copy() algorithm by copying from a range of constant iterators:
|
||||
///
|
||||
/// \snippet test/test_constant_iterator.cpp fill_with_copy
|
||||
///
|
||||
/// \see make_constant_iterator()
|
||||
template<class T>
|
||||
class constant_iterator : public detail::constant_iterator_base<T>::type
|
||||
{
|
||||
public:
|
||||
typedef typename detail::constant_iterator_base<T>::type super_type;
|
||||
typedef typename super_type::reference reference;
|
||||
typedef typename super_type::difference_type difference_type;
|
||||
|
||||
constant_iterator(const T &value, size_t index = 0)
|
||||
: m_value(value),
|
||||
m_index(index)
|
||||
{
|
||||
}
|
||||
|
||||
constant_iterator(const constant_iterator<T> &other)
|
||||
: m_value(other.m_value),
|
||||
m_index(other.m_index)
|
||||
{
|
||||
}
|
||||
|
||||
constant_iterator<T>& operator=(const constant_iterator<T> &other)
|
||||
{
|
||||
if(this != &other){
|
||||
m_value = other.m_value;
|
||||
m_index = other.m_index;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
~constant_iterator()
|
||||
{
|
||||
}
|
||||
|
||||
size_t get_index() const
|
||||
{
|
||||
return m_index;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
template<class Expr>
|
||||
detail::meta_kernel_literal<T> operator[](const Expr &expr) const
|
||||
{
|
||||
(void) expr;
|
||||
|
||||
return detail::meta_kernel::make_lit<T>(m_value);
|
||||
}
|
||||
|
||||
private:
|
||||
friend class ::boost::iterator_core_access;
|
||||
|
||||
/// \internal_
|
||||
reference dereference() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
bool equal(const constant_iterator<T> &other) const
|
||||
{
|
||||
return m_value == other.m_value && m_index == other.m_index;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void increment()
|
||||
{
|
||||
m_index++;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void decrement()
|
||||
{
|
||||
m_index--;
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
void advance(difference_type n)
|
||||
{
|
||||
m_index = static_cast<size_t>(static_cast<difference_type>(m_index) + n);
|
||||
}
|
||||
|
||||
/// \internal_
|
||||
difference_type distance_to(const constant_iterator<T> &other) const
|
||||
{
|
||||
return static_cast<difference_type>(other.m_index - m_index);
|
||||
}
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
size_t m_index;
|
||||
};
|
||||
|
||||
/// Returns a new constant_iterator with \p value at \p index.
|
||||
///
|
||||
/// \param value the constant value
|
||||
/// \param index the iterators index
|
||||
///
|
||||
/// \return a \c constant_iterator with \p value
|
||||
template<class T>
|
||||
inline constant_iterator<T>
|
||||
make_constant_iterator(const T &value, size_t index = 0)
|
||||
{
|
||||
return constant_iterator<T>(value, index);
|
||||
}
|
||||
|
||||
/// \internal_ (is_device_iterator specialization for constant_iterator)
|
||||
template<class T>
|
||||
struct is_device_iterator<constant_iterator<T> > : boost::true_type {};
|
||||
|
||||
} // end compute namespace
|
||||
} // end boost namespace
|
||||
|
||||
#endif // BOOST_COMPUTE_ITERATOR_CONSTANT_ITERATOR_HPP
|
||||
@@ -0,0 +1,873 @@
|
||||
#ifndef BOOST_THREAD_THREAD_COMMON_HPP
|
||||
#define BOOST_THREAD_THREAD_COMMON_HPP
|
||||
// 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-2010 Anthony Williams
|
||||
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
|
||||
|
||||
#include <boost/thread/detail/config.hpp>
|
||||
#include <boost/predef/platform.h>
|
||||
|
||||
#include <boost/thread/exceptions.hpp>
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
#include <ostream>
|
||||
#endif
|
||||
#include <boost/thread/detail/move.hpp>
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#if defined BOOST_THREAD_USES_DATETIME
|
||||
#include <boost/thread/xtime.hpp>
|
||||
#endif
|
||||
#include <boost/thread/detail/thread_heap_alloc.hpp>
|
||||
#include <boost/thread/detail/make_tuple_indices.hpp>
|
||||
#include <boost/thread/detail/invoke.hpp>
|
||||
#include <boost/thread/detail/is_convertible.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <list>
|
||||
#include <algorithm>
|
||||
#include <boost/core/ref.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <stdlib.h>
|
||||
#include <memory>
|
||||
#include <boost/core/enable_if.hpp>
|
||||
#include <boost/type_traits/remove_reference.hpp>
|
||||
#include <boost/io/ios_state.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/decay.hpp>
|
||||
#include <boost/functional/hash.hpp>
|
||||
#ifdef BOOST_THREAD_USES_CHRONO
|
||||
#include <boost/chrono/system_clocks.hpp>
|
||||
#include <boost/chrono/ceil.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||
#include <tuple>
|
||||
#endif
|
||||
#include <boost/config/abi_prefix.hpp>
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4251)
|
||||
#endif
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||
|
||||
template<typename F, class ...ArgTypes>
|
||||
class thread_data:
|
||||
public detail::thread_data_base
|
||||
{
|
||||
public:
|
||||
BOOST_THREAD_NO_COPYABLE(thread_data)
|
||||
thread_data(BOOST_THREAD_RV_REF(F) f_, BOOST_THREAD_RV_REF(ArgTypes)... args_):
|
||||
fp(boost::forward<F>(f_), boost::forward<ArgTypes>(args_)...)
|
||||
{}
|
||||
template <std::size_t ...Indices>
|
||||
void run2(tuple_indices<Indices...>)
|
||||
{
|
||||
|
||||
detail::invoke(std::move(std::get<0>(fp)), std::move(std::get<Indices>(fp))...);
|
||||
}
|
||||
void run()
|
||||
{
|
||||
typedef typename make_tuple_indices<std::tuple_size<std::tuple<F, ArgTypes...> >::value, 1>::type index_type;
|
||||
|
||||
run2(index_type());
|
||||
}
|
||||
|
||||
private:
|
||||
std::tuple<typename decay<F>::type, typename decay<ArgTypes>::type...> fp;
|
||||
};
|
||||
#else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||
|
||||
template<typename F>
|
||||
class thread_data:
|
||||
public detail::thread_data_base
|
||||
{
|
||||
public:
|
||||
BOOST_THREAD_NO_COPYABLE(thread_data)
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
thread_data(BOOST_THREAD_RV_REF(F) f_):
|
||||
f(boost::forward<F>(f_))
|
||||
{}
|
||||
// This overloading must be removed if we want the packaged_task's tests to pass.
|
||||
// thread_data(F& f_):
|
||||
// f(f_)
|
||||
// {}
|
||||
#else
|
||||
|
||||
thread_data(BOOST_THREAD_RV_REF(F) f_):
|
||||
f(f_)
|
||||
{}
|
||||
thread_data(F f_):
|
||||
f(f_)
|
||||
{}
|
||||
#endif
|
||||
//thread_data() {}
|
||||
|
||||
void run()
|
||||
{
|
||||
f();
|
||||
}
|
||||
|
||||
private:
|
||||
F f;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
class thread_data<boost::reference_wrapper<F> >:
|
||||
public detail::thread_data_base
|
||||
{
|
||||
private:
|
||||
F& f;
|
||||
public:
|
||||
BOOST_THREAD_NO_COPYABLE(thread_data)
|
||||
thread_data(boost::reference_wrapper<F> f_):
|
||||
f(f_)
|
||||
{}
|
||||
void run()
|
||||
{
|
||||
f();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
class thread_data<const boost::reference_wrapper<F> >:
|
||||
public detail::thread_data_base
|
||||
{
|
||||
private:
|
||||
F& f;
|
||||
public:
|
||||
BOOST_THREAD_NO_COPYABLE(thread_data)
|
||||
thread_data(const boost::reference_wrapper<F> f_):
|
||||
f(f_)
|
||||
{}
|
||||
void run()
|
||||
{
|
||||
f();
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
class BOOST_THREAD_DECL thread
|
||||
{
|
||||
public:
|
||||
typedef thread_attributes attributes;
|
||||
|
||||
BOOST_THREAD_MOVABLE_ONLY(thread)
|
||||
private:
|
||||
|
||||
struct dummy;
|
||||
|
||||
void release_handle();
|
||||
|
||||
detail::thread_data_ptr thread_info;
|
||||
|
||||
private:
|
||||
bool start_thread_noexcept();
|
||||
bool start_thread_noexcept(const attributes& attr);
|
||||
void start_thread()
|
||||
{
|
||||
if (!start_thread_noexcept())
|
||||
{
|
||||
boost::throw_exception(thread_resource_error());
|
||||
}
|
||||
}
|
||||
void start_thread(const attributes& attr)
|
||||
{
|
||||
if (!start_thread_noexcept(attr))
|
||||
{
|
||||
boost::throw_exception(thread_resource_error());
|
||||
}
|
||||
}
|
||||
|
||||
explicit thread(detail::thread_data_ptr data);
|
||||
|
||||
detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||
template<typename F, class ...ArgTypes>
|
||||
static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
|
||||
{
|
||||
return detail::thread_data_ptr(detail::heap_new<
|
||||
detail::thread_data<typename boost::remove_reference<F>::type, ArgTypes...>
|
||||
>(
|
||||
boost::forward<F>(f), boost::forward<ArgTypes>(args)...
|
||||
)
|
||||
);
|
||||
}
|
||||
#else
|
||||
template<typename F>
|
||||
static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
|
||||
{
|
||||
return detail::thread_data_ptr(detail::heap_new<detail::thread_data<typename boost::remove_reference<F>::type> >(
|
||||
boost::forward<F>(f)));
|
||||
}
|
||||
#endif
|
||||
static inline detail::thread_data_ptr make_thread_info(void (*f)())
|
||||
{
|
||||
return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(
|
||||
boost::forward<void(*)()>(f)));
|
||||
}
|
||||
#else
|
||||
template<typename F>
|
||||
static inline detail::thread_data_ptr make_thread_info(F f
|
||||
, typename disable_if_c<
|
||||
//boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value ||
|
||||
is_same<typename decay<F>::type, thread>::value,
|
||||
dummy* >::type=0
|
||||
)
|
||||
{
|
||||
return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
|
||||
}
|
||||
template<typename F>
|
||||
static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
|
||||
{
|
||||
return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
|
||||
}
|
||||
|
||||
#endif
|
||||
public:
|
||||
#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
|
||||
thread(const volatile thread&);
|
||||
#endif
|
||||
#endif
|
||||
thread() BOOST_NOEXCEPT;
|
||||
~thread()
|
||||
{
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
|
||||
if (joinable()) {
|
||||
std::terminate();
|
||||
}
|
||||
#else
|
||||
detach();
|
||||
#endif
|
||||
}
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <
|
||||
class F
|
||||
>
|
||||
explicit thread(BOOST_THREAD_RV_REF(F) f
|
||||
//, typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
|
||||
):
|
||||
thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
template <
|
||||
class F
|
||||
>
|
||||
thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f):
|
||||
thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
|
||||
{
|
||||
start_thread(attrs);
|
||||
}
|
||||
|
||||
#else
|
||||
#ifdef BOOST_NO_SFINAE
|
||||
template <class F>
|
||||
explicit thread(F f):
|
||||
thread_info(make_thread_info(f))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
template <class F>
|
||||
thread(attributes const& attrs, F f):
|
||||
thread_info(make_thread_info(f))
|
||||
{
|
||||
start_thread(attrs);
|
||||
}
|
||||
#else
|
||||
template <class F>
|
||||
explicit thread(F f
|
||||
, typename disable_if_c<
|
||||
boost::thread_detail::is_rv<F>::value // todo ass a thread_detail::is_rv
|
||||
//boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value
|
||||
//|| is_same<typename decay<F>::type, thread>::value
|
||||
, dummy* >::type=0
|
||||
):
|
||||
thread_info(make_thread_info(f))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
template <class F>
|
||||
thread(attributes const& attrs, F f
|
||||
, typename disable_if<boost::thread_detail::is_rv<F>, dummy* >::type=0
|
||||
//, typename disable_if<boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F) >, dummy* >::type=0
|
||||
):
|
||||
thread_info(make_thread_info(f))
|
||||
{
|
||||
start_thread(attrs);
|
||||
}
|
||||
#endif
|
||||
template <class F>
|
||||
explicit thread(BOOST_THREAD_RV_REF(F) f
|
||||
, typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
|
||||
):
|
||||
#ifdef BOOST_THREAD_USES_MOVE
|
||||
thread_info(make_thread_info(boost::move<F>(f))) // todo : Add forward
|
||||
#else
|
||||
thread_info(make_thread_info(f)) // todo : Add forward
|
||||
#endif
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F>
|
||||
thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f):
|
||||
#ifdef BOOST_THREAD_USES_MOVE
|
||||
thread_info(make_thread_info(boost::move<F>(f))) // todo : Add forward
|
||||
#else
|
||||
thread_info(make_thread_info(f)) // todo : Add forward
|
||||
#endif
|
||||
{
|
||||
start_thread(attrs);
|
||||
}
|
||||
#endif
|
||||
thread(BOOST_THREAD_RV_REF(thread) x) BOOST_NOEXCEPT
|
||||
{
|
||||
thread_info=BOOST_THREAD_RV(x).thread_info;
|
||||
BOOST_THREAD_RV(x).thread_info.reset();
|
||||
}
|
||||
#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
|
||||
#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
|
||||
thread& operator=(thread x)
|
||||
{
|
||||
swap(x);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
thread& operator=(BOOST_THREAD_RV_REF(thread) other) BOOST_NOEXCEPT
|
||||
{
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
|
||||
if (joinable()) std::terminate();
|
||||
#else
|
||||
detach();
|
||||
#endif
|
||||
thread_info=BOOST_THREAD_RV(other).thread_info;
|
||||
BOOST_THREAD_RV(other).thread_info.reset();
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
|
||||
template <class F, class Arg, class ...Args>
|
||||
thread(F&& f, Arg&& arg, Args&&... args) :
|
||||
thread_info(make_thread_info(
|
||||
thread_detail::decay_copy(boost::forward<F>(f)),
|
||||
thread_detail::decay_copy(boost::forward<Arg>(arg)),
|
||||
thread_detail::decay_copy(boost::forward<Args>(args))...)
|
||||
)
|
||||
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
template <class F, class Arg, class ...Args>
|
||||
thread(attributes const& attrs, F&& f, Arg&& arg, Args&&... args) :
|
||||
thread_info(make_thread_info(
|
||||
thread_detail::decay_copy(boost::forward<F>(f)),
|
||||
thread_detail::decay_copy(boost::forward<Arg>(arg)),
|
||||
thread_detail::decay_copy(boost::forward<Args>(args))...)
|
||||
)
|
||||
|
||||
{
|
||||
start_thread(attrs);
|
||||
}
|
||||
#else
|
||||
template <class F,class A1>
|
||||
thread(F f,A1 a1,typename disable_if<boost::thread_detail::is_convertible<F&,thread_attributes >, dummy* >::type=0):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
template <class F,class A1,class A2>
|
||||
thread(F f,A1 a1,A2 a2):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4,class A5>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4,class A5,class A6>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
|
||||
template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8,class A9>
|
||||
thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9):
|
||||
thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8,a9)))
|
||||
{
|
||||
start_thread();
|
||||
}
|
||||
#endif
|
||||
void swap(thread& x) BOOST_NOEXCEPT
|
||||
{
|
||||
thread_info.swap(x.thread_info);
|
||||
}
|
||||
|
||||
class id;
|
||||
#ifdef BOOST_THREAD_PLATFORM_PTHREAD
|
||||
inline id get_id() const BOOST_NOEXCEPT;
|
||||
#else
|
||||
id get_id() const BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
|
||||
bool joinable() const BOOST_NOEXCEPT;
|
||||
private:
|
||||
bool join_noexcept();
|
||||
public:
|
||||
inline void join();
|
||||
|
||||
#ifdef BOOST_THREAD_USES_CHRONO
|
||||
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
||||
template <class Rep, class Period>
|
||||
bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
|
||||
{
|
||||
chrono::milliseconds rel_time2= chrono::ceil<chrono::milliseconds>(rel_time);
|
||||
return do_try_join_until(rel_time2.count());
|
||||
}
|
||||
#else
|
||||
template <class Rep, class Period>
|
||||
bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
|
||||
{
|
||||
return try_join_until(chrono::steady_clock::now() + rel_time);
|
||||
}
|
||||
#endif
|
||||
template <class Clock, class Duration>
|
||||
bool try_join_until(const chrono::time_point<Clock, Duration>& t)
|
||||
{
|
||||
using namespace chrono;
|
||||
bool joined= false;
|
||||
do {
|
||||
system_clock::time_point s_now = system_clock::now();
|
||||
typename Clock::duration d = ceil<nanoseconds>(t-Clock::now());
|
||||
if (d <= Clock::duration::zero()) return false; // in case the Clock::time_point t is already reached
|
||||
joined = try_join_until(s_now + d);
|
||||
} while (! joined);
|
||||
return true;
|
||||
}
|
||||
template <class Duration>
|
||||
bool try_join_until(const chrono::time_point<chrono::system_clock, Duration>& t)
|
||||
{
|
||||
using namespace chrono;
|
||||
typedef time_point<system_clock, nanoseconds> nano_sys_tmpt;
|
||||
return try_join_until(nano_sys_tmpt(ceil<nanoseconds>(t.time_since_epoch())));
|
||||
}
|
||||
#endif
|
||||
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
||||
private:
|
||||
bool do_try_join_until_noexcept(uintmax_t milli, bool& res);
|
||||
inline bool do_try_join_until(uintmax_t milli);
|
||||
public:
|
||||
bool timed_join(const system_time& abs_time);
|
||||
//{
|
||||
// return do_try_join_until(get_milliseconds_until(wait_until));
|
||||
//}
|
||||
|
||||
#ifdef BOOST_THREAD_USES_CHRONO
|
||||
bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
|
||||
{
|
||||
chrono::milliseconds rel_time= chrono::ceil<chrono::milliseconds>(tp-chrono::system_clock::now());
|
||||
return do_try_join_until(rel_time.count());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
private:
|
||||
bool do_try_join_until_noexcept(struct timespec const &timeout, bool& res);
|
||||
inline bool do_try_join_until(struct timespec const &timeout);
|
||||
public:
|
||||
#if defined BOOST_THREAD_USES_DATETIME
|
||||
bool timed_join(const system_time& abs_time)
|
||||
{
|
||||
struct timespec const ts=detail::to_timespec(abs_time);
|
||||
return do_try_join_until(ts);
|
||||
}
|
||||
#endif
|
||||
#ifdef BOOST_THREAD_USES_CHRONO
|
||||
bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
|
||||
{
|
||||
using namespace chrono;
|
||||
nanoseconds d = tp.time_since_epoch();
|
||||
timespec ts = boost::detail::to_timespec(d);
|
||||
return do_try_join_until(ts);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
public:
|
||||
|
||||
#if defined BOOST_THREAD_USES_DATETIME
|
||||
template<typename TimeDuration>
|
||||
inline bool timed_join(TimeDuration const& rel_time)
|
||||
{
|
||||
return timed_join(get_system_time()+rel_time);
|
||||
}
|
||||
#endif
|
||||
void detach();
|
||||
|
||||
static unsigned hardware_concurrency() BOOST_NOEXCEPT;
|
||||
static unsigned physical_concurrency() BOOST_NOEXCEPT;
|
||||
|
||||
#define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE
|
||||
typedef detail::thread_data_base::native_handle_type native_handle_type;
|
||||
native_handle_type native_handle();
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_THREAD_EQ
|
||||
// Use thread::id when comparisions are needed
|
||||
// backwards compatibility
|
||||
bool operator==(const thread& other) const;
|
||||
bool operator!=(const thread& other) const;
|
||||
#endif
|
||||
#if defined BOOST_THREAD_USES_DATETIME
|
||||
static inline void yield() BOOST_NOEXCEPT
|
||||
{
|
||||
this_thread::yield();
|
||||
}
|
||||
|
||||
static inline void sleep(const system_time& xt)
|
||||
{
|
||||
this_thread::sleep(xt);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
|
||||
// extensions
|
||||
void interrupt();
|
||||
bool interruption_requested() const BOOST_NOEXCEPT;
|
||||
#endif
|
||||
};
|
||||
|
||||
inline void swap(thread& lhs,thread& rhs) BOOST_NOEXCEPT
|
||||
{
|
||||
return lhs.swap(rhs);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
inline thread&& move(thread& t) BOOST_NOEXCEPT
|
||||
{
|
||||
return static_cast<thread&&>(t);
|
||||
}
|
||||
#endif
|
||||
|
||||
BOOST_THREAD_DCL_MOVABLE(thread)
|
||||
|
||||
namespace this_thread
|
||||
{
|
||||
#ifdef BOOST_THREAD_PLATFORM_PTHREAD
|
||||
inline thread::id get_id() BOOST_NOEXCEPT;
|
||||
#else
|
||||
thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
|
||||
void BOOST_THREAD_DECL interruption_point();
|
||||
bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT;
|
||||
bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT;
|
||||
#endif
|
||||
|
||||
#if defined BOOST_THREAD_USES_DATETIME
|
||||
inline BOOST_SYMBOL_VISIBLE void sleep(xtime const& abs_time)
|
||||
{
|
||||
sleep(system_time(abs_time));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
class BOOST_SYMBOL_VISIBLE thread::id
|
||||
{
|
||||
private:
|
||||
friend inline
|
||||
std::size_t
|
||||
hash_value(const thread::id &v)
|
||||
{
|
||||
#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
||||
return hash_value(v.thread_data);
|
||||
#else
|
||||
return hash_value(v.thread_data.get());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
||||
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
||||
typedef unsigned int data;
|
||||
#else
|
||||
typedef thread::native_handle_type data;
|
||||
#endif
|
||||
#else
|
||||
typedef detail::thread_data_ptr data;
|
||||
#endif
|
||||
data thread_data;
|
||||
|
||||
id(data thread_data_):
|
||||
thread_data(thread_data_)
|
||||
{}
|
||||
friend class thread;
|
||||
friend id BOOST_THREAD_DECL this_thread::get_id() BOOST_NOEXCEPT;
|
||||
public:
|
||||
id() BOOST_NOEXCEPT:
|
||||
#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
||||
thread_data(0)
|
||||
#else
|
||||
thread_data()
|
||||
#endif
|
||||
{}
|
||||
|
||||
id(const id& other) BOOST_NOEXCEPT :
|
||||
thread_data(other.thread_data)
|
||||
{}
|
||||
|
||||
bool operator==(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return thread_data==y.thread_data;
|
||||
}
|
||||
|
||||
bool operator!=(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return thread_data!=y.thread_data;
|
||||
}
|
||||
|
||||
bool operator<(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return thread_data<y.thread_data;
|
||||
}
|
||||
|
||||
bool operator>(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return y.thread_data<thread_data;
|
||||
}
|
||||
|
||||
bool operator<=(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return !(y.thread_data<thread_data);
|
||||
}
|
||||
|
||||
bool operator>=(const id& y) const BOOST_NOEXCEPT
|
||||
{
|
||||
return !(thread_data<y.thread_data);
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_IOSTREAM
|
||||
#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
template<class charT, class traits>
|
||||
friend BOOST_SYMBOL_VISIBLE
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator<<(std::basic_ostream<charT, traits>& os, const id& x)
|
||||
{
|
||||
if(x.thread_data)
|
||||
{
|
||||
io::ios_flags_saver ifs( os );
|
||||
return os<< std::hex << x.thread_data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return os<<"{Not-any-thread}";
|
||||
}
|
||||
}
|
||||
#else
|
||||
template<class charT, class traits>
|
||||
BOOST_SYMBOL_VISIBLE
|
||||
std::basic_ostream<charT, traits>&
|
||||
print(std::basic_ostream<charT, traits>& os) const
|
||||
{
|
||||
if(thread_data)
|
||||
{
|
||||
io::ios_flags_saver ifs( os );
|
||||
return os<< std::hex << thread_data;
|
||||
}
|
||||
else
|
||||
{
|
||||
return os<<"{Not-any-thread}";
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifdef BOOST_THREAD_PLATFORM_PTHREAD
|
||||
thread::id thread::get_id() const BOOST_NOEXCEPT
|
||||
{
|
||||
#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
||||
return const_cast<thread*>(this)->native_handle();
|
||||
#else
|
||||
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
|
||||
return (local_thread_info? id(local_thread_info) : id());
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace this_thread
|
||||
{
|
||||
inline thread::id get_id() BOOST_NOEXCEPT
|
||||
{
|
||||
#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
|
||||
return pthread_self();
|
||||
#else
|
||||
boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
|
||||
return (thread_info?thread::id(thread_info->shared_from_this()):thread::id());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
void thread::join() {
|
||||
if (this_thread::get_id() == get_id())
|
||||
boost::throw_exception(thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost thread: trying joining itself"));
|
||||
|
||||
BOOST_THREAD_VERIFY_PRECONDITION( join_noexcept(),
|
||||
thread_resource_error(static_cast<int>(system::errc::invalid_argument), "boost thread: thread not joinable")
|
||||
);
|
||||
}
|
||||
|
||||
#ifdef BOOST_THREAD_PLATFORM_PTHREAD
|
||||
bool thread::do_try_join_until(struct timespec const &timeout)
|
||||
#else
|
||||
bool thread::do_try_join_until(uintmax_t timeout)
|
||||
#endif
|
||||
{
|
||||
if (this_thread::get_id() == get_id())
|
||||
boost::throw_exception(thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost thread: trying joining itself"));
|
||||
bool res;
|
||||
if (do_try_join_until_noexcept(timeout, res))
|
||||
{
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOST_THREAD_THROW_ELSE_RETURN(
|
||||
(thread_resource_error(static_cast<int>(system::errc::invalid_argument), "boost thread: thread not joinable")),
|
||||
false
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
|
||||
template<class charT, class traits>
|
||||
BOOST_SYMBOL_VISIBLE
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator<<(std::basic_ostream<charT, traits>& os, const thread::id& x)
|
||||
{
|
||||
return x.print(os);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined BOOST_THREAD_PROVIDES_THREAD_EQ
|
||||
inline bool thread::operator==(const thread& other) const
|
||||
{
|
||||
return get_id()==other.get_id();
|
||||
}
|
||||
|
||||
inline bool thread::operator!=(const thread& other) const
|
||||
{
|
||||
return get_id()!=other.get_id();
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace detail
|
||||
{
|
||||
struct thread_exit_function_base
|
||||
{
|
||||
virtual ~thread_exit_function_base()
|
||||
{}
|
||||
virtual void operator()()=0;
|
||||
};
|
||||
|
||||
template<typename F>
|
||||
struct thread_exit_function:
|
||||
thread_exit_function_base
|
||||
{
|
||||
F f;
|
||||
|
||||
thread_exit_function(F f_):
|
||||
f(f_)
|
||||
{}
|
||||
|
||||
void operator()()
|
||||
{
|
||||
f();
|
||||
}
|
||||
};
|
||||
|
||||
void BOOST_THREAD_DECL add_thread_exit_function(thread_exit_function_base*);
|
||||
struct shared_state_base;
|
||||
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
||||
inline void make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
|
||||
{
|
||||
detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
|
||||
if(current_thread_data)
|
||||
{
|
||||
current_thread_data->make_ready_at_thread_exit(as);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void BOOST_THREAD_DECL make_ready_at_thread_exit(shared_ptr<shared_state_base> as);
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace this_thread
|
||||
{
|
||||
template<typename F>
|
||||
void at_thread_exit(F f)
|
||||
{
|
||||
detail::thread_exit_function_base* const thread_exit_func=detail::heap_new<detail::thread_exit_function<F> >(f);
|
||||
detail::add_thread_exit_function(thread_exit_func);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <boost/config/abi_suffix.hpp>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,501 @@
|
||||
/*==============================================================================
|
||||
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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10, 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 A10, 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 , A10 const& a10
|
||||
, 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) , boost::phoenix::eval(a10, 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 A10 , typename A11, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11, 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 A10 , typename A11, 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 , A10 const& a10 , A11 const& a11
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, 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 A10 , typename A11 , typename A12, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12, 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 A10 , typename A11 , typename A12, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, 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 A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13, 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 A10 , typename A11 , typename A12 , typename A13, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19, 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 A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, 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 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18 , A19 const& a19
|
||||
, 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) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, ctx) , boost::phoenix::eval(a19, ctx)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 1998-2003 Joel de Guzman
|
||||
Copyright (c) 2001 Daniel Nuffer
|
||||
Copyright (c) 2001 Bruce Florman
|
||||
Copyright (c) 2002 Raghavendra Satish
|
||||
http://spirit.sourceforge.net/
|
||||
|
||||
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)
|
||||
=============================================================================*/
|
||||
#if !defined(BOOST_SPIRIT_DIRECTIVES_IPP)
|
||||
#define BOOST_SPIRIT_DIRECTIVES_IPP
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#include <boost/spirit/home/classic/core/scanner/skipper.hpp>
|
||||
|
||||
namespace boost { namespace spirit {
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
|
||||
|
||||
template <typename BaseT>
|
||||
struct no_skipper_iteration_policy;
|
||||
|
||||
template <typename BaseT>
|
||||
struct inhibit_case_iteration_policy;
|
||||
|
||||
template <typename A, typename B>
|
||||
struct alternative;
|
||||
|
||||
template <typename A, typename B>
|
||||
struct longest_alternative;
|
||||
|
||||
template <typename A, typename B>
|
||||
struct shortest_alternative;
|
||||
|
||||
namespace impl
|
||||
{
|
||||
template <typename RT, typename ST, typename ScannerT, typename BaseT>
|
||||
inline RT
|
||||
contiguous_parser_parse(
|
||||
ST const& s,
|
||||
ScannerT const& scan,
|
||||
skipper_iteration_policy<BaseT> const&)
|
||||
{
|
||||
typedef scanner_policies<
|
||||
no_skipper_iteration_policy<
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::iteration_policy_t>,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::match_policy_t,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::action_policy_t
|
||||
> policies_t;
|
||||
|
||||
scan.skip(scan);
|
||||
RT hit = s.parse(scan.change_policies(policies_t(scan)));
|
||||
// We will not do a post skip!!!
|
||||
return hit;
|
||||
}
|
||||
|
||||
template <typename RT, typename ST, typename ScannerT, typename BaseT>
|
||||
inline RT
|
||||
contiguous_parser_parse(
|
||||
ST const& s,
|
||||
ScannerT const& scan,
|
||||
no_skipper_iteration_policy<BaseT> const&)
|
||||
{
|
||||
return s.parse(scan);
|
||||
}
|
||||
|
||||
template <typename RT, typename ST, typename ScannerT>
|
||||
inline RT
|
||||
contiguous_parser_parse(
|
||||
ST const& s,
|
||||
ScannerT const& scan,
|
||||
iteration_policy const&)
|
||||
{
|
||||
return s.parse(scan);
|
||||
}
|
||||
|
||||
template <
|
||||
typename RT,
|
||||
typename ParserT,
|
||||
typename ScannerT,
|
||||
typename BaseT>
|
||||
inline RT
|
||||
implicit_lexeme_parse(
|
||||
ParserT const& p,
|
||||
ScannerT const& scan,
|
||||
skipper_iteration_policy<BaseT> const&)
|
||||
{
|
||||
typedef scanner_policies<
|
||||
no_skipper_iteration_policy<
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::iteration_policy_t>,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::match_policy_t,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::action_policy_t
|
||||
> policies_t;
|
||||
|
||||
scan.skip(scan);
|
||||
RT hit = p.parse_main(scan.change_policies(policies_t(scan)));
|
||||
// We will not do a post skip!!!
|
||||
return hit;
|
||||
}
|
||||
|
||||
template <
|
||||
typename RT,
|
||||
typename ParserT,
|
||||
typename ScannerT,
|
||||
typename BaseT>
|
||||
inline RT
|
||||
implicit_lexeme_parse(
|
||||
ParserT const& p,
|
||||
ScannerT const& scan,
|
||||
no_skipper_iteration_policy<BaseT> const&)
|
||||
{
|
||||
return p.parse_main(scan);
|
||||
}
|
||||
|
||||
template <typename RT, typename ParserT, typename ScannerT>
|
||||
inline RT
|
||||
implicit_lexeme_parse(
|
||||
ParserT const& p,
|
||||
ScannerT const& scan,
|
||||
iteration_policy const&)
|
||||
{
|
||||
return p.parse_main(scan);
|
||||
}
|
||||
|
||||
template <typename RT, typename ST, typename ScannerT>
|
||||
inline RT
|
||||
inhibit_case_parser_parse(
|
||||
ST const& s,
|
||||
ScannerT const& scan,
|
||||
iteration_policy const&)
|
||||
{
|
||||
typedef scanner_policies<
|
||||
inhibit_case_iteration_policy<
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::iteration_policy_t>,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::match_policy_t,
|
||||
BOOST_DEDUCED_TYPENAME ScannerT::action_policy_t
|
||||
> policies_t;
|
||||
|
||||
return s.parse(scan.change_policies(policies_t(scan)));
|
||||
}
|
||||
|
||||
template <typename RT, typename ST, typename ScannerT, typename BaseT>
|
||||
inline RT
|
||||
inhibit_case_parser_parse(
|
||||
ST const& s,
|
||||
ScannerT const& scan,
|
||||
inhibit_case_iteration_policy<BaseT> const&)
|
||||
{
|
||||
return s.parse(scan);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct to_longest_alternative
|
||||
{
|
||||
typedef T result_t;
|
||||
static result_t const&
|
||||
convert(T const& a) // Special (end) case
|
||||
{ return a; }
|
||||
};
|
||||
|
||||
template <typename A, typename B>
|
||||
struct to_longest_alternative<alternative<A, B> >
|
||||
{
|
||||
typedef typename to_longest_alternative<A>::result_t a_t;
|
||||
typedef typename to_longest_alternative<B>::result_t b_t;
|
||||
typedef longest_alternative<a_t, b_t> result_t;
|
||||
|
||||
static result_t
|
||||
convert(alternative<A, B> const& alt) // Recursive case
|
||||
{
|
||||
return result_t(
|
||||
to_longest_alternative<A>::convert(alt.left()),
|
||||
to_longest_alternative<B>::convert(alt.right()));
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct to_shortest_alternative
|
||||
{
|
||||
typedef T result_t;
|
||||
static result_t const&
|
||||
convert(T const& a) // Special (end) case
|
||||
{ return a; }
|
||||
};
|
||||
|
||||
template <typename A, typename B>
|
||||
struct to_shortest_alternative<alternative<A, B> >
|
||||
{
|
||||
typedef typename to_shortest_alternative<A>::result_t a_t;
|
||||
typedef typename to_shortest_alternative<B>::result_t b_t;
|
||||
typedef shortest_alternative<a_t, b_t> result_t;
|
||||
|
||||
static result_t
|
||||
convert(alternative<A, B> const& alt) // Recursive case
|
||||
{
|
||||
return result_t(
|
||||
to_shortest_alternative<A>::convert(alt.left()),
|
||||
to_shortest_alternative<B>::convert(alt.right()));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
BOOST_SPIRIT_CLASSIC_NAMESPACE_END
|
||||
|
||||
}} // namespace boost::spirit
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
// (C) Copyright John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/static_assert for documentation.
|
||||
|
||||
/*
|
||||
Revision history:
|
||||
02 August 2000
|
||||
Initial version.
|
||||
*/
|
||||
|
||||
#ifndef BOOST_STATIC_ASSERT_HPP
|
||||
#define BOOST_STATIC_ASSERT_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
//
|
||||
// This is horrible, but it seems to be the only we can shut up the
|
||||
// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]"
|
||||
// warning that get spewed out otherwise in non-C++11 mode.
|
||||
//
|
||||
#pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg )
|
||||
# endif
|
||||
#else
|
||||
# define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B )
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
//
|
||||
// workaround for buggy integral-constant expression support:
|
||||
#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4))
|
||||
// gcc 3.3 and 3.4 don't produce good error messages with the default version:
|
||||
# define BOOST_SA_GCC_WORKAROUND
|
||||
#endif
|
||||
|
||||
//
|
||||
// If the compiler issues warnings about old C style casts,
|
||||
// then enable this:
|
||||
//
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4)))
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true)
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true)
|
||||
# endif
|
||||
#else
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT( B ) static_assert(B, #B)
|
||||
# endif
|
||||
#else
|
||||
|
||||
namespace boost{
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
template <bool x> struct STATIC_ASSERTION_FAILURE;
|
||||
|
||||
template <> struct STATIC_ASSERTION_FAILURE<true> { enum { value = 1 }; };
|
||||
|
||||
// HP aCC cannot deal with missing names for template value parameters
|
||||
template<int x> struct static_assert_test{};
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// Implicit instantiation requires that all member declarations be
|
||||
// instantiated, but that the definitions are *not* instantiated.
|
||||
//
|
||||
// It's not particularly clear how this applies to enum's or typedefs;
|
||||
// both are described as declarations [7.1.3] and [7.2] in the standard,
|
||||
// however some compilers use "delayed evaluation" of one or more of
|
||||
// these when implicitly instantiating templates. We use typedef declarations
|
||||
// by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum
|
||||
// version gets better results from your compiler...
|
||||
//
|
||||
// Implementation:
|
||||
// Both of these versions rely on sizeof(incomplete_type) generating an error
|
||||
// message containing the name of the incomplete type. We use
|
||||
// "STATIC_ASSERTION_FAILURE" as the type name here to generate
|
||||
// an eye catching error message. The result of the sizeof expression is either
|
||||
// used as an enum initialiser, or as a template argument depending which version
|
||||
// is in use...
|
||||
// Note that the argument to the assert is explicitly cast to bool using old-
|
||||
// style casts: too many compilers currently have problems with static_cast
|
||||
// when used inside integral constant expressions.
|
||||
//
|
||||
#if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS)
|
||||
|
||||
#if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
|
||||
#elif defined(BOOST_MSVC)
|
||||
#define BOOST_STATIC_ASSERT(...) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__)
|
||||
#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
||||
// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
|
||||
// instead of warning in case of failure
|
||||
# define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
|
||||
[ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ]
|
||||
#elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS)
|
||||
// agurt 15/sep/02: a special care is needed to force Intel C++ issue an error
|
||||
// instead of warning in case of failure
|
||||
# define BOOST_STATIC_ASSERT(...) \
|
||||
typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \
|
||||
[ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ]
|
||||
#elif defined(__sgi)
|
||||
// special version for SGI MIPSpro compiler
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
BOOST_STATIC_CONSTANT(bool, \
|
||||
BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< \
|
||||
BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__)
|
||||
#elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003)
|
||||
// special version for CodeWarrior <= 8.x
|
||||
#define BOOST_STATIC_ASSERT( B ) \
|
||||
BOOST_STATIC_CONSTANT(int, \
|
||||
BOOST_JOIN(boost_static_assert_test_, __LINE__) = \
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) )
|
||||
#else
|
||||
// generic version
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT( ... ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT( B ) \
|
||||
typedef ::boost::static_assert_test<\
|
||||
sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\
|
||||
BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
// alternative enum based implementation:
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_STATIC_ASSERT( ... ) \
|
||||
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
|
||||
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) }
|
||||
# else
|
||||
# define BOOST_STATIC_ASSERT(B) \
|
||||
enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \
|
||||
= sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) }
|
||||
# endif
|
||||
#endif
|
||||
#endif // defined(BOOST_NO_CXX11_STATIC_ASSERT)
|
||||
|
||||
#endif // BOOST_STATIC_ASSERT_HPP
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef BOOST_THREAD_ONCE_HPP
|
||||
#define BOOST_THREAD_ONCE_HPP
|
||||
|
||||
// once.hpp
|
||||
//
|
||||
// (C) Copyright 2006-7 Anthony Williams
|
||||
//
|
||||
// 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/thread/detail/config.hpp>
|
||||
#include <boost/thread/detail/platform.hpp>
|
||||
#if defined(BOOST_THREAD_PLATFORM_WIN32)
|
||||
#include <boost/thread/win32/once.hpp>
|
||||
#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
|
||||
#if defined BOOST_THREAD_ONCE_FAST_EPOCH
|
||||
#include <boost/thread/pthread/once.hpp>
|
||||
#elif defined BOOST_THREAD_ONCE_ATOMIC
|
||||
#include <boost/thread/pthread/once_atomic.hpp>
|
||||
#else
|
||||
#error "Once Not Implemented"
|
||||
#endif
|
||||
#else
|
||||
#error "Boost threads unavailable on this platform"
|
||||
#endif
|
||||
|
||||
#include <boost/config/abi_prefix.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
// template<class Callable, class ...Args> void
|
||||
// call_once(once_flag& flag, Callable&& func, Args&&... args);
|
||||
template<typename Function>
|
||||
inline void call_once(Function func,once_flag& flag)
|
||||
//inline void call_once(void (*func)(),once_flag& flag)
|
||||
{
|
||||
call_once(flag,func);
|
||||
}
|
||||
}
|
||||
|
||||
#include <boost/config/abi_suffix.hpp>
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user