CppADCodeGen
HEAD
A C++ Algorithmic Differentiation Package with Source Code Generation
|
Public Member Functions | |
ArrayIdCompresser (CodeHandlerVector< Base, size_t > &varId, size_t maxArraySize) | |
size_t | getIdCount () const |
void | addFreeArraySpace (const OperationNode< Base > &released) |
size_t | reserveArraySpace (const OperationNode< Base > &newArray) |
Static Public Member Functions | |
static bool | isSameArrayElement (const Argument< Base > *oldArg, const Argument< Base > &arg) |
Arrays in generated source can reuse space from a global array. Positions for each array can be determined using this class. Array locations are stored in node IDs as: id = location + 1.
Definition at line 27 of file array_id_compresser.hpp.
|
inline |
Creates an ArrayIdCompresser
maxArraySize | The likely number of elements in the temporary array |
Definition at line 55 of file array_id_compresser.hpp.
|
inline |
Find the best location for the new array
Use available space
no space available, need more
Definition at line 98 of file array_id_compresser.hpp.
Referenced by CppAD::cg::CodeHandler< ScalarOut >::reduceTemporaryVariables().