Changes between Version 2 and Version 3 of DataParallel/Vectorisation/TypeVectorisation


Ignore:
Timestamp:
May 28, 2007 4:00:42 AM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/Vectorisation/TypeVectorisation

    v2 v3  
    33The transformation of types includes both closure conversion and the pairing of scalar with lifted computations. 
    44 
     5=== Unboxed types === 
     6 
     7Unboxed types and functions defined in `GHC.Prim` need to be treated specially during vectorisation.  This is as we cannot have `PA` instances for unboxed types and the transformation needs to know which functions from `GHC.Prim` can be safely parallelised (e.g., its fine to run many `+#` in parallel, whereas this is not really advisable for calls to side-effecting RTS functions).  Indeed, we might regard unboxed types and functions from `GHC.Prim` as the place where we make the transition from implementing vectorisation decisions in package ndp to hard-coding them into the compiler.  It is probably a good idea to eventually move as much as possible of the hardcoded information into `primops.txt.pp`, but for the moment, we simply hardcode everything in the modules in `vectorise/`. 
     8 
    59=== Transformation rules === 
    610 
     11TODO: 
     12 * Be careful that `t1* ->> t2*` includes `PArr t1` and `PArr t2*`; so, we can only use that if we have `PA` instances for these types. 
     13 
    714The type transformation rules achieve two goals: (1) they replace original type constructors and variables by their vectorised variants, where those are available, and (2) they alter the representation of functions: 
     15{{{ 
     16T*            = T_V  , if T_V exists 
     17              = T    , otherwise 
     18a*            = a_v 
     19(t1 -> t2)*   = t1* ->> t2* 
     20(t1 t2)*      = t1* t2* 
     21(forall a.t)* = forall a_v.t* 
     22}}} 
     23The transformation of function types includes both the change from `(->)` to `(:->)` as well as  
     24 
    825{{{ 
    926T*            = T_V , if T_V exists 
     
    1734(forall a.t)* = forall a_v.t* 
    1835}}} 
    19 The transformation of function types includes both the change from `(->)` to `(:->)` as well as