#include <hpsys.h>
Go to the source code of this file.
Typedefs | |
typedef unsigned long long | ULONGLONG |
typedef long long | LONGLONG |
typedef unsigned(*) | RNDFUNC (int) |
typedef void(*) | SRNDFUNC (unsigned) |
Functions | |
void * | malloc (size_t) |
Standard C library function. | |
void | free (void *) |
Standard C library function. | |
void * | calloc (size_t, size_t) |
Standard C library function. | |
void * | realloc (void *oldp, size_t size) |
Standard C library function. | |
void | exit (int) |
Standard C library function. | |
int | atexit (void(*__func)(void)) |
Standard C library function. | |
unsigned | mwc (int bits) |
32 bit multiply with carry pseudo RNG | |
unsigned int | rand (void) |
wrapper for concrete PRNG implementation | |
unsigned int | rand_bits (int bits) |
void | srand (unsigned int seed) |
seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc(). | |
int | memcmp (const void *s1, const void *s2, size_t n) |
void | qsort (void *base, size_t n_elements, size_t width, int(*compar)(const void *, const void *)) |
Standard C library function. | |
void * | bsearch (register const void *key, register const void *base, register size_t n_elements, register size_t size, int(*compar)(const void *, const void *)) |
Standard C library function. | |
Variables | |
RNDFUNC | rand_hook |
SRNDFUNC | srand_hook |
Definition in file hpstdlib.h.
typedef long long LONGLONG |
Definition at line 48 of file hpstdlib.h.
typedef unsigned(*) RNDFUNC(int) |
Definition at line 58 of file hpstdlib.h.
typedef void(*) SRNDFUNC(unsigned) |
Definition at line 59 of file hpstdlib.h.
typedef unsigned long long ULONGLONG |
Definition at line 47 of file hpstdlib.h.
int atexit | ( | void(*)(void) | __func | ) |
Standard C library function.
void * bsearch | ( | register const void * | key, | |
register const void * | base, | |||
register size_t | n_elements, | |||
register size_t | size, | |||
int(*)(const void *, const void *) | compar | |||
) |
Standard C library function.
void * calloc | ( | size_t | , | |
size_t | ||||
) |
Standard C library function.
void exit | ( | int | ) |
Standard C library function.
void free | ( | void * | ) |
Standard C library function.
void * malloc | ( | size_t | ) |
Standard C library function.
int memcmp | ( | const void * | s1, | |
const void * | s2, | |||
size_t | n | |||
) |
unsigned mwc | ( | int | bits | ) |
32 bit multiply with carry pseudo RNG
bits | bit pseudo random number. |
void qsort | ( | void * | base, | |
size_t | n_elements, | |||
size_t | width, | |||
int(*)(const void *, const void *) | compar | |||
) |
Standard C library function.
unsigned rand | ( | void | ) |
wrapper for concrete PRNG implementation
32 | bit pseudo random number. |
unsigned int rand_bits | ( | int | bits | ) |
void * realloc | ( | void * | oldp, | |
size_t | size | |||
) |
Standard C library function.
void srand | ( | unsigned int | seed | ) |
seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc().
seed | The seed value or 0 (zero) for a system time based value. |