Changes between Version 56 and Version 57 of DataParallel/VectPragma


Ignore:
Timestamp:
Dec 7, 2012 5:41:41 AM (3 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/VectPragma

    v56 v57  
    2626This pragma can also be used for imported functions `f`.  In this case, `f_v` and a suitable vectorisation mapping of `f` to `f_v` is exported implicitly — just like `RULES` applied to imported identifiers.  By vectorising imported functions, we can vectorise functions of modules that have not been compiled with `-fvectorise`.  This is crucial to using the standard `Prelude` in vectorised code.
    2727
     28''Parallelism:'' A vectorised value is marked as parallel if its code includes a parallel value or if it includes any parallel types. The detailed rules are in the '''Vectorisation Avoidance''' paper.
     29
    2830'''IMPLEMENTATION RESTRICTION:''' Currently the right-hand side of the equation —i.e., `e`— may only be a simple identifier '''and''' it must be at the correct type instance.  More precisely, the Core type of the right-hand side must be identical to the vectorised version of `t`.
    2931
     
    3840
    3941This pragma can only be used for bindings in the current module (exactly like an `INLINE` pragma). The pragma must be used on all bindings forming a recursive group if it is used on any of the bindings in a group.
     42
     43''Parallelism:'' `f` will not be marked as parallel.
    4044
    4145'''Caveat:''' If `f`'s definition contains bindings that are being floated to the toplevel, those bindings may still be vectorised. ('''TODO:''' We might want to ensure that we never float anything out of (at least, those) bindings before the vectoriser is invoked.)
     
    6165Examples are the vectorisation of types, such as `Maybe` and `[]`, defined in the `Prelude`.
    6266
     67''Parallelism:'' `T` is being marked as parallel by the vectoriser if `T`'s definition includes any type constructor that is parallel.
     68
    6369=== With right-hand side ===
    6470
     
    7278
    7379An example is the vectorisation of parallel arrays, where `[::]` is replaced by `PArray` during vectorisation, but the vectoriser never looks at the representation of `[::]`.
     80
     81'Parallelism:'' '''???'''
    7482
    7583== The VECTORISE SCALAR pragma for type constructors ==
     
    8997An example is the handling of `Bool`, which is scalar and represents itself in vectorised code, but we want to use the custom instances of 'PData' and 'PRepr' defined in the DPH libraries.
    9098
     99''Parallelism:'' The type `T` is not marked as parallel.
     100
    91101=== With right-hand side ===
    92102
     
    101111An example is the handling of `(->)`, which the vectoriser maps to `(:->)`, but it never looks at the implementation of `(->)` and allows its use in encapsulated scalar code.
    102112
     113''Parallelism:'' The type `T` is not marked as parallel.
     114
    103115== The NOVECTORISE pragma for types ==
    104116
     
    110122
    111123This pragma can only be used for definitions in the current module.
     124
     125''Parallelism:'' The type `T` is not marked as parallel.
    112126
    113127'''TODO:'''