repa-array-4.1.0.1: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Generic.Load

Synopsis

Documentation

class (Bulk l1 a, Target l2 a) => Load l1 l2 a where Source

Compute all elements defined by a delayed array and write them to a manifest target representation.

The instances of this class require that the source array has a delayed representation. If you want to use a pre-existing manifest array as the source then delay it first.

Methods

loadS :: Array l1 a -> Buffer l2 a -> IO () Source

Fill an entire array sequentially.

loadP :: Gang -> Array l1 a -> Buffer l2 a -> IO () Source

Fill an entire array in parallel.

Instances

(Layout l1, Target l2 a) => Load (D l1) l2 a 
(Layout lSrc1, Layout lSrc2, Target lDst a, (~) * (Index lSrc1) (Index lSrc2)) => Load (D2 lSrc1 lSrc2) lDst a 

computeS :: (Load lSrc lDst a, Index lSrc ~ Index lDst) => Name lDst -> Array lSrc a -> Array lDst a Source

Sequential computation of delayed array elements.

Elements of the source array are computed sequentially and written to a new array of the specified layout.

computeIntoS :: Load lSrc lDst a => lDst -> Array lSrc a -> Maybe (Array lDst a) Source

Like computeS but use the provided desination layout.

The size of the destination layout must match the size of the source array, else Nothing.