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 compiletime constant, it's even faster to use the DivModByConst utility class.
Definition at line 24 of file DivModBySame.hh.

inline 
Definition at line 30 of file DivModBySame.hh.
Referenced by divMod(), openmsx::DynamicClock::getTicksTill(), and openmsx::DynamicClock::getTicksTillUp().

inline 
Definition at line 40 of file DivModBySame.hh.
Referenced by div().

inline 
Definition at line 60 of file DivModBySame.hh.
References div().
Referenced by openmsx::DynamicClock::getTicksTillAsIntFloat(), and mod().

inline 
Definition at line 28 of file DivModBySame.hh.

inline 
Definition at line 70 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 Math::log2p1(), and t.
Referenced by openmsx::DynamicClock::setFreq().