README 3.37 KB
Newer Older
1

2
3
Directories in libraries/dph

4
5
6
   dph-base/
        Common config and debugging functions for Data Parallel Haskell.

7
8
9
10
11
12
   dph-buildbot/
        Performance regression buildbot.

   dph-examples/
        Examples using Data Parallel Haskell.

13
14
15
16
17
18
19
20
   dph-prim-interface/
        Empty implementation of flat parallel arrays. 
        This package exists only so that dph-prim-par and dph-prim-seq
        can provide the same interface.

   dph-prim-seq/
        Sequential implementation of the flat parallel array API defined
        in dph-prim-interface.
21
        This is only used during debugging.
22
23
24
25
26
27
28
29
30
        You probably want dph-prim-par instead.

   dph-prim-par/
        Production implementation of the flat parallel array API defined
        in dph-prim-interface.

   dph-lifted-base/
        Common definitions used by the other dph-lifted packages.

31

32
33
34
35
36
37
38
   The following packages provide:
     Nested arrays and the primitive operators that work on them (PA functions).
     The lifted array combinators that the vectoriser introduces (PP functions).
     The user facing library functions that work on [::] style arrays (P functions).

     dph-lifted-boxed/
        Incomplete implementation using boxed array elements.
39
        This is very slow, but sometimes useful for debugging.
40
41
42
43
44
45
46
47
48
49
50
51
        
     dph-lifted-copy/
        Deprecated implementation that performs deep copying replicate.
        Using this package can cause the vectorised program to have worse
        asymptotic complexity than the original.
        Use dph-lifted-vseg instead.

     dph-lifted-vseg/
        This implementation directly encodes sharing between array segments,
        and avoids the copying that dph-lifted-copy would otherwise do.
        Use this version for production code.

52

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
   Odds and ends:
   make/
        Makefiles used for development and debugging

   dph-test/
        Quickcheck tests for the array operators.

   dtrace/
        Old code to add dtrace support to DPH.

   examples/
        Rotted example code that doesn't build anymore and should 
        probably just be deleted.
    

68
69
70
71
72
To compile programs use:
     ghc -rtsopts -threaded 
         -fllvm -optlo-O3 
         -Odph -fcpr-off -fno-liberate-case 
         -package dph-lifted-vseg
73

74
75
76
Why:
     -rtsopts -threaded         -- You'll want to pass +RTS -Nwhatever when running
                                --  the compiled program to enable threads.
77

78
79
     -fllvm                     -- LLVM produces much better numerical code than GHC's
                                --  default native code generator.
80

81
82
83
     -optlo-O3                  -- Turn on more LLVM optimisations. 
                                --  This can produce better numerical code, 
                                --  but sometimes tickles bugs in LLVM.
84

85
86
     -fcpr-off                  -- The Constructed Product Result transform sometimes
                                --  interferes with fusion in the Data.Vector Library.
87

88
89
90
91
92
93
     -fno-liberate-case         -- The LiberateCase transform can duplicate lots of 
                                --  intermediate code, result in slow compile times,
                                --  large binaries, and minimal performance improvement.
                                --  The implementation of the DPH backend library should
                                --  manually handle most cases where LiberateCase
                                --  would fire.
94