Changes between Version 17 and Version 18 of DataParallel/VectPragma

Aug 17, 2011 6:08:26 AM (6 years ago)



  • DataParallel/VectPragma

    v17 v18  
    5454== The basic VECTORISE pragma for type constructors ==
     56=== Without right-hand side ===
     58For a type constructor `T`, the pragma
     60{-# VECTORISE type T #-}
     62indicates that the type `T` should be vectorised and embeds no parallel arrays.  This is similar to where the vectoriser automatically decides to vectorise a type, but but no special vectorised representation needs to be generated as the type embeds no arrays.
     64The data type constructor `T` that together with its constructors `Cn` may be used in vectorised code, where `T` and the `Cn` represent themselves in vectorised code. An example is the treatment of 'Bool'.  'Bool' together with 'False' and 'True' may appear in vectorised code and they remain unchanged by vectorisation.  (There is no need for a special representation as the values cannot embed any arrays.)
     66The type constructor `T` must be in scope, but it may be imported.  'PData' and 'PRepr' instances are automatically generated by the vectoriser.
     69 * Do we need to be able to specify that an imported type embedding arrays should be vectorised including the generation of a specialised right-hand side?
     71=== With right-hand side ===
    62  * This isn' fully implemented yet.  (Implemented up to and including desugaring and being put into `ModGuts`, but not used in the vectoriser.)
    63  * We probably want two variants: one which just gives a tycon to vectorise and one also giving the vectorised tycon/type.  The first variant matches the default behaviour for locally defined data types, but enables to vectorise imported data types in subsequent modules.  (Eg, to vectorise data types from the Prelude without changing —or vectorising— the Prelude itself.)
    64  * Maybe don't have a rhs, but make this pragma mean that `T` should be vectorised as if the module containing `T` would have been vectorised.  (Post-hoc vectorisation of a data type.)
     78 * This isn't fully implemented yet.  (Implemented up to and including desugaring and being put into `ModGuts`, but not used in the vectoriser.)
    6680== The VECTORISE SCALAR pragma for type constructors ==