|
| template<typename T > |
| void | piSwap (T &f, T &s) |
| | Templated function for swap two values. More...
|
| |
| template<typename T > |
| void | piSwapBinary (T &f, T &s) |
| | Templated function for swap two values without "=". More...
|
| |
| bool | piCompareBinary (const void *f, const void *s, size_t size) |
| | Function for compare two values without "==" by raw content. More...
|
| |
| template<typename T > |
| constexpr int | piRound (const T &v) |
| | Templated function return round of float falue. More...
|
| |
| template<typename T > |
| constexpr int | piFloor (const T &v) |
| | Templated function return floor of float falue. More...
|
| |
| template<typename T > |
| constexpr int | piCeil (const T &v) |
| | Templated function return ceil of float falue. More...
|
| |
| template<typename T > |
| constexpr T | piAbs (const T &v) |
| | Templated function return absolute of numeric falue. More...
|
| |
| template<typename T , typename... Args> |
| constexpr T | piMin (const T &f, const T &s, const Args &... args) |
| | Templated function return minimum of several values. More...
|
| |
| template<typename T , typename... Args> |
| constexpr T | piMax (const T &f, const T &s, const Args &... args) |
| | Templated function return maximum of several values. More...
|
| |
| template<typename T > |
| constexpr T | piClamp (const T &v, const T &min, const T &max) |
| | Templated function return clamped value. More...
|
| |
| template<typename T > |
| bool | piCompare (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) |
| | Function for compare two numeric values with epsilon. More...
|
| |
|
void | piChangeEndianBinary (void *data, size_t size) |
| | Function inverse byte order in memory block ([1..N] -> [N..1])
|
| |
|
void | piChangeEndianBinary (PIMemoryBlock mem_blk) |
| | Function inverse byte order in memory block ([1..N] -> [N..1])
|
| |
|
template<typename T > |
| void | piChangeEndian (T &v) |
| | Templated function that inverse byte order of value "v".
|
| |
|
template<typename T > |
| T | piChangedEndian (const T &v) |
| | Templated function that returns value "v" with inversed byte order.
|
| |
|
uint | piHashData (const uchar *data, uint len, uint seed=0) |
| | Generic hash function, implements murmur3/32 algorithm.
|
| |
|
void | piZeroMemory (void *ptr, size_t size) |
| | Zero "size" bytes by address "ptr".
|
| |
|
template<typename T > |
| void | piZeroMemory (T &v) |
| | Zero variable "v" memory.
|
| |
|
template<typename T > |
| void | piDeleteAll (const T &container) |
| | Call delete on each "container" element.
|
| |
|
template<typename T > |
| void | piDeleteAll (std::initializer_list< T > container) |
| | Call delete on each element of C++11 initializer list.
|
| |
|
template<typename T > |
| void | piDeleteAllAndClear (T &container) |
| | Call delete on each "container" element and clear container.
|
| |
|
template<typename T > |
| bool | piDeleteSafety (T *&pointer) |
| | Call delete if "pointer" is not null and set it to null. Returns if deleted.
|
| |
Base types and functions.
This file implements first layer above the system and declares some basic useful functions