dph-prim-par-0.6.1.1: Data Parallel Haskell segmented arrays. (production version)

Safe HaskellSafe-Infered

Data.Array.Parallel.Unlifted.Distributed.Gang

Description

Gang primitives.

Synopsis

Documentation

data Gang Source

A Gang is a group of threads which execute arbitrary work requests.

Instances

seqGang :: Gang -> GangSource

A sequential gang has no threads.

forkGang :: Int -> IO GangSource

Fork a Gang with the given number of threads (at least 1).

gangSize :: Gang -> IntSource

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 have been executed. If the gang is already busy then just run the action in the requesting thread.

gangST :: Gang -> (Int -> ST s ()) -> ST s ()Source

Same as gangIO but in the ST monad.

traceGang :: String -> IO ()Source

Emit a GHC event for debugging.

traceGangST :: String -> ST s ()Source

Emit a GHC event for debugging, in the ST monad.