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