dph-prim-par- Data Parallel Haskell segmented arrays. (production version)

Safe HaskellNone



Basic operations on parallel unlifted arrays.



emptyUP :: Unbox e => Vector eSource

O(1). Construct an empty array.

replicateUP :: Unbox e => Int -> e -> Vector eSource

Yield an array where all elements contain the same value

repeatUP :: Unbox e => Int -> Vector e -> Vector eSource

Repeat an array the given number of times.

lengthUP :: Unbox e => Vector e -> IntSource

O(1). Take the length of an array.

nullUP :: Unbox e => Vector e -> BoolSource

O(1). Test whether the given array is empty

interleaveUP :: Unbox e => Vector e -> Vector e -> Vector eSource

Interleave elements of two arrays

indexedUP :: (DT e, Unbox e) => Vector e -> Vector (Int, e)Source

Associate each element of the array with its index