Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SoA Proxy Updates, main branch (2025.02.20.) #309

Merged
merged 4 commits into from
Feb 21, 2025

Conversation

krasznaa
Copy link
Member

Triggered by @beomki-yeo's insistence in acts-project/traccc#878, I spent a bit of time trying to come up with a way of filling SoA containers conveniently "by hand".

I considered a number of options, but in the end went with making vecmem::edm::proxy even a bit more complicated. 🤔 Instead of only being able to refer to (i.e. "proxy"...) an element of a container, now they can also behave as standalone objects, which hold some payload of their own.

I went with this, because if I introduced a new type for this (let's say vecmem::edm::object), I would've had to create conversion operators back and forth between the new type and vecmem::edm::proxy. So it was easier to just use the same type for the standalone objects as well.

So far I only added vecmem::edm::host::push_back(...) with the new machinery, just as a proof of concept. Along with some testing code for it. Please have a look, especially at the unit test code. Since some early feedback could be useful here.

Note that it will never be possible to use such a formalism on containers that have jagged vectors, in device code. (Since a dynamic sized vector cannot be used in device code for this.) But since SoA containers with jagged vectors are not resizable to begin with, that is not a new limitation actually... 🤔

@krasznaa krasznaa added the improvement Improve an existing feature label Feb 20, 2025
@krasznaa krasznaa force-pushed the SoAProxyUpdate-main-20250220 branch from 1593e7c to 9d21e37 Compare February 20, 2025 14:50
Just because I intend to use "proxy type" for a different
thing shortly.
Without making any meaningful use of it yet.
@krasznaa krasznaa force-pushed the SoAProxyUpdate-main-20250220 branch 2 times, most recently from 63ba931 to d3cc47d Compare February 21, 2025 08:55
@stephenswat
Copy link
Member

Is this still under development or is it ready for review?

@krasznaa
Copy link
Member Author

Please have a look. By now it's in a shape that I'm fairly happy with.

@krasznaa krasznaa force-pushed the SoAProxyUpdate-main-20250220 branch from d3cc47d to 38fdcdb Compare February 21, 2025 10:33
@krasznaa krasznaa force-pushed the SoAProxyUpdate-main-20250220 branch from 38fdcdb to 510ef56 Compare February 21, 2025 10:38
@krasznaa krasznaa merged commit e462b33 into acts-project:main Feb 21, 2025
32 checks passed
@krasznaa krasznaa deleted the SoAProxyUpdate-main-20250220 branch February 21, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improve an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants