Changes between Version 1 and Version 2 of DataParallel/Library

May 14, 2009 9:22:59 AM (6 years ago)



  • DataParallel/Library

    v1 v2  
     1= The DPH packages =
     3This page describes the packages (aka libraries) that form part of DPH, enumerates all the wyas in which they differ from "normal" GHC packages, and says what stuff lives where.
     5== What packages there are ==
     7DPH comes with the following blobs of source code:
     9  * `dph/dph-prim-seq` implements the DPH Primitive Interface for sequential machines.  Compiling it yields package `dph-prim-seq`.
     11  * `dph/dph-prim-par` implements the DPH Primitive Interface for parallel machines.  Compiling it yields package `dph-prim-seq`.
     13  * `dph/dph-base` implements the DPH User Interface, by importing the DPH Primitive Interface. The same source code can be compiled in two ways:
     14     * Importing `dph-prim-seq`, generating package `dph-base-seq`
     15     * Importing `dph-prim-seq`, generating package `dph-base-seq`
     17'''SLPJ: what is dph-common?'''
     19The DPH libraries (in particular `dph-base`) use Template Haskell, so they can only be compiled with a stage2 compiler.
     21== How the DPH packages are coupled to GHC ==
     23GHC knows about DPH as follows.  A single flag `-dph` switches on the following:
     25  * Adds `-package dph` ('''SLPJ: correct?'''), so that the user can `import Data.Array.Parallel`.  And so that the right package gets linked in the link step.
     27  * Runs a special pass called the '''vectoriser'''.  This pass generates code that mentions (by Original Name) various functions defined in `dph-prim-seq` or `dph-prim-par` (depending on the compiler flag used).  So if you change where a function is defined in `dph-prim-*`, or the name of the function, you have to make a corresponding change in GHC.
     29'''SLPJ: is it correct that GHC only generates Names in dph-prim?  If not, could it be made true?'''
    131== Array library of flat and segmented operations ==