xgboost
Classes | Typedefs | Functions
xgboost::common::detail Namespace Reference

Classes

struct  ExtentAsBytesValue
 
struct  ExtentValue
 
struct  Greater
 
struct  IsAllowedElementTypeConversion
 
struct  IsAllowedExtentConversion
 
struct  IsSpan
 
struct  IsSpanOracle
 
struct  IsSpanOracle< Span< T, Extent > >
 
struct  Less
 
class  SpanIterator
 

Typedefs

using ptrdiff_t = typename std::conditional< std::is_same< std::ptrdiff_t, std::int64_t >::value, std::ptrdiff_t, std::int64_t >::type
 

Functions

template<class InputIt1 , class InputIt2 , class Compare = detail::Less<decltype(std::declval<InputIt1>().operator*())>>
XGBOOST_DEVICE bool LexicographicalCompare (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2)
 
void SetBit (CompressedByteT *byte, int bit_idx)
 
template<typename T >
CheckBit (const T &byte, int bit_idx)
 
void ClearBit (CompressedByteT *byte, int bit_idx)
 
XGBOOST_DEVICE size_t SymbolBits (size_t num_symbols)
 

Typedef Documentation

◆ ptrdiff_t

using xgboost::common::detail::ptrdiff_t = typedef typename std::conditional< std::is_same<std::ptrdiff_t, std::int64_t>::value, std::ptrdiff_t, std::int64_t>::type

By default, XGBoost uses uint32_t for indexing data. int64_t covers all values uint32_t can represent. Also, On x86-64 Linux, GCC uses long int to represent ptrdiff_t, which is just int64_t. So we make it determinstic here.

Function Documentation

◆ CheckBit()

template<typename T >
T xgboost::common::detail::CheckBit ( const T &  byte,
int  bit_idx 
)
inline

◆ ClearBit()

void xgboost::common::detail::ClearBit ( CompressedByteT byte,
int  bit_idx 
)
inline

◆ LexicographicalCompare()

template<class InputIt1 , class InputIt2 , class Compare = detail::Less<decltype(std::declval<InputIt1>().operator*())>>
XGBOOST_DEVICE bool xgboost::common::detail::LexicographicalCompare ( InputIt1  first1,
InputIt1  last1,
InputIt2  first2,
InputIt2  last2 
)

◆ SetBit()

void xgboost::common::detail::SetBit ( CompressedByteT byte,
int  bit_idx 
)
inline

◆ SymbolBits()

XGBOOST_DEVICE size_t xgboost::common::detail::SymbolBits ( size_t  num_symbols)
inline