morepretty

This commit is contained in:
Ryan Oldenburg 2022-06-29 01:02:34 -05:00
parent bf1caf1c9b
commit 17cfd9643d
3 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,4 @@
import blends, bumpy, chroma, common, masks, internal, vmath
import blends, bumpy, chroma, common, internal, masks, vmath
when allowSimd:
import simd

View file

@ -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))

View file

@ -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})