repa-eval-4.2.3.1: Low-level parallel operators on bulk random-accessble arrays.
Data.Repa.Eval.Gang
Description
Gang Primitives.
Synopsis
data Gang Source #
A Gang is a group of threads that execute arbitrary work requests.
Gang
Instances
Methods
showsPrec :: Int -> Gang -> ShowS #
show :: Gang -> String #
showList :: [Gang] -> ShowS #
forkGang :: Int -> IO Gang Source #
Fork a Gang with the given number of threads (at least 1).
gangSize :: Gang -> Int# Source #
O(1). Yield the number of threads in the Gang.
gangIO :: Gang -> (Int# -> IO ()) -> IO () Source #
Issue work requests for the Gang and wait until they complete.
If the gang is already busy then print a warning to stderr and just run the actions sequentially in the requesting thread.
stderr
gangST :: Gang -> (Int# -> ST s ()) -> ST s () Source #
Same as gangIO but in the ST monad.
gangIO
ST