Single Integer Particle Indexing
Replaces the Cabana::Index
for accessing particle data in an Cabana::AoSoA
with access via a single integer. This is motivated by @gchen noticing the temporary construction of the Index object in the parallel for loops was prohibiting automatic vectorization on some compilers. Cabana::Index
is now a stateless class providing static bit operations for computing struct and array indices from a single integer given an known inner array size.
Note that this introduces a constraint on the static inner array size of the AoSoA that it be a power of 2. This is checked at compile time.