ADOL-C: Automatic Differentiation in C/C++ 2.7.3
Loading...
Searching...
No Matches
Public Attributes | List of all members
ext_diff_fct_v2 Struct Reference

Callback descriptor for a block-structured external function. More...

#include <externfcts2.h>

Public Attributes

short tapeId {0}
 
short extTapeId {0}
 
ADOLC_ext_fct_v2 * function {nullptr}
 
locint index {0}
 
ADOLC_ext_fct_v2 * zos_forward {nullptr}
 
ADOLC_ext_fct_v2_fos_forward * fos_forward {nullptr}
 
ADOLC_ext_fct_v2_fov_forward * fov_forward {nullptr}
 
ADOLC_ext_fct_v2_fos_reverse * fos_reverse {nullptr}
 
ADOLC_ext_fct_v2_fov_reverse * fov_reverse {nullptr}
 
double ** x {nullptr}
 
double ** xp {nullptr}
 
double *** Xp {nullptr}
 
double ** y {nullptr}
 
double ** yp {nullptr}
 
double *** Yp {nullptr}
 
double ** up {nullptr}
 
double *** Up {nullptr}
 
double ** zp {nullptr}
 
double *** Zp {nullptr}
 
size_t max_nin {0}
 
size_t max_nout {0}
 
size_t max_insz {0}
 
size_t max_outsz {0}
 
int p {0}
 
int q {0}
 
char nestedAdolc {0}
 
char dp_x_changes {1}
 
char dp_y_priorRequired {1}
 
void * context {nullptr}
 
char * allmem {nullptr}
 
void * obj {nullptr}
 
char user_allocated_mem {0}
 

Detailed Description

Callback descriptor for a block-structured external function.

Instances are created by reg_ext_fct() and then configured with the derivative callbacks required by the application. Fields documented as managed by ADOL-C must not be modified by callers.

Member Data Documentation

◆ allmem

char* ext_diff_fct_v2::allmem {nullptr}

This is an all-memory pointer for allocating and deallocating all other pointers can point to memory within here.

◆ context

void* ext_diff_fct_v2::context {nullptr}

This is a opaque context pointer that the user may set and use in his implementation of the above functions

◆ dp_x_changes

char ext_diff_fct_v2::dp_x_changes {1}

if 0, then the 'function' does not change dp_x; defaults to non-0 which implies dp_x values are saved in taylors

◆ dp_y_priorRequired

char ext_diff_fct_v2::dp_y_priorRequired {1}

if 0, then the value of dp_y prior to calling 'function' is not required for reverse; defaults to non-0 which implies dp_y values are saved in taylors

◆ extTapeId

short ext_diff_fct_v2::extTapeId {0}

◆ fos_forward

ADOLC_ext_fct_v2_fos_forward* ext_diff_fct_v2::fos_forward {nullptr}

this points to a method implementing a forward execution of the externally differentiated function y=f(x) and computing the projection yp=Jacobian*xp see also the explanation of the xp,yp members below.

◆ fos_reverse

ADOLC_ext_fct_v2_fos_reverse* ext_diff_fct_v2::fos_reverse {nullptr}

this points to a method computing the projection zp=transpose(zp) * Jacobian see also the explanation of the up/zp members below.

◆ fov_forward

ADOLC_ext_fct_v2_fov_forward* ext_diff_fct_v2::fov_forward {nullptr}

this points to a method implementing a forward execution of the externally differentiated function y=f(x) and computing the projection Yp=Jacobian*Xp see also the explanation of the Xp/Yp members below.

◆ fov_reverse

ADOLC_ext_fct_v2_fov_reverse* ext_diff_fct_v2::fov_reverse {nullptr}

this points to a method computing the projection Zp=transpose(Up) * Jacobian see also the explanation of the Up/Zp members below.

◆ function

ADOLC_ext_fct_v2* ext_diff_fct_v2::function {nullptr}

DO NOT touch - the function pointer is set through reg_ext_fct

◆ index

locint ext_diff_fct_v2::index {0}

DO NOT touch - the index is set through reg_ext_fct

◆ max_insz

size_t ext_diff_fct_v2::max_insz {0}

◆ max_nin

size_t ext_diff_fct_v2::max_nin {0}

track maximal dimensions when function is invoked

◆ max_nout

size_t ext_diff_fct_v2::max_nout {0}

◆ max_outsz

size_t ext_diff_fct_v2::max_outsz {0}

◆ nestedAdolc

char ext_diff_fct_v2::nestedAdolc {0}

make the call such that Adol-C may be used inside of the externally differentiated function; defaults to 0; this implies certain storage duplication that can be avoided if no nested use of Adol-C takes place

◆ obj

void* ext_diff_fct_v2::obj {nullptr}

This is a reference to an object for the C++ object-oriented implementation of the external function ** do not touch **

◆ p

int ext_diff_fct_v2::p {0}

Number of forward directions in fos/fov forward calls.

◆ q

int ext_diff_fct_v2::q {0}

Number of reverse weight vectors in fov/hov reverse calls.

◆ tapeId

short ext_diff_fct_v2::tapeId {0}

◆ up

double** ext_diff_fct_v2::up {nullptr}

fos_reverse and hos_reverse: weight vector, dimension nout*outsz[0..nout]

◆ Up

double*** ext_diff_fct_v2::Up {nullptr}

fov_reverse and hov_reverse: q weight vectors, dimensions (q=nout*outsz[0..nout]) q*nout*outsz[0..nout]

◆ user_allocated_mem

char ext_diff_fct_v2::user_allocated_mem {0}

This flag indicates that user allocates memory and internally no memory should be allocated

◆ x

double** ext_diff_fct_v2::x {nullptr}

The names of the variables below correspond to the formal parameters names in the call back functions above; function and all _forward calls: function argument, dimension nin*insz[0..nin]

◆ xp

double** ext_diff_fct_v2::xp {nullptr}

fos_forward: tangent direction, dimension nin*insz[0..nin]

◆ Xp

double*** ext_diff_fct_v2::Xp {nullptr}

fov_forward: seed matrix for p directions, dimensions nin*insz[0..nin]*p (p=nin*insz[0..nin])

◆ y

double** ext_diff_fct_v2::y {nullptr}

function and all _forward calls: function result, dimension nout*outsz[0..nout]

◆ yp

double** ext_diff_fct_v2::yp {nullptr}

fos_forward: Jacobian projection, dimension nout*outsz[0..nout]

◆ Yp

double*** ext_diff_fct_v2::Yp {nullptr}

fov_forward: Jacobian projection in p directions, dimension nout*outsz[0..nout]*p (p=nin*insz[0..nin])

◆ zos_forward

ADOLC_ext_fct_v2* ext_diff_fct_v2::zos_forward {nullptr}

below are function pointers used for call back from the corresponding ADOL-C trace interpreters; these function pointers are initialized to 0 by reg_ext_fct; the user needs to set eplicitly the function pointers for the trace interpreters called in the application driver this points to a method implementing a forward execution of the externally differentiated function y=f(x); the pointer would typically be set to the same function pointer supplied in the call to reg_ext_fct, i.e. zos_forward would be equal to function (above) but there are cases when it makes sense for this to be different as illustrated in examples/additional_examples/ext_diff_func/ext_diff_func.cpp

◆ zp

double** ext_diff_fct_v2::zp {nullptr}

fos_reverse: Jacobian projection, dimension nin*insz[0..nin]

◆ Zp

double*** ext_diff_fct_v2::Zp {nullptr}

fov_reverse: Jacobian projection for q weight vectors, dimensions (q=nout*outsz[0..nout]) q*nin*insz[0..nin]


The documentation for this struct was generated from the following file: