The lane-wise larger of two vectors. Each lane is Basic.max of the two values, so with a NaN lane the answer depends on the operand order, as it does in scalar code.
a := set(4, cast(s32) 3);
b := set(4, cast(s32) 5);
assert(max(a, b).data[0] == 5);
assert(max(a, cast(s32) 4).data[0] == 4);max :: (a: $T/SIMD_Array, b: T) -> T
The lane-wise larger of two vectors. Each lane is Basic.max of the two values, so with a NaN lane the answer depends on the operand order, as it does in scalar code.
Parameters
- a: $T/SIMD_Array
- b: T
Returns
- T
a := set(4, cast(s32) 3);
b := set(4, cast(s32) 5);
assert(max(a, b).data[0] == 5);
assert(max(a, cast(s32) 4).data[0] == 4);max :: (a: $T/SIMD_Array, factor: a.type) -> T
The lane-wise larger of each lane and factor. Each lane is Basic.max of the two values, so with a NaN lane the answer depends on the operand order, as it does in scalar code.
Parameters
- a: $T/SIMD_Array
- factor: a.type
Returns
- T