Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Commit

Permalink
Truncate extra bits of too-large parameters to splat; closes #149 (#151)
Browse files Browse the repository at this point in the history
Previously it was not clear what to do when passing an `i32` to, e.g., an `i8x16.splat`: the `i32` has more bits than fit in an `i8` lane. As discussed in #149, this change removes the extra bits (potentially losing information) so that the input parameter will fit in the splatted lanes. If at some point the spec adds support for `i8` and `i16` types, then this change would be unnecessary since the splat signature could be, e.g., `i8x16.splat(x: i8)` and no truncation would be required.
  • Loading branch information
abrown authored and tlively committed Dec 10, 2019
1 parent e0da318 commit 6b7ef4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proposals/simd/SIMD.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ Construct a vector with `x` replicated to all lanes:
def S.splat(x):
result = S.New()
for i in range(S.Lanes):
result[i] = x
result[i] = S.Reduce(x)
return result
```

Expand Down

0 comments on commit 6b7ef4f

Please sign in to comment.