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

Safe HaskellNone

Data.Array.Parallel.Unlifted.Vectors

Description

Irregular two dimensional arrays.

Synopsis

Documentation

data Vectors a

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

Class of element types that can be used in a Vectors

empty :: Vectors a

Construct an empty Vectors with no arrays of no elements.

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

Construct a Vectors containing data from a single unboxed array.

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

Yield the number of vectors in a Vectors.

index

Arguments

:: (Unboxes a, Unbox a) 
=> String

source position

-> Vectors a 
-> Int 
-> Vector a 

Take one of the outer vectors from a Vectors, with bounds checking

index2

Arguments

:: Unboxes a 
=> String

source position

-> Vectors a 
-> Int 
-> Int 
-> a 

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

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

Take one of the outer vectors from a Vectors.

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

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

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

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 a

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

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

Convert a boxed vector of unboxed vectors to a Vectors.

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

Convert a Vectors to a boxed vector of unboxed vectors.