This commit is contained in:
Ryan Oldenburg 2022-07-30 20:47:25 -05:00
parent dee3c81c67
commit 271101edeb

View file

@ -133,17 +133,3 @@ reset()
timeIt "blendExcludeMask": timeIt "blendExcludeMask":
for i in 0 ..< backdrop.data.len: for i in 0 ..< backdrop.data.len:
backdrop.data[i] = blendExcludeMask(backdrop.data[i], source.data[i]) backdrop.data[i] = blendExcludeMask(backdrop.data[i], source.data[i])
when defined(amd64) and not defined(pixieNoSimd):
import nimsimd/sse2
reset()
timeIt "blendNormal [simd]":
var i: int
while i < backdrop.data.len - 4:
let
b = mm_loadu_si128(backdrop.data[i].addr)
s = mm_loadu_si128(source.data[i].addr)
mm_storeu_si128(backdrop.data[i].addr, blendNormalSimd(b, s))
i += 4