|
Functions |
static uint32_t | base_subu32 (uint32_t a, uint32_t b, uint32_t *cp) |
| Unsigned 32-bit subtraction with borrow.
|
void | base_copySmall (void *dst, const void *src, size_t intSize) |
| Best compromise for copy:
- for Intel, it is better to define our own copy function for small copies memcpy is better for sizes over 120-150
- for Sun, memcpy is always worse.
|
static void | base_copyLarge (void *dst, const void *src, size_t intSize) |
static void | base_copyBest (void *dst, const void *src, size_t intSize) |
| Try to choose best copy dynamically.
|
void | base_fill (void *mem, size_t intSize, uint32_t intValue) |
| Fill memory with a given value.
|
uint32_t | base_diff (const void *mem, size_t intSize, uint32_t intValue) |
| Check if memory differs with a given value.
|
static void | base_resetSmall (void *mem, size_t intSize) |
| Reset memory: tests on Intel and Sun show that memset is always slower on Sun and it becomes faster than a custom function on Intel after a threshold between 120 and 150 ints.
|
static void | base_resetLarge (void *mem, size_t intSize) |
static void | base_resetBest (void *mem, size_t intSize) |
| Try to choose best reset dynamically.
|
BOOL | base_areEqual (const void *data1, const void *data2, size_t intSize) |
| Test equality.
|
static int32_t | base_abs (int32_t x) |
static int32_t | base_absNot (int32_t x) |
void | base_sort (uint32_t *values, size_t n) |
| Quick sort: from lower to higher ints.
|