# spirv: new vectorization helper · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a3b1ba82f57d5d8981a471850cbbb0db29c3a479)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a3b1ba82f57d5d8981a471850cbbb0db29c3a479

Requested commit: a3b1ba82f57d5d8981a471850cbbb0db29c3a479

Commit: a3b1ba82f57d5d8981a471850cbbb0db29c3a479

Tree: 848b20d5c8929a1198f331725865f1a08c07288d

Author: Robin Voetter

Committer: Robin Voetter

## Message

```
spirv: new vectorization helper

The old vectorization helper (WipElementWise) was clunky and a bit
annoying to use, and it wasn't really flexible enough.

This introduces a new vectorization helper, which uses Temporary and
Operation types to deduce a Vectorization to perform the operation
in a reasonably efficient manner. It removes the outer loop
required by WipElementWise so that implementations of AIR instructions
are cleaner. This helps with sanity when we start to introduce support
for composite integers.

airShift, convertToDirect, convertToIndirect, and normalize are initially
implemented using this new method.

```

## Parents

- [4e7159ae1d08ce74548e0adc3b3936aacc23a06e](https://git.cafe/gitcafe/zig/commit/4e7159ae1d08ce74548e0adc3b3936aacc23a06e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a3b1ba82f57d5d8981a471850cbbb0db29c3a479?format=markdown)
