← Standard library

int16x8

struct int16x8

Available without an import.

A 128-bit SIMD value containing 8 int16 lanes. Arithmetic operates lane-wise, with integer overflow wrapping within each lane. Lane and WithLane require constant indices; bracket indexing supports checked runtime indices. Comparisons return all-one/all-zero integer masks. Bit reinterpretation involving floating-point lanes canonicalizes NaNs.

Simd.wax:478

Members

Splatmethod

public static fn Splat(int16 value) : int16x8

Copies one scalar value into every lane.

Simd.wax:484

Zeromethod

public static fn Zero() : int16x8

Returns a vector whose lanes are all zero.

Simd.wax:488

constructorconstructor

public constructor (int16 l0, int16 l1, int16 l2, int16 l3, int16 l4, int16 l5, int16 l6, int16 l7)

Creates a vector from scalar lanes in ascending index order.

Simd.wax:492

Lanemethod

public fn Lane(int32 index) : int32

Reads a compile-time constant lane index in [0, 8). Invalid or nonconstant indices are rejected; use bracket indexing for runtime indices. Sub-32-bit integer lanes widen with the type's signedness.

Simd.wax:498

Minmethod

public fn Min(int16x8 other) : int16x8

Selects the smaller value in each lane.

Simd.wax:502

Maxmethod

public fn Max(int16x8 other) : int16x8

Selects the larger value in each lane.

Simd.wax:506

AddSatmethod

public fn AddSat(int16x8 other) : int16x8

Adds corresponding lanes and clamps each result to this lane type's minimum/maximum instead of wrapping.

Simd.wax:511

SubSatmethod

public fn SubSat(int16x8 other) : int16x8

Subtracts corresponding lanes and clamps each result to this lane type's minimum/maximum instead of wrapping.

Simd.wax:516

Absmethod

public fn Abs() : int16x8

Returns each lane's magnitude. A minimum signed lane remains the negative minimum because its positive magnitude does not fit.

Simd.wax:521

Eqmethod

public fn Eq(int16x8 other) : int16x8

Compares corresponding lanes for equal, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:526

Nemethod

public fn Ne(int16x8 other) : int16x8

Compares corresponding lanes for unequal, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:531

Ltmethod

public fn Lt(int16x8 other) : int16x8

Compares corresponding lanes for less, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:536

Lemethod

public fn Le(int16x8 other) : int16x8

Compares corresponding lanes for less or equal, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:541

Gtmethod

public fn Gt(int16x8 other) : int16x8

Compares corresponding lanes for greater, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:546

Gemethod

public fn Ge(int16x8 other) : int16x8

Compares corresponding lanes for greater or equal, returning all-one bits for true and all-zero bits for false. Ordered comparisons use the lane type's signedness.

Simd.wax:551

AnyTruemethod

public fn AnyTrue() : bool

Tests whether any lane has a nonzero bit pattern.

Simd.wax:555

AllTruemethod

public fn AllTrue() : bool

Tests whether every lane has a nonzero bit pattern.

Simd.wax:559

Bitmaskmethod

public fn Bitmask() : int32

Packs each lane's most significant bit into the corresponding bit of an integer; lane zero becomes bit zero.

Simd.wax:564

WithLanemethod

public fn WithLane(int32 index, int16 value) : int16x8

Returns a copy with one lane replaced. The index must be a compile-time constant in [0, 8); use bracket assignment for runtime indices.

Simd.wax:569

Shufflemethod

public fn Shuffle(int32 l0, int32 l1, int32 l2, int32 l3, int32 l4, int32 l5, int32 l6, int32 l7) : int16x8

Returns lanes selected in argument order. Every index must be a compile-time constant in [0, 8); repeats are allowed.

Simd.wax:574

Selectmethod

public fn Select(int16x8 a, int16x8 b) : int16x8

Selects bits from a where this mask has one bits and from b where it has zero bits. Comparison masks select entire lanes; arbitrary masks can mix bits within a lane.

Simd.wax:579

WidenLowmethod

public fn WidenLow() : int32x4

Widens the low half of the lanes to twice their width, using sign extension.

Simd.wax:583

WidenHighmethod

public fn WidenHigh() : int32x4

Widens the high half of the lanes to twice their width, using sign extension.

Simd.wax:587

WideningMulLowmethod

public fn WideningMulLow(int16x8 other) : int32x4

Multiplies the low-half lane pairs, widening operands first so products fit the doubled lane width.

Simd.wax:592

WideningMulHighmethod

public fn WideningMulHigh(int16x8 other) : int32x4

Multiplies the high-half lane pairs, widening operands first so products fit the doubled lane width.

Simd.wax:597

ReduceSummethod

public fn ReduceSum() : int32

Sums every lane into the scalar result. Arithmetic wraps at the scalar result width; narrow lanes are widened before addition.

Simd.wax:603

ReduceMinmethod

public fn ReduceMin() : int32

Reduces all lanes to their minimum.

Simd.wax:607

ReduceMaxmethod

public fn ReduceMax() : int32

Reduces all lanes to their maximum.

Simd.wax:611

Narrowmethod

public fn Narrow(int16x8 other) : int8x16

Saturates both vectors into half-width lanes. Receiver lanes form the low half and other lanes the high half; values clamp to the destination range.

Simd.wax:616

AsInt8x16method

public fn AsInt8x16() : int8x16

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:622

AsUint8x16method

public fn AsUint8x16() : uint8x16

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:628

AsUint16x8method

public fn AsUint16x8() : uint16x8

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:634

AsInt32x4method

public fn AsInt32x4() : int32x4

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:640

AsUint32x4method

public fn AsUint32x4() : uint32x4

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:646

AsInt64x2method

public fn AsInt64x2() : int64x2

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:652

AsUint64x2method

public fn AsUint64x2() : uint64x2

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:658

AsFloat32x4method

public fn AsFloat32x4() : float32x4

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:664

AsFloat64x2method

public fn AsFloat64x2() : float64x2

Reinterprets this 128-bit value with the destination lane shape rather than converting numerically. Floating-point NaN lanes are canonicalized on either side of the reinterpretation; NaN payload bits are not preserved.

Simd.wax:670

Loadmethod

public static fn Load(Span<uint8> data, int32 byteOffset) : int16x8

Reads 16 bytes starting at byteOffset as this lane type. The complete range must fit the span or the operation panics. No alignment requirement is imposed.

Simd.wax:675

LoadAlignedmethod

public static fn LoadAligned(Span<uint8> data, int32 byteOffset) : int16x8

Reads 16 bytes with the same bounds checks and behavior as Load. Alignment is a hint; unaligned addresses are accepted.

Simd.wax:680

Storemethod

public fn Store(Span<uint8> data, int32 byteOffset) : void

Writes all 16 bytes at byteOffset. The complete range must fit the span or the operation panics. Does not resize or retain the span.

Simd.wax:685

LoadElemsmethod

public static fn LoadElems(Span<int16> data, int32 elemIndex) : int16x8

Reads 8 consecutive elements starting at elemIndex. The whole element range must fit or the operation panics; indices count elements, not bytes.

Simd.wax:690

StoreElemsmethod

public fn StoreElems(Span<int16> data, int32 elemIndex) : void

Writes 8 consecutive elements starting at elemIndex. The whole element range must fit or the operation panics; indices count elements, not bytes.

Simd.wax:695

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.