Instance Methodswift 6.2.4Swift

replace(with:where:)

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

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

Equivalent to:

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