default_cores_per_fit: Determines the default cores per single fit.

View source: R/results.R

default_cores_per_fitR Documentation

Determines the default cores per single fit.

Description

When parallel processing is disabled, this just returns the number of available cores. Otherwise, it chooses the largest integer that keeps cores_per_fit * (n_fits / chunk_size) <= total_cores, i.e. it avoids running so many chains in parallel that there will be more chains than cores.

Usage

default_cores_per_fit(
  n_fits,
  total_cores = future::availableCores(),
  chunk_size = default_chunk_size(n_fits)
)

hyunjimoon/SBC documentation built on March 15, 2024, 3:18 a.m.