]> gitweb.factorcode.org Git - factor.git/commitdiff
use unsigned<->signed unpacking for normal-noise because SSE doesn't have an unsigned...
authorJoe Groff <arcata@gmail.com>
Sat, 17 Oct 2009 03:03:55 +0000 (22:03 -0500)
committerJoe Groff <arcata@gmail.com>
Sat, 17 Oct 2009 03:03:55 +0000 (22:03 -0500)
extra/noise/noise.factor

index 5d32ed4502b18c6d1b2c6a65dfe2935a516324ea..1ea5b951573fb30c58b5029515676afd7657ad2b 100644 (file)
@@ -38,10 +38,10 @@ CONSTANT: normal-noise-count 4
 TYPED: normal-noise-map ( seed: integer dim -- bytes )
     '[ _ product normal-noise-count * random-bytes >byte-array ] with-seed
     [
-        [ ushort-8{ 0 0 0 0 0 0 0 0 } ushort-8{ 0 0 0 0 0 0 0 0 } ] normal-noise-count ndip
-        [ uchar-16 ushort-8 vconvert [ v+ ] bi-curry@ bi* ] normal-noise-count napply
+        [ short-8{ 0 0 0 0 0 0 0 0 } short-8{ 0 0 0 0 0 0 0 0 } ] normal-noise-count ndip
+        [ uchar-16 short-8 vconvert [ v+ ] bi-curry@ bi* ] normal-noise-count napply
         [ normal-noise-pow vrshift ] bi@
-        ushort-8 uchar-16 vconvert
+        short-8 uchar-16 vconvert
     ] data-map( uchar-16[normal-noise-count] -- uchar-16 ) ; inline
 
 : normal-noise-image ( seed dim -- image )