| trex_get_num_threads | R Documentation |
The library is single-threaded by default. Every parallel
region of the C++ backend runs on an explicit budget: a selector's
random experiments and its inner kernels on trex_control(
max_outer_threads, max_inner_threads), a T-solver on
tsolver_options(n_threads), and every method without an option
of its own (the scalers, the clustering, the ML regressions, the
dummy and data generators, trex_normalize_design) on the
library's default budget, which starts at 1.
trex_get_num_threads() reads that default budget and
trex_set_num_threads() sets it for this session; the
n_threads argument of those methods overrides it per object.
trex_get_max_threads() reports the threads OpenMP can run on this
machine (1 in a build without OpenMP), an upper bound for a budget.
trex_get_num_threads()
trex_get_max_threads()
trex_set_num_threads(n)
n |
Positive integer, the default thread budget. |
trex_get_num_threads(), trex_get_max_threads(): an
integer. trex_set_num_threads(): invisibly, the previous budget.
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_build_group_centering_k(),
trex_control(),
trex_da_control(),
trex_default_lambda2_grid(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
trex_gvs_control(),
trex_gvs_lambda2_power_rule(),
trex_normalize_design(),
trex_precision(),
trex_recall(),
trex_screen_control(),
trex_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
trex_get_num_threads() # 1
old <- trex_set_num_threads(min(2L, trex_get_max_threads()))
trex_get_num_threads()
trex_set_num_threads(old)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.