acts-project / vecmem

Vectorised data model base and helper classes.
https://acts-project.github.io/vecmem/
Mozilla Public License 2.0
19 stars 13 forks source link

Add SoA Buffer Class, main branch (2023.12.08.) #254

Closed krasznaa closed 11 months ago

krasznaa commented 11 months ago

In the 4th step of the #246 saga after #250, #251 and #252, we now arrived at the most complex part of this development. :thinking:

The vecmem::edm::buffer type tries to be pretty smart. It would only ever ask for a maximum of 2 allocations.

The vecmem::edm::view type has a number of views into these memory blocks, but as far as the CUDA/SYCL/HIP runtimes are concerned, these are still single contiguous memory blocks.

The layout of the memory blocks is not super trivial. Maybe easiest to attach here the table that I wrote up for the Doxygen documentation. :thinking:

image

Note that at this point it is not possible to set up jagged vector variables with different sizes. With the current code the assumption is that all jagged vector variables would have the same internal capacities. This is not a fundamental restriction of the code, it will be possible to implement that sort of flexibility later on, but I just didn't want to complicate the code further with that at this stage.