Boost logo

Boost :

Subject: Re: [boost] interest in structure of arrays container?
From: Andreas Schäfer (gentryx_at_[hidden])
Date: 2016-10-15 14:48:06


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#L41
[2] https://github.com/gentryx/libflatarray/blob/master/test/soa_grid_test.cpp#L72
[3] https://github.com/gentryx/libflatarray/blob/master/src/aligned_allocator.hpp

-- 
==========================================================
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!



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk