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

replace(with:where:)

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

Declaration 宣言

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

Discussion 解説

Equivalent to: 次に等しい:


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