Commit b97b0b2c authored by Ben Gamari's avatar Ben Gamari 🐢

parallel/transclos: Detabify

parent 6687fc10
......@@ -75,8 +75,8 @@ main = do
#elif defined(TRANSCL_SET)
let zs = Data.Set.toList $ {- take n $ -} transcl_set rel_set (Data.Set.fromList seeds) -- set-based with 1-to-n rel
#else
let zs = {- take n $ -} transcl rel_list seeds -- default: seq, circular, with a 1-to-n list-based relation
-- unused versions
let zs = {- take n $ -} transcl rel_list seeds -- default: seq, circular, with a 1-to-n list-based relation
-- unused versions
-- let zs = {- take n $ -} transcl_dup rel_one seeds -- no elim of duplicates; good parallelism but stupid
-- let zs = {- take n $ -} transcl_simp rel_one seeds -- list-based with 1-to-1 rel
#endif
......@@ -87,9 +87,9 @@ main = do
3 -> (\ _ -> parListChunkN z n rnf (drop (length seeds) zs), "parListChunkN with blocksize z = "++(show z)++" and length n = "++(show n))
-}
4 -> (\ _ -> error "parBuffer' ", "parBuffer with buffer size "++(show n))
-- 5 -> (\ _ -> parBufferLChunk n z (ins rnf) (drop (length seeds) zs), "parBufferLChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 6 -> (\ _ -> parBufferQChunk n z (ins rnf) (drop (length seeds) zs), "parBufferQChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 7 -> (\ _ -> parBufferAChunk n z (ins rnf) (drop (length seeds) zs), "parBufferAChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 5 -> (\ _ -> parBufferLChunk n z (ins rnf) (drop (length seeds) zs), "parBufferLChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 6 -> (\ _ -> parBufferQChunk n z (ins rnf) (drop (length seeds) zs), "parBufferQChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 7 -> (\ _ -> parBufferAChunk n z (ins rnf) (drop (length seeds) zs), "parBufferAChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 10 -> (\ _ -> parBufferChunk_ z n rnf (drop (length seeds) zs), "parBufferChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 11 -> (\ _ -> evalBufferChunk z n (rpar `dot` seqList rnf) (drop (length seeds) zs), "evalBufferChunk with buffer size "++(show n)++" chunk size size "++(show z))
-- 12 -> (\ _ -> parBufferLSliceChunk n z z (rpar `dot` seqList (ins rnf)) (drop (length seeds) zs), "parBufferLSliceChunk with buffer size "++(show n)++" stride "++(show z)++" chunk size "++(show z))
......
......@@ -82,7 +82,7 @@ transcl_nested :: (Eq a) => (a -> [a]) -> [a] -> [[a]] {- [a] -}
transcl_nested r xs = {- (nub . concat) -} zss
where -- zss :: [[a]]
zss = xs:(build 1 zss)
-- build :: Int -> [[a]] -> [[a]]
-- build :: Int -> [[a]] -> [[a]]
build j [] = []
build j (xs:xss) = zss' ++ build (j+length zss') xss
where zss' = [ filter (not . (`elem` (concat (take j zss)))) xs' | x <- xs, let xs' = r x ]
......@@ -122,7 +122,7 @@ transcl_set r xs = foldl Data.Set.union Data.Set.empty xs'
is_new ([]) y = True
is_new (xs:xss) y | y `Data.Set.member` xs = False
| otherwise = is_new xss y
-- transcl_set (r1_set 444) (Data.Set.fromList [1])
-- (0.07 secs, 3884380 bytes)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment