Changes between Version 8 and Version 9 of DataParallel/Vectorisation/TypeVectorisation


Ignore:
Timestamp:
May 29, 2007 9:02:12 AM (8 years ago)
Author:
chak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/Vectorisation/TypeVectorisation

    v8 v9  
    4040=== Lifting ===
    4141
    42 The lifting of types into vector space is, for all boxed monotypes, denoted by the array family constructor `PArr`.  However, need to handle the lifting of unboxed types and the extension of signatures with `PA` dictionaries explicitly:
     42The lifting of types into vector space is, for all boxed monotypes, denoted by the array family constructor `PArr`.  However, we need to handle the lifting of unboxed types and the extension of signatures with `PA` dictionaries explicitly:
    4343{{{
    4444Int#^                 = UArr Int
     
    6161newtype instance PArr (a :-> b) = PArrFun (a :=> b)
    6262}}}
     63
     64
     65=== Examples ===
     66
     67{{{
     68(Int  -> Int)* = Int_V :-> Int_V
     69(Int# -> Int)* = (Int# -> Int) :|| (UArr Int -> PArr Int)
     70
     71[:Int  -> Int:]* = PArr (Int_V :-> Int_V)
     72[:Int# -> Int:]* = PArr ((Int# -> Int) :||
     73                         (UArr Int -> PArr Int))
     74}}}
     75So, we have the `PArrUFun` type instance
     76{{{
     77PArrUFun :: ((Int# -> Int) :|| ACls (UArr Int) (PArr Int))
     78         -> PArr ((Int# -> Int) :|| (UArr Int -> PArr Int))
     79}}}
     80which constructs parallel arrays containing functions of type `Int# -> Int`.
     81
     82'''Problem:''' Pairing an array closure (that only contains a lifted function) with a scalar function that takes no environment seems useless.  We cannot use that scalar function to extract a single element from the array closure, as it cannot make any use of that single element from the environment array.  On the other hand, we cannot include the scalar function into the closure when the function manipulates unboxed tyes...or can we?!?