CoDiPack  2.2.0
A Code Differentiation Package
SciComp TU Kaiserslautern
Loading...
Searching...
No Matches
codi::Chunk3< Data1, Data2, Data3 > Struct Template Referencefinal

#include <chunk.hpp>

Inheritance diagram for codi::Chunk3< Data1, Data2, Data3 >:

Public Types

using Base = ChunkBase
 Abbreviation for the base class type.
 

Public Member Functions

 Chunk3 (size_t const &size)
 Constructor.
 
 ~Chunk3 ()
 Destructor.
 
- Public Member Functions inherited from codi::ChunkBase
 ChunkBase (size_t const &size)
 Constructor.
 
virtual ~ChunkBase ()
 Destructor.
 
template<typename... Data>
void pushData (Data &&... dataEntries)
 provided.
 
template<typename... Pointers>
void dataPointer (size_t const &index, Pointers *&... pointers)
 
void swap (ImplProxy &other)
 Swap data with other chunk of the same type.
 
size_t getSize () const
 Get the allocated size.
 
size_t getUnusedSize () const
 Number of unused data items.
 
size_t getUsedSize () const
 Number of used data items.
 
void reset ()
 Sets the number of used items to zero.
 
void resize (size_t newSize)
 Resize the allocated data. Stored data is lost. Used size is set to zero.
 
void setUsedSize (size_t const &usage)
 Set the used size.
 

ChunkBase interface implementation

static size_t constexpr EntrySize
 Total size of all data in one entry.
 
void allocateData ()
 Allocated the data if it was deallocated before.
 
void dataPointer (size_t const &index, Data1 *&pointer1, Data2 *&pointer2, Data3 *&pointer3)
 
void deleteData ()
 Delete the allocated data.
 
void erase (size_t const &start, size_t const &end)
 Erase data items start, ..., end - 1.
 
void pushData (Data1 const &value1, Data2 const &value2, Data3 const &value3)
 provided.
 
void readData (FileIo &handle)
 Read data from the FileIo handle.
 
void swap (Chunk3< Data1, Data2, Data3 > &other)
 Swap data with other chunk of the same type.
 
void writeData (FileIo &handle) const
 Write data to the FileIo handle.
 

Additional Inherited Members

- Static Public Attributes inherited from codi::ChunkBase
static size_t constexpr EntrySize = false
 Total size of all data in one entry.
 
- Protected Member Functions inherited from codi::ChunkBase
void swap (ChunkBase &other)
 Swap the entries of this base class.
 
- Protected Attributes inherited from codi::ChunkBase
size_t size
 Maximum size of arrays.
 
size_t usedSize
 Currently used size.
 

Detailed Description

template<typename Data1, typename Data2, typename Data3>
struct codi::Chunk3< Data1, Data2, Data3 >

@ brief Chunk with three entries per item.

Template Parameters
Chunk1Any type.
Chunk2Any type.
Chunk3Any type.

Member Function Documentation

◆ allocateData()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::allocateData ( )
inlinevirtual

Allocated the data if it was deallocated before.

Implements codi::ChunkBase.

◆ dataPointer()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::dataPointer ( size_t const & index,
Data1 *& pointer1,
Data2 *& pointer2,
Data3 *& pointer3 )
inline

Extract pointer to requested position. For each entry one argument has to be provided.

◆ deleteData()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::deleteData ( )
inlinevirtual

Delete the allocated data.

Implements codi::ChunkBase.

◆ erase()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::erase ( size_t const & start,
size_t const & end )
inlinevirtual

Erase data items start, ..., end - 1.

Implements codi::ChunkBase.

◆ pushData()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::pushData ( Data1 const & value1,
Data2 const & value2,
Data3 const & value3 )
inline

provided.

Add one data item. For each entry one argument has to be

◆ readData()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::readData ( FileIo & handle)
inlinevirtual

Read data from the FileIo handle.

Implements codi::ChunkBase.

◆ swap()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::swap ( Chunk3< Data1, Data2, Data3 > & other)
inline

Swap data with other chunk of the same type.

◆ writeData()

template<typename Data1 , typename Data2 , typename Data3 >
void codi::Chunk3< Data1, Data2, Data3 >::writeData ( FileIo & handle) const
inlinevirtual

Write data to the FileIo handle.

Implements codi::ChunkBase.

Member Data Documentation

◆ EntrySize

template<typename Data1 , typename Data2 , typename Data3 >
size_t constexpr codi::Chunk3< Data1, Data2, Data3 >::EntrySize
staticconstexpr
Initial value:
=
sizeof(Data1) + sizeof(Data2) + sizeof(Data3)

Total size of all data in one entry.


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