|
A library for working with phylogenetic and population genetic data.
v0.32.0
|
|
Go to the documentation of this file. 1 #ifndef GENESIS_UTILS_CORE_INFO_H_
2 #define GENESIS_UTILS_CORE_INFO_H_
37 #include <unordered_map>
348 bool use_openmp =
true,
349 bool use_slurm =
true,
350 bool physical_cores =
true
474 #endif // include guard
size_t guess_number_of_threads(bool use_openmp, bool use_slurm, bool physical_cores)
Make an educated guess on the number of threads to use for multi-threaded functionality.
bool with_openmp
Compiled with OpenMP.
bool is_release
Binary was compiled with build type RELEASE.
std::pair< int, int > info_terminal_size()
Return the width and height of the terminal that is used to run the program, in number of columns and...
std::pair< double, double > info_process_total_cpu_time()
Get the currently used cpu run time, similar to the Unix time command.
bool with_avx512
Compiled with AVX512.
bool with_avx
Compiled with AVX.
std::unordered_map< std::string, std::string > const & info_preprocessor_definitions()
Return a string map with some relevant preprocessor macros.
double info_process_current_cpu_usage(bool all_cores, bool percent)
Return the CPU usage of the current process.
bool is_little_endian
System uses little endian memory. If false, system uses big endian.
size_t info_process_peak_memory_usage()
Get the peak used memory, in bytes.
std::string platform
Platform under which genesis was compiled.
size_t info_system_current_memory_usage()
Return the memory currently used across all running processes, in bytes.
InfoHardware const & info_get_hardware()
Return information about hardware features.
std::string info_print_compiler()
Print information about compiler settings and flags to a string.
std::string info_process_print_total_usage()
Print usage information to a string.
size_t info_process_current_memory_usage()
Return the memory currently used by the current process, in bytes.
size_t total_memory
Total amount of memory, in bytes.
double info_process_total_energy_consumption()
Get energy consumption of the program so far, in Wh.
bool info_stdout_is_terminal()
Return true iff the standard output stream is a terminal, and false if not, i.e., if it is a file or ...
bool info_hyperthreads_enabled()
Try to get whether hyperthreads are enabled in the current system.
size_t info_number_of_threads_slurm()
Get the number of threads as indicated by the SLURM environment.
size_t info_get_pid()
Get the process ID of the current process.
std::string compiler_family
Compiler family (name) that was used to compile genesis.
size_t info_number_of_threads_openmp()
Get the number of threads as indicated by the OpenMP environment.
size_t info_system_current_memory_available()
Return the memory currently available in the system, in bytes.
bool info_use_avx()
Assess if it is safe to use AVX features.
std::string build_type
Build type that was used to compile the binary, i.e., "debug" or "release".
std::string compile_date_time
Date and time when genesis was compiled.
double info_system_current_cpu_usage(bool all_cores, bool percent)
Return the CPU usage of the system, across all cores.
Container namespace for all symbols of genesis in order to keep them separate when used as a library.
bool info_stdin_is_terminal()
Return true iff the standard input stream is a terminal, and false if not, i.e., if it is a file or a...
std::string cpp_version
C++ version that was used to compile genesis.
InfoCompiler const & info_get_compiler()
Return information about compiler settings and flags.
size_t info_physical_core_count()
Get the number of CPU cores.
std::string vendor_string
size_t info_process_max_file_count()
Return the maximum number of files (i.e., file descriptors) that can be opened simultaneously in the ...
bool info_use_avx2()
Assess if it is safe to use AVX2 features.
bool with_avx2
Compiled with AVX2.
size_t info_process_current_file_count()
Return the number of files (i.e., file descriptors) that the current process (the process calling thi...
bool info_stderr_is_terminal()
Return true iff the standard error stream is a terminal, and false if not, i.e., if it is a file or a...
bool info_use_avx512()
Assess if it is safe to use AVX512 features.
std::string info_print_hardware(bool full)
Print information about hardware features to a string.
size_t physical_core_count
bool is_debug
Binary was compiled with build type DEBUG.
std::string compiler_version
Compiler version that was used to compile genesis.