Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
bitwise.hpp File Reference
This graph shows which files directly or indirectly include this file:

Classes

struct  boost::multiprecision::backends::bit_and
 
struct  boost::multiprecision::backends::bit_or
 
struct  boost::multiprecision::backends::bit_xor
 

Namespaces

 boost
 Duration formatting facet for input.
 
 boost::multiprecision
 
 boost::multiprecision::backends
 

Functions

template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
void boost::multiprecision::backends::is_valid_bitwise_op (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o, const mpl::int_< checked > &)
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
void boost::multiprecision::backends::is_valid_bitwise_op (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &, const mpl::int_< unchecked > &)
 
template<class CppInt1 , class CppInt2 , class Op >
void boost::multiprecision::backends::bitwise_op (CppInt1 &result, const CppInt2 &o, Op op, const mpl::true_ &) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< CppInt1 >
 
template<class CppInt1 , class CppInt2 , class Op >
void boost::multiprecision::backends::bitwise_op (CppInt1 &result, const CppInt2 &o, Op op, const mpl::false_ &) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< CppInt1 >
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_and (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_or (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_xor (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, unsigned_magnitude,
Checked1, Allocator1 >
>::value >::type 
boost::multiprecision::backends::eval_bitwise_and (cpp_int_backend< MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1 > &result, limb_type l) BOOST_NOEXCEPT
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, unsigned_magnitude,
Checked1, Allocator1 >
>::value >::type 
boost::multiprecision::backends::eval_bitwise_or (cpp_int_backend< MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1 > &result, limb_type l) BOOST_NOEXCEPT
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1 >
BOOST_MP_FORCEINLINE
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, unsigned_magnitude,
Checked1, Allocator1 >
>::value >::type 
boost::multiprecision::backends::eval_bitwise_xor (cpp_int_backend< MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1 > &result, limb_type l) BOOST_NOEXCEPT
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
BOOST_MP_FORCEINLINE
enable_if_c< is_signed_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_complement (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
 boost::multiprecision::backends::eval_increment (result)
 
result boost::multiprecision::backends::negate ()
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 >
BOOST_MP_FORCEINLINE
enable_if_c
< is_unsigned_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value >::type 
boost::multiprecision::backends::eval_complement (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
result boost::multiprecision::backends::resize (UINT_MAX, os)
 
 boost::multiprecision::backends::for (unsigned i=0;i< os;++i) result.limbs()[i] = ~static_cast<limb_type>(0)
 
result boost::multiprecision::backends::normalize ()
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 >
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value >::type 
boost::multiprecision::backends::eval_left_shift (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, double_limb_type s) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
 boost::multiprecision::backends::if ((ors==1)&&(!*result.limbs())) return
 
 boost::multiprecision::backends::if (shift &&(result.limbs()[ors-1] >>(cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 >::limb_bits-shift)))++rs
 
result boost::multiprecision::backends::resize (rs, rs)
 
 boost::multiprecision::backends::if (offset > rs)
 
 boost::multiprecision::backends::if (shift)
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 >
enable_if_c
<!is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value >::type 
boost::multiprecision::backends::eval_right_shift (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, double_limb_type s) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
 boost::multiprecision::backends::if (offset >=rs)
 
 boost::multiprecision::backends::if ((pr[ors-1] >> shift)==0)--rs
 
 boost::multiprecision::backends::if (rs==0)
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , class T >
BOOST_MP_FORCEINLINE enable_if
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > > >::type 
boost::multiprecision::backends::eval_left_shift (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, T s) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , class T >
BOOST_MP_FORCEINLINE enable_if
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > > >::type 
boost::multiprecision::backends::eval_right_shift (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, T s) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&(is_signed_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value||is_signed_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value) >::type 
boost::multiprecision::backends::eval_bitwise_and (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
 boost::multiprecision::backends::if (result.sign()||o.sign())
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_and (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&(is_signed_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value||is_signed_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value) >::type 
boost::multiprecision::backends::eval_bitwise_or (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_or (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&(is_signed_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value||is_signed_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value) >::type 
boost::multiprecision::backends::eval_bitwise_xor (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_bitwise_xor (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&(is_signed_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value||is_signed_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value) >::type 
boost::multiprecision::backends::eval_complement (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 
 boost::multiprecision::backends::if (o.sign())
 
result boost::multiprecision::backends::sign (true)
 
template<unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1 , unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2 >
enable_if_c
< is_trivial_cpp_int
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_trivial_cpp_int
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 > >::value
&&is_unsigned_number
< cpp_int_backend< MinBits2,
MaxBits2, SignType2, Checked2,
Allocator2 > >::value >::type 
boost::multiprecision::backends::eval_complement (cpp_int_backend< MinBits1, MaxBits1, SignType1, Checked1, Allocator1 > &result, const cpp_int_backend< MinBits2, MaxBits2, SignType2, Checked2, Allocator2 > &o) BOOST_NOEXCEPT_IF((is_non_throwing_cpp_int< cpp_int_backend< MinBits1
 

Variables

limb_type boost::multiprecision::backends::offset = static_cast<limb_type>(s / cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits)
 
limb_type boost::multiprecision::backends::shift = static_cast<limb_type>(s % cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits)
 
unsigned boost::multiprecision::backends::ors = result.size()
 
unsigned boost::multiprecision::backends::rs = ors
 
bool boost::multiprecision::backends::truncated = result.size() != rs
 
cpp_int_backend< MinBits1,
MaxBits1, SignType1, Checked1,
Allocator1 >::limb_pointer 
boost::multiprecision::backends::pr = result.limbs()
 
unsigned boost::multiprecision::backends::i = rs - result.size()
 
 boost::multiprecision::backends::else