odin_options {odin}R Documentation

Odin options

Description

For lower-level odin functions odin_parse, odin_validate we only accept a list of options rather than individually named options.

Usage

odin_options(verbose = NULL, target = NULL, workdir = NULL,
  validate = NULL, pretty = NULL, skip_cache = NULL,
  compiler_warnings = NULL, no_check_unused_equations = NULL,
  rewrite_dims = NULL, rewrite_constants = NULL, substitutions = NULL,
  options = NULL)

Arguments

verbose

Logical scalar indicating if the compilation should be verbose. Defaults to the value of the option odin.verbose or FALSE otherwise.

target

Compilation target. Options are "c" and "r", defaulting to the option odin.target or "c" otherwise.

workdir

Directory to use for any generated files. This is only relevant for the "c" target. Defaults to the value of the option odin.workdir or tempdir() otherwise.

validate

Validate the model's intermediate representation against the included schema. Normally this is not needed and is intended primarily for development use. Defaults to the value of the option odin.validate or FALSE otherwise.

pretty

Pretty-print the model's intermediate representation. Normally this is not needed and is intended primarily for development use. Defaults to the value of the option odin.pretty or FALSE otherwise.

skip_cache

Skip odin's cache. This might be useful if the model appears not to compile when you would expect it to. Hopefully this will not be needed often. Defaults to the option odin.skip_cache or FALSE otherwise.

compiler_warnings

Previously this attempted detection of compiler warnings (with some degree of success), but is currently ignored. This may become supported again in a future version depending on underlying support in pkgbuild.

no_check_unused_equations

If TRUE, then don't print messages about unused variables. Defaults to the option odin.no_check_unused_equations or FALSE otherwise.

rewrite_dims

Logical, indicating if odin should try and rewrite your model dimensions (if using arrays). If TRUE then we replace dimensions known at compile-time with literal integers, and those known at initialisation with simplified and shared expressions. You may get less-comprehensible error messages with this option set to TRUE because parts of the model have been effectively evaluated during processing.

rewrite_constants

Logical, indicating if odin should try and rewrite all constant scalars. This is a superset of rewrite_dims and may be slow for large models. Doing this will make your model less debuggable; error messages will reference expressions that have been extensively rewritten, some variables will have been removed entirely or merged with other identical expressions, and the generated code may not be obviously connected to the original code.

substitutions

Optionally, a list of values to substitute into model specification as constants, even though they are declared as user(). This will be most useful in conjunction with rewrite_dims to create a copy of your model with dimensions known at compile time and all loops using literal integers.

options

Named list of options. If provided, then all other options are ignored.

Value

A list of parameters, of class odin_options

Examples

odin_options()

[Package odin version 1.2.5 Index]