Changes between Version 41 and Version 42 of DataParallel/VectPragma


Ignore:
Timestamp:
Aug 18, 2012 7:49:35 AM (3 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/VectPragma

    v41 v42  
    3434== The VECTORISE SCALAR pragma for functions == 
    3535 
    36 Functions that contain no array computations, especially if they are cheap (such as `(+)`), should not be vectorised, but applied by simply mapping them over an array.  This could be achieved by using the `VECTORISE` pragma with an appropriate right-hand side, but leads to repetitive code that we rather like the compiler to generate. 
     36Currently, not used. (Might be used to ensure that specific functions are used scalar vectorised.) 
    3737 
    38 If a unary function `f` is accompanied by a pragma 
    39 {{{ 
    40 {-# VECTORISE SCALAR f #-} 
    41 }}} 
    42 then the vectoriser generates  
    43 {{{ 
    44 f_v = closure1 f (scalar_map f) 
    45 }}} 
    46 and keeps `f` unchanged. 
    47  
    48 For a binary function, it generates 
    49 {{{ 
    50 f_v = closure2 f (scalar_zipWith f) 
    51 }}} 
    52 for a tertiary function, it generates 
    53 {{{ 
    54 f_v = closure3 f (scalar_zipWith3 f) 
    55 }}} 
    56 and so on.  (The variable `f` must have a proper function type.) 
    57  
    58 This pragma can also be used on imported functions `f`, in the same manner as the plain `VECTORISE` pragma. 
    59  
    60 '''RESTRICTION:''' Functions vectorised with this pragma can not be mutually recursive. (They may be recursive.) 
    6138 
    6239== The basic VECTORISE pragma for type constructors ==