Prev Next atomic_three_for_type

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@ This is cppad-20221105 documentation. Here is a link to its current documentation .
Atomic Function Forward Type Calculation

Syntax
ok = afun.for_type(parameter_xtype_xtype_y)

Prototype

template <class Base>
bool atomic_three<Base>::for_type(
    const vector<Base>&          parameter_x ,
    const vector<ad_type_enum>&  type_x      ,
    vector<ad_type_enum>&        type_y      )

Dependency Analysis
This calculation is sometimes referred to as a forward dependency analysis.

Usage
This syntax and prototype are used by
    
afun(axay)
where afun is a user defined atomic function.

Implementation
This virtual function must be defined by the atomic_user class.

Base
See Base .

parameter_x
See parameter_x .

type_x
See type_x .

type_y
This vector has size equal to the number of results for this atomic function; i.e. m=ay.size() . The input values of the elements of type_y are not specified (must not matter). Upon return, for @(@ i = 0 , \ldots , m-1 @)@, type_y[i] is set to one of the following values:
  1. It is constant_enum if ay[i] only depends on the arguments that are constants.
  2. It is dynamic_enum if ay[i] depends on a dynamic parameter and does not depend on any variables.
  3. It is variable_enum if ay[i] depends on a variable.


ok
If this calculation succeeded, ok is true. Otherwise, it is false.

Example
The following is an example of a atomic function for_type definition: get_started.cpp .
Input File: include/cppad/core/atomic/three/for_type.hpp