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

#include <chunk.hpp>

Inheritance diagram for codi::Chunk1< Data1 >:

Public Types

using Base = ChunkBase
 Abbreviation for the base class type.
 

Public Member Functions

 Chunk1 (size_t const &size)
 Constructor.
 
 ~Chunk1 ()
 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 = sizeof(Data1)
 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)
 
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)
 provided.
 
void readData (FileIo &handle)
 Read data from the FileIo handle.
 
void swap (Chunk1< Data1 > &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>
struct codi::Chunk1< Data1 >

@ brief Chunk with one entry per item.

Template Parameters
Chunk1Any type.

Member Function Documentation

◆ allocateData()

template<typename Data1 >
void codi::Chunk1< Data1 >::allocateData ( )
inlinevirtual

Allocated the data if it was deallocated before.

Implements codi::ChunkBase.

◆ dataPointer()

template<typename Data1 >
void codi::Chunk1< Data1 >::dataPointer ( size_t const & index,
Data1 *& pointer1 )
inline

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

◆ deleteData()

template<typename Data1 >
void codi::Chunk1< Data1 >::deleteData ( )
inlinevirtual

Delete the allocated data.

Implements codi::ChunkBase.

◆ erase()

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

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

Implements codi::ChunkBase.

◆ pushData()

template<typename Data1 >
void codi::Chunk1< Data1 >::pushData ( Data1 const & value1)
inline

provided.

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

◆ readData()

template<typename Data1 >
void codi::Chunk1< Data1 >::readData ( FileIo & handle)
inlinevirtual

Read data from the FileIo handle.

Implements codi::ChunkBase.

◆ swap()

template<typename Data1 >
void codi::Chunk1< Data1 >::swap ( Chunk1< Data1 > & other)
inline

Swap data with other chunk of the same type.

◆ writeData()

template<typename Data1 >
void codi::Chunk1< Data1 >::writeData ( FileIo & handle) const
inlinevirtual

Write data to the FileIo handle.

Implements codi::ChunkBase.

Member Data Documentation

◆ EntrySize

template<typename Data1 >
size_t constexpr codi::Chunk1< Data1 >::EntrySize = sizeof(Data1)
staticconstexpr

Total size of all data in one entry.


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