repa-eval-4.2.3.1: Low-level parallel operators on bulk random-accessble arrays.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Eval.Gang

Description

Gang Primitives.

Synopsis

Documentation

data Gang Source #

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

Instances

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.

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

Same as gangIO but in the ST monad.