# SE-0229 — SIMD Vectors

**URL:** <https://forums.swift.org/t/se-0229-simd-vectors/16518>\
**Category:** Proposal Reviews\
**Created:** [September 27, 2018, 5:27pm UTC](https://forums.swift.org/t/se-0229-simd-vectors/16518 "2018-09-27T17:27:15Z")\
**Posts on this page:** 1\
**Showing post:** 97

<div class="post-metadata">

**Author:** ![ben-cohen](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ben-cohen/32/296_2.png) [@ben-cohen](https://forums.swift.org/u/ben-cohen)\
**Post date:** [October 17, 2018, 1:45am UTC](https://forums.swift.org/t/se-0229-simd-vectors/16518/97 "2018-10-17T01:45:28Z")

</div>

## Review Update

The core team met and discussed the feedback received so far, and has made the following recommendations:

**Intention to accept**

The core team feels this is an important addition to the language that will open up SIMD programming to a wide audience in an approachable way.

The core team also made the following decisions for when the proposal is accepted:

- There were many requests for additional math operations. These are certainly important, but can be left to later proposals once this foundational proposal has landed.
- The initializers for `VectorN` from an `Array` should instead be generic from any `Sequence`.
- The `.` prefix should be used on _all_ mask-producing operators:
  - In case of `.==`, this helps disambiguate between the `Bool` and `Mask`-returning forms
  - In case of `.&` and `.|` this helps resolve the precedence problem of `&` and the inconsistency of a non-short-circuiting `&&`
  - While it doesn't have similar motivations, for consistency `.<` & co should also have a leading dot.

- Pointwise arithmetic operations will not have a leading dot.
- To avoid confusion with `Collection` semantics and future types like matrices, `count` should be renamed `elementCount`
- The element properties `x`, `y`, `z` and `w` will be available on vectors of up to 4, along with the common named swizzles `even`, `odd`, `high` and `low`.
  - The general swizzle operation `init(gathering:at:)` feels unsatisfactory, and so should be deferred for a later proposal after more thought.
  - Brute-forcing all possible swizzles on the smaller vectors as properties was also ruled out.

**Prototype of "generic"-style vectors**

The majority of the feedback received during the thread was regarding the alternate "generic" spelling: `Vector3<Int8>` rather than `Int8.Vector3`.

It is still unclear which is the better form. However, in order to better make the decision, the core team has asked the proposal author to implement a prototype showing the alternate form. Reviewers will then be able to try out either form in order to help make the decision. (since @scanon is on vacation this week, @moiseev is kindly helping out with this prototype)

In addition, the proposal should be revised to spell out more explicitly some of the details, for example, of what masks are and the role they play.

We will hold the review open pending that prototype, and I'll post again when it's available.

---

_[View the full topic](https://forums.swift.org/t/se-0229-simd-vectors/16518)._
