Reuse index manager with a one-to-one relation between tapes and index manager.
More...
|
| | ParallelReuseIndexManager (Index const &reservedIndices) |
| |
|
| ~ParallelReuseIndexManager () |
| | Destructor.
|
| |
|
| void | addToTapeValues (TapeValues &values) const |
| | Add storage and other information to the tape values.
|
| |
| inlineIndex | getLargestCreatedIndex () const |
| | Returns the largest created index.
|
| |
| | ReuseIndexManagerBase () |
| |
|
| ~ReuseIndexManagerBase () |
| | Destructor.
|
| |
| inlinebool | assignIndex (Index &index) |
| | Call on assignment of a primal value, e.g. on w for w = a + b.
|
| |
| inlinebool | assignUnusedIndex (Index &index) |
| | Call on registering input values.
|
| |
| inlinevoid | copyIndex (Index &lhs, Index const &rhs) |
| | Call on copy of a primal value, e.g. w = a.
|
| |
| inlinevoid | freeIndex (Index &index) |
| | Call on destruction of a primal value. Usually called from the destructor.
|
| |
| void | updateLargestCreatedIndex (Index const &index) |
| | Update the largest generated index.
|
| |
| inlinevoid | reset () |
| | Reset for a new recording.
|
| |
| void | addToTapeValues (TapeValues &values) const |
| | Add storage and other information to the tape values.
|
| |
| void | addToTapeValues (TapeValues &values) const |
| | Add storage and other information to the tape values.
|
| |
| Index | getLargestCreatedIndex () const |
| | Returns the largest created index.
|
| |
| template<typename Tape> |
| bool | assignIndex (Index &index) |
| | Call on assignment of a primal value, e.g. on w for w = a + b.
|
| |
|
void | updateLargestCreatedIndex (Index const &index) |
| | Update the largest generated index.
|
| |
| template<typename Tape> |
| bool | assignUnusedIndex (Index &index) |
| | Call on registering input values.
|
| |
|
template<typename Tape> |
| void | copyIndex (Index &lhs, Index const &rhs) |
| | Call on copy of a primal value, e.g. w = a.
|
| |
|
template<typename Tape> |
| void | freeIndex (Index &index) |
| | Call on destruction of a primal value. Usually called from the destructor.
|
| |
|
void | reset () |
| | Reset for a new recording.
|
| |
| inlinevoid | pushData () |
| | Add data to the storage allocated by the implementation. The method can only be called after a call to reserveItems and only as often as the number of reserved items.
|
| |
| inlinevoid | getDataPointers () |
| | Get pointers to the data from the storage implementation. The method can only be called after a call to reserveItems() and data can only be accessed from 0 to the number given by reserveItems (excluding). Afterwards, addDataSize() needs to be called with the actual number of elements that have been written.
|
| |
| inlinevoid | addDataSize (size_t size) |
| | Add this many items to the data stream, after the data has been manipulated via pointers obtained from getDataPointers().
|
| |
| inlineInternalPosHandle | reserveItems (size_t const &items) |
| | Reserve this many items on the data stream. See pushData for details.
|
| |
| void | resize (size_t const &totalSize) |
| |
| void | reset () |
| |
| void | resetHard () |
| |
| void | resetTo (Position const &pos) |
| |
| void | erase (Position const &start, Position const &end, bool recursive=true) |
| |
| inlinesize_t | getDataSize () const |
| |
| inlinePosition | getPosition () const |
| |
| inlinesize_t | getPushedDataCount (InternalPosHandle const &startPos) |
| |
| inlinePosition | getZeroPosition () const |
| |
| void | addToTapeValues (TapeValues &values) const |
| | Add amount of stored data to the TapeValues object. Not called on the nested vector.
|
| |
| template<typename = void> |
| inlinePosition | extractPosition (Position const &pos) const |
| | Extract the position of a nested DataInterface from the global position object provide by this interface.
|
| |
| void | setNested (NestedData *v) |
| |
|
| |
| void | swap (DataInterface &other) |
| |
| template<int selectedDepth = -1, typename FunctionObject, typename... Args> |
| inlinevoid | evaluateForward (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Evaluates the function object with segments of continuous and valid data for all nested DataInterfaces.
|
| |
| template<int selectedDepth = -1, typename FunctionObject, typename... Args> |
| inlinevoid | evaluateReverse (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Evaluates the function object with segments of continuous and valid data for all nested DataInterfaces.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachChunk (FunctionObject &function, bool recursive, Args &&... args) |
| | Calls the function object for each continuous segment of data.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachForward (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Calls the function object for each item in the data stream. This call is not recursive.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachReverse (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Calls the function object for each item in the data stream. This call is not recursive.
|
| |
| inlinevoid | addDataSize (size_t const &size) |
| | Add this many items to the data stream, after the data has been manipulated via pointers obtained from getDataPointers().
|
| |
| template<typename... Data> |
| inlinevoid | getDataPointers (Data *&... pointers) |
| | Get pointers to the data from the storage implementation. The method can only be called after a call to reserveItems() and data can only be accessed from 0 to the number given by reserveItems (excluding). Afterwards, addDataSize() needs to be called with the actual number of elements that have been written.
|
| |
| template<typename... Data> |
| inlinevoid | pushData (Data const &... data) |
| | Add data to the storage allocated by the implementation. The method can only be called after a call to reserveItems and only as often as the number of reserved items.
|
| |
| inlineInternalPosHandle | reserveItems (size_t const &items) |
| | Reserve this many items on the data stream. See pushData for details.
|
| |
| void | resize (size_t const &totalSize) |
| |
| void | reset () |
| |
| void | resetHard () |
| |
| void | resetTo (Position const &pos) |
| |
| void | erase (Position const &start, Position const &end, bool recursive=true) |
| |
| inlinesize_t | getDataSize () const |
| |
| inlinePosition | getPosition () const |
| |
| inlinesize_t | getPushedDataCount (InternalPosHandle const &startPos) |
| |
| inlinePosition | getZeroPosition () const |
| |
| void | addToTapeValues (TapeValues &values) const |
| | Add amount of stored data to the TapeValues object. Not called on the nested vector.
|
| |
| template<typename TargetPosition> |
| inlineTargetPosition | extractPosition (Position const &pos) const |
| | Extract the position of a nested DataInterface from the global position object provide by this interface.
|
| |
| void | setNested (NestedData *v) |
| |
| void | swap (DataInterface &other) |
| |
| template<int selectedDepth = -1, typename FunctionObject, typename... Args> |
| inlinevoid | evaluateForward (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Evaluates the function object with segments of continuous and valid data for all nested DataInterfaces.
|
| |
| template<int selectedDepth = -1, typename FunctionObject, typename... Args> |
| inlinevoid | evaluateReverse (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Evaluates the function object with segments of continuous and valid data for all nested DataInterfaces.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachChunk (FunctionObject &function, bool recursive, Args &&... args) |
| | Calls the function object for each continuous segment of data.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachForward (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Calls the function object for each item in the data stream. This call is not recursive.
|
| |
| template<typename FunctionObject, typename... Args> |
| inlinevoid | forEachReverse (Position const &start, Position const &end, FunctionObject function, Args &&... args) |
| | Calls the function object for each item in the data stream. This call is not recursive.
|
| |
template<typename T_Index, typename T_ParallelToolbox>
struct codi::ParallelReuseIndexManager< T_Index, T_ParallelToolbox >
Reuse index manager with a one-to-one relation between tapes and index manager.
This is a thread-safe implementation of the reuse index management strategy. For the details of reuse index management, see ReuseIndexManagerBase. The key difference is that multiple tape-local index managers can acquire non-overlapping ranges of indices from the same global management.
- Template Parameters
-
| T_Index | Type for the identifier, usually an integer type. |
| T_ParallelToolbox | Tools used to make this index manager thread-safe. |