11#include "vecmem/containers/details/aligned_multiple_placement.hpp"
24template <
typename TYPE>
27allocate_jagged_buffer_outer_memory(
29 vecmem::memory_resource& resource) {
48template <
typename TYPE>
51template <
typename TYPE>
53 std::enable_if_t<std::is_convertible<TYPE, OTHERTYPE>::value,
bool> >
60template <
typename TYPE>
62 std::enable_if_t<std::is_integral<SIZE_TYPE>::value &&
63 std::is_unsigned<SIZE_TYPE>::value,
66 const std::vector<SIZE_TYPE, SIZE_ALLOC>&
capacities,
79 TYPE>::value_type::size_type;
91 data_ptr =
reinterpret_cast<TYPE*
>(m_inner_memory.get());
96 details::aligned_multiple_placement<header_t, TYPE>(
104 : m_outer_host_memory.get()),
105 m_outer_host_memory.get()});
125template <
typename TYPE>
132template <
typename TYPE>
An allocator class that wraps a memory resource.
Definition allocator.hpp:37
Object owning all the data of a jagged vector.
Definition jagged_vector_buffer.hpp:30
typename base_type::size_type size_type
Use the base class's size_type.
Definition jagged_vector_buffer.hpp:36
typename base_type::value_type value_type
Use the base class's value_type.
Definition jagged_vector_buffer.hpp:38
jagged_vector_buffer()
Make sure that the template type does not have a custom destructor.
Definition jagged_vector_buffer.ipp:49
VECMEM_HOST_AND_DEVICE pointer host_ptr() const
Access the host accessible array describing the inner vectors.
Definition jagged_vector_view.ipp:105
VECMEM_HOST_AND_DEVICE jagged_vector_view & operator=(const jagged_vector_view< OTHERTYPE > &rhs)
Assignment operator from a "slightly different" object.
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
buffer_type
"Overall type" for a buffer object
Definition buffer_type.hpp:13
@ fixed_size
The buffer has a fixed number of elements.
@ resizable
The buffer is resizable/expandable.
Main namespace for the vecmem classes/functions.
Definition atomic_ref.hpp:16
unique_alloc_ptr< T > make_unique_alloc(memory_resource &m)
Create a unique allocation pointer to a type.
Definition unique_ptr.hpp:185
std::unique_ptr< T, details::unique_alloc_deleter< T > > unique_alloc_ptr
A unique pointer type for trivial types.
Definition unique_ptr.hpp:69
VECMEM_HOST data::vector_view< T > get_data(array< T, N > &a)
Helper function creating a vecmem::data::vector_view object.
Definition array.ipp:217