TRIQS/nda 1.3.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
nda::no_alias_accessor::accessor< T >

#include <nda/accessors.hpp>

Detailed Description

template<typename T>
struct nda::no_alias_accessor::accessor< T >

Accessor type of the nda::no_alias_accessor.

Template Parameters
TValue type of the data.

Definition at line 82 of file accessors.hpp.

Public Types

using element_type = T
 Value type of the data.
 
using pointer = T *__restrict
 Restricted pointer type to the data.
 
using reference = T &
 Reference type to the data.
 

Static Public Member Functions

static __inline__ reference access (pointer p, std::ptrdiff_t i) noexcept
 Access a specific element of the data.
 
static __inline__ T * offset (pointer p, std::ptrdiff_t i) noexcept
 Offset the pointer by a certain number of elements.
 

Member Function Documentation

◆ access()

template<typename T >
static __inline__ reference nda::no_alias_accessor::accessor< T >::access ( pointer p,
std::ptrdiff_t i )
inlinestaticnoexcept

Access a specific element of the data.

Parameters
pPointer to the data.
iIndex of the element to access.
Returns
Reference to the element.

Definition at line 99 of file accessors.hpp.

◆ offset()

template<typename T >
static __inline__ T * nda::no_alias_accessor::accessor< T >::offset ( pointer p,
std::ptrdiff_t i )
inlinestaticnoexcept

Offset the pointer by a certain number of elements.

Parameters
pPointer to the data.
iNumber of elements to offset the pointer by.
Returns
Pointer after applying the offset.

Definition at line 108 of file accessors.hpp.


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