Developer Guide and Reference

Contents

aos1d_container

Template class for "Array of Structures" memory layout of a one-dimensional container of Primitives.
#include <sdlt/aos1d_container.h>

Syntax

template< typename PrimitiveT, AccessBy AccessByT, class AllocatorT = allocator::default_alloc > class aos1d_container;
Arguments
typename PrimitiveT
The type that each element in the array will store
access_by AccessByT
Enum to control how the memory layout will be accessed. Recommend access_by_struct unless you are having issues vectorizing.
See the documentation of
access_by
for more details
class AllocatorT = allocator::default_alloc
[Optional] Specify the type of allocator to be used.
allocator::default_alloc
is currently the only allocator supported.
Description
Provide compatible interface with
soa1d_container
while keeping the memory layout as an Array of Structures internally. User can easily switch between data layouts by changing the type of container they use. The rest of the code written against accessors and proxy elements and members can stay the same.
  • Dynamic resizing with interface similar to
    std::vector
  • Accessor objects suitable for efficient data access inside SIMD loops
Member
Description
typedef size_t size_type;
Type to use when specifying sizes to methods of the container.
template <typename OffsetT = no_offset> using accessor;
Template alias to an
accessor
for this container
template <typename OffsetT = no_offset> using const_accessor;