Skip to content
New issue

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

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

Already on GitHub? # to your account

wip: change std::vector to std::pmr::vector #424

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

stch-zhangyzh
Copy link

BEGINRELEASENOTES

  • change std::vector to std::pmr::vector

ENDRELEASENOTES

@tmadlener
Copy link
Collaborator

I like the general idea of this, and I have also thought about doing this in the past, as it would potentially allow some quite cool features. May I ask what your motivation for changing to pmr vectors is?

Overall doing this right comes with quite a few considerations:

  • If we switch to pmr vectors we should also think about which parts we expose to (framework) users. Simply switching to pmr doesn't really change anything. Having the possibility to pass in a custom memory resource would potentially allow to use podio more easily within a framework that keeps ownerships of the objects itself (rather than having podio do that).
    • This comes with the question of what the defaults should be.
  • How does pmr play with our I/O, specifically ROOT. Is it supported directly or do we have to do some work for this?
  • Can we use this to make things easily work on heterogeneous resources, e.g. by using something like vecmem.
    • Potentially unrelated, but could play a role, can we more easily support SoA vs AoS with this?
  • Compiler support for polymorphic memory resources has only landed in LLVM 16 (see here) so anyone would have to switch to that.

From a prioritization point of view, I would really like to finish podio v1.0 first and then see how to best go forward with this. With all that in mind, I still think this is at least something that should be tried to see how far this can be taken and how it works in the end, and I would be happy to help with that.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants