Various utilities.
More...
Various utilities.
static int MALP_Trace_check_dir |
( |
const char * |
path | ) |
|
|
inlinestatic |
Checks if a path is a directory.
- Parameters
-
- Returns
- 1 if path is a directory, 0 otherwise
Definition at line 38 of file Utils.h.
static int MALP_Trace_fast_strcmp |
( |
char * |
haystack, |
|
|
char * |
needle |
|
) |
| |
|
inlinestatic |
Fast string comparison.
- Parameters
-
haystack | first string to compare |
needle | second string to compare |
- Returns
- 1 if the strings are identical, 0 otherwise
Definition at line 89 of file Utils.h.
static int MALP_Trace_file_exists |
( |
const char * |
path | ) |
|
|
inlinestatic |
Checks if a file exists.
- Parameters
-
path | the path to the file to check |
- Returns
- 1 if the file exists, 0 otherwise
Definition at line 72 of file Utils.h.
static int MALP_Trace_is_numeric |
( |
char * |
number | ) |
|
|
inlinestatic |
Checks if a string contains a numerical element.
- Parameters
-
number | the string ti check |
- Returns
- 1 if the string represents a numeric, 0 otherwise
Definition at line 113 of file Utils.h.
static int MALP_Trace_line_begins_with_sharp |
( |
char * |
line | ) |
|
|
inlinestatic |
Checks if the first not space char of a string is a #.
- Parameters
-
- Returns
- 1 if the string starts with a #, 0 otherwise
Definition at line 129 of file Utils.h.
static uint64_t MALP_Trace_mem_per_core |
( |
| ) |
|
|
inlinestatic |
Getter on the per core memory on the current node.
- Returns
- the per core memory
Definition at line 162 of file Utils.h.
static uint64_t MALP_Trace_total_mem |
( |
| ) |
|
|
inlinestatic |
Getter on the total amount of memory available on current node.
- Returns
- the total memory
Definition at line 153 of file Utils.h.
static void MALP_Trace_try_mkdir |
( |
char * |
path | ) |
|
|
inlinestatic |
Creates a directory without failing if it already exists.
- Parameters
-
path | the path to the directory do create |
Definition at line 57 of file Utils.h.
static char* my_pad |
( |
char * |
val | ) |
|
|
inlinestatic |
Removes starting and ending spaces from a string.
- Parameters
-
val | the string where to removes spaces |
- Returns
- the same string as val with spaces removed
Definition at line 173 of file Utils.h.