Safe Haskell | Safe-Infered |
---|
Control.Monad.Par.Meta.Resources.SMP
Description
This module implements a Meta-Par Resource
for SMP parallelism,
suitable as a base for combined execution resources (e.g.,
Control.Monad.Par.Meta.AccSMP
).
- mkResource :: Int -> Resource
- mkResourceOn :: [Int] -> Int -> Resource
- defaultStartup :: Startup
- defaultWorkSearch :: Int -> WorkSearch
- startupForCaps :: [Int] -> Startup
- wsForCaps :: [Int] -> Int -> WorkSearch
Resource creation
Arguments
:: Int | The number of steal attempts per |
-> Resource |
Create an SMP resource for all capabilities.
Arguments
:: [Int] | Capability list. |
-> Int | The number of steal attempts per |
-> Resource |
Create an SMP resource for a configurable list of capabilities.
Default implementation
defaultWorkSearch :: Int -> WorkSearchSource
WorkSearch
for all capabilities.
Customizable implementation
startupForCaps :: [Int] -> StartupSource
Startup
for spawning threads only on a particular set of
capabilities.
wsForCaps :: [Int] -> Int -> WorkSearchSource
Given a set of capabilities and a number of steals to attempt per
capability, return a WorkSearch
.