For each SIMD vector type, several words are defined, where
type is the type in question:
Word | Stack effect | Description |
type-with | ( x -- simd-array ) | creates a new instance where all components are set to a single scalar |
type-boa | ( ... -- simd-array ) | creates a new instance where components are read from the stack |
type-cast | ( simd-array -- simd-array' ) | creates a new SIMD array where the underlying data is taken from another SIMD array, with no format conversion |
>type | ( seq -- simd-array ) | creates a new instance initialized with the elements of an existing sequence, which must have the correct length |
type{ | type{ elements... } | parsing word defining literal syntax for an SIMD vector; the correct number of elements must be given |
To actually perform vector arithmetic on SIMD vectors, use
Vector operations words.
See alsoC type specifiers