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

replacing(with:where:)

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

Declaration 宣言

func replacing(with other: SIMD4<Scalar>, where mask: SIMDMask<SIMD4<Scalar.SIMDMaskScalar>>) -> SIMD4<Scalar>

Discussion 解説

Equivalent to: 次に等しい:


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