save a cycle
This commit is contained in:
parent
380c9be181
commit
97d69b1473
1 changed files with 2 additions and 4 deletions
|
@ -205,10 +205,8 @@ when defined(amd64) and allowSimd:
|
||||||
|
|
||||||
proc unpackAlphaValues*(v: M128i): M128i {.inline, raises: [].} =
|
proc unpackAlphaValues*(v: M128i): M128i {.inline, raises: [].} =
|
||||||
## Unpack the first 32 bits into 4 rgba(0, 0, 0, value)
|
## Unpack the first 32 bits into 4 rgba(0, 0, 0, value)
|
||||||
let
|
result = mm_unpacklo_epi8(mm_setzero_si128(), v)
|
||||||
a = mm_unpacklo_epi8(v, mm_setzero_si128())
|
result = mm_unpacklo_epi8(mm_setzero_si128(), result)
|
||||||
b = mm_unpacklo_epi8(a, mm_setzero_si128())
|
|
||||||
result = mm_slli_epi32(b, 24) # Shift the values to uint32 `a`
|
|
||||||
|
|
||||||
when defined(release):
|
when defined(release):
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
Loading…
Reference in a new issue