Gromacs
2025.0-dev-20241011-013a99c
|
#include <gromacs/mdspan/accessor_policy.h>
The most basic memory access model for mdspan.
ElementType | the type held in memory to be accessed |
Public Types | |
using | element_type = ElementType |
Type of element to be accessed. | |
using | pointer = ElementType * |
Pointer to element to be accessed. | |
using | offset_policy = accessor_basic |
How to determine a memory offset, provided by self accessor. | |
using | reference = ElementType & |
Type of references. | |
Public Member Functions | |
constexpr offset_policy::pointer | offset (pointer p, ptrdiff_t i) const noexcept |
Shift a pointer by an offset. More... | |
constexpr reference | access (pointer p, ptrdiff_t i) const noexcept |
Access element from an offset to given pointer. More... | |
constexpr ElementType * | decay (pointer p) const noexcept |
Decay pointer to pointer to ElementType. NOTE This function does nothing, because it is the trivial implementation of an accessor. More... | |
|
inlinenoexcept |
Access element from an offset to given pointer.
[in] | p | Pointer to reference memory location. |
[in] | i | offset from memory location. |
|
inlinenoexcept |
Decay pointer to pointer to ElementType. NOTE This function does nothing, because it is the trivial implementation of an accessor.
|
inlinenoexcept |
Shift a pointer by an offset.
[in] | p | Pointer to reference memory location. |
[in] | i | offset from memory location. |