On 12:02 Sat 15 Oct , Michael Marcin wrote:
Looks to only work for homogeneous data
Could you clarify what you mean by "homogeneous data"? Do you refer to structures where all members have the same type? In LibFlatArray all member fields of an SoA may have different types. This example[1] has a member of type bool and one of type double. You can also have arrays (e.g. int foo[3]) as members (e.g. [2]).
and looks to not handle alignment.
Alignment for the allocated memory is handled by the allocator. The aligned_allocator[3] can also be used with std containers (e.g. std::vector). For 2D and 3D grids the soa_grid container will pad the grid dimensions internally to ensure alignment.
Otherwise looks quite similar to what I described. Thanks for the link.
HTH :-) Cheers -Andreas [1] https://github.com/gentryx/libflatarray/blob/master/test/soa_grid_test.cpp#L... [2] https://github.com/gentryx/libflatarray/blob/master/test/soa_grid_test.cpp#L... [3] https://github.com/gentryx/libflatarray/blob/master/src/aligned_allocator.hp... -- ========================================================== Andreas Schäfer HPC and Supercomputing Institute for Multiscale Simulation Friedrich-Alexander-Universität Erlangen-Nürnberg, Germany +49 9131 85-20866 PGP/GPG key via keyserver http://www.libgeodecomp.org ========================================================== (\___/) (+'.'+) (")_(") This is Bunny. Copy and paste Bunny into your signature to help him gain world domination!