Contents

replace(with:where:)

Replaces elements of this vector with other in the lanes where mask is true.

Declaration

mutating func replace(with other: Self.Scalar, where mask: SIMDMask<Self.MaskStorage>)

Discussion

Equivalent to:

for i in indices {
  if mask[i] { self[i] = other }
}