11#include "vecmem/containers/data/jagged_vector_buffer.hpp"
12#include "vecmem/containers/data/jagged_vector_view.hpp"
13#include "vecmem/containers/data/vector_buffer.hpp"
14#include "vecmem/containers/data/vector_view.hpp"
15#include "vecmem/edm/buffer.hpp"
16#include "vecmem/edm/details/schema_traits.hpp"
17#include "vecmem/edm/host.hpp"
18#include "vecmem/edm/view.hpp"
19#include "vecmem/memory/memory_resource.hpp"
20#include "vecmem/utils/abstract_event.hpp"
21#include "vecmem/utils/attributes.hpp"
22#include "vecmem/vecmem_core_export.hpp"
79 template <
typename TYPE>
83 template <
typename TYPE>
88 template <
typename TYPE>
94 template <
typename TYPE>
101 template <
typename TYPE,
typename ALLOC>
104 std::vector<TYPE, ALLOC>& to,
108 template <
typename TYPE>
118 template <
typename TYPE>
123 template <
typename TYPE>
128 template <
typename TYPE>
135 template <
typename TYPE>
142 template <
typename TYPE,
typename ALLOC1,
typename ALLOC2>
145 std::vector<std::vector<TYPE, ALLOC2>,
ALLOC1>& to,
149 template <
typename TYPE>
150 std::vector<typename data::vector_view<TYPE>::size_type> get_sizes(
154 template <
typename TYPE>
165 template <
typename SCHEMA>
177 memory_resource& resource,
204 std::vector<data::vector_view<int>::size_type> get_sizes(
211 virtual void do_copy(std::size_t size,
const void*
from,
void* to,
214 virtual void do_memset(std::size_t size,
void* ptr,
int value)
const;
216 VECMEM_NODISCARD
virtual event_type create_event()
const;
220 template <
typename TYPE>
225 template <
typename TYPE>
230 template <
typename TYPE>
231 void copy_views_impl(
236 template <
typename TYPE>
237 void copy_views_contiguous_impl(
242 template <
typename TYPE>
243 std::vector<typename data::vector_view<TYPE>::size_type> get_sizes_impl(
246 template <
typename TYPE>
262 void copy_sizes_impl(
268 void copy_payload_impl(
274 std::vector<data::vector_view<int>::size_type> get_sizes_impl(
282#include "vecmem/utils/impl/copy.ipp"
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
Class implementing (synchronous) host <-> device memory copies.
Definition copy.hpp:42
VECMEM_NODISCARD event_type setup(data::jagged_vector_view< TYPE > data) const
Copy the internal state of a jagged vector buffer to the target device.
VECMEM_NODISCARD event_type set_sizes(const std::vector< typename data::vector_view< TYPE >::size_type > &sizes, data::jagged_vector_view< TYPE > data) const
Helper function for setting the sizes of a resizable jagged vector.
VECMEM_NODISCARD event_type operator()(const data::vector_view< std::add_const_t< TYPE > > &from, data::vector_view< TYPE > to, type::copy_type cptype=type::unknown) const
Copy a 1-dimensional vector's data between two existing memory blocks.
VECMEM_NODISCARD event_type setup(data::vector_view< TYPE > data) const
Set up the internal state of a vector buffer correctly on a device.
VECMEM_NODISCARD event_type operator()(const edm::view< edm::details::add_const_t< edm::schema< VARTYPES... > > > &from, edm::host< edm::schema< VARTYPES... >, INTERFACE > &to, type::copy_type cptype=type::unknown) const
Copy from a view, into a host container.
VECMEM_NODISCARD event_type operator()(const data::jagged_vector_view< std::add_const_t< TYPE > > &from, std::vector< std::vector< TYPE, ALLOC2 >, ALLOC1 > &to, type::copy_type cptype=type::unknown) const
Copy a jagged vector's data into a vector object.
VECMEM_NODISCARD event_type operator()(const data::vector_view< std::add_const_t< TYPE > > &from, std::vector< TYPE, ALLOC > &to, type::copy_type cptype=type::unknown) const
Copy a 1-dimensional vector's data into a vector object.
std::unique_ptr< abstract_event > event_type
Event type used by the copy class.
Definition copy.hpp:70
VECMEM_NODISCARD event_type memset(edm::view< edm::schema< VARTYPES... > > data, int value) const
Set all bytes of the container to some value.
VECMEM_NODISCARD event_type operator()(const edm::view< edm::details::add_const_t< edm::schema< VARTYPES... > > > &from, edm::view< edm::schema< VARTYPES... > > to, type::copy_type cptype=type::unknown) const
Copy between two views.
VECMEM_NODISCARD event_type memset(data::jagged_vector_view< TYPE > data, int value) const
Set all bytes of the jagged vector to some value.
VECMEM_NODISCARD event_type operator()(const data::jagged_vector_view< std::add_const_t< TYPE > > &from, data::jagged_vector_view< TYPE > to, type::copy_type cptype=type::unknown) const
Copy a jagged vector's data between two existing allocations.
VECMEM_NODISCARD event_type setup(edm::view< SCHEMA > data) const
Set up the internal state of a buffer correctly on a device.
VECMEM_NODISCARD event_type memset(data::vector_view< TYPE > data, int value) const
Set all bytes of the vector to some value.
virtual ~copy()=default
Virtual destructor.
Object owning all the data of a jagged vector.
Definition jagged_vector_buffer.hpp:30
A view for jagged vectors.
Definition jagged_vector_view.hpp:45
Object owning the data held by it.
Definition vector_buffer.hpp:29
Class holding data about a 1 dimensional vector/array.
Definition vector_view.hpp:38
Technical base type for buffer<schema<VARTYPES...>>
Definition buffer.hpp:28
Technical base type for host<schema<VARTYPES...>,INTERFACE>
Definition host.hpp:28
Technical base type for view<schema<VARTYPES...>>
Definition view.hpp:29
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
Wrapper struct around the copy_type enumeration.
Definition copy.hpp:51
copy_type
Types of memory copies to handle.
Definition copy.hpp:53
Meta type describing the "schema" of an SoA container.
Definition schema.hpp:46