Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
soa1d_container::const_accessor and aos1d_container::const_accessor
Lightweight object provides efficient array subscript [] access to the read elements from inside a soa1d_container or aos1d_container. #include <sdlt/soa1d_container.h> and #include <sdlt/aos1d_container.h>
template <typename OffsetT> soa1d_container::const_accessor;
template <typename OffsetT> aos1d_container::const_accessor; 
  typename OffsetT  |  
      The type offset that embedded offset that will be applied to each operator[] call  |  
     
const_accessor provides [] operator that returns a proxy object representing a const Element inside the Container that can export the Primitive's data. Can re-access with an offset to create a new const_accessor that when accessed at [0] will really be accessing at index corresponding to the embedded offset. Lightweight and meant to be passed by value into functions or lambda closures. Use const_accessors in place of const pointers to access the logical array data.
Member  |  
        Description  |  
       
|---|---|
 |  
        Default Constructible  |  
       
const_accessor(const const_accessor &);  |  
        Copy Constructible  |  
       
 |  
        Copy Assignable  |  
       
 |  
        Returns: Number of elements in the container.  |  
       
 |  
        Returns: proxy ConstElement representing element atindex_d1 in the container..  |  
       
 |  
        When: IndexT_D1 is one of the SDLT defined or generated Index types. Returns: proxy ConstElement representing element at index_d1 in the container.  |  
       
 |  
        Returns: const_accessor with an integer-based embedded index offset.  |  
       
 |  
        Returns: const_accessor with an aligned_offset<IndexAlignmentT> based embedded index offset.  |  
       
 |  
        Returns: const_accessor with a fixed_offset<OffsetT> based embedded index offset.  |