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: SIMDMask<Storage>, where mask: SIMDMask<Storage>)
Available when Storage is SIMD2<Int32>. StorageSIMD2<Int32>である時に利用可能です。

Discussion 解説

Equivalent to: 次に等しい:


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