You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but convert them into Vec3x4 chunks (with some possible remaining Vec3s) for processing?
I'm guessing some use of chunks_exact and remainder would work here -- iterate each column in chunks of 4, get an f32x4 from each chunk (is there an easy conversion for this?), convert the three zipped f32x4s into a Vec3x4, perform operations, and then break it all apart again to store the result, with some special cases for the remaining <4 f32s into a regular Vec3. Is this ever done in practice? Is it worth it? It would be nice to preserve the ability to easily access a single entity's (x, y, z) from those columns.
The text was updated successfully, but these errors were encountered:
Not really. I'm not sure what the best way is and I'm not sure that it would be worth it, either. Lots of random-ish memory access and copying to do this. If you want to process with Vec3x4 then should just store as pos: Vec<Vec3x4> probably. But I haven't measured, either
Apologies if this is covered in the docs somewhere, I wasn't able to find anything about best practices on this.
Is there a helper function, or some guidance on the best way to store floats in columns, e.g.
but convert them into
Vec3x4
chunks (with some possible remainingVec3
s) for processing?I'm guessing some use of
chunks_exact
andremainder
would work here -- iterate each column in chunks of 4, get anf32x4
from each chunk (is there an easy conversion for this?), convert the three zippedf32x4
s into aVec3x4
, perform operations, and then break it all apart again to store the result, with some special cases for the remaining <4f32
s into a regularVec3
. Is this ever done in practice? Is it worth it? It would be nice to preserve the ability to easily access a single entity's(x, y, z)
from those columns.The text was updated successfully, but these errors were encountered: