Skip to main content

Module select

Module select 

Source
Expand description

Lane-wise conditional select and masked-negate. Conditional SIMD blend/select operations on SimdView.

select performs a lane-wise conditional merge: for each index i, the output is self[i] if mask[i] is true, else other[i].

§Architecture mapping

MethodInstruction family
blend (float mask)AVX-512 _mm512_mask_blend_ps, AVX2 _mm256_blendv_ps, NEON vbslq_f32
Scalar fallbackif mask[i] { self[i] } else { other[i] }

§Zero-Cost Contract

Selection is monomorphized per (T, Arch, Align). The Align ZST governs which load instruction is emitted; Arch is a ZST erased after codegen.