exasmr / openmc

OpenMC Monte Carlo Code
https://docs.openmc.org
MIT License
15 stars 9 forks source link

Add a static map supporting on-device lookups #6

Closed amandalund closed 2 years ago

amandalund commented 2 years ago

This adds a simple read-only map that can be used for on-device lookups and uses it instead of std::unordered_map in the tally filters. I tested it out on an A100 with a simple problem using a material filter and everything seemed to work. Since tallying is currently done on the host, I also did some additional (hacky) testing to make sure the map is working as expected on device. None of our current offloading benchmark problems have filters that use maps, so I can add a model to the repo where a map is actually used during tallying.