Reference documentation for deal.II version 8.5.1
|
Classes | |
struct | MemoryStats |
Functions | |
double | get_cpu_load () |
void | get_memory_stats (MemoryStats &stats) |
std::string | get_hostname () |
std::string | get_time () |
std::string | get_date () |
void | posix_memalign (void **memptr, size_t alignment, size_t size) |
bool | job_supports_mpi () 1 |
A namespace for utility functions that probe system properties.
double Utilities::System::get_cpu_load | ( | ) |
Return the CPU load as returned by "uptime". Note that the interpretation of this number depends on the actual number of processors in the machine. This is presently only implemented on Linux, using the /proc/loadavg pseudo-file, on other systems we simply return zero.
Definition at line 604 of file utilities.cc.
void Utilities::System::get_memory_stats | ( | MemoryStats & | stats | ) |
Fills the stats
structure with information about the memory consumption of this process. This is only implemented on Linux.
Definition at line 613 of file utilities.cc.
std::string Utilities::System::get_hostname | ( | ) |
Return the name of the host this process runs on.
Definition at line 646 of file utilities.cc.
std::string Utilities::System::get_time | ( | ) |
Return the present time as HH:MM:SS.
Definition at line 660 of file utilities.cc.
std::string Utilities::System::get_date | ( | ) |
Return the present date as YYYY/MM/DD. MM and DD may be either one or two digits.
Definition at line 675 of file utilities.cc.
void Utilities::System::posix_memalign | ( | void ** | memptr, |
size_t | alignment, | ||
size_t | size | ||
) |
Call the system function posix_memalign, or a replacement function if not available, to allocate memory with a certain minimal alignment. The first argument will then return a pointer to this memory block that can be released later on through a standard free
call.
memptr | The address of a pointer variable that will after this call point to the allocated memory. |
alignment | The minimal alignment of the memory block, in bytes. |
size | The size of the memory block to be allocated, in bytes. |
Definition at line 690 of file utilities.cc.
bool Utilities::System::job_supports_mpi | ( | ) |
Definition at line 708 of file utilities.cc.