SE-0229 — SIMD Vectors

What about replacingElements(_ mask: Mask, with: Self)? That would solve both this issue, and the issue @rxwei pointed out in the pitch thread that the method is missing an object:

let v1: Int8.Vector3 = [1, 2, 3]
let v2: Int8.Vector3 = [4, 5, 6]
v1.replacingElements(v1 .< 3, with: v2)

What are we replacing? The elements that are less than 3. What are we replacing them with? The corresponding elements in v2.

5 Likes