View source: R/mc_is_helpers.R
| parallel_dispatch | R Documentation |
Internal helper function used by MC_IS_single() to distribute
Monte Carlo sample blocks across worker threads in a reproducible and
backend-independent manner.
The function ensures worker-invariant execution by:
Performing deterministic chunking of sample indices,
Avoiding per-worker random number generation,
Supporting both "future" and "parallel" backends.
This abstraction isolates parallel execution from the statistical core of the Importance Sampling algorithm.
parallel_dispatch(
chunk_indices,
worker_fun,
u_mat,
use_threads,
backend,
debug.level = 0
)
chunk_indices |
List of integer vectors defining sample indices assigned to each worker. |
worker_fun |
Function that evaluates a given subset of samples. |
u_mat |
Matrix of samples in standard normal space. |
use_threads |
Number of worker threads. |
backend |
Character string specifying backend
( |
debug.level |
Verbosity level for diagnostic output. |
A list containing worker evaluation results.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.