10#include "vecmem/utils/type_traits.hpp"
11#include "vecmem/utils/types.hpp"
37template <
typename TYPE>
42 !std::is_same<typename std::remove_cv<TYPE>::type,
bool>::value,
43 "bool is not supported in VecMem containers");
50 std::conditional_t<std::is_const<TYPE>::value,
51 std::add_pointer_t<std::add_const_t<size_type>>,
52 std::add_pointer_t<size_type>>;
59 VECMEM_HOST_AND_DEVICE
62 VECMEM_HOST_AND_DEVICE
74 std::enable_if_t<details::is_same_nc<TYPE, OTHERTYPE>::value,
83 std::enable_if_t<details::is_same_nc<TYPE, OTHERTYPE>::value,
91 std::enable_if_t<std::is_same<std::remove_cv_t<TYPE>,
92 std::remove_cv_t<OTHERTYPE>>::value,
99 std::enable_if_t<std::is_same<std::remove_cv_t<TYPE>,
100 std::remove_cv_t<OTHERTYPE>>::value,
106 VECMEM_HOST_AND_DEVICE
109 VECMEM_HOST_AND_DEVICE
113 VECMEM_HOST_AND_DEVICE
117 VECMEM_HOST_AND_DEVICE
134#include "vecmem/containers/impl/vector_view.ipp"
Class holding data about a 1 dimensional vector/array.
Definition vector_view.hpp:38
VECMEM_HOST_AND_DEVICE vector_view & operator=(const vector_view< OTHERTYPE > &rhs)
Copy from a "slightly different" vecmem::details::vector_view object.
std::add_pointer_t< TYPE > pointer
Pointer type to the array.
Definition vector_view.hpp:54
VECMEM_HOST_AND_DEVICE bool operator!=(const vector_view< OTHERTYPE > &rhs) const
Inequality check. Simply based on operator==.
Definition vector_view.ipp:65
VECMEM_HOST_AND_DEVICE pointer ptr() const
Get a pointer to the vector elements.
Definition vector_view.ipp:91
unsigned int size_type
We cannot use boolean types.
Definition vector_view.hpp:47
vector_view()=default
Default constructor.
VECMEM_HOST_AND_DEVICE bool operator==(const vector_view< OTHERTYPE > &rhs) const
Equality check.
Definition vector_view.ipp:53
VECMEM_HOST_AND_DEVICE size_pointer size_ptr() const
Get a pointer to the size of the vector.
Definition vector_view.ipp:84
std::conditional_t< std::is_const< TYPE >::value, std::add_pointer_t< std::add_const_t< size_type > >, std::add_pointer_t< size_type > > size_pointer
Pointer type to the size of the array.
Definition vector_view.hpp:52
VECMEM_HOST_AND_DEVICE size_type capacity() const
Get the maximum capacity of the vector.
Definition vector_view.ipp:78
VECMEM_HOST_AND_DEVICE size_type size() const
Get the size of the vector.
Definition vector_view.ipp:72
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