packages feed

meta-par-0.3: meta-par.cabal

Name:                meta-par
Version:             0.3
Synopsis:            Provides the monad-par interface, but based on modular scheduler "mix-ins".

-- Version history:

-- 0.3: Initial release.

Description: 

  This library provides a composable abstraction for /Resources/ which
  can be mixed and matched to build /Schedulers/.


  A `Resource` typically corresponds to a specific kind of hardware or
  to a style of scheduling.  This package contains implementations of
  basic `Resource`s that implement parallel scheduling on the CPU.

  
  To use a complete meta-par Scheduler, import Control.Monad.Par.SMP for 
  example, which will provide a `runPar` as well as instances for the 
  relevant classes that enable `Par` programming (e.g. `ParFuture`).


Homepage:            https://github.com/simonmar/monad-par
License:             BSD3
License-file:        LICENSE
Author:              Adam Foltzer, Ryan Newton
Maintainer:          Adam Foltzer <acfoltzer@gmail.com>
Copyright:           (c) Adam Foltzer 2011-2012
Stability:           Experimental
Category:            Control,Parallelism,Monads
Build-type:          Simple
Cabal-version:       >=1.8

extra-source-files:
  include/pin.h

Library
  Exposed-modules: 
                 -- Meta scheduler and friends
                   Control.Monad.Par.Meta
                 -- A complete scheduler:
                 , Control.Monad.Par.Meta.SMP
                 , Control.Monad.Par.Meta.Serial

                 -- Mostly internal modules for use to build other schedulers:
                 , Control.Monad.Par.Meta.Resources.SingleThreaded 
                 , Control.Monad.Par.Meta.Resources.SMP
                 , Control.Monad.Par.Meta.Resources.Backoff
                 , Control.Monad.Par.Meta.Resources.Debugging
                 , Control.Monad.Par.Meta.HotVar.IORef                 

    -- NOTE: NUMA not released yet.

  Build-depends: base >= 4 && < 5
               -- This provides the interface for monad-par:
               , abstract-par 
               , abstract-deque >= 0.1.4
               , mwc-random >= 0.11
               , containers
               , bytestring >= 0.9
               , transformers >= 0.2.2.0
               , deepseq >= 1.2
               , vector
--               , cereal >= 0.3
               , mtl >= 2.0.1.0

  if flag(affinity) {
      CPP-options: -DAFFINITY
  }

  if flag(affinity) {
    Other-modules: System.Posix.Affinity
  }

  if flag(affinity) {   
    c-sources:       cbits/pin.c
    include-dirs:    include
    includes:        pin.h
  }
  
  ghc-options: -Wall

Flag affinity
  Description: Turn on pinning to CPUs via pthread/linux scheduler calls.
  Default:     False