|Version 2 (modified by chak, 9 years ago) (diff)|
The transformation of types includes both closure conversion and the pairing of scalar with lifted computations.
The type transformation rules achieve two goals: (1) they replace original type constructors and variables by their vectorised variants, where those are available, and (2) they alter the representation of functions:
T* = T_V , if T_V exists = T , otherwise a* = a_v (t1 -> t2)* = ( t1* -> t2*, , if kindOf t1 == # [:t1* -> t2*:]) or kindOf t2 == # = ( t1* :-> t2*, , otherwise [:t1* :-> t2*:]) (t1 t2)* = t1* t2* (forall a.t)* = forall a_v.t*
The transformation of function types includes both the change from (->) to (:->) as well as