Changes between Version 31 and Version 32 of DataParallel/VectPragma


Ignore:
Timestamp:
Oct 25, 2011 11:56:35 PM (2 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/VectPragma

    v31 v32  
    103103 * For type constructors identified with this pragma, can we generate an `instance` of the `Scalar` type class automatically (instead of relying on it being in the library)? 
    104104 
     105== The VECTORISE pragma for type classes == 
     106 
     107For a type class `C`, the pragma 
     108{{{ 
     109{-# VECTORISE class C #-} 
     110}}} 
     111indicates that the class `C` should be automatically vectorised, even if it is imported.  This is the default for all classes declared in the current module. 
     112 
     113The class `C` must be in scope, but it may be imported.  'PData' and 'PRepr' instances are generally not used for type classes and their dictionary representations. 
     114 
     115An example is the handling of `Num`. 
     116 
     117== The VECTORISE pragma for class instances == 
     118 
     119For a class instance `C t`, the pragma 
     120{{{ 
     121{-# VECTORISE instance C t #-} 
     122}}} 
     123indicates that the class instance `C t` should be automatically vectorised, even if it is imported.  This implies that all class methods making up the instance dfun are vectorised separately to combine into a vectorised diun.  This is the default for all class instances declared in the current module. 
     124 
     125== The VECTORISE SCALAR pragma for class instances == 
     126 
     127For a class instance `C t`, the pragma 
     128{{{ 
     129{-# VECTORISE SCALAR instance C t #-} 
     130}}} 
     131indicates that the instance dfun `C t` should vectorised by proceeding as for `VECTORISE SCALAR` on each individual class method of `C`. 
     132 
     133An example is `{-# VECTORISE SCALAR instance Num Int #-}`. 
     134 
    105135== Vectorising imported definitions == 
    106136