|
| template<typename T > |
| T | betoh (T const &x) |
| | Big endian to host order conversion.
|
| |
| template<int N> |
| void | byte_swap (char *data) |
| | Swaps little/big endianess of the operand.
|
| |
| template<> |
| void | byte_swap< 2 > (char *data) |
| |
| template<> |
| void | byte_swap< 4 > (char *data) |
| |
| template<> |
| void | byte_swap< 8 > (char *data) |
| |
| template<typename T > |
| T | letoh (T const &x) |
| | Little endian to host order conversion.
|
| |
| void | print_build_timestamp (char const *application_name, char const *date, char const *time) |
| | Prints the application name and the given date and time strings.
|
| |
| void | print_build_timestamp (char const *application_name) |
| | Prints the application name and date and time of the build.
|
| |
| void | print_stack_trace (void) |
| | Prints a stack trace.
|
| |
| float | rand_float (void) |
| | Returns a floating point random number in [0, 1].
|
| |
| void | rand_init (void) |
| | Initializes the random number generator.
|
| |
| int | rand_int (void) |
| | Returns a random number in [0, 2^31].
|
| |
| void | rand_seed (int seed) |
| | Initializes the random number generator with a given seed.
|
| |
| template<typename T > |
| T | read_binary_little_endian (std::istream *stream) |
| | Reads little endian according to host order conversion.
|
| |
| void | register_segfault_handler (void) |
| | Registers signal SIGSEGV (segmentation fault) handler.
|
| |
| void | signal_segfault_handler (int code) |
| | Handles signal SIGSEGV (segmentation fault) printing a stack trace.
|
| |
| void | sleep (std::size_t msec) |
| | Sleeps the given amount of milli seconds.
|
| |
| void | sleep_sec (float secs) |
| | Sleeps the given amount of seconds.
|
| |
Cross-platform operating system related functions.