Phoenix
Object-oriented orthogonally persistent operating system
|
Classes | |
struct | UnalignedData |
Helper structure for accessing unaligned data fields. More... | |
Functions | |
template<typename T > | |
T | Min (T x, T y) |
Minimal value. | |
template<typename T > | |
T | Max (T x, T y) |
Maximal value. | |
template<typename T , typename Tal > | |
T | RoundUp (T size, Tal align) |
Round up the value with specified alignment. | |
template<typename T , typename Tal > | |
T | RoundDown (T size, Tal align) |
Round down the value with specified alignment. | |
template<typename T > | |
bool | IsPowerOf2 (T value) |
Check if specified value is an integer power of two. | |
template<typename T , typename Tal > | |
T | RoundUp2 (T size, Tal align) |
Round up the value with specified alignment. | |
template<typename T , typename Tal > | |
T | RoundDown2 (T size, Tal align) |
Round down the value with specified alignment. | |
template<typename T > | |
T | RotL (const T value, const size_t numBits) |
Bit-rotate value left by specified number of bits. | |
template<typename T > | |
T | RotR (const T value, const size_t numBits) |
Bit-rotate value right by specified number of bits. | |
template<typename T > | |
T | GetUnaligned (const void *p) |
Get unaligned data at specified location. | |
template<typename T > | |
void | PutUnaligned (T value, void *p) |
Put unaligned data at specified location. |
T anonymous_namespace{utils.h}::GetUnaligned | ( | const void * | p | ) | [inline] |
Get unaligned data at specified location.
Data type indicated by template argument T.
p | Location of unaligned data to retrieve. |
bool anonymous_namespace{utils.h}::IsPowerOf2 | ( | T | value | ) | [inline] |
Check if specified value is an integer power of two.
T anonymous_namespace{utils.h}::Max | ( | T | x, |
T | y | ||
) | [inline] |
Maximal value.
T anonymous_namespace{utils.h}::Min | ( | T | x, |
T | y | ||
) | [inline] |
Minimal value.
void anonymous_namespace{utils.h}::PutUnaligned | ( | T | value, |
void * | p | ||
) | [inline] |
Put unaligned data at specified location.
Data type indicated by template argument T.
p | Location of unaligned data to put. |
value | Value to put. |
T anonymous_namespace{utils.h}::RotL | ( | const T | value, |
const size_t | numBits | ||
) | [inline] |
Bit-rotate value left by specified number of bits.
value | Value to rotate. |
numBits | Number of bits to rotate. |
T anonymous_namespace{utils.h}::RotR | ( | const T | value, |
const size_t | numBits | ||
) | [inline] |
Bit-rotate value right by specified number of bits.
value | Value to rotate. |
numBits | Number of bits to rotate. |
T anonymous_namespace{utils.h}::RoundDown | ( | T | size, |
Tal | align | ||
) | [inline] |
Round down the value with specified alignment.
T anonymous_namespace{utils.h}::RoundDown2 | ( | T | size, |
Tal | align | ||
) | [inline] |
Round down the value with specified alignment.
Alignment must be an integer power of two.
T anonymous_namespace{utils.h}::RoundUp | ( | T | size, |
Tal | align | ||
) | [inline] |
Round up the value with specified alignment.
T anonymous_namespace{utils.h}::RoundUp2 | ( | T | size, |
Tal | align | ||
) | [inline] |
Round up the value with specified alignment.
Alignment must be an integer power of two.