Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/default_options.R
To compile new user-defined operators, rkeops
requires compilation options
that control the compilation process and the way user-defined operators
behave (precision, verbosity, use of GPU, storage order, debug flag, and
path to different required files).
The function default_compile_options
returns a list of class
rkeops_compile_options
with default values for the corresponding options
(see Details).
1 2 3 4 5 6 7 8 9 10 |
precision |
string, precision for floating point computations ( |
verbosity |
boolean indicator regarding verbosity level. Default value
is |
use_cuda_if_possible |
boolean indicator regarding compilation of the
user-defined operators to be GPU-compatible (if possible on the system,
i.e. if CUDA is available). Default value is |
col_major |
boolean indicator regarding storage order (default is TRUE). |
debug |
boolean indicator regarding debuging flag for compilation.
Default value is |
rkeops_dir |
string, path to |
build_dir |
string, path to the directory where new custom user-defined
operators will be compiled. If NULL, default path described in Details
section is used. Default value is |
src_dir |
string, path to |
The aforementioned compile options are the following:
rkeops_dir
: path to rkeops
install directory on the system (e.g.
/path/to/R_package_install/rkeops
on Unix system).
build_dir
: path to directory where new user-defined operators
will be compiled and corresponding share objects (.so
files) will be
saved (so that they can be found upon reuse to avoid useless recompilation).
Default value is the build
sub-folder in rkeops
install directory (e.g.
/path/to/R_package_install/rkeops/build
on Unix system).
src_dir
: path to keops
(C++) source files required for compilation of
user-defined operators. Default value is the include
sub-folder in
rkeops
install directory (e.g. /path/to/R_package_install/rkeops/include
on Unix system).
precision
: precision for floating point computations (float
or
double
). Default value is float
.
verbosity
: 0-1 indicator (boolean) for verbosity level.
Default value is 0
.
use_cuda_if_possible
: 0-1 indicator (boolean) regarding use
of GPU in computations (if possible on the system). Default value is 1
.
col_major
: 0-1 indicator (boolean) regarding matrix storage order in
C++ KeOps API. 1
is column-major storage (or f_contiguous
) and 0
is
row-major storage (or c_contiguous
). Default value is 1
. This is
independent from the storage order in R. Always keep in mind that matrices
are stored with column-major order in R.
debug
: 0-1 indicator (boolean) regarding compilation debugging flag.
1
means that user-defined operators will be compiled with a debug flag,
and 0
means no debug flag. Default value is 0
Note on storage order: Column-major storage means that elements of each column of a matrix are contiguous in memory (called Fortran-style). Row-major storage means that each row of a matrix are contiguous in memory (called C-style). In R, matrices are stored with column-major order in R, so we recommend to use column-major order in for KeOps compilation (to avoid useless matrix conversion).
Note: Default options are set up when loading rkeops
. To reset
rkeops
options to default, you should use the function
set_rkeops_options()
. To set up a particular option, you should
use the function set_rkeops_option()
.
Some wrappers are available to enable some compilation options,
see compile4float32()
, compile4float64()
,
compile4cpu()
, compile4gpu()
.
a list (of class rkeops_compile_options
) with the following
elements:
rkeops_dir |
string, path to |
build_dir |
string, path to the directory where new custom user-defined operators will be compiled. |
src_dir |
string, path to |
precision |
string, precision for floating point computations ( |
verbosity |
integer, 0-1 indicator (boolean) for verbosity. |
use_cuda_if_possible |
integer, 0-1 indicator (boolean) regarding use of GPU in computations (if possible). |
col_major |
integer, 0-1 indicator (boolean) for storage order. |
debug |
integer, 0-1 indicator (boolean) for debugging flag. |
Ghislain Durif
default_compile_options()
,
set_rkeops_options()
, set_rkeops_option()
,
compile4float32()
, compile4float64()
,
compile4cpu()
, compile4gpu()
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.