diff --git a/R/parallel.R b/R/parallel.R index 9c835b06..5f81d2e1 100644 --- a/R/parallel.R +++ b/R/parallel.R @@ -22,8 +22,8 @@ #' `"mc.cores"` option: #' #' ```r -#' options(mc.cores = parallel::detectCores()) # use all available cores -#' options(mc.cores = 4L) # or a fixed number +#' options(mc.cores = parallelly::availableCores()) # use all available cores +#' options(mc.cores = 4L) # or a fixed number #' ``` #' #' The default is `1` (single-threaded). diff --git a/R/tree_distance_info.R b/R/tree_distance_info.R index 3cfe8c69..a6ad95d4 100644 --- a/R/tree_distance_info.R +++ b/R/tree_distance_info.R @@ -128,8 +128,8 @@ #' automatically. Control the number of threads with the `"mc.cores"` option: #' #' ```r -#' options(mc.cores = parallel::detectCores()) # use all cores -#' options(mc.cores = 4L) # or a fixed number +#' options(mc.cores = parallelly::availableCores()) # use all cores +#' options(mc.cores = 4L) # or a fixed number #' ``` #' #' Do **not** call [`StartParallel()`] for these functions: a registered diff --git a/man/StartParallel.Rd b/man/StartParallel.Rd index 1a918897..0cbf7a10 100644 --- a/man/StartParallel.Rd +++ b/man/StartParallel.Rd @@ -54,8 +54,8 @@ no cluster setup is required. The affected functions are: The number of \acronym{OpenMP} threads is controlled by the standard \code{"mc.cores"} option: -\if{html}{\out{
}}\preformatted{options(mc.cores = parallel::detectCores()) # use all available cores -options(mc.cores = 4L) # or a fixed number +\if{html}{\out{
}}\preformatted{options(mc.cores = parallelly::availableCores()) # use all available cores +options(mc.cores = 4L) # or a fixed number }\if{html}{\out{
}} The default is \code{1} (single-threaded). diff --git a/man/TreeDistance.Rd b/man/TreeDistance.Rd index f753909c..dd0fdce5 100644 --- a/man/TreeDistance.Rd +++ b/man/TreeDistance.Rd @@ -263,8 +263,8 @@ When \code{tree2 = NULL} and all trees share the same tip labels, pairwise distance calculation uses a multi-threaded \acronym{OpenMP} batch path automatically. Control the number of threads with the \code{"mc.cores"} option: -\if{html}{\out{
}}\preformatted{options(mc.cores = parallel::detectCores()) # use all cores -options(mc.cores = 4L) # or a fixed number +\if{html}{\out{
}}\preformatted{options(mc.cores = parallelly::availableCores()) # use all cores +options(mc.cores = 4L) # or a fixed number }\if{html}{\out{
}} Do \strong{not} call \code{\link[=StartParallel]{StartParallel()}} for these functions: a registered