Changes between Version 42 and Version 43 of DataParallel/Regular


Ignore:
Timestamp:
Jan 20, 2010 1:24:22 PM (4 years ago)
Author:
gckeller
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DataParallel/Regular

    v42 v43  
    268268simpleReplicate:: (U.Elt e, Shape dim) => Array dim e -> Int -> Array (dim :*: Int) e 
    269269simpleReplicate arr n = 
    270   replicate arr (IndexFixed n IndexNil) 
     270  replicate arr (IndexFixed n IndexNil)  -- (*,n) 
    271271}}} 
    272272replicates the argument array (which can of any dimensionality) `n` times and behaves 
     
    276276  Array (dim :*: Int) e -> Int -> Array (dim :*: Int :*: Int) e 
    277277elementwiseReplicate arr n = 
    278   replicate arr (IndexAll (IndexFixed n IndexNil)) 
     278  replicate arr (IndexAll (IndexFixed n IndexNil))    -- (*,n,.) 
    279279}}} 
    280280replicates each element of an array `n` times (similarly to `map (replicate n)` on lists). 
     
    408408 where 
    409409    arr2T   = forceDArray $ transpose arr2   
    410     arr1Ext = replicate arr1 (Array.IndexAll (Array.IndexFixed m2 (Array.IndexAll Array.IndexNil))) 
    411     arr2Ext = replicate arr2T 
    412                  (Array.IndexAll (Array.IndexAll (Array.IndexFixed n1 Array.IndexNil))) 
     410    arr1Ext = replicate arr1 (Array.IndexAll (Array.IndexFixed m2 (Array.IndexAll Array.IndexNil))) --  (*,.,m2,.) 
     411    arr2Ext = replicate arr2T                
     412                 (Array.IndexAll (Array.IndexAll (Array.IndexFixed n1 Array.IndexNil)))                                 -- (*,n1,.,.) 
    413413 
    414414}}}