/TMB/man/compile.Rd
Unknown | 36 lines | 29 code | 7 blank | 0 comment | 0 complexity | 2c3bcb1e71a001ec256495b0108a8bdb MD5 | raw file
Possible License(s): CPL-1.0
- % Generated by roxygen2 (4.0.1): do not edit by hand
- \name{compile}
- \alias{compile}
- \title{Compile a c++ template to DLL suitable for MakeADFun.}
- \usage{
- compile(file, flags = "", safebounds = TRUE, safeunload = TRUE,
- openmp = isParallelTemplate(file), libtmb = TRUE, ...)
- }
- \arguments{
- \item{file}{c++ file.}
- \item{flags}{Character with compile flags.}
- \item{safebounds}{Turn on preprocessor flag for bound checking?}
- \item{safeunload}{Turn on preprocessor flag for safe DLL unloading?}
- \item{openmp}{Turn on openmp flag? Auto detected for parallel templates.}
- \item{libtmb}{Use precompiled TMB library if available (to speed up compilation)?}
- \item{...}{Passed as Makeconf variables.}
- }
- \description{
- Compile a c++ template into a shared object file. OpenMP flag is set if the template is detected to be parallel.
- }
- \details{
- TMB relies on R's built in functionality to create shared libraries independent on the platform.
- A template is compiled by \code{compile("template.cpp")}, which will call R's makefile with appropriate
- preprocessor flags.
- Compiler and compiler flags can be stored in a configuration file. In order of precedence either via
- the file pointed at by R_MAKEVARS_USER or the file ~/.R/Makevars if it exists.
- Additional configuration variables can be set with \code{...} argument, which will overwrite any
- previous selections.
- }