10#if defined(__HIP_DEVICE_COMPILE__)
11#include <hip/hip_runtime.h>
19template <
typename T, std::
size_t N>
27template <
typename T, std::
size_t N>
29 std::enable_if_t<details::is_same_nc<T, OTHERTYPE>::value,
bool> >
37template <
typename T, std::
size_t N>
40 : m_ptr(parent.m_ptr) {}
42template <
typename T, std::
size_t N>
58template <
typename T, std::
size_t N>
68template <
typename T, std::
size_t N>
79template <
typename T, std::
size_t N>
87template <
typename T, std::
size_t N>
95template <
typename T, std::
size_t N>
99 static_assert(
N > 0,
"Cannot return first element of empty array");
105template <
typename T, std::
size_t N>
110 static_assert(
N > 0,
"Cannot return first element of empty array");
116template <
typename T, std::
size_t N>
120 static_assert(
N > 0,
"Cannot return last element of empty array");
126template <
typename T, std::
size_t N>
131 static_assert(
N > 0,
"Cannot return last element of empty array");
137template <
typename T, std::
size_t N>
143template <
typename T, std::
size_t N>
149template <
typename T, std::
size_t N>
155template <
typename T, std::
size_t N>
162template <
typename T, std::
size_t N>
169template <
typename T, std::
size_t N>
175template <
typename T, std::
size_t N>
181template <
typename T, std::
size_t N>
187template <
typename T, std::
size_t N>
193template <
typename T, std::
size_t N>
200template <
typename T, std::
size_t N>
207template <
typename T, std::
size_t N>
213template <
typename T, std::
size_t N>
220template <
typename T, std::
size_t N>
227template <
typename T, std::
size_t N>
233template <
typename T, std::
size_t N>
240template <
typename T, std::
size_t N>
Class holding data about a 1 dimensional vector/array.
Definition vector_view.hpp:38
Type mimicking std::reverse_iterator.
Definition reverse_iterator.hpp:25
Class mimicking a host-filled std::array in "device code".
Definition device_array.hpp:28
VECMEM_HOST_AND_DEVICE iterator end()
Return a forward iterator pointing at the end of the array.
Definition device_array.ipp:170
VECMEM_HOST_AND_DEVICE reference at(size_type pos)
Return a specific element of the array in a "safe way" (non-const)
Definition device_array.ipp:59
VECMEM_HOST_AND_DEVICE pointer data()
Access the underlying memory array (non-const)
Definition device_array.ipp:138
VECMEM_HOST_AND_DEVICE const_reverse_iterator crend() const
Return a constant reverse iterator pointing at the beginning of the array.
Definition device_array.ipp:221
VECMEM_HOST_AND_DEVICE reference front()
Return the first element of the array (non-const)
Definition device_array.ipp:96
VECMEM_HOST_AND_DEVICE reference operator[](size_type pos)
Return a specific element of the array (non-const)
Definition device_array.ipp:80
VECMEM_HOST_AND_DEVICE constexpr bool empty() const
Check whether the array is empty.
Definition device_array.ipp:228
value_type * pointer
Value pointer type.
Definition device_array.hpp:46
const value_type * const_pointer
Constant value pointer type.
Definition device_array.hpp:48
value_type & reference
Value reference type.
Definition device_array.hpp:42
std::size_t size_type
Size type for the array.
Definition device_array.hpp:37
VECMEM_HOST_AND_DEVICE const_reverse_iterator crbegin() const
Return a constant reverse iterator pointing at the end of the array.
Definition device_array.ipp:201
VECMEM_HOST_AND_DEVICE const_iterator cbegin() const
Return a constant forward iterator pointing at the beginning of the array.
Definition device_array.ipp:163
const_pointer const_iterator
Constant forward iterator type.
Definition device_array.hpp:53
VECMEM_HOST_AND_DEVICE reverse_iterator rbegin()
Return a reverse iterator pointing at the end of the array.
Definition device_array.ipp:188
VECMEM_HOST_AND_DEVICE const_iterator cend() const
Return a constant forward iterator pointing at the end of the array.
Definition device_array.ipp:182
VECMEM_HOST_AND_DEVICE device_array & operator=(const device_array &rhs)
Copy assignment operator.
Definition device_array.ipp:43
VECMEM_HOST_AND_DEVICE device_array(const data::vector_view< value_type > &data)
Constructor, on top of a previously allocated/filled block of memory.
Definition device_array.ipp:20
VECMEM_HOST_AND_DEVICE constexpr size_type max_size() const
Return the maximum (fixed) number of elements in the array.
Definition device_array.ipp:241
VECMEM_HOST_AND_DEVICE constexpr size_type size() const
Return the number of elements in the array.
Definition device_array.ipp:234
const value_type & const_reference
Constant value reference type.
Definition device_array.hpp:44
VECMEM_HOST_AND_DEVICE reverse_iterator rend()
Return a reverse iterator pointing at the beginning of the array.
Definition device_array.ipp:208
VECMEM_HOST_AND_DEVICE reference back()
Return the last element of the array (non-const)
Definition device_array.ipp:117
pointer iterator
Forward iterator type.
Definition device_array.hpp:51
VECMEM_HOST_AND_DEVICE iterator begin()
Return a forward iterator pointing at the beginning of the array.
Definition device_array.ipp:150
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
std::vector< T, vecmem::polymorphic_allocator< T > > vector
Alias type for vectors with our polymorphic allocator.
Definition vector.hpp:35