← Standard library

uint8x16

struct uint8x16

Available without an import.

A 128-bit SIMD value containing 16 uint8 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:248

Members

Splatmethod

public static fn Splat(uint8 value) : uint8x16

Copies one scalar value into every lane.

Simd.wax:254

Zeromethod

public static fn Zero() : uint8x16

Returns a vector whose lanes are all zero.

Simd.wax:258

constructorconstructor

public constructor (uint8 l0, uint8 l1, uint8 l2, uint8 l3, uint8 l4, uint8 l5, uint8 l6, uint8 l7, uint8 l8, uint8 l9, uint8 l10, uint8 l11, uint8 l12, uint8 l13, uint8 l14, uint8 l15)

Creates a vector from scalar lanes in ascending index order.

Simd.wax:262

Lanemethod

public fn Lane(int32 index) : uint32

Reads a compile-time constant lane index in [0, 16). 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:268

Minmethod

public fn Min(uint8x16 other) : uint8x16

Selects the smaller value in each lane.

Simd.wax:272

Maxmethod

public fn Max(uint8x16 other) : uint8x16

Selects the larger value in each lane.

Simd.wax:276

AddSatmethod

public fn AddSat(uint8x16 other) : uint8x16

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

Simd.wax:281

SubSatmethod

public fn SubSat(uint8x16 other) : uint8x16

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

Simd.wax:286

PopCountmethod

public fn PopCount() : uint8x16

Counts the set bits in each byte lane, producing counts from 0 to 8.

Simd.wax:290

Eqmethod

public fn Eq(uint8x16 other) : uint8x16

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:295

Nemethod

public fn Ne(uint8x16 other) : uint8x16

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:300

Ltmethod

public fn Lt(uint8x16 other) : uint8x16

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:305

Lemethod

public fn Le(uint8x16 other) : uint8x16

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:310

Gtmethod

public fn Gt(uint8x16 other) : uint8x16

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:315

Gemethod

public fn Ge(uint8x16 other) : uint8x16

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:320

AnyTruemethod

public fn AnyTrue() : bool

Tests whether any lane has a nonzero bit pattern.

Simd.wax:324

AllTruemethod

public fn AllTrue() : bool

Tests whether every lane has a nonzero bit pattern.

Simd.wax:328

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:333

WithLanemethod

public fn WithLane(int32 index, uint8 value) : uint8x16

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

Simd.wax:338

Shufflemethod

public fn Shuffle(int32 l0, int32 l1, int32 l2, int32 l3, int32 l4, int32 l5, int32 l6, int32 l7, int32 l8, int32 l9, int32 l10, int32 l11, int32 l12, int32 l13, int32 l14, int32 l15) : uint8x16

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

Simd.wax:343

Selectmethod

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

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:348

WidenLowmethod

public fn WidenLow() : uint16x8

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

Simd.wax:352

WidenHighmethod

public fn WidenHigh() : uint16x8

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

Simd.wax:356

WideningMulLowmethod

public fn WideningMulLow(uint8x16 other) : uint16x8

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

Simd.wax:361

WideningMulHighmethod

public fn WideningMulHigh(uint8x16 other) : uint16x8

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

Simd.wax:366

AverageRoundedmethod

public fn AverageRounded(uint8x16 other) : uint8x16

Returns the unsigned lane-wise average rounded upward, without overflowing the intermediate sum.

Simd.wax:371

ReduceSummethod

public fn ReduceSum() : uint32

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

Simd.wax:377

ReduceMinmethod

public fn ReduceMin() : uint32

Reduces all lanes to their minimum.

Simd.wax:381

ReduceMaxmethod

public fn ReduceMax() : uint32

Reduces all lanes to their maximum.

Simd.wax:385

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:391

AsInt16x8method

public fn AsInt16x8() : int16x8

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:397

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:403

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:409

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:415

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:421

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:427

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:433

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:439

Swizzlemethod

public fn Swizzle(uint8x16 indices) : uint8x16

Selects each output byte from this vector using the corresponding runtime index byte. Indices outside [0, 16), including negative signed index bytes, produce zero.

Simd.wax:444

Loadmethod

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

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:449

LoadAlignedmethod

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

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

Simd.wax:454

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:459

LoadElemsmethod

public static fn LoadElems(Span<uint8> data, int32 elemIndex) : uint8x16

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

Simd.wax:464

StoreElemsmethod

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

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

Simd.wax:469

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.