|
vecmem 1.22.0
|
Simple statically-sized array-like class designed for use in device code. More...
#include <vecmem/containers/static_array.hpp>
Public Types | |
Type definitions, mimicking @c std::array | |
| using | value_type = T |
| Type of the array elements. | |
| using | size_type = std::size_t |
| Size type for the array. | |
| using | difference_type = std::ptrdiff_t |
| Pointer difference type. | |
| using | reference = value_type & |
| Value reference type. | |
| using | const_reference = const value_type & |
| Constant value reference type. | |
| using | pointer = value_type * |
| Value pointer type. | |
| using | const_pointer = const value_type * |
| Constant value pointer type. | |
| using | iterator = pointer |
| Forward iterator type. | |
| using | const_iterator = const_pointer |
| Constant forward iterator type. | |
| using | reverse_iterator = vecmem::details::reverse_iterator< iterator > |
| Reverse iterator type. | |
| using | const_reverse_iterator = vecmem::details::reverse_iterator< const_iterator > |
| Constant reverse iterator type. | |
Public Member Functions | |
Array element access functions | |
| VECMEM_HOST constexpr reference | at (size_type i) |
| Bounds-checked accessor method. | |
| VECMEM_HOST constexpr const_reference | at (size_type i) const |
| Constant bounds-checked accessor method. | |
| VECMEM_HOST_AND_DEVICE constexpr reference | operator[] (size_type i) |
| Accessor method. | |
| VECMEM_HOST_AND_DEVICE constexpr const_reference | operator[] (size_type i) const |
| Constant accessor method. | |
Simple statically-sized array-like class designed for use in device code.
This class is designed to be an almost-drop-in replacement for std::array which can be used in device code.
| T | The array type. |
| N | The size of the array. |
Bounds-checked accessor method.
Since this method can throw an exception, this is not usable on the device side.
| [in] | i | The index to access. |
Constant bounds-checked accessor method.
Since this method can throw an exception, this is not usable on the device side.
| [in] | i | The index to access. |
|
constexpr |
Accessor method.
| [in] | i | The index to access. |
|
constexpr |
Constant accessor method.
| [in] | i | The index to access. |