openMSX
|
Helper class to divide multiple times by the same number. More...
#include <DivModBySame.hh>
Public Member Functions | |
void | setDivisor (uint32_t divisor) |
uint32_t | getDivisor () const |
uint32_t | div (uint64_t dividend) const |
uint32_t | divInC (uint64_t dividend) const |
std::pair< uint32_t, uint32_t > | divMod (uint64_t dividend) const |
uint32_t | mod (uint64_t dividend) const |
Helper class to divide multiple times by the same number.
Binary division can be performed by:
If the divisor is a compile-time constant, it's even faster to use the DivModByConst utility class.
Definition at line 25 of file DivModBySame.hh.
|
inline |
Definition at line 31 of file DivModBySame.hh.
Referenced by divMod(), openmsx::DynamicClock::getTicksTill(), openmsx::DynamicClock::getTicksTill(), and openmsx::DynamicClock::getTicksTillUp().
|
inline |
Definition at line 41 of file DivModBySame.hh.
Referenced by div().
|
inline |
Definition at line 61 of file DivModBySame.hh.
References div().
Referenced by openmsx::DynamicClock::getTicksTillAsIntFloat(), and mod().
|
inline |
Definition at line 29 of file DivModBySame.hh.
|
inline |
Definition at line 71 of file DivModBySame.hh.
References divMod().
Referenced by openmsx::DynamicClock::advance().
void openmsx::DivModBySame::setDivisor | ( | uint32_t | divisor | ) |
Definition at line 7 of file DivModBySame.cc.
References t.
Referenced by openmsx::DynamicClock::setPeriod().