TMB Documentation  v1.9.11
Classes | Functions
vectorize Namespace Reference

Vectorized atomic functions. More...

Classes

struct  vector
 Vector of consequtive values on the AD tape. More...
 

Functions

template<class Type , class T1 , class T2 >
vector< Type > dnorm (vector< Type > x, T1 mean, T2 sd, int give_log=0)
 Demonstrate native vectorization of 'dnorm'.
 

Detailed Description

Vectorized atomic functions.

This namespace provides a vector class (vectorize::vector) for which 'native' AD vectorization is available. A native vectorized operator is represented by a single node in the computational graph. Note that this is different from syntactic vectorization as implemented by the Vectorize.hpp macros.

For an overview of vectorized methods see TMBad/vectorize.hpp.

Note
PROS/CONS: Native vectorization is fast and memory efficient. However, some optimization tricks may not be as effective (e.g. sparsity).
License: GPL v2