-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Library for parallel programming in the Intel Concurrent Collections paradigm.
--
-- Intel (Concurrent Collections) CnC is a data-flow like deterministic
-- parallel programming model, similar to stream-processing but in which
-- nodes in the computation graph share data in tables.
@package haskell-cnc
@version 0.1
-- | This module is an alternative implementation exposing the same
-- inteface as Intel.Cnc.
module Intel.CncPure
instance Ord (ItemCol a b)
instance Eq (ItemCol a b)
instance Show (ItemCol a b)
instance Ord (TagCol a)
instance Eq (TagCol a)
instance Show (TagCol a)
instance Monad GraphCode
instance Monad StepCode
-- | This module implements the Intel Concurrent Collections (CnC)
-- programming model. The variations of this module (Intel.Cnc3,
-- Intel.Cnc5, Intel.Cnc6, and Intel.Cnc8) each
-- implement the same programming model using different schedulers. All
-- of them internally use the IO monad but expose a pure interface. (The
-- module Intel.CncPure is an alternative implementation that
-- exposes the same interface as this module but is internally pure.)
--
-- CnC is a data-flow like deterministic parallel programming model. To
-- use it, one constructs a CnC graph of computation steps. Edges
-- in the graph are control and data relationships, which are implemented
-- by tag and item collections respectively.
--
-- A brief introduction to CnC using this module can be found at
-- http://software.intel.com/foobar. General documentation on the
-- CnC model can be found at
-- http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc/.
module Intel.Cnc3
-- | Steps are functions that take a single tag as input and
-- perform a computation in the StepCode monad, which may perform
-- puts and gets.
type Step a = a -> StepCode ()
-- | Construct a new item collection.
newItemCol :: (Eq tag, Ord tag, Show tag) => GraphCode (ItemCol tag val)
-- | Construct a new tag collection.
newTagCol :: GraphCode (TagCol tag)
-- | Attach a computation step to a supply of control tags. This adds a new
-- node in the computation graph.
prescribe :: TagCol tag -> Step tag -> GraphCode ()
-- | Put-Tag. Push a control tag out into the computation graph.
putt :: TagCol tag -> tag -> StepCode ()
-- | Put an item. Subsequently, any steps waiting on the item may
-- subsequently execute.
put :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> val -> StepCode ()
-- | Get an item. Synchronous read-data operation.
get :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> StepCode val
-- | Run an initial step which populates the CnC graph with input tags and
-- items. Presently only a single initialize is allowed within a graph
-- execution.
initialize :: StepCode a -> GraphCode a
-- | Run a final step which collects outputs of the graph that are of
-- interest to the larger application. Presently only a single finalize
-- is allowed within a graph execution.
finalize :: StepCode a -> GraphCode a
-- | Construct a CnC graph and execute it to completion. Completion is
-- defined as the finalize action having completed.
runGraph :: GraphCode a -> a
-- | Print a message within a step (unsafe side effect).
stepPutStr :: String -> StepCode ()
-- | Print a message within the graph construction code (unsafe side
-- effect).
cncPutStr :: String -> GraphCode ()
-- | An informal identifier of the CnC version presently in use (for
-- example, identifying a scheduler implementation).
cncVariant :: String
-- | This module implements the Intel Concurrent Collections (CnC)
-- programming model. The variations of this module (Intel.Cnc3,
-- Intel.Cnc5, Intel.Cnc6, and Intel.Cnc8) each
-- implement the same programming model using different schedulers. All
-- of them internally use the IO monad but expose a pure interface. (The
-- module Intel.CncPure is an alternative implementation that
-- exposes the same interface as this module but is internally pure.)
--
-- CnC is a data-flow like deterministic parallel programming model. To
-- use it, one constructs a CnC graph of computation steps. Edges
-- in the graph are control and data relationships, which are implemented
-- by tag and item collections respectively.
--
-- A brief introduction to CnC using this module can be found at
-- http://software.intel.com/foobar. General documentation on the
-- CnC model can be found at
-- http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc/.
module Intel.Cnc5
-- | Steps are functions that take a single tag as input and
-- perform a computation in the StepCode monad, which may perform
-- puts and gets.
type Step a = a -> StepCode ()
-- | Construct a new item collection.
newItemCol :: (Eq tag, Ord tag, Show tag) => GraphCode (ItemCol tag val)
-- | Construct a new tag collection.
newTagCol :: GraphCode (TagCol tag)
-- | Attach a computation step to a supply of control tags. This adds a new
-- node in the computation graph.
prescribe :: TagCol tag -> Step tag -> GraphCode ()
-- | Put-Tag. Push a control tag out into the computation graph.
putt :: TagCol tag -> tag -> StepCode ()
-- | Put an item. Subsequently, any steps waiting on the item may
-- subsequently execute.
put :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> val -> StepCode ()
-- | Get an item. Synchronous read-data operation.
get :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> StepCode val
-- | Run an initial step which populates the CnC graph with input tags and
-- items. Presently only a single initialize is allowed within a graph
-- execution.
initialize :: StepCode a -> GraphCode a
-- | Run a final step which collects outputs of the graph that are of
-- interest to the larger application. Presently only a single finalize
-- is allowed within a graph execution.
finalize :: StepCode a -> GraphCode a
-- | Construct a CnC graph and execute it to completion. Completion is
-- defined as the finalize action having completed.
runGraph :: GraphCode a -> a
-- | Print a message within a step (unsafe side effect).
stepPutStr :: String -> StepCode ()
-- | Print a message within the graph construction code (unsafe side
-- effect).
cncPutStr :: String -> GraphCode ()
-- | An informal identifier of the CnC version presently in use (for
-- example, identifying a scheduler implementation).
cncVariant :: String
instance Show HiddenState5
instance Show (IO a)
instance Show (IORef a)
-- | This module implements the Intel Concurrent Collections (CnC)
-- programming model. The variations of this module (Intel.Cnc3,
-- Intel.Cnc5, Intel.Cnc6, and Intel.Cnc8) each
-- implement the same programming model using different schedulers. All
-- of them internally use the IO monad but expose a pure interface. (The
-- module Intel.CncPure is an alternative implementation that
-- exposes the same interface as this module but is internally pure.)
--
-- CnC is a data-flow like deterministic parallel programming model. To
-- use it, one constructs a CnC graph of computation steps. Edges
-- in the graph are control and data relationships, which are implemented
-- by tag and item collections respectively.
--
-- A brief introduction to CnC using this module can be found at
-- http://software.intel.com/foobar. General documentation on the
-- CnC model can be found at
-- http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc/.
module Intel.Cnc6
-- | Steps are functions that take a single tag as input and
-- perform a computation in the StepCode monad, which may perform
-- puts and gets.
type Step a = a -> StepCode ()
-- | Construct a new item collection.
newItemCol :: (Eq tag, Ord tag, Show tag) => GraphCode (ItemCol tag val)
-- | Construct a new tag collection.
newTagCol :: GraphCode (TagCol tag)
-- | Attach a computation step to a supply of control tags. This adds a new
-- node in the computation graph.
prescribe :: TagCol tag -> Step tag -> GraphCode ()
-- | Put-Tag. Push a control tag out into the computation graph.
putt :: TagCol tag -> tag -> StepCode ()
-- | Put an item. Subsequently, any steps waiting on the item may
-- subsequently execute.
put :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> val -> StepCode ()
-- | Get an item. Synchronous read-data operation.
get :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> StepCode val
-- | Run an initial step which populates the CnC graph with input tags and
-- items. Presently only a single initialize is allowed within a graph
-- execution.
initialize :: StepCode a -> GraphCode a
-- | Run a final step which collects outputs of the graph that are of
-- interest to the larger application. Presently only a single finalize
-- is allowed within a graph execution.
finalize :: StepCode a -> GraphCode a
-- | Construct a CnC graph and execute it to completion. Completion is
-- defined as the finalize action having completed.
runGraph :: GraphCode a -> a
-- | Print a message within a step (unsafe side effect).
stepPutStr :: String -> StepCode ()
-- | Print a message within the graph construction code (unsafe side
-- effect).
cncPutStr :: String -> GraphCode ()
-- | An informal identifier of the CnC version presently in use (for
-- example, identifying a scheduler implementation).
cncVariant :: String
instance Show HiddenState5
instance Show (IO a)
instance Show (IORef a)
-- | This module implements the Intel Concurrent Collections (CnC)
-- programming model. The variations of this module (Intel.Cnc3,
-- Intel.Cnc5, Intel.Cnc6, and Intel.Cnc8) each
-- implement the same programming model using different schedulers. All
-- of them internally use the IO monad but expose a pure interface. (The
-- module Intel.CncPure is an alternative implementation that
-- exposes the same interface as this module but is internally pure.)
--
-- CnC is a data-flow like deterministic parallel programming model. To
-- use it, one constructs a CnC graph of computation steps. Edges
-- in the graph are control and data relationships, which are implemented
-- by tag and item collections respectively.
--
-- A brief introduction to CnC using this module can be found at
-- http://software.intel.com/foobar. General documentation on the
-- CnC model can be found at
-- http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc/.
module Intel.Cnc8
-- | Steps are functions that take a single tag as input and
-- perform a computation in the StepCode monad, which may perform
-- puts and gets.
type Step a = a -> StepCode ()
-- | Construct a new item collection.
newItemCol :: (Eq tag, Ord tag, Show tag) => GraphCode (ItemCol tag val)
-- | Construct a new tag collection.
newTagCol :: GraphCode (TagCol tag)
-- | Attach a computation step to a supply of control tags. This adds a new
-- node in the computation graph.
prescribe :: TagCol tag -> Step tag -> GraphCode ()
-- | Put-Tag. Push a control tag out into the computation graph.
putt :: TagCol tag -> tag -> StepCode ()
-- | Put an item. Subsequently, any steps waiting on the item may
-- subsequently execute.
put :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> val -> StepCode ()
-- | Get an item. Synchronous read-data operation.
get :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> StepCode val
-- | Run an initial step which populates the CnC graph with input tags and
-- items. Presently only a single initialize is allowed within a graph
-- execution.
initialize :: StepCode a -> GraphCode a
-- | Run a final step which collects outputs of the graph that are of
-- interest to the larger application. Presently only a single finalize
-- is allowed within a graph execution.
finalize :: StepCode a -> GraphCode a
-- | Construct a CnC graph and execute it to completion. Completion is
-- defined as the finalize action having completed.
runGraph :: GraphCode a -> a
-- | Print a message within a step (unsafe side effect).
stepPutStr :: String -> StepCode ()
-- | Print a message within the graph construction code (unsafe side
-- effect).
cncPutStr :: String -> GraphCode ()
-- | An informal identifier of the CnC version presently in use (for
-- example, identifying a scheduler implementation).
cncVariant :: String
instance Typeable EscapeStep
instance Show EscapeStep
instance Exception EscapeStep
-- | This module implements the Intel Concurrent Collections (CnC)
-- programming model. The variations of this module (Intel.Cnc3,
-- Intel.Cnc5, Intel.Cnc6, and Intel.Cnc8) each
-- implement the same programming model using different schedulers. All
-- of them internally use the IO monad but expose a pure interface. (The
-- module Intel.CncPure is an alternative implementation that
-- exposes the same interface as this module but is internally pure.)
--
-- CnC is a data-flow like deterministic parallel programming model. To
-- use it, one constructs a CnC graph of computation steps. Edges
-- in the graph are control and data relationships, which are implemented
-- by tag and item collections respectively.
--
-- A brief introduction to CnC using this module can be found at
-- http://software.intel.com/foobar. General documentation on the
-- CnC model can be found at
-- http://software.intel.com/en-us/articles/intel-concurrent-collections-for-cc/.
module Intel.Cnc
-- | Steps are functions that take a single tag as input and
-- perform a computation in the StepCode monad, which may perform
-- puts and gets.
type Step a = a -> StepCode ()
-- | Construct a new item collection.
newItemCol :: (Eq tag, Ord tag, Show tag) => GraphCode (ItemCol tag val)
-- | Construct a new tag collection.
newTagCol :: GraphCode (TagCol tag)
-- | Attach a computation step to a supply of control tags. This adds a new
-- node in the computation graph.
prescribe :: TagCol tag -> Step tag -> GraphCode ()
-- | Put-Tag. Push a control tag out into the computation graph.
putt :: TagCol tag -> tag -> StepCode ()
-- | Put an item. Subsequently, any steps waiting on the item may
-- subsequently execute.
put :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> val -> StepCode ()
-- | Get an item. Synchronous read-data operation.
get :: (Eq tag, Ord tag, Show tag) => ItemCol tag val -> tag -> StepCode val
-- | Run an initial step which populates the CnC graph with input tags and
-- items. Presently only a single initialize is allowed within a graph
-- execution.
initialize :: StepCode a -> GraphCode a
-- | Run a final step which collects outputs of the graph that are of
-- interest to the larger application. Presently only a single finalize
-- is allowed within a graph execution.
finalize :: StepCode a -> GraphCode a
-- | Construct a CnC graph and execute it to completion. Completion is
-- defined as the finalize action having completed.
runGraph :: GraphCode a -> a
-- | Print a message within a step (unsafe side effect).
stepPutStr :: String -> StepCode ()
-- | Print a message within the graph construction code (unsafe side
-- effect).
cncPutStr :: String -> GraphCode ()
-- | An informal identifier of the CnC version presently in use (for
-- example, identifying a scheduler implementation).
cncVariant :: String
instance Show HiddenState5
instance Show (IO a)
instance Show (IORef a)