wiki:DataParallel/Replicate

Version 1 (modified by chak, 4 years ago) (diff)

--

Preventing space blow-up due to replicate

The vectorisation transformation lifts scalar computations into vector space. In the course of this lifting, scalar constants are duplicated to fill an array, using the function 'replicateP'. Array computations are lifted in a similar manner, which leads to array constants being replicated to form arrays of arrays, which are represented as a segmented arrays. A simple example is our 'smvm' example code: