ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Types | Public Member Functions | List of all members
AlignedArrayTriplet< T > Class Template Reference
Inheritance diagram for AlignedArrayTriplet< T >:
AlignedArray< T, alignment >

Public Types

enum class  Coordinate { X = 0 , Y = 1 , Z = 2 }
 

Public Member Functions

 AlignedArrayTriplet (size_t initialSize=0)
 
void prefetch (int hint=1, int n=-1) const
 
T * begin (Coordinate coord)
 
T * xBegin ()
 
T * yBegin ()
 
T * zBegin ()
 
const T * begin (Coordinate coord) const
 
const T * xBegin () const
 
const T * yBegin () const
 
const T * zBegin () const
 
T & get (Coordinate coord, size_t i)
 
T & x (size_t i)
 
T & y (size_t i)
 
T & z (size_t i)
 
const T & get (Coordinate coord, size_t i) const
 
const T & x (size_t i) const
 
const T & y (size_t i) const
 
const T & z (size_t i) const
 
size_t dimensionToOffset (int i) const
 
T & linearCrossAccess (size_t i)
 
size_t resize_zero_shrink (size_t exact_size, bool zero_rest_of_CL=false, bool allow_shrink=false)
 
void zero (size_t start_idx)
 
void resize (size_t nEntriesPerArray)
 Reallocate the array. All content may be lost. More...
 
void increaseStorage (size_t oldNumElements, size_t additionalElements)
 
void appendValueTriplet (T v0, T v1, T v2, size_t oldNumElements)
 
- Public Member Functions inherited from AlignedArray< T, alignment >
 AlignedArray ()
 Construct an empty array.
 
 AlignedArray (size_t n)
 Construct an array of n elements.
 
 AlignedArray (const AlignedArray &a)
 Construct a copy of another AlignedArray.
 
AlignedArrayoperator= (const AlignedArray &a)
 Assign a copy of another AlignedArray.
 
virtual ~AlignedArray ()
 Free the array.
 
void appendValue (T v, size_t oldNumElements)
 
size_t get_size () const
 Return current size in terms of elements.
 
 operator T* ()
 Implicit conversion into pointer to T.
 
 operator const T * () const
 
size_t get_dynamic_memory () const
 Return amount of allocated storage + .
 

Additional Inherited Members

- Static Public Member Functions inherited from AlignedArray< T, alignment >
static size_t _round_up (size_t n)
 
- Protected Attributes inherited from AlignedArray< T, alignment >
std::vector< T, AlignedAllocator< T, alignment > > _vec
 

Member Function Documentation

◆ increaseStorage()

template<class T >
void AlignedArrayTriplet< T >::increaseStorage ( size_t  oldNumElements,
size_t  additionalElements 
)
inlinevirtual

Reimplemented from AlignedArray< T, alignment >.

◆ prefetch()

template<class T >
void AlignedArrayTriplet< T >::prefetch ( int  hint = 1,
int  n = -1 
) const
inlinevirtual

Reimplemented from AlignedArray< T, alignment >.

◆ resize()

template<class T >
void AlignedArrayTriplet< T >::resize ( size_t  nEntriesPerArray)
inlinevirtual

Reallocate the array. All content may be lost.

Reimplemented from AlignedArray< T, alignment >.

◆ resize_zero_shrink()

template<class T >
size_t AlignedArrayTriplet< T >::resize_zero_shrink ( size_t  exact_size,
bool  zero_rest_of_CL = false,
bool  allow_shrink = false 
)
inlinevirtual

Reimplemented from AlignedArray< T, alignment >.

◆ zero()

template<class T >
void AlignedArrayTriplet< T >::zero ( size_t  start_idx)
inlinevirtual

Reimplemented from AlignedArray< T, alignment >.


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