morepretty
This commit is contained in:
parent
bf1caf1c9b
commit
17cfd9643d
3 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
import blends, bumpy, chroma, common, masks, internal, vmath
|
||||
import blends, bumpy, chroma, common, internal, masks, vmath
|
||||
|
||||
when allowSimd:
|
||||
import simd
|
||||
|
|
|
@ -87,7 +87,10 @@ proc isOpaqueAvx2*(data: ptr UncheckedArray[ColorRGBX], len: int): bool =
|
|||
if data[i].a != 255:
|
||||
return false
|
||||
|
||||
proc toPremultipliedAlphaAvx2*(data: ptr UncheckedArray[uint32], len: int): int =
|
||||
proc toPremultipliedAlphaAvx2*(
|
||||
data: ptr UncheckedArray[uint32],
|
||||
len: int
|
||||
): int =
|
||||
let
|
||||
alphaMask = mm256_set1_epi32(cast[int32](0xff000000))
|
||||
oddMask = mm256_set1_epi16(cast[int16](0xff00))
|
||||
|
|
|
@ -4,7 +4,8 @@ when defined(release):
|
|||
{.push checks: off.}
|
||||
|
||||
when defined(amd64):
|
||||
import nimsimd/runtimecheck, nimsimd/sse2, runtimechecked/avx, runtimechecked/avx2
|
||||
import nimsimd/runtimecheck, nimsimd/sse2, runtimechecked/avx,
|
||||
runtimechecked/avx2
|
||||
|
||||
let
|
||||
cpuHasAvx* = checkInstructionSets({AVX})
|
||||
|
|
Loading…
Reference in a new issue