Changes between Version 21 and Version 22 of DataParallel/VectPragma


Ignore:
Timestamp:
Aug 22, 2011 2:29:32 PM (4 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/VectPragma

    v21 v22  
    1414then the vectoriser defines `f_v = e` and refrains from rebinding `f`.  This implies that for `f :: t`, `e`'s type is the `t` vectorised (in particular), `e`'s type uses the array closure type `(:->)` instead of the vanilla function space `(->)`.  The vectoriser checks that `e` has the appropriate type.
    1515
     16This 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 iff `f` is re-exported; otherwise, it is only available in the module in which the pragma is located.  By re-exporting a vectorised imported function, we can vectorise functions of modules that have not been compiled with `-fvectorise`.  This is crucial to using the standard `Prelude` in vectorised code.
     17
    1618'''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`.
     19
    1720
    1821== The NOVECTORISE pragma for values ==
     
    5255}}}
    5356and so on.  (The variable `f` must have a proper function type.)
     57
     58This pragma can also be used on imported functions `f`, in the same manner as the plain `VECTORISE` pragma.
    5459
    5560