3 ms·
The metaprogramming available in languages like Rust and C++ could maybe be leveraged to make the struct-of-arrays model easier. Wouldn't be the same as native
by TazeTSchnitzel 6y ago
The metaprogramming available in languages like Rust and C++ could maybe be leveraged to make the struct-of-arrays model easier. Wouldn't be the same as native support, though.
- PixelOfDeath 6y agoThere is some, lets call them experimental, C++ libraries for that. But C++ not having static reflection is the main show stopper on that frontier.
- f00zz 6y ago> There is some, lets call them experimental, C++ libraries for that. Could you provide some links?
- PixelOfDeath 6y agohttps://github.com/Yamahari/struct_array https://github.com/Yamahari/struct_array It uses C++20 features and macros. The macros limit it to a POD count of 8.
- f00zz 6y agoThanks!
- mhh__ 6y agoI've seen this done in D fairly easily, almost definitely closed source unfortunately.
- adgjlsfhk1 6y agoJulia has a package that provides incredibility easy to use SoA. https://github.com/JuliaArrays/StructArrays.jl https://github.com/JuliaArrays/StructArrays.jl Julia's metaprogramming and multiple dispatch mean that it can use user structs fully transparently. Everything just works.