packages feed

dph-examples-0.5.1.1: dph-examples.cabal



Name:                dph-examples
Version:             0.5.1.1
License:             BSD3
License-file:        LICENSE
Author:              The DPH Team
Maintainer:          Ben Lippmeier <benl@ouroborus.net>
Build-Type:          Simple
Cabal-Version:       >=1.8
Stability:           experimental
Category:            Data Structures
Homepage:            http://www.cse.unsw.edu.au/~chak/project/dph/
Description:         Examples using the DPH library.
Synopsis:            Examples using the DPH library.

Flag gloss
 Description:        Enable graphical front ends that use the gloss library.
 Default:            False

-- With these examples, 
--   the plain dph-NAME versions are parallel versions built against dph-par
--   while the dph_NAME-seq versions are sequential ones built against dph-seq

-- Sum of Squares -------------------------------------------------------------
Executable dph-sumsq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  SumSquaresVector
                  SumSquaresVectorised
                  Timing Randomish
  hs-source-dirs: lib imaginary/SumSquares/dph
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-sumsq-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  SumSquaresVector
                  SumSquaresVectorised
                  Timing Randomish
  hs-source-dirs: lib imaginary/SumSquares/dph
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- Dot Product ----------------------------------------------------------------
Executable dph-dotp
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  DotProductVector
                  DotProductVectorised
                  Timing Randomish
  hs-source-dirs: lib imaginary/DotProduct/dph
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-dotp-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  DotProductVector
                  DotProductVectorised
                  Timing Randomish
  hs-source-dirs: lib imaginary/DotProduct/dph
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- Evens ----------------------------------------------------------------------
Executable dph-evens
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  EvensVector
                  EvensVectorised
                  Timing Randomish
  hs-source-dirs: imaginary/Evens/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-evens-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  EvensVector
                  EvensVectorised
                  Timing Randomish
  hs-source-dirs: imaginary/Evens/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- Primes ---------------------------------------------------------------------
-- Primes dies with a bounds check error
-- Executable dph-primes
--  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
--  Main-is:        Main.hs
--  hs-source-dirs: imaginary/Primes lib
--  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

-- Executable dph-primes-seq
--  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
--  Main-is:        Main.hs
--  hs-source-dirs: imaginary/Primes lib
--  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- Reverse --------------------------------------------------------------------
Executable dph-reverse
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  ReverseVector
                  ReverseVectorised
                  Util Timing Randomish
  hs-source-dirs: imaginary/Reverse/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


Executable dph-reverse-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  ReverseVector
                  ReverseVectorised
                  Util Timing Randomish
  hs-source-dirs: imaginary/Reverse/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- Words ---------------------------------------------------------------------
-- This builds and runs, but takes ~5min. 
-- Executable dph-words
--  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
--  Main-is:        Main.hs
--  hs-source-dirs: imaginary/Words lib
--  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3 -fno-liberate-case

-- This one also stalls in SpecConstr, like quicksort-seq
-- Executable dph-words-seq
--   Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
--   Main-is:        Main.hs
--   hs-source-dirs: imaginary/Words lib
--   ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- SMVM ---------------------------------------------------------------------
Executable dph-smvm
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  SMVMVectorised
                  Timing
  hs-source-dirs: spectral/SMVM/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-smvm-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  SMVMVectorised
                  Timing
  hs-source-dirs: spectral/SMVM/dph lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3



-- QuickHull ------------------------------------------------------------------
Executable dph-quickhull
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  QuickHullVect
                  Timing Points2D.Types SVG
  hs-source-dirs: lib spectral/QuickHull/dph spectral/QuickHull/lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-quickhull-seq
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  QuickHullVect
                  Timing Points2D.Types SVG
  hs-source-dirs: lib spectral/QuickHull/dph spectral/QuickHull/lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

Executable dph-quickhull-vector
  Build-depends: 
        base          == 4.*,
        vector        == 0.7.*,    
        old-time      == 1.0.*,
        random        == 1.0.*
  Main-is:        Main.hs
  other-modules:  QuickHullIO
                  QuickHullSplit
                  QuickHullVector
                  Timing Points2D.Types SVG
  hs-source-dirs: lib spectral/QuickHull/vector spectral/QuickHull/lib
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- QuickSort ------------------------------------------------------------------
Executable dph-quicksort
  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*
  Main-is:        Main.hs
  other-modules:  QuickSortVect
                  Timing
  hs-source-dirs: lib spectral/QuickSort/dph
  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3

-- This one stalls in SpecConstr then eventually runs out of memory.
-- Executable dph-quicksort-seq
--  Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*
--  Main-is:        Main.hs
--  other-modules:  QuickSortVect
--                  Timing
--  hs-source-dirs: lib spectral/QuickSort/dph
--  ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3


-- NBody ----------------------------------------------------------------------
Executable dph-nbody
  Main-is:        Main.hs
  other-modules:  Common.Dump Common.World Common.Body Common.Util 
                  Solver Solver.ListBH.Solver
                         Solver.NestedBH.Solver
                         Solver.VectorBH.Solver
                         Solver.VectorNaive.Solver
                  Timing Points2D.Types Points2D.Generate

  if flag(gloss)
    other-modules:  Gloss.MainArgs Gloss.Draw Gloss.Config
    Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*, parseargs == 0.1.*, gloss == 1.3.*
    hs-source-dirs: lib real/NBody real/NBody/Gloss
    ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3 -fno-liberate-case
  else
    other-modules:  Batch.MainArgs Batch.Config
    Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-par == 0.5.*, dph-par == 0.5.*, random == 1.0.*, old-time == 1.0.*, parseargs == 0.1.*
    hs-source-dirs: lib real/NBody real/NBody/Batch
    ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-par -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3 -fno-liberate-case
  endif

-- Executable dph-nbody-seq
--  Main-is:        Main.hs
--  if flag(gloss)
--    Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*, parseargs == 0.1.*, gloss == 1.3.*
--    hs-source-dirs: lib real/NBody real/NBody/Gloss
--    ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3
--  else
--    Build-depends:  base == 4.4.*, vector == 0.7.*, dph-base == 0.5.*, dph-prim-seq == 0.5.*, dph-seq == 0.5.*, random == 1.0.*, old-time == 1.0.*, parseargs == 0.1.*
--    hs-source-dirs: lib real/NBody real/NBody/Batch
--    ghc-options:    -rtsopts -threaded -fllvm -Odph -fdph-seq -fcpr-off -fsimplifier-phases=4 -fstrictness-before=3
--  endif