Following #251, this is the 3rd PR for reviewing everything from #246.
Here I introduce vecmem::edm::host and vecmem::edm::data.
vecmem::edm::host is the first data owning type introduced in these PRs. It allocates variables for SoA containers with:
vecmem::edm::type::scalar variables are held by vecmem::vector objects with size 1. In #246 at the time of writing those variables are still kept by vecmem::unique_obj_ptr objects. But those prevent copying and assigning objects in an easy way. Eventually I'll want to switch to using vecmem::array<T, 1> for the scalars, but had to realize that the vecmem::array type is not quite powerful enough just yet for this. So that will come in a future PR.
vecmem::edm::type::vector and vecmem::edm::type::jagged_vector variables are managed using vecmem::vector and vecmem::jagged_vector objects of course.
vecmem::edm::data is the return type of vecmem::get_data(vecmem::edm::host). Just as how we need vecmem::data::jagged_vector_data to hold on to device memory, we can't use vecmem::edm::view directly as the type returned by the vecmem::get_data(vecmem::edm::host) function.
The behaviour of vecmem::edm::data wrt. vecmem::edm::view is exactly the same as how vecmem::data::jagged_vector_data relates to vecmem::data::jagged_vector_view.
To keep the PR size down, only added host tests for the new code at this point. The device tests will come later.
Following #251, this is the 3rd PR for reviewing everything from #246.
Here I introduce
vecmem::edm::host
andvecmem::edm::data
.vecmem::edm::host
is the first data owning type introduced in these PRs. It allocates variables for SoA containers with:vecmem::edm::type::scalar
variables are held byvecmem::vector
objects with size1
. In #246 at the time of writing those variables are still kept byvecmem::unique_obj_ptr
objects. But those prevent copying and assigning objects in an easy way. Eventually I'll want to switch to usingvecmem::array<T, 1>
for the scalars, but had to realize that thevecmem::array
type is not quite powerful enough just yet for this. So that will come in a future PR.vecmem::edm::type::vector
andvecmem::edm::type::jagged_vector
variables are managed usingvecmem::vector
andvecmem::jagged_vector
objects of course.vecmem::edm::data
is the return type ofvecmem::get_data(vecmem::edm::host)
. Just as how we needvecmem::data::jagged_vector_data
to hold on to device memory, we can't usevecmem::edm::view
directly as the type returned by thevecmem::get_data(vecmem::edm::host)
function.vecmem::edm::data
wrt.vecmem::edm::view
is exactly the same as howvecmem::data::jagged_vector_data
relates tovecmem::data::jagged_vector_view
.To keep the PR size down, only added host tests for the new code at this point. The device tests will come later.