Open
Description
WIP issue with thoughts.
Currently the SIMD types are:
boolean8x16, boolean16x8, boolean32x4, boolean64x2, boolean8x32, boolean16x16, boolean32x8, boolean64x4
int8x16, int16x8, int32x4, int64x2, int8x32, int16x16, int32x8, int64x4
uint8x16, uint16x8, uint32x4, uint64x2, uint8x32, uint16x16, uint32x8, uint64x4
float32x4, float64x2, float32x8, float64x4
Been thinking they could just be aliases. They're really nice to have as they make math code compact. One of the main reasons I originally defined them as separate types is because they need component accessors in the form of:
position: x, y, z, w
color: r, g, b, a
texture: s, t, p, q
These would be part of the swizzling operators on vectors of size 2 and 4.
There are vectors with sizes 2, 4, 8, 16, and 32. These could all be defined like:
type float32x8 = vector<float32, 8>;
We'd need to make the boolean bitflag types real: boolean8, boolean16, boolean32, boolean64
. These array syntax to access bitflags probably.
const a:boolean8 = 2;
a[1]; // 1
Metadata
Metadata
Assignees
Labels
No labels