Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
pcg_extras::uint_x4< UInt, UIntX2 > Class Template Reference

Public Member Functions

constexpr uint_x4 (UInt v3, UInt v2, UInt v1, UInt v0)
constexpr uint_x4 (UIntX2 v23, UIntX2 v01)
constexpr uint_x4 (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 UIntX2 () const
template<class Integral, typename std::enable_if<(std::is_integral< Integral >::value &&sizeof(Integral)<=sizeof(UIntX2)) >::type * = nullptr>
constexpr operator Integral () const
constexpr operator bool () const
uint_x4 & operator*= (const uint_x4 &rhs)
uint_x4 & operator*= (UIntX2 rhs)
uint_x4 & operator/= (const uint_x4 &rhs)
uint_x4 & operator%= (const uint_x4 &rhs)
uint_x4 & operator+= (const uint_x4 &rhs)
uint_x4 & operator-= (const uint_x4 &rhs)
uint_x4 & operator&= (const uint_x4 &rhs)
uint_x4 & operator|= (const uint_x4 &rhs)
uint_x4 & operator^= (const uint_x4 &rhs)
uint_x4 & operator>>= (bitcount_t shift)
uint_x4 & operator<<= (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] 
}; 

Static Private Attributes

static constexpr unsigned int UINT_BITS = sizeof(UInt) * CHAR_BIT

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>
uint_x4< U, V > operator* (const uint_x4< U, V > &, 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 bitcount_t shift)
template<typename U, typename V>
uint_x4< U, V > operator>> (const uint_x4< U, V > &, const bitcount_t shift)
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 > &v)
template<typename U, typename V>
bitcount_t trailingzeros (const uint_x4< U, V > &v)

Constructor & Destructor Documentation

◆ uint_x4() [1/4]

template<typename UInt, typename UIntX2>
pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( UInt v3,
UInt v2,
UInt v1,
UInt v0 )
inlineconstexpr
94364 : w{v0, v1, v2, v3}
94365#else
94366 : w{v3, v2, v1, v0}
94367#endif
94368 {
94369 // Nothing (else) to do
94370 }

◆ uint_x4() [2/4]

template<typename UInt, typename UIntX2>
pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( UIntX2 v23,
UIntX2 v01 )
inlineconstexpr
94374 : d{v01,v23}
94375#else
94376 : d{v23,v01}
94377#endif
94378 {
94379 // Nothing (else) to do
94380 }

◆ uint_x4() [3/4]

template<typename UInt, typename UIntX2>
pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( UIntX2 v01)
inlineconstexpr
94384 : d{v01, UIntX2(0)}
94385#else
94386 : d{UIntX2(0),v01}
94387#endif
94388 {
94389 // Nothing (else) to do
94390 }
Definition duckdb.cpp:94333

◆ 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>
pcg_extras::uint_x4< UInt, UIntX2 >::uint_x4 ( Integral v01)
inlineconstexpr
94398 : d{UIntX2(v01), UIntX2(0)}
94399#else
94400 : d{UIntX2(0), UIntX2(v01)}
94401#endif
94402 {
94403 // Nothing (else) to do
94404 }

Member Function Documentation

◆ operator UIntX2()

template<typename UInt, typename UIntX2>
pcg_extras::uint_x4< UInt, UIntX2 >::operator UIntX2 ( ) const
inlineexplicitconstexpr
94407 {
94408 return d.v01;
94409 }

◆ operator Integral()

template<typename UInt, typename UIntX2>
template<class Integral, typename std::enable_if<(std::is_integral< Integral >::value &&sizeof(Integral)<=sizeof(UIntX2)) >::type * = nullptr>
pcg_extras::uint_x4< UInt, UIntX2 >::operator Integral ( ) const
inlineexplicitconstexpr
94416 {
94417 return Integral(d.v01);
94418 }

◆ operator bool()

template<typename UInt, typename UIntX2>
pcg_extras::uint_x4< UInt, UIntX2 >::operator bool ( ) const
inlineexplicitconstexpr
94421 {
94422 return d.v01 || d.v23;
94423 }

◆ operator*=() [1/2]

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator*= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94487 {
94488 uint_x4 result = *this * rhs;
94489 return *this = result;
94490 }

◆ operator*=() [2/2]

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator*= ( UIntX2 rhs)
inline
94493 {
94494 uint_x4 result = *this * rhs;
94495 return *this = result;
94496 }

◆ operator/=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator/= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94499 {
94500 uint_x4 result = *this / rhs;
94501 return *this = result;
94502 }

◆ operator%=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator%= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94505 {
94506 uint_x4 result = *this % rhs;
94507 return *this = result;
94508 }

◆ operator+=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator+= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94511 {
94512 uint_x4 result = *this + rhs;
94513 return *this = result;
94514 }

◆ operator-=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator-= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94517 {
94518 uint_x4 result = *this - rhs;
94519 return *this = result;
94520 }

◆ operator&=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator&= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94523 {
94524 uint_x4 result = *this & rhs;
94525 return *this = result;
94526 }

◆ operator|=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator|= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94529 {
94530 uint_x4 result = *this | rhs;
94531 return *this = result;
94532 }

◆ operator^=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator^= ( const uint_x4< UInt, UIntX2 > & rhs)
inline
94535 {
94536 uint_x4 result = *this ^ rhs;
94537 return *this = result;
94538 }

◆ operator>>=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator>>= ( bitcount_t shift)
inline
94541 {
94542 uint_x4 result = *this >> shift;
94543 return *this = result;
94544 }

◆ operator<<=()

template<typename UInt, typename UIntX2>
uint_x4 & pcg_extras::uint_x4< UInt, UIntX2 >::operator<<= ( bitcount_t shift)
inline
94547 {
94548 uint_x4 result = *this << shift;
94549 return *this = result;
94550 }

◆ flog2

template<typename UInt, typename UIntX2>
template<typename U, typename V>
bitcount_t flog2 ( const uint_x4< U, V > & v)
friend
94556{
94557#if PCG_LITTLE_ENDIAN
94558 for (uint8_t i = 4; i !=0; /* dec in loop */) {
94559 --i;
94560#else
94561 for (uint8_t i = 0; i < 4; ++i) {
94562#endif
94563 if (v.wa[i] == 0)
94564 continue;
94565 return flog2(v.wa[i]) + uint_x4<U,V>::UINT_BITS*i;
94566 }
94567 abort();
94568}

◆ trailingzeros

template<typename UInt, typename UIntX2>
template<typename U, typename V>
bitcount_t trailingzeros ( const uint_x4< U, V > & v)
friend
94572{
94573#if PCG_LITTLE_ENDIAN
94574 for (uint8_t i = 0; i < 4; ++i) {
94575#else
94576 for (uint8_t i = 4; i !=0; /* dec in loop */) {
94577 --i;
94578#endif
94579 if (v.wa[i] != 0)
94580 return trailingzeros(v.wa[i]) + uint_x4<U,V>::UINT_BITS*i;
94581 }
94582 return uint_x4<U,V>::UINT_BITS*4;
94583}

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