37#include "reuseIndexManagerBase.hpp"
52 template<
typename T_Index>
73 Index globalMaximumIndex;
92 unsigned long maximumGlobalIndex = globalMaximumIndex;
94 long currentLiveIndices = maximumGlobalIndex - storedIndices;
97 values.
addLongEntry(
"Cur. live indices", currentLiveIndices);
107 return globalMaximumIndex;
#define CODI_NO_INLINE
See codi::Config::AvoidedInlines.
Definition config.h:417
#define CODI_INLINE
See codi::Config::ForcedInlines.
Definition config.h:457
#define codiAssert(x)
See codi::Config::EnableAssert.
Definition config.h:432
#define CODI_DD(Type, Default)
Abbreviation for CODI_DECLARE_DEFAULT.
Definition macros.hpp:94
CoDiPack - Code Differentiation Package.
Definition codi.hpp:90
Identifiers are reused. Freed identifiers are assigned to new variables. Variables keep their indices...
Definition reuseIndexManagerBase.hpp:66
static bool constexpr IsLinear
Identifiers are not coupled to statements.
Definition reuseIndexManagerBase.hpp:80
std::vector< Index > unusedIndices
Pool of indices that have not been used in this recording yet.
Definition reuseIndexManagerBase.hpp:90
static bool constexpr CopyNeedsStatement
No copy optimization is implemented.
Definition reuseIndexManagerBase.hpp:79
void addToTapeValues(TapeValues &values) const
Add storage and other information to the tape values.
Definition reuseIndexManagerBase.hpp:233
static bool constexpr NeedsStaticStorage
Identifiers are managed globally.
Definition reuseIndexManagerBase.hpp:81
size_t indexSizeIncrement
Block size for index pool enlargement.
Definition reuseIndexManagerBase.hpp:93
size_t unusedIndicesPos
Number of remaining unused indices.
Definition reuseIndexManagerBase.hpp:91
size_t usedIndicesPos
Number of remaining used indices.
Definition reuseIndexManagerBase.hpp:88
Reuse index manager with a many-to-one relation between tapes and index manager.
Definition reuseIndexManager.hpp:53
ReuseIndexManager(Index const &reservedIndices)
Constructor.
Definition reuseIndexManager.hpp:78
friend Base
Allow the base class to call protected and private methods.
Definition reuseIndexManager.hpp:59
Index getLargestCreatedIndex() const
Returns the largest created index.
Definition reuseIndexManager.hpp:106
~ReuseIndexManager()
Destructor.
Definition reuseIndexManager.hpp:83
void addToTapeValues(TapeValues &values) const
Add storage and other information to the tape values.
Definition reuseIndexManager.hpp:91
T_Index Index
See ReuseIndexManager.
Definition reuseIndexManager.hpp:56
Tape information that can be printed in a pretty print format or a table format.
Definition tapeValues.hpp:73
void addUnsignedLongEntry(std::string const &name, unsigned long const &value)
Add unsigned long entry.
Definition tapeValues.hpp:150
void addLongEntry(std::string const &name, long const &value)
Add long entry.
Definition tapeValues.hpp:140