celeritas
celeritas copied to clipboard
Add compile-time polymorphism for distributions for on-device separable user sampling
Related to #2122 , add the infrastructure to sample from arbitrary distributions on device
- Add
inpdirectory tocorecel(Gridinput should be moved there) - Move distribution inputs from
celeritas/inp/Events.hhtocorecel/inp/Distributions.hh - For each sampling type (1D, 3D, size_type/ParticleId, ...?), define a distribution enum and type dispatch for samplers similar to
orange/surfbut improved with our latest techniques- Define a
DistributionCollectionGroupthat has enums, offsets, records (needed for dynamic-sized distributions), and reals/ints (for backend storage) - Write setup-time
DistributionInserterthat takesinp::...and adds to the collection group, returning distribution ID for that type - Write compile-time
DistributionVisitorthat takesNativeCRef<DistributionCollectionGroup>, locally constructs the distribution, and returns a sample given an RNG
- Define a
- Update primary generators to use on-device sampling