Safe Haskell | None |
---|
Sequential operations on unlifted arrays.
- This is an internal API and shouldn't need to be used directly. Client programs should use Data.Array.Parallel.Unlifted
- replicateSU :: Unbox a => USegd -> Vector a -> Vector a
- replicateRSU :: Unbox a => Int -> Vector a -> Vector a
- appendSU :: Unbox a => USegd -> Vector a -> USegd -> Vector a -> Vector a
- indicesSU :: USegd -> Vector Int
- indicesSU' :: Int -> USegd -> Vector Int
- foldSU :: Unbox a => (a -> a -> a) -> a -> USegd -> Vector a -> Vector a
- foldSSU :: (Unbox a, Unboxes a) => (a -> a -> a) -> a -> USSegd -> Vectors a -> Vector a
- foldlSU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> USegd -> Vector a -> Vector b
- foldlSSU :: (Unbox a, Unboxes a, Unbox b) => (b -> a -> b) -> b -> USSegd -> Vectors a -> Vector b
- foldlRU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> Int -> Vector a -> Vector b
- foldl1SU :: Unbox a => (a -> a -> a) -> USegd -> Vector a -> Vector a
- foldl1SSU :: (Unbox a, Unboxes a) => (a -> a -> a) -> USSegd -> Vectors a -> Vector a
- fold1SU :: Unbox a => (a -> a -> a) -> USegd -> Vector a -> Vector a
- fold1SSU :: (Unbox a, Unboxes a) => (a -> a -> a) -> USSegd -> Vectors a -> Vector a
- andSU :: USegd -> Vector Bool -> Vector Bool
- orSU :: USegd -> Vector Bool -> Vector Bool
- sumSU :: (Num e, Unbox e) => USegd -> Vector e -> Vector e
- sumRU :: (Num e, Unbox e) => Int -> Vector e -> Vector e
- productSU :: (Num e, Unbox e) => USegd -> Vector e -> Vector e
- maximumSU :: (Ord e, Unbox e) => USegd -> Vector e -> Vector e
- minimumSU :: (Ord e, Unbox e) => USegd -> Vector e -> Vector e
- combineSU :: Unbox a => Vector Bool -> USegd -> Vector a -> USegd -> Vector a -> Vector a
- indexsFromVector :: Unbox a => Vector a -> Vector Int -> Vector a
- indexsFromVectorsUVSegd :: (Unbox a, Unboxes a) => Vectors a -> UVSegd -> Vector (Int, Int) -> Vector a
- extractsFromNestedUSSegd :: Unbox a => USSegd -> Vector (Vector a) -> Vector a
- extractsFromVectorsUSSegd :: (Unboxes a, Unbox a) => USSegd -> Vectors a -> Vector a
- extractsFromVectorsUVSegd :: (Unbox a, Unboxes a) => UVSegd -> Vectors a -> Vector a
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
.
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.