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


Ignore:
Timestamp:
May 28, 2007 4:34:41 AM (7 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/Vectorisation/TypeVectorisation

    v3 v4  
    66 
    77Unboxed 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 
     9To treat unboxed type properly, we cannot simply use the type constructor `PArr` wherever we need a flattened array; instead, we define a type translation 
     10{{{ 
     11Int#^    = UArr Int 
     12Float#^  = UArr Float 
     13Double#^ = UArr Double 
     14<and so on for other unboxed types> 
     15t^       = PArr t 
     16}}} 
    817 
    918=== Transformation rules ===