CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::ChunkPosition< T_NestedPosition > Struct Template Reference

Position with two indices for e.g. chunked data access. More...

#include <position.hpp>

Inheritance diagram for codi::ChunkPosition< T_NestedPosition >:

Public Types

using Base = ArrayPosition<NestedPosition>
 Base abbreviation.
 
using NestedPosition = T_NestedPosition
 See ChunkPosition.
 
- Public Types inherited from codi::ArrayPosition< T_NestedPosition >
using NestedPosition = T_NestedPosition
 See ArrayPosition.
 

Public Member Functions

 ChunkPosition ()
 Constructor.
 
 ChunkPosition (size_t const &chunk, size_t const &data, NestedPosition const &inner)
 Constructor.
 
bool operator!= (ChunkPosition const &o) const
 Operator != also compares with nested data.
 
bool operator< (ChunkPosition const &o) const
 Operator < also compares with nested data.
 
bool operator<= (ChunkPosition const &o) const
 Operator <= also compares with nested data.
 
bool operator== (ChunkPosition const &o) const
 Operator == also compares with nested data.
 
bool operator> (ChunkPosition const &o) const
 Operator > also compares with nested data.
 
bool operator>= (ChunkPosition const &o) const
 Operator >= also compares with nested data.
 
- Public Member Functions inherited from codi::ArrayPosition< T_NestedPosition >
 ArrayPosition ()
 Constructor.
 
 ArrayPosition (size_t const &data, NestedPosition const &inner)
 Constructor.
 
bool operator!= (ArrayPosition const &o) const
 Operator != also compares with nested data.
 
bool operator< (ArrayPosition const &o) const
 Operator < also compares with nested data.
 
bool operator<= (ArrayPosition const &o) const
 Operator <= also compares with nested data.
 
bool operator== (ArrayPosition const &o) const
 Operator == also compares with nested data.
 
bool operator> (ArrayPosition const &o) const
 Operator > also compares with nested data.
 
bool operator>= (ArrayPosition const &o) const
 Operator >= also compares with nested data.
 

Public Attributes

size_t chunk
 Chunk position index.
 
- Public Attributes inherited from codi::ArrayPosition< T_NestedPosition >
size_t data
 Array position index.
 
NestedPosition inner
 Position of nested data.
 

Detailed Description

template<typename T_NestedPosition>
struct codi::ChunkPosition< T_NestedPosition >

Position with two indices for e.g. chunked data access.

Used for data that is allocated with multiple chunks, e.g. ChunkData. chunk is the major index and identifies the chunk and Base::data is the secondary index which refers to the position in the chunk.

For p1 < p2 it is enough that p1.chunk < p2.chunk, only in the equality case Base::data needs to be checked.

Template Parameters
T_NestedPositionPosition implementation

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