]> gitweb.factorcode.org Git - factor.git/commitdiff
math.vectors.simd: don't try distance on int types
authorJoe Groff <arcata@gmail.com>
Mon, 14 Nov 2011 00:09:30 +0000 (16:09 -0800)
committerJoe Groff <arcata@gmail.com>
Mon, 14 Nov 2011 00:10:27 +0000 (16:10 -0800)
"v- norm" doesn't work right for uint-4s because of underflow, but who's going to call "distance" on a uint vector?

basis/math/vectors/simd/simd-tests.factor

index 33961cd12bae527e949a4516b44d40c2edbd24c0..8f9f2b5daf4299f688800a191ac10dfb6cc7ca0a 100644 (file)
@@ -235,7 +235,7 @@ TUPLE: simd-test-failure
     word '[ _ execute ] ;
 
 : remove-float-words ( alist -- alist' )
-    { vsqrt n/v v/n v/ normalize } unique assoc-diff ;
+    { distance vsqrt n/v v/n v/ normalize } unique assoc-diff ;
 
 : remove-integer-words ( alist -- alist' )
     { vlshift vrshift v*high v*hs+ } unique assoc-diff ;