56 void set(
const char* name, T &var, T default_value)
61 SEXP name_symbol = Rf_install(name);
62 if (cmd==0) var = default_value;
63 if (cmd==1) Rf_defineVar(name_symbol,
asSEXP(var), envir);
64 if (cmd==2) var = INTEGER(Rf_findVar(name_symbol, envir))[0];
66 #define SET(name,value)set(#name,name,value); 69 SET(trace.parallel,
true);
70 SET(trace.optimize,
true);
71 SET(trace.atomic,
true);
72 SET(debug.getListElement,
false);
75 SET(tape.parallel,
true);
76 SET(tmbad.sparse_hessian_compress,
false);
77 SET(tmbad.atomic_sparse_log_determinant,
true);
92 SEXP TMBconfig(SEXP envir, SEXP cmd) CSKIP(
94 config.cmd=INTEGER(cmd)[0];
Configuration variables of a user template.
bool optimize
Trace tape optimization.
bool atomic_sparse_log_determinant
Use atomic sparse log determinant (faster but limited order) ?
bool autopar
Enable automatic parallization (if OpenMP is enabled) ?
SEXP asSEXP(const matrix< Type > &a)
Convert TMB matrix, vector, scalar or int to R style.
bool sparse_hessian_compress
Reduce memory of sparse hessian even if reducing speed ?
int nthreads
Number of OpenMP threads to use (if OpenMP is enabled)
bool instantly
Always optimize just after tape creation.
bool atomic
Trace construction of atomic functions.
bool parallel
Trace info from parallel for loops.