dph-prim-seq-0.6.1.1: Data Parallel Haskell segmented arrays. (sequential implementation)

Safe HaskellSafe-Infered

Data.Array.Parallel.Unlifted.Vectors

Description

Irregular two dimensional arrays.

Synopsis

Documentation

data Vectors a Source

A 2-dimensional array, where the inner arrays can all have different lengths.

Instances

(Unboxes a, Unbox a, Show a) => Show (Vectors a) 

class Prim a => Unboxes a Source

Class of element types that can be used in a Vectors

empty :: Vectors aSource

Construct an empty Vectors with no arrays of no elements.

singleton :: (Unboxes a, Unbox a) => Vector a -> Vectors aSource

Construct a Vectors containing data from a single unboxed array.

length :: Unboxes a => Vectors a -> IntSource

Yield the number of vectors in a Vectors.

unsafeIndex :: (Unboxes a, Unbox a) => Vectors a -> Int -> Vector aSource

Take one of the outer vectors from a Vectors.

unsafeIndex2 :: Unboxes a => Vectors a -> Int -> Int -> aSource

Retrieve a single element from a Vectors, given the outer and inner indices.

unsafeIndexUnpack :: Unboxes a => Vectors a -> Int -> (ByteArray, Int, Int)Source

Retrieve an inner array from a Vectors, returning the array data, starting index in the data, and vector length.

append :: (Unboxes a, Unbox a) => Vectors a -> Vectors a -> Vectors aSource

Appending two Vectors uses work proportional to the length of the outer arrays.

fromVector :: (Unboxes a, Unbox a) => Vector (Vector a) -> Vectors aSource

Convert a boxed vector of unboxed vectors to a Vectors.

toVector :: (Unboxes a, Unbox a) => Vectors a -> Vector (Vector a)Source

Convert a Vectors to a boxed vector of unboxed vectors.