diff --git a/examples/sort/bitonic/main.hvm b/examples/sort/bitonic/main.hvm index ed89e3ac..84133ccc 100644 --- a/examples/sort/bitonic/main.hvm +++ b/examples/sort/bitonic/main.hvm @@ -1,9 +1,9 @@ // Atomic Swapper (HVM builtin) -//(U60.swap 0 a b) = (Both a b) -//(U60.swap n a b) = (Both b a) +//(Data.U60.swap 0 a b) = (Both a b) +//(Data.U60.swap n a b) = (Both b a) // Swaps distant values in parallel; corresponds to a Red Box -(Warp s (Leaf a) (Leaf b)) = (U60.swap (^ (> a b) s) (Leaf a) (Leaf b)) +(Warp s (Leaf a) (Leaf b)) = (Data.U60.swap (^ (> a b) s) (Leaf a) (Leaf b)) (Warp s (Both a b) (Both c d)) = (Join (Warp s a c) (Warp s b d)) // Rebuilds the warped tree in the original order @@ -33,4 +33,4 @@ (Sum (Leaf x)) = x (Sum (Both a b)) = (+ (Sum a) (Sum b)) -(Main n) = (Sum (Sort 0 (Rev (Gen n 0)))) +(Main n) = (Sum (Sort 0 (Rev (Gen 0 0)))) diff --git a/examples/sort/radix/main.hvm b/examples/sort/radix/main.hvm index 4ef43577..90590165 100644 --- a/examples/sort/radix/main.hvm +++ b/examples/sort/radix/main.hvm @@ -26,30 +26,30 @@ // Radix : U60 -> Map (Radix n) = let r = Used - let r = (U60.swap (& n 1) r Free) - let r = (U60.swap (& n 2) r Free) - let r = (U60.swap (& n 4) r Free) - let r = (U60.swap (& n 8) r Free) - let r = (U60.swap (& n 16) r Free) - let r = (U60.swap (& n 32) r Free) - let r = (U60.swap (& n 64) r Free) - let r = (U60.swap (& n 128) r Free) - let r = (U60.swap (& n 256) r Free) - let r = (U60.swap (& n 512) r Free) - let r = (U60.swap (& n 1024) r Free) - let r = (U60.swap (& n 2048) r Free) - let r = (U60.swap (& n 4096) r Free) - let r = (U60.swap (& n 8192) r Free) - let r = (U60.swap (& n 16384) r Free) - let r = (U60.swap (& n 32768) r Free) - let r = (U60.swap (& n 65536) r Free) - let r = (U60.swap (& n 131072) r Free) - let r = (U60.swap (& n 262144) r Free) - let r = (U60.swap (& n 524288) r Free) - let r = (U60.swap (& n 1048576) r Free) - let r = (U60.swap (& n 2097152) r Free) - let r = (U60.swap (& n 4194304) r Free) - let r = (U60.swap (& n 8388608) r Free) + let r = (Data.U60.swap (& n 1) r Free) + let r = (Data.U60.swap (& n 2) r Free) + let r = (Data.U60.swap (& n 4) r Free) + let r = (Data.U60.swap (& n 8) r Free) + let r = (Data.U60.swap (& n 16) r Free) + let r = (Data.U60.swap (& n 32) r Free) + let r = (Data.U60.swap (& n 64) r Free) + let r = (Data.U60.swap (& n 128) r Free) + let r = (Data.U60.swap (& n 256) r Free) + let r = (Data.U60.swap (& n 512) r Free) + let r = (Data.U60.swap (& n 1024) r Free) + let r = (Data.U60.swap (& n 2048) r Free) + let r = (Data.U60.swap (& n 4096) r Free) + let r = (Data.U60.swap (& n 8192) r Free) + let r = (Data.U60.swap (& n 16384) r Free) + let r = (Data.U60.swap (& n 32768) r Free) + let r = (Data.U60.swap (& n 65536) r Free) + let r = (Data.U60.swap (& n 131072) r Free) + let r = (Data.U60.swap (& n 262144) r Free) + let r = (Data.U60.swap (& n 524288) r Free) + let r = (Data.U60.swap (& n 1048576) r Free) + let r = (Data.U60.swap (& n 2097152) r Free) + let r = (Data.U60.swap (& n 4194304) r Free) + let r = (Data.U60.swap (& n 8388608) r Free) r // Reverse : Arr -> Arr