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: SIMD16<Scalar>, where mask: SIMDMask<SIMD16<Scalar.SIMDMaskScalar>>) -> SIMD16<Scalar>

Discussion 解説

Equivalent to: 次に等しい:


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