Instance Method インスタンスメソッド

replace(with:where:)

Replaces elements of this vector with elements of other in the lanes where mask is true. このベクターの要素を、masktrueであるところの、レーンの中のotherの要素で置き換えます。

Declaration 宣言

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

Discussion 解説

Equivalent to: 次に等しい:


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