10#include "vecmem/edm/details/schema_traits.hpp"
11#include "vecmem/utils/type_traits.hpp"
19template <
typename... VARTYPES>
22 : m_capacity(capacity),
32 vecmem::details::conjunction_v<std::is_constructible<
35 vecmem::details::disjunction_v<
42 : m_capacity{
other.capacity()},
43 m_views{
other.variables()},
45 m_payload{
other.payload()},
46 m_layout{
other.layout()},
47 m_host_layout{
other.host_layout()} {}
52 vecmem::details::conjunction_v<std::is_constructible<
55 vecmem::details::disjunction_v<
65 assert(
static_cast<const void*
>(
this) !=
static_cast<const void*
>(&
rhs));
68 m_capacity =
rhs.capacity();
69 m_views =
rhs.variables();
71 m_payload =
rhs.payload();
72 m_layout =
rhs.layout();
73 m_host_layout =
rhs.host_layout();
87template <std::
size_t INDEX>
95template <std::
size_t INDEX>
102template <
typename... VARTYPES>
141 return m_host_layout;
150 static std::vector<vecmem::data::vector_view<int>::size_type> get(
157 template <
typename T>
158 VECMEM_HOST
static std::vector<vecmem::data::vector_view<int>::size_type>
164 template <
typename T>
165 VECMEM_HOST
static std::vector<vecmem::data::vector_view<int>::size_type>
178 static std::vector<vecmem::data::vector_view<int>::size_type> get(
185 "The first variable in the schema must be a jagged vector");
197VECMEM_HOST std::vector<vecmem::data::vector_view<int>::size_type>
203 "Function can only be used on containers with jagged vectors");
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
A view for jagged vectors.
Definition jagged_vector_view.hpp:45
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
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< typename vector_view< T >::size_type > get_capacities(const jagged_vector_view< T > &data)
Get the capacities of the inner vectors of a jagged vector.
Definition jagged_vector_view.ipp:111
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
VECMEM_HOST_AND_DEVICE constexpr const auto & get(const tuple< Ts... > &t) noexcept
Get a constant element out of a tuple.
Definition tuple.ipp:58
typename tuple_element< I, T >::type tuple_element_t
Convenience accessor for the I-th element of a tuple.
Definition tuple.hpp:204
Implementation for std::negation.
Definition type_traits.hpp:91
Technical base type for has_jagged_vector<schema<VARTYPES...>>
Definition schema_traits.hpp:238
Definition view_traits.hpp:33
Meta type describing the "schema" of an SoA container.
Definition schema.hpp:46
Definition schema_traits.hpp:108