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"
44 static_assert(
sizeof...(VARTYPES) > 0,
45 "SoA containers without variables are not supported.");
54 vecmem::details::disjunction_v<std::is_const<
56 details::const_size_pointer, details::size_pointer>;
63 vecmem::details::disjunction_v<std::is_const<
78 VECMEM_HOST_AND_DEVICE
95 vecmem::details::conjunction_v<std::is_constructible<
98 vecmem::details::disjunction_v<
115 vecmem::details::conjunction_v<std::is_constructible<
118 vecmem::details::disjunction_v<
132 VECMEM_HOST_AND_DEVICE
136 template <std::
size_t INDEX>
139 template <std::
size_t INDEX>
149 VECMEM_HOST_AND_DEVICE
152 VECMEM_HOST_AND_DEVICE
156 VECMEM_HOST_AND_DEVICE
160 VECMEM_HOST_AND_DEVICE
164 VECMEM_HOST_AND_DEVICE
168 VECMEM_HOST_AND_DEVICE
203VECMEM_HOST std::vector<vecmem::data::vector_view<int>::size_type>
210#include "vecmem/edm/impl/view.ipp"
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
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:65
memory_view_type m_payload
View into the single (device) memory allocation for the "payload".
Definition view.hpp:183
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:189
view()=default
Default constructor.
memory_view_type m_size
View into the memory allocated for the container's size variable(s)
Definition view.hpp:180
memory_view_type m_layout
View into the memory that describes the layout of the container.
Definition view.hpp:186
size_type m_capacity
Maximum capacity of the container.
Definition view.hpp:175
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:56
tuple_type m_views
Views for the individual variables.
Definition view.hpp:177
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:58
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:51
Technical base type for view<schema<VARTYPES...>>
Definition view.hpp:29
VECMEM_HOST std::vector< vecmem::data::vector_view< int >::size_type > get_capacities(const view< schema< VARTYPES... > > &soa)
Helper function to get the capacities of the jagged vectors in a view.
Definition view.ipp:198
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
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