Detection of available hardware resources. More...
#include "private.h"#include "tuklib_cpucores.h"Functions | |
| void | hardware_threadlimit_set (uint32_t new_threadlimit) |
| Set custom value for maximum number of coder threads. | |
| uint32_t | hardware_threadlimit_get (void) |
| void | hardware_memlimit_set (uint64_t new_memlimit) |
| void | hardware_memlimit_set_percentage (uint32_t percentage) |
| uint64_t | hardware_memlimit_get (void) |
| Get the current memory usage limit. | |
| void | hardware_init (void) |
Variables | |
| static uint32_t | threadlimit |
| static uint64_t | memlimit |
| Memory usage limit. | |
| static uint64_t | total_ram |
| Total amount of physical RAM. | |
Detection of available hardware resources.
| void hardware_threadlimit_set | ( | uint32_t | new_threadlimit | ) |
Set custom value for maximum number of coder threads.
References threadlimit.
Referenced by hardware_init().
| uint32_t hardware_threadlimit_get | ( | void | ) |
Get the maximum number of coder threads. Some additional helper threads are allowed on top of this).
References threadlimit.
Referenced by message_help().
| void hardware_memlimit_set | ( | uint64_t | memlimit | ) |
Set custom memory usage limit. This is used for both encoding and decoding. Zero indicates resetting the limit back to defaults.
References memlimit, and total_ram.
Referenced by hardware_init().
| void hardware_memlimit_set_percentage | ( | uint32_t | percentage | ) |
| uint64_t hardware_memlimit_get | ( | void | ) |
Get the current memory usage limit.
References memlimit.
Referenced by coder_init(), message_help(), message_mem_needed(), message_memlimit(), and parse_indexes().
| void hardware_init | ( | void | ) |
Initialize some hardware-specific variables, which are needed by other hardware_* functions.
References hardware_memlimit_set(), hardware_threadlimit_set(), lzma_physmem(), and total_ram.
uint32_t threadlimit [static] |
Maximum number of free *coder* threads. This can be set with the --threads=NUM command line option.
Referenced by hardware_threadlimit_get(), and hardware_threadlimit_set().
uint64_t memlimit [static] |
Memory usage limit.
Referenced by hardware_memlimit_get(), hardware_memlimit_set(), hardware_memlimit_set_percentage(), message_mem_needed(), and parse_indexes().
uint64_t total_ram [static] |
Total amount of physical RAM.
Referenced by hardware_init(), hardware_memlimit_set(), and hardware_memlimit_set_percentage().
1.6.3