Contents

replacing(with:where:)

Returns a copy of this vector, with elements replaced by elements of other in the lanes where mask is true.

Declaration

func replacing(with other: SIMDMask<Storage>, where mask: SIMDMask<Storage>) -> SIMDMask<Storage>

Discussion

Equivalent to:

var result = Self()
for i in indices {
  result[i] = mask[i] ? other[i] : self[i]
}