|
Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
|
Classes | |
| class | ExtrapError |
| Exception raised when an extrapolation error occurs. More... | |
| class | InvalidDataError |
| Exception raised when the data to be operated on are invalid. More... | |
| class | InvalidParameterError |
| Exception raised when parameters are invalid. More... | |
| class | IOError |
| Exception raised when an input/output operation fails. More... | |
| class | Logger |
| Logger with logging level differentiation. More... | |
| class | ProgressBar |
| Progress bar for tracking tasks. More... | |
| class | UnimplementedError |
| Exception raised when a function or method is unimplemented. More... | |
Enumerations | |
| enum | LogLevel { NSET = 0 , DBUG = 10 , STAT = 20 , INFO = 30 , WARN = 40 , ERRO = 50 } |
| Logging levels. More... | |
Functions | |
| bool | if_filepath_is_set (const std::string &pathstr) |
| Check if a file path is set. | |
| void | make_write_dir (std::string dirstr) |
| Make write directory. | |
| bool | has_extension (const std::string &fname, const std::string &fext) |
| Check if a file has a given extension. | |
| std::string | join_strings (const std::vector< std::string > &strings, const std::string &delimiter) |
| Join a vector of strings with a delimiter. | |
| std::vector< std::string > | split_string (const std::string &str, const std::string &delimiter) |
| Split a string into a vector of strings. | |
| template<typename T> | |
| double | size_in_gb (long long num) |
| Return size in gibibytes. | |
| template<typename T> | |
| double | size_in_gb (int num) |
| Return size in gibibytes. | |
| void | update_maxmem (bool gpu=false) |
| Update the maximum memory usage estimate. | |
| void | update_maxcntgrid () |
| Update the maximum 3-d grid counts. | |
| std::string | show_current_datetime (bool utc=false) |
| Return the current datetime string. | |
| std::string | show_elapsed_time (double duration_in_seconds) |
| Return the elapsed-time string in 'HH:MM:SS' format. | |
| std::string | show_timestamp () |
| Return the timestamp string including the elapsed time. | |
| int | get_gpu_count (bool sys=false) |
| Get the number of GPUs available. | |
| std::vector< int > | get_gpu_ids () |
| Get the indices of GPUs available for use. | |
| bool | is_gpu_available () |
| Check if GPUs are available in the system. | |
| bool | is_gpu_enabled () |
| Check if GPU mode is enabled. | |
| bool | is_gpu_single () |
| Check if in single-GPU mode. | |
| void | exit_fatal (const std::string &msg) |
Terminate the program with exit status EXIT_FAILURE. | |
| bool | is_colourable () |
Check if the program stdout is colourable. | |
| std::vector< float > | set_nodes_by_str (std::string interval_str) |
| Set a node list possibly from a string. | |
| std::string | get_build_datetime () |
| Return the build datetime string in ISO 8601–like format. | |
| void | display_help () |
Display help message in stdout. | |
| void | display_prog_logo () |
Display program logo in stdout. | |
| void | display_prog_licence (bool brief=false) |
Display program licence in stdout. | |
| void | display_prog_info (bool runtime=false) |
Display program information in stdout. | |
| void | display_prog_logbars (int endpoint) |
Display program log bars in stdout. | |
| void | expand_envar_in_path (std::string &path_str) |
| Expand environment variables in a path string. | |
Variables | |
| int | currTask = 0 |
| current task | |
| double | gbytesMem = 0. |
| current memory usage in gibibytes | |
| double | gbytesMaxMem = 0. |
| maximum memory usage in gibibytes | |
| double | gbytesMemGPU = 0. |
| current (GPU) memory usage in gibibytes | |
| double | gbytesMaxMemGPU = 0. |
| maximum (GPU) memory usage in gibibytes | |
| int | count_rgrid = 0 |
| number of 3-d real grids | |
| int | count_cgrid = 0 |
| number of 3-d complex grids | |
| float | count_grid = 0. |
| number of grids | |
| int | max_count_rgrid = 0 |
| maximum number of 3-d real grids | |
| int | max_count_cgrid = 0 |
| maximum number of 3-d complex grids | |
| float | max_count_grid = 0. |
| maximum number of grids | |
| int | count_fft = 0 |
| number of FFTs | |
| int | count_ifft = 0 |
| number of IFFTs | |
| bool | fftw_wisdom_f_imported = false |
| wisdom import status for forward transform | |
| bool | fftw_wisdom_b_imported = false |
| wisdom import status for backward transform | |
| Logger | logger |
default logger (at NSET logging level) | |
| auto | clockStart = std::chrono::steady_clock::now() |
| program starting time | |
| enum trv::sys::LogLevel |
Logging levels.
| Enumerator | |
|---|---|
| NSET | 0: unset |
| DBUG | 10: debugging |
| STAT | 20: status |
| INFO | 30: info |
| WARN | 40: warning |
| ERRO | 50: error/critical |
Definition at line 435 of file monitor.hpp.
| bool trv::sys::if_filepath_is_set | ( | const std::string & | pathstr | ) |
| void trv::sys::make_write_dir | ( | std::string | dirstr | ) |
Make write directory.
| dirstr | Directory path string. |
| trv::sys::IOError | When write directory cannot be created. |
Definition at line 59 of file io.cpp.
Here is the caller graph for this function:| bool trv::sys::has_extension | ( | const std::string & | fname, |
| const std::string & | fext ) |
Check if a file has a given extension.
| fname | File name. |
| fext | File extension (with the dot). |
true, false} Definition at line 38 of file monitor.cpp.
Here is the caller graph for this function:| std::string trv::sys::join_strings | ( | const std::vector< std::string > & | strings, |
| const std::string & | delimiter ) |
Join a vector of strings with a delimiter.
| strings | A vector of strings. |
| delimiter | Delimiter string. |
Definition at line 45 of file monitor.cpp.
Here is the caller graph for this function:| std::vector< std::string > trv::sys::split_string | ( | const std::string & | str, |
| const std::string & | delimiter ) |
Split a string into a vector of strings.
| str | String to be split. |
| delimiter | Delimiter string. |
Definition at line 59 of file monitor.cpp.
Here is the caller graph for this function:| double trv::sys::size_in_gb | ( | long long | num | ) |
Return size in gibibytes.
| T | A typename. |
| num | Number of type-double elements. |
Definition at line 281 of file monitor.hpp.
Here is the caller graph for this function:| double trv::sys::size_in_gb | ( | int | num | ) |
Return size in gibibytes.
| T | A typename. |
| num | Number of type-double elements. |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 296 of file monitor.hpp.
| void trv::sys::update_maxmem | ( | bool | gpu = false | ) |
Update the maximum memory usage estimate.
| gpu | If true, update the GPU memory usage estimate. |
Definition at line 165 of file monitor.cpp.
Here is the caller graph for this function:| void trv::sys::update_maxcntgrid | ( | ) |
Update the maximum 3-d grid counts.
Definition at line 177 of file monitor.cpp.
Here is the caller graph for this function:| std::string trv::sys::show_current_datetime | ( | bool | utc = false | ) |
Return the current datetime string.
| utc | If true, return UTC time in ISO 8601–like format, else return local time in 'YYYY-MM-DD HH:MM:SS' format. |
Definition at line 189 of file monitor.cpp.
Here is the caller graph for this function:| std::string trv::sys::show_elapsed_time | ( | double | duration_in_seconds | ) |
Return the elapsed-time string in 'HH:MM:SS' format.
| duration_in_seconds | Duration in seconds. |
Definition at line 212 of file monitor.cpp.
Here is the caller graph for this function:| std::string trv::sys::show_timestamp | ( | ) |
Return the timestamp string including the elapsed time.
Definition at line 238 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| int trv::sys::get_gpu_count | ( | bool | sys = false | ) |
Get the number of GPUs available.
| sys | If true, return the number of GPU devices in the system, else return the number of GPU devices available for use. |
TRV_GPU_MAXNUM. Definition at line 258 of file monitor.cpp.
Here is the caller graph for this function:| std::vector< int > trv::sys::get_gpu_ids | ( | ) |
Get the indices of GPUs available for use.
Definition at line 284 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool trv::sys::is_gpu_available | ( | ) |
Check if GPUs are available in the system.
true, false} Definition at line 292 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool trv::sys::is_gpu_enabled | ( | ) |
Check if GPU mode is enabled.
true, false}TRV_GPU_MODE: when it is set to false, no, off or 0, the function will return false. Definition at line 297 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool trv::sys::is_gpu_single | ( | ) |
Check if in single-GPU mode.
true, false} Definition at line 322 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::exit_fatal | ( | const std::string & | msg | ) |
Terminate the program with exit status EXIT_FAILURE.
Definition at line 326 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool trv::sys::is_colourable | ( | ) |
Check if the program stdout is colourable.
true, false} true if the environmental variable TRV_INTERACTIVE is set to "true" or "yes" or "1" or "on" and TERM contains "color", or false otherwise. Definition at line 506 of file monitor.cpp.
Here is the caller graph for this function:| std::vector< float > trv::sys::set_nodes_by_str | ( | std::string | interval_str | ) |
Set a node list possibly from a string.
If the string corresponds to a number between 0 and 100, that is then the percentage-point interval at which the nodes are set as by ProgressBar::set_nodes().
| interval_str | Interval string. |
| trv::sys::InvalidParameterError | If the interval string is invalid. |
Definition at line 649 of file monitor.cpp.
Here is the caller graph for this function:| std::string trv::sys::get_build_datetime | ( | ) |
Return the build datetime string in ISO 8601–like format.
Definition at line 757 of file monitor.cpp.
Here is the caller graph for this function:| void trv::sys::display_help | ( | ) |
Display help message in stdout.
Definition at line 856 of file monitor.cpp.
Here is the caller graph for this function:| void trv::sys::display_prog_logo | ( | ) |
Display program logo in stdout.
Definition at line 871 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::display_prog_licence | ( | bool | brief = false | ) |
Display program licence in stdout.
| brief | Display brief notice only (default is false). |
Definition at line 890 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::display_prog_info | ( | bool | runtime = false | ) |
Display program information in stdout.
| runtime | Display runtime information (default is false). |
Definition at line 930 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::display_prog_logbars | ( | int | endpoint | ) |
Display program log bars in stdout.
| endpoint | Progress bar endpoint, either 0 (start) or 1 (finish). |
Definition at line 994 of file monitor.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::sys::expand_envar_in_path | ( | std::string & | path_str | ) |
Expand environment variables in a path string.
| [in,out] | path_str | Path string. |
Definition at line 1012 of file monitor.cpp.
Here is the caller graph for this function:| int trv::sys::currTask = 0 |
current task
Definition at line 92 of file monitor.cpp.
| double trv::sys::gbytesMem = 0. |
current memory usage in gibibytes
Definition at line 94 of file monitor.cpp.
| double trv::sys::gbytesMaxMem = 0. |
maximum memory usage in gibibytes
Definition at line 95 of file monitor.cpp.
| double trv::sys::gbytesMemGPU = 0. |
current (GPU) memory usage in gibibytes
Definition at line 97 of file monitor.cpp.
| double trv::sys::gbytesMaxMemGPU = 0. |
maximum (GPU) memory usage in gibibytes
Definition at line 98 of file monitor.cpp.
| int trv::sys::count_rgrid = 0 |
number of 3-d real grids
Definition at line 100 of file monitor.cpp.
| int trv::sys::count_cgrid = 0 |
number of 3-d complex grids
Definition at line 101 of file monitor.cpp.
| float trv::sys::count_grid = 0. |
number of grids
Definition at line 102 of file monitor.cpp.
| int trv::sys::max_count_rgrid = 0 |
maximum number of 3-d real grids
Definition at line 103 of file monitor.cpp.
| int trv::sys::max_count_cgrid = 0 |
maximum number of 3-d complex grids
Definition at line 104 of file monitor.cpp.
| float trv::sys::max_count_grid = 0. |
maximum number of grids
Definition at line 105 of file monitor.cpp.
| int trv::sys::count_fft = 0 |
number of FFTs
Definition at line 107 of file monitor.cpp.
| int trv::sys::count_ifft = 0 |
number of IFFTs
Definition at line 108 of file monitor.cpp.
| bool trv::sys::fftw_wisdom_f_imported = false |
wisdom import status for forward transform
Definition at line 110 of file monitor.cpp.
| bool trv::sys::fftw_wisdom_b_imported = false |
wisdom import status for backward transform
Definition at line 111 of file monitor.cpp.
|
extern |
default logger (at NSET logging level)
| auto trv::sys::clockStart = std::chrono::steady_clock::now() |
program starting time
Definition at line 113 of file monitor.cpp.