xgboost

Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
xgboost::BitFieldContainer< VT, Direction > Struct Template Reference

A non-owning type with auxiliary methods defined for manipulating bits. More...

`#include <bitfield.h>`

Collaboration diagram for xgboost::BitFieldContainer< VT, Direction >:

## Classes
struct | Pos

## Public Types
using | value_type = VT
using | pointer = value_type *

## Public Member Functions
| BitFieldContainer ()=default
XGBOOST_DEVICE | BitFieldContainer (common::Span< value_type > bits)
XGBOOST_DEVICE | BitFieldContainer (BitFieldContainer const &other)
common::Span< value_type > | Bits ()
common::Span< value_type const > | Bits () const
BitFieldContainer & | operator|= (BitFieldContainer const &rhs)
BitFieldContainer & | operator &= (BitFieldContainer const &rhs)
void | Set (value_type pos)
void | Clear (value_type pos)
XGBOOST_DEVICE bool | Check (Pos pos_v) const
XGBOOST_DEVICE bool | Check (value_type pos) const
XGBOOST_DEVICE size_t | Size () const
XGBOOST_DEVICE pointer | Data () const

## Static Public Member Functions
static size_t | ComputeStorageSize (size_t size)

## Static Public Attributes
static value_type constexpr | kValueSize = sizeof(value_type) * 8
static value_type constexpr | kOne = 1

## Friends
std::ostream & | operator<< (std::ostream &os, BitFieldContainer< VT, Direction > field)

## Detailed Description

### template<typename VT, typename Direction>
struct xgboost::BitFieldContainer< VT, Direction >

A non-owning type with auxiliary methods defined for manipulating bits.

Template Parameters

  Direction | Whether the bits start from left or from right.

## Member Typedef Documentation

## ◆ pointer

template<typename VT, typename Direction>

using xgboost::BitFieldContainer< VT, Direction >::pointer = value_type*

## ◆ value_type

template<typename VT, typename Direction>

using xgboost::BitFieldContainer< VT, Direction >::value_type = VT

## Constructor & Destructor Documentation

## ◆ BitFieldContainer() [1/3]

template<typename VT, typename Direction>

xgboost::BitFieldContainer< VT, Direction >::BitFieldContainer | ( |  | ) |
| default

## ◆ BitFieldContainer() [2/3]

template<typename VT, typename Direction>

XGBOOST_DEVICE xgboost::BitFieldContainer< VT, Direction >::BitFieldContainer | ( | common::Span< value_type > | bits | ) |
| inline explicit

## ◆ BitFieldContainer() [3/3]

template<typename VT, typename Direction>

XGBOOST_DEVICE xgboost::BitFieldContainer< VT, Direction >::BitFieldContainer | ( | BitFieldContainer< VT, Direction > const & | other | ) |
| inline

## Member Function Documentation

## ◆ Bits() [1/2]

template<typename VT, typename Direction>

common::Span<value_type> xgboost::BitFieldContainer< VT, Direction >::Bits | ( |  | ) |
| inline

## ◆ Bits() [2/2]

template<typename VT, typename Direction>

common::Span<value_type const> xgboost::BitFieldContainer< VT, Direction >::Bits | ( |  | ) | const
| inline

## ◆ Check() [1/2]

template<typename VT, typename Direction>

XGBOOST_DEVICE bool xgboost::BitFieldContainer< VT, Direction >::Check | ( | Pos | pos_v | ) | const
| inline

## ◆ Check() [2/2]

template<typename VT, typename Direction>

XGBOOST_DEVICE bool xgboost::BitFieldContainer< VT, Direction >::Check | ( | value_type | pos | ) | const
| inline

## ◆ Clear()

template<typename VT, typename Direction>

void xgboost::BitFieldContainer< VT, Direction >::Clear | ( | value_type | pos | ) |
| inline

## ◆ ComputeStorageSize()

template<typename VT, typename Direction>

static size_t xgboost::BitFieldContainer< VT, Direction >::ComputeStorageSize | ( | size_t | size | ) |
| inline static

## ◆ Data()

template<typename VT, typename Direction>

XGBOOST_DEVICE pointer xgboost::BitFieldContainer< VT, Direction >::Data | ( |  | ) | const
| inline

## ◆ operator &=()

template<typename VT, typename Direction>

BitFieldContainer& xgboost::BitFieldContainer< VT, Direction >::operator&= | ( | BitFieldContainer< VT, Direction > const & | rhs | ) |
| inline

## ◆ operator|=()

template<typename VT, typename Direction>

BitFieldContainer& xgboost::BitFieldContainer< VT, Direction >::operator|= | ( | BitFieldContainer< VT, Direction > const & | rhs | ) |
| inline

## ◆ Set()

template<typename VT, typename Direction>

void xgboost::BitFieldContainer< VT, Direction >::Set | ( | value_type | pos | ) |
| inline

## ◆ Size()

template<typename VT, typename Direction>

XGBOOST_DEVICE size_t xgboost::BitFieldContainer< VT, Direction >::Size | ( |  | ) | const
| inline

## Friends And Related Function Documentation

## ◆ operator<<

template<typename VT, typename Direction>

std::ostream& operator<< | ( | std::ostream & | os,
|  | BitFieldContainer< VT, Direction > | field
| ) |  |
| friend

## Member Data Documentation

## ◆ kOne

template<typename VT, typename Direction>

value_type constexpr xgboost::BitFieldContainer< VT, Direction >::kOne = 1
| static

## ◆ kValueSize

template<typename VT, typename Direction>

value_type constexpr xgboost::BitFieldContainer< VT, Direction >::kValueSize = sizeof(value_type) * 8
| static

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

- /workspace/src/common/bitfield.h