hops
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
pcg_extras::uint_x4< UInt, UIntX2 > Class Template Reference

#include <pcg_uint128.hpp>

Collaboration diagram for pcg_extras::uint_x4< UInt, UIntX2 >:
Collaboration graph

Public Types

typedef std::conditional< std::is_same< uint64_t, unsigned long >::value, unsigned long long, unsigned long >::type uint_missing_t
 

Public Member Functions

 uint_x4 ()=default
 
constexpr uint_x4 (UInt v3, UInt v2, UInt v1, UInt v0)
 
constexpr uint_x4 (UIntX2 v23, UIntX2 v01)
 
template<class Integral , typename std::enable_if<(std::is_integral< Integral >::value &&sizeof(Integral)<=sizeof(UIntX2)) >::type * = nullptr>
constexpr uint_x4 (Integral v01)
 
constexpr operator uint64_t () const
 
constexpr operator uint32_t () const
 
constexpr operator int () const
 
constexpr operator uint16_t () const
 
constexpr operator uint8_t () const
 
constexpr operator uint_missing_t () const
 
constexpr operator bool () const
 
uint_x4operator*= (const uint_x4 &rhs)
 
uint_x4operator/= (const uint_x4 &rhs)
 
uint_x4operator%= (const uint_x4 &rhs)
 
uint_x4operator+= (const uint_x4 &rhs)
 
uint_x4operator-= (const uint_x4 &rhs)
 
uint_x4operator&= (const uint_x4 &rhs)
 
uint_x4operator|= (const uint_x4 &rhs)
 
uint_x4operator^= (const uint_x4 &rhs)
 
uint_x4operator>>= (bitcount_t shift)
 
uint_x4operator<<= (bitcount_t shift)
 

Public Attributes

union {
   struct {
      UInt   v3
 
      UInt   v2
 
      UInt   v1
 
      UInt   v0
 
   }   w
 
   struct {
      UIntX2   v23
 
      UIntX2   v01
 
   }   d
 
   UInt   wa [4]
 
   UIntX2   da [2]
 
}; 
 

Friends

template<typename U , typename V >
uint_x4< U, V > operator* (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
std::pair< uint_x4< U, V >, uint_x4< U, V > > divmod (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator+ (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator- (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator<< (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator>> (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator& (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator| (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator^ (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator== (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator!= (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator< (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator<= (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator> (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
bool operator>= (const uint_x4< U, V > &, const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator~ (const uint_x4< U, V > &)
 
template<typename U , typename V >
uint_x4< U, V > operator- (const uint_x4< U, V > &)
 
template<typename U , typename V >
bitcount_t flog2 (const uint_x4< U, V > &)
 
template<typename U , typename V >
bitcount_t trailingzeros (const uint_x4< U, V > &)
 

Member Typedef Documentation

◆ uint_missing_t

template<typename UInt , typename UIntX2 >
typedef std::conditional<std::is_same<uint64_t, unsigned long>::value, unsigned long long, unsigned long>::type pcg_extras::uint_x4< UInt, UIntX2 >::uint_missing_t

Constructor & Destructor Documentation

◆ uint_x4() [1/4]

template<typename UInt , typename UIntX2 >
pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( )
default

◆ uint_x4() [2/4]

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( UInt  v3,
UInt  v2,
UInt  v1,
UInt  v0 
)
inlineconstexpr

◆ uint_x4() [3/4]

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( UIntX2  v23,
UIntX2  v01 
)
inlineconstexpr

◆ uint_x4() [4/4]

template<typename UInt , typename UIntX2 >
template<class Integral , typename std::enable_if<(std::is_integral< Integral >::value &&sizeof(Integral)<=sizeof(UIntX2)) >::type * = nullptr>
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( Integral  v01)
inlineconstexpr

Member Function Documentation

◆ operator bool()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator bool ( ) const
inlineexplicitconstexpr

◆ operator int()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator int ( ) const
inlineexplicitconstexpr

◆ operator uint16_t()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator uint16_t ( ) const
inlineexplicitconstexpr

◆ operator uint32_t()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator uint32_t ( ) const
inlineexplicitconstexpr

◆ operator uint64_t()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator uint64_t ( ) const
inlineexplicitconstexpr

◆ operator uint8_t()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator uint8_t ( ) const
inlineexplicitconstexpr

◆ operator uint_missing_t()

template<typename UInt , typename UIntX2 >
constexpr pcg_extras::uint_x4< UInt, UIntX2 >::operator uint_missing_t ( ) const
inlineexplicitconstexpr

◆ operator%=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator%= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator&=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator&= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator*=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator*= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator+=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator+= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator-=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator-= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator/=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator/= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator<<=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator<<= ( bitcount_t  shift)
inline

◆ operator>>=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator>>= ( bitcount_t  shift)
inline

◆ operator^=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator^= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

◆ operator|=()

template<typename UInt , typename UIntX2 >
uint_x4& pcg_extras::uint_x4< UInt, UIntX2 >::operator|= ( const uint_x4< UInt, UIntX2 > &  rhs)
inline

Friends And Related Function Documentation

◆ divmod

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
std::pair< uint_x4<U,V>,uint_x4<U,V> > divmod ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ flog2

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bitcount_t flog2 ( const uint_x4< U, V > &  v)
friend

◆ operator!=

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator!= ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator&

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator& ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator*

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator* ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator+

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator+ ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator- [1/2]

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator- ( const uint_x4< U, V > &  )
friend

◆ operator- [2/2]

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator- ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator<

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator< ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator<<

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator<< ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator<=

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator<= ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator==

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator== ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator>

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator> ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator>=

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bool operator>= ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator>>

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator>> ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator^

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator^ ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator|

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator| ( const uint_x4< U, V > &  ,
const uint_x4< U, V > &   
)
friend

◆ operator~

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
uint_x4<U,V> operator~ ( const uint_x4< U, V > &  )
friend

◆ trailingzeros

template<typename UInt , typename UIntX2 >
template<typename U , typename V >
bitcount_t trailingzeros ( const uint_x4< U, V > &  v)
friend

Member Data Documentation

◆ @2

union { ... }

◆ d

struct { ... } pcg_extras::uint_x4< UInt, UIntX2 >::d

◆ da

template<typename UInt , typename UIntX2 >
UIntX2 pcg_extras::uint_x4< UInt, UIntX2 >::da[2]

◆ v0

template<typename UInt , typename UIntX2 >
UInt pcg_extras::uint_x4< UInt, UIntX2 >::v0

◆ v01

template<typename UInt , typename UIntX2 >
UIntX2 pcg_extras::uint_x4< UInt, UIntX2 >::v01

◆ v1

template<typename UInt , typename UIntX2 >
UInt pcg_extras::uint_x4< UInt, UIntX2 >::v1

◆ v2

template<typename UInt , typename UIntX2 >
UInt pcg_extras::uint_x4< UInt, UIntX2 >::v2

◆ v23

template<typename UInt , typename UIntX2 >
UIntX2 pcg_extras::uint_x4< UInt, UIntX2 >::v23

◆ v3

template<typename UInt , typename UIntX2 >
UInt pcg_extras::uint_x4< UInt, UIntX2 >::v3

◆ w

struct { ... } pcg_extras::uint_x4< UInt, UIntX2 >::w

◆ wa

template<typename UInt , typename UIntX2 >
UInt pcg_extras::uint_x4< UInt, UIntX2 >::wa[4]

The documentation for this class was generated from the following file: