10#include "vecmem/containers/data/vector_view.hpp"
11#include "vecmem/edm/details/types.hpp"
12#include "vecmem/edm/details/view_traits.hpp"
13#include "vecmem/edm/schema.hpp"
14#include "vecmem/utils/tuple.hpp"
15#include "vecmem/utils/type_traits.hpp"
16#include "vecmem/utils/types.hpp"
43 static_assert(
sizeof...(VARTYPES) > 0,
44 "SoA containers without variables are not supported.");
53 vecmem::details::disjunction_v<std::is_const<
54 typename details::view_type<VARTYPES>::payload_type>...>,
55 details::const_size_pointer, details::size_pointer>;
62 vecmem::details::disjunction_v<std::is_const<
63 typename details::view_type<VARTYPES>::payload_type>...>,
77 VECMEM_HOST_AND_DEVICE
94 vecmem::details::conjunction_v<std::is_constructible<
97 vecmem::details::disjunction_v<
114 vecmem::details::conjunction_v<std::is_constructible<
117 vecmem::details::disjunction_v<
131 VECMEM_HOST_AND_DEVICE
135 template <std::
size_t INDEX>
138 template <std::
size_t INDEX>
148 VECMEM_HOST_AND_DEVICE
151 VECMEM_HOST_AND_DEVICE
155 VECMEM_HOST_AND_DEVICE
159 VECMEM_HOST_AND_DEVICE
163 VECMEM_HOST_AND_DEVICE
167 VECMEM_HOST_AND_DEVICE
196#include "vecmem/edm/impl/view.ipp"
Class holding data about a 1 dimensional vector/array.
Definition vector_view.hpp:38
std::conditional_t< vecmem::details::disjunction_v< std::is_const< typename details::view_type< VARTYPES >::payload_type >... >, details::const_memory_view, details::memory_view > memory_view_type
Type of the view(s) into the raw data of the view.
Definition view.hpp:64
memory_view_type m_payload
View into the single (device) memory allocation for the "payload".
Definition view.hpp:182
VECMEM_HOST_AND_DEVICE tuple_element_t< INDEX, tuple_type > & get()
Get the view of a specific variable (non-const)
memory_view_type m_host_layout
View into the memory that describes the layout of the container (in host accessible memory)
Definition view.hpp:188
view()=default
Default constructor.
memory_view_type m_size
View into the memory allocated for the container's size variable(s)
Definition view.hpp:179
memory_view_type m_layout
View into the memory that describes the layout of the container.
Definition view.hpp:185
size_type m_capacity
Maximum capacity of the container.
Definition view.hpp:174
std::conditional_t< vecmem::details::disjunction_v< std::is_const< typename details::view_type< VARTYPES >::payload_type >... >, details::const_size_pointer, details::size_pointer > size_pointer
Pointer type to the size of the container.
Definition view.hpp:55
tuple_type m_views
Views for the individual variables.
Definition view.hpp:176
VECMEM_HOST_AND_DEVICE view & operator=(const view< schema< OTHERTYPES... > > &rhs)
Assignment operator from a (possibly/slightly) different view.
details::const_size_pointer const_size_pointer
Constant pointer type to the size of the container.
Definition view.hpp:57
VECMEM_HOST_AND_DEVICE const tuple_element_t< INDEX, tuple_type > & get() const
Get the view of a specific variable (const)
details::size_type size_type
Size type used for the container.
Definition view.hpp:50
schema< VARTYPES... > schema_type
The schema describing the container view.
Definition view.hpp:48
Technical base type for view<schema<VARTYPES...>>
Definition view.hpp:28
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
Implementation for std::negation.
Definition type_traits.hpp:91
Definition view_traits.hpp:33
Meta type describing the "schema" of an SoA container.
Definition schema.hpp:46