|
| #define | TIME(title, fp, code) |
| | Elapsed time in seconds (from start of program) More...
|
| |
|
#define | assert(expr) (void)((expr) ? 0 : assertStackTraceExit(#expr, __func__, __FILE__, __LINE__)) |
| | A custom assertion with stack trace (NOTE: enabled in release modes as well)
|
| |
|
#define | logPrintf(...) fprintf(globalLog, __VA_ARGS__) |
| | printf() for log files
|
| |
|
#define | logFlush() fflush(globalLog) |
| | fflush() for log files
|
| |
| #define | die(...) |
| | Quit with an error message (formatted using printf()). Must be called from all processes. More...
|
| |
| #define | die_alone(...) |
| | Version of die that should only be used when it is impossible to guarantee synchronized calls from all processes. More...
|
| |
|
#define | PRIdPTR "zd" |
| |
|
|
void | printVersionBanner (const InitParams *ip=0) |
| | Print package name, version, revision etc. to log.
|
| |
|
void | initSystem (int argc, char **argv, const InitParams *ip=0) |
| | Init MPI (if not already done), print banner, set up threads (play nice with job schedulers), GPU and signal handlers.
|
| |
|
void | initSystemCmdline (int argc, char **argv, InitParams &ip) |
| | initSystem along with commandline options
|
| |
|
void | finalizeSystem (bool successful=true) |
| | Clean-up corresponding to initSystem(), final messages (depending on successful) and clean-up MPI.
|
| |
|
double | clock_us () |
| |
|
double | clock_sec () |
| | Elapsed time in microseconds (from start of program)
|
| |
|
void | printStack (bool detailedStackScript=false) |
| | Print a minimal stack trace and optionally write a script that, when run, will print a more detailed stacktrace.
|
| |
|
void | stackTraceExit (int code) |
| | Exit on error with stack trace.
|
| |
| int | assertStackTraceExit (const char *expr, const char *function, const char *file, long line) |
| |
|
void | logSuspend () |
| | temporarily disable all log output (until logResume())
|
| |
|
void | logResume () |
| | re-enable logging after a logSuspend() call
|
| |
| void | Citations::add (string reason, string paper) |
| |
|
void | Citations::print (FILE *fp=globalLog) |
| | Print the list of citations (with reasons) to the specified stream.
|
| |
|
off_t | fileSize (const char *filename) |
| | Get the size of a file.
|
| |
|
void | convertToLE (void *ptr, size_t size, size_t nmemb) |
| | Convert data from operating endianness to little-endian.
|
| |
|
void | convertFromLE (void *ptr, size_t size, size_t nmemb) |
| | Convert data from little-endian to operating endianness.
|
| |
|
size_t | freadLE (void *ptr, size_t size, size_t nmemb, FILE *fp) |
| | Read from a little-endian binary file, regardless of operating endianness.
|
| |
|
size_t | fwriteLE (const void *ptr, size_t size, size_t nmemb, FILE *fp) |
| | Write to a little-endian binary file, regardless of operating endianness.
|
| |
|
uint16_t | positiveRemainder (int16_t x, uint16_t y) |
| | For any x and y>0, compute z = x % y such that 0 <= z < y.
|
| |
|
bool | fftSuitable (int N) |
| | Check if an integer is suitable for Fast Fourier Transforms (small prime factors only)
|
| |