repa- High performance, regular, shape polymorphic parallel arrays.

Safe HaskellNone




data V Source

Arrays represented as boxed vectors.

This representation should only be used when your element type doesn't have an Unbox instsance. If it does, then use the Unboxed U representation will be faster.


Source V a

Read elements from a boxed vector array.

Target V e

Filling of boxed vector arrays.

(Read sh, Read e) => Read (Array V sh e) 
(Show sh, Show e) => Show (Array V sh e) 
(Arbitrary sh, Arbitrary a, Shape sh) => Arbitrary (Array V sh a) 
data MVec V = MVector (IOVector e) 
data Array V sh a = AVector !sh !(Vector a) 

computeVectorS :: (Shape sh, Load r1 sh e) => Array r1 sh e -> Array V sh e Source

Sequential computation of array elements.

  • This is an alias for compute with a more specific type.

computeVectorP :: (Shape sh, Load r1 sh e, Monad m) => Array r1 sh e -> m (Array V sh e) Source

Parallel computation of array elements.

fromListVector :: Shape sh => sh -> [a] -> Array V sh a Source

O(n). Convert a list to a boxed vector array.

  • This is an alias for fromList with a more specific type.

fromVector :: Shape sh => sh -> Vector e -> Array V sh e Source

O(1). Wrap a boxed vector as an array.

toVector :: Array V sh e -> Vector e Source

O(1). Unpack a boxed vector from an array.