Skip to content

Layouts

layoutstoragechosen
aosthe original array of objectswhen unsafe, too small, or not worth it
soaone column per field: Float64Array for numeric fields, plain arrays otherwiseautomatically, when safe and profitable
aosoa(N)blocks of N elements, field-major within a block, in one Float64Arrayonly with // @viscosity aosoa(N); all fields numeric

Generated container classes are named __Vsc_<name> (in Python, _Vsc_<name>). They keep a length (in Python, __len__), so xs.length (or len(xs)) keeps working unchanged.