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

replacing(with:where:)

Returns a copy of this vector, with elements other in the lanes where mask is true. このベクターのコピーを返します、masktrueであるところの、レーンの中の要素otherを持ちます。

Declaration 宣言

func replacing(with other: Bool, where mask: SIMDMask<Storage>) -> SIMDMask<Storage>

Discussion 解説

Equivalent to: 次に等しい:


var result = Self()
for i in indices {
  result[i] = mask[i] ? other : self[i]
}