Title: | An Interruptible Progress Bar with OpenMP Support for C++ in R Packages |
---|---|
Description: | Allows to display a progress bar in the R console for long running computations taking place in C++ code, and support for interrupting those computations even in multithreaded code, typically using OpenMP. |
Authors: | Karl Forner <[email protected]> |
Maintainer: | Karl Forner <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.0.0 |
Built: | 2025-02-20 05:15:59 UTC |
Source: | https://github.com/kforner/rcpp_progress |
runs the multithreaded test from the RcppProgressArmadillo example package
test_amardillo_multithreaded( max = 100, nb = 1000, threads = 0, display_progress = TRUE )
test_amardillo_multithreaded( max = 100, nb = 1000, threads = 0, display_progress = TRUE )
max |
the number of loops/increments to execute |
nb |
a parameter controlling the number of computations executed in each loop, so the time complexity is quadratic in this parameter |
threads |
the number of OMP threads to use for the computation. If < 0, runs in sequential mode. |
display_progress |
whether to display the progress bar |
the computed number, or -1 if the computation was aborted
runs the test from the RcppProgressETA example package
test_eta_progress_bar(max = 100, nb = 1000, display_progress = TRUE)
test_eta_progress_bar(max = 100, nb = 1000, display_progress = TRUE)
max |
the number of loops/increments to execute |
nb |
a parameter controlling the number of computations executed in each loop, so the time complexity is quadratic in this parameter |
display_progress |
whether to display the progress bar |
the computed number, or -1 if the computation was aborted
runs the multithreaded test from the RcppProgressExample example R package
test_multithreaded(max = 100, nb = 1000, threads = 0, display_progress = TRUE)
test_multithreaded(max = 100, nb = 1000, threads = 0, display_progress = TRUE)
max |
the number of loops/increments to execute |
nb |
a parameter controlling the number of computations executed in each loop, so the time complexity is quadratic in this parameter |
threads |
the number of OMP threads to use for the computation. If < 0, runs in sequential mode. |
display_progress |
whether to display the progress bar |
the computed number, or -1 if the computation was aborted
runs the sequential test from the RcppProgressExample example R package
test_sequential(max = 100, nb = 1000, display_progress = TRUE)
test_sequential(max = 100, nb = 1000, display_progress = TRUE)
max |
the number of loops/increments to execute |
nb |
a parameter controlling the number of computations executed in each loop, so the time complexity is quadratic in this parameter |
display_progress |
whether to display the progress bar |
the computed number, or -1 if the computation was aborted