umx_detect_cores: Detect number of CPU cores (including Performance cores)

umx_detect_coresR Documentation

Detect number of CPU cores (including Performance cores)

Description

Detects the number of cores on the local machine. On hybrid architectures (like Apple Silicon or Intel Alder Lake+), it prioritizes detecting only Performance (P) cores to avoid E-core bottlenecks in parallel loops.

Usage

umx_detect_cores(logical = FALSE, p_cores = TRUE)

Arguments

logical

Whether to count logical cores (hyperthreaded) or physical cores. Default is FALSE (physical).

p_cores

Whether to prioritize detecting Performance (P) cores only on hybrid architectures. Default is TRUE.

Value

Integer count of cores.

References

https://tbates.github.io, https://github.com/tbates/umx

See Also

Other Get and set: umx, umx_get_checkpoint(), umx_get_options(), umx_scale_reliabilities(), umx_set_auto_plot(), umx_set_auto_run(), umx_set_checkpoint(), umx_set_condensed_slots(), umx_set_cores(), umx_set_data_variance_check(), umx_set_dollar_symbol(), umx_set_optimization_options(), umx_set_optimizer(), umx_set_plot_file_suffix(), umx_set_plot_format(), umx_set_separator(), umx_set_silent(), umx_set_table_format()

Examples

umx_detect_cores() # physical cores (P-cores if hybrid)
umx_detect_cores(logical = TRUE, p_cores = FALSE) # all logical cores

umx documentation built on Oct. 11, 2026, 5:07 p.m.