osl::misc::BitOp Struct Reference

`#include <mask.h>`

## Static Public Member Functions

template<class Integer>
static int | bsf (Integer mask)
template<class Integer>
static int | bsr (Integer mask)
template<class Integer>
static int | takeOneBit (Integer &mask)
template<class Integer>
static int | countBit (Integer mask)
template<class Integer>
static bool | hasMultipleBit (Integer mask)
template<class Integer>
static Integer | lowestBit (Integer mask)
| non-zeroのmaskのsetされているビットをLSBから探し，そのビットだけがsetされたmaskを返す.

## Detailed Description

Definition at line 135 of file mask.h.

## Member Function Documentation

## bsf()

template<class Integer>

int osl::misc::BitOp::bsf | ( | Integer | mask | ) |

inline static

Definition at line 138 of file mask.h.

Referenced by osl::move_probability::StateInfo::findCheckmateDefender(), osl::move_probability::AddEffectLong::match(), osl::move_probability::KingBlockade::match(), takeOneBit(), and osl::move_probability::StateInfo::updatePinnedGenerals().

## bsr()

template<class Integer>

int osl::misc::BitOp::bsr | ( | Integer | mask | ) |

inline static

Definition at line 143 of file mask.h.

## countBit()

template<class Integer>

int osl::misc::BitOp::countBit | ( | Integer | mask | ) |

inline static

Definition at line 160 of file mask.h.

Referenced by osl::PieceStand::atMostOneKind(), osl::checkmate::Dfpn::attack(), osl::checkmate::ProofNumberTable::countLiberty(), osl::checkmate::Dfpn::defense(), osl::checkmate::ProofNumberTable::disproofAfterAllCheck(), osl::checkmate::ProofNumberTable::init(), osl::checkmate::EdgeTable::resetEdgeFromLiberty(), and osl::checkmate::DfpnTable::List::testTable().

## hasMultipleBit()

template<class Integer>

bool osl::misc::BitOp::hasMultipleBit | ( | Integer | mask | ) |

inline static

Definition at line 171 of file mask.h.

## lowestBit()

template<class Integer>

Integer osl::misc::BitOp::lowestBit | ( | Integer | mask | ) |

inline static

non-zeroのmaskのsetされているビットをLSBから探し，そのビットだけがsetされたmaskを返す.

Definition at line 179 of file mask.h.

## takeOneBit()

template<class Integer>

int osl::misc::BitOp::takeOneBit | ( | Integer & | mask | ) |

inline static

Definition at line 148 of file mask.h.

References bsf().

Referenced by osl::effect_util::SendOffSquare::Table::init(), and osl::effect_util::SendOffSquare::unpack().

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

- mask.h