Below are some guidelines on when to use which CoDiPack type. Details can be found at Active type definitions. A plus in the table means that this is supported or a beneficial type, a minus that it is not supported or not beneficial.
Type | C-like memory operations | Vector mode | Large inactive parts | Hessian computation |
---|---|---|---|---|
codi::RealReverse | + | - | + | - |
codi::RealReverseIndex | - | + | + | - |
codi::RealReversePrimal | + | - | - | + |
codi::RealReversePrimalIndex | - | + | - | + |
Legend:
memcpy
can be used on the CoDiPack type, assuming that the correct size is used (e.g. memcpy(y, x, n * sizeof(codi::RealReverse))
.registerInput
(independent variables) - then the sensitivites are not propagated for these passive variables. Jacobian taping approaches perform usually better in such a case.