cgenpp makes use of shared memory multi-threading using
OpenMP. R is of single-threaded nature, hence almost the entire package is written
in C++. The package offers a variety of functions that lets you control and check
the number of threads that are being used by the functions of the package.
Internally every function uses the global variable
cgenpp.threads which is stored in
The value can be changed using the function
set_num_threads(). When the package is loaded
in an R-session
cgenpp.threads will be set to the value returned by
is a wrapper for the OpenMP-header function
The following functions are multithreaded and access the variable
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.