|
Medial Code Documentation
|
A non-owning type with auxiliary methods defined for manipulating bits. More...
#include <bitfield.h>
Data Structures | |
| struct | Pos |
Public Types | |
| using | value_type = std::conditional_t< IsConst, VT const, VT > |
| using | size_type = size_t |
| using | index_type = size_t |
| using | pointer = value_type * |
Public Member Functions | |
| XGBOOST_DEVICE | BitFieldContainer (common::Span< value_type > bits) |
| BitFieldContainer (BitFieldContainer const &other)=default | |
| BitFieldContainer (BitFieldContainer &&other)=default | |
| BitFieldContainer & | operator= (BitFieldContainer const &that)=default |
| BitFieldContainer & | operator= (BitFieldContainer &&that)=default |
| XGBOOST_DEVICE auto | Bits () |
| XGBOOST_DEVICE auto | Bits () const |
| BitFieldContainer & | operator|= (BitFieldContainer const &rhs) |
| BitFieldContainer & | operator&= (BitFieldContainer const &rhs) |
| void | Set (index_type pos) noexcept(true) |
| void | Clear (index_type pos) noexcept(true) |
| XGBOOST_DEVICE bool | Check (Pos pos_v) const noexcept(true) |
| XGBOOST_DEVICE bool | Check (index_type pos) const noexcept(true) |
| XGBOOST_DEVICE size_type | Capacity () const noexcept(true) |
| Returns the total number of bits that can be viewed. | |
| XGBOOST_DEVICE size_type | NumValues () const noexcept(true) |
| Number of storage unit used in this bit field. | |
| XGBOOST_DEVICE pointer | Data () const noexcept(true) |
Static Public Member Functions | |
| static XGBOOST_DEVICE Pos | ToBitPos (index_type pos) |
| static XGBOOST_DEVICE size_t | ComputeStorageSize (index_type size) |
Static Public Attributes | |
| static index_type constexpr | kValueSize = sizeof(value_type) * 8 |
| static index_type constexpr | kOne = 1 |
Friends | |
| std::ostream & | operator<< (std::ostream &os, BitFieldContainer< VT, Direction, IsConst > field) |
A non-owning type with auxiliary methods defined for manipulating bits.
| VT | Underlying value type, must be an unsigned integer. |
| Direction | Whether the bits start from left or from right. |
| IsConst | Whether the view is const. |
|
inlinenoexcept |
Returns the total number of bits that can be viewed.
This is equal to or larger than the acutal number of valid bits.