yarr-1.2.3: Yet another array library

Safe HaskellNone

Data.Yarr.Utils.Fork

Documentation

makeForkEachSliceSource

Arguments

:: (Shape sh, Arity n, v ~ VecList n) 
=> Int

Number of threads to fork work on

-> sh

Start

-> sh

End

-> v (Work sh a)

Slice works

-> Int -> IO (v a)

Thread work, returns piece of result for each slice

makeForkSlicesOnceSource

Arguments

:: (Shape sh, Arity n) 
=> Int

Number of threads to fork work on

-> VecList n (sh, sh)

(start, end) for each slice

-> VecList n (Work sh a)

Slice works

-> Int -> IO [(Int, a)]

Thread work, returns pieces of results: [(slice number, result)]

makeForkSource

Arguments

:: Shape sh 
=> Int

Number of threads to fork work on

-> sh

Start

-> sh

End

-> Work sh a

Work

-> Int -> IO a

Thread work