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

Safe HaskellSafe-Infered

Data.Array.Parallel.Unlifted.Sequential

Contents

Description

Sequential operations on unlifted arrays.

Synopsis

Constructors

replicateSU :: Unbox a => USegd -> Vector a -> Vector aSource

Segmented replicate of a vector based on the lengths of the segments of the provided USegd.

replicateRSU :: Unbox a => Int -> Vector a -> Vector aSource

Regular sgemented replicate.

appendSU :: Unbox a => USegd -> Vector a -> USegd -> Vector a -> Vector aSource

Segmented append.

indicesSU :: USegd -> Vector IntSource

Segmented indices.

Folds

foldSU :: Unbox a => (a -> a -> a) -> a -> USegd -> Vector a -> Vector aSource

Segmented array reduction that requires an associative combination function with its unit

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

Segmented array reduction that requires an associative combination function with its unit. For scattered segments.

foldlSU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> USegd -> Vector a -> Vector bSource

Segmented array reduction proceeding from the left

foldlSSU :: (Unbox a, Unboxes a, Unbox b) => (b -> a -> b) -> b -> USSegd -> Vectors a -> Vector bSource

Segmented array reduction proceeding from the left. For scattered segments.

foldlRU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> Int -> Vector a -> Vector bSource

Regular arrar reduction

foldl1SU :: Unbox a => (a -> a -> a) -> USegd -> Vector a -> Vector aSource

Segmented array reduction from left to right with non-empty subarrays only

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

Segmented array reduction from left to right with non-empty subarrays only. For scattered segments.

fold1SU :: Unbox a => (a -> a -> a) -> USegd -> Vector a -> Vector aSource

Segmented array reduction with non-empty subarrays and an associative combination function.

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

Segmented array reduction with non-empty subarrays and an associative combination function. For scattered segments.

Sums

andSU :: USegd -> Vector Bool -> Vector BoolSource

Compute the boolean AND of all segments in a segmented array.

orSU :: USegd -> Vector Bool -> Vector BoolSource

Compute the boolean OR of all segments in a segmented array.

sumSU :: (Num e, Unbox e) => USegd -> Vector e -> Vector eSource

Compute the segmented sum of an array of numerals

sumRU :: (Num e, Unbox e) => Int -> Vector e -> Vector eSource

Compute the segmented sum of an array of numerals

productSU :: (Num e, Unbox e) => USegd -> Vector e -> Vector eSource

Compute the segmented product of an array of numerals

maximumSU :: (Ord e, Unbox e) => USegd -> Vector e -> Vector eSource

Determine the maximum element in each subarray

minimumSU :: (Ord e, Unbox e) => USegd -> Vector e -> Vector eSource

Determine the minimum element in each subarray

Pack and Combine

combineSU :: Unbox a => Vector Bool -> USegd -> Vector a -> USegd -> Vector a -> Vector aSource

Merge two segmented arrays according to flag array

Extracts and Indexing

indexsFromVector :: Unbox a => Vector a -> Vector Int -> Vector aSource

Lookup elements from a Vector.

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

Lookup elements from some Vectors through a UPVSegd.

extractsFromNestedUSSegd :: Unbox a => USSegd -> Vector (Vector a) -> Vector aSource

Copy segments from a Vectors, concatenating them into a new array.

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

Copy segments from a Vectors, concatenating them into a new array.

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

Copy segments from a Vectors, concatenating them into a new array.