|
ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
An aligned array. More...
#include <AlignedArray.h>
Public Member Functions | |
| 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. | |
| AlignedArray & | operator= (const AlignedArray &a) |
| Assign a copy of another AlignedArray. | |
| virtual | ~AlignedArray () |
| Free the array. | |
| virtual void | prefetch (int, int) const |
| virtual void | increaseStorage (size_t oldNumElements, size_t additionalElements) |
| void | appendValue (T v, size_t oldNumElements) |
| virtual size_t | resize_zero_shrink (size_t exact_size, bool zero_rest_of_CL=false, bool allow_shrink=false) |
| virtual void | resize (size_t n) |
| Reallocate the array. All content may be lost. More... | |
| virtual void | zero (size_t start_idx=0) |
| 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 + . | |
Static Public Member Functions | |
| static size_t | _round_up (size_t n) |
Protected Attributes | |
| std::vector< T, AlignedAllocator< T, alignment > > | _vec |
An aligned array.
Has pointer to T semantics. Internal size is rounded up to fill up full cache-lines.
| T | The type of the array elements. |
| alignment | The alignment restriction. Must be a power of 2, should not be 8. |
|
inlinevirtual |
Reallocate the array. All content may be lost.
Reimplemented in AlignedArrayTriplet< T >.