replacing(with:where:)
Returns a copy of this vector, with elements other in the lanes where mask is true.
Declaration
func replacing(with other: Self.Scalar, where mask: SIMDMask<Self.MaskStorage>) -> SelfDiscussion
Equivalent to:
var result = Self()
for i in indices {
result[i] = mask[i] ? other : self[i]
}