You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The allocator in the ParticleContainer classes is a template argument, as in low level C++ objects like std::vector et al.
I think this is a bit of a design issue, impacting at least for me:
compile-time
link-time
maintainability
extensibility
in downstream codes and pyAMReX, because every template argument needs to be specialized, compiled, linked, etc.
@WeiqunZhang@atmyers do you think that long-term, we could make the PC classes using the allocator as a runtime argument, as we do in MultiFabs? This would simplify a lot for me downstream.
The text was updated successfully, but these errors were encountered:
This can already be done by setting the templated allocator to amrex::PolymorphicArenaAllocator. The question is if this should be the default or maybe even the only allocator?
Currently with amrex::PolymorphicArenaAllocator one has to loop over all components of all particle tiles to set the arena. It would be nice if there were some helper functions for this, while also keeping the flexibility of having different allocators for different components.
Thanks @AlexanderSinn, I was not aware of that. I chatted with @WeiqunZhang confirming that we should be good to use the amrex::PolymorphicArenaAllocator for all our classes in BLAST codes, simplifying build times.
Yes, let's add a helper for setting all components at once.
The allocator in the
ParticleContainer
classes is a template argument, as in low level C++ objects likestd::vector
et al.I think this is a bit of a design issue, impacting at least for me:
in downstream codes and pyAMReX, because every template argument needs to be specialized, compiled, linked, etc.
@WeiqunZhang @atmyers do you think that long-term, we could make the PC classes using the allocator as a runtime argument, as we do in MultiFabs? This would simplify a lot for me downstream.
The text was updated successfully, but these errors were encountered: