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

Safe HaskellNone

Data.Array.Parallel.Unlifted.Parallel.Sums

Description

Sum-like parallel combinators for unlifted arrays

Synopsis

Documentation

andUP :: Vector Bool -> BoolSource

Compute the logical AND of all the elements in a array.

orUP :: Vector Bool -> BoolSource

Compute the logical OR of all the elements in a array.

allUP :: Unbox e => (e -> Bool) -> Vector e -> BoolSource

Check whether all the elements in a array meet the given predicate.

anyUP :: Unbox e => (e -> Bool) -> Vector e -> BoolSource

Check whether any of the elements in a array meet the given predicate.

sumUP :: (Unbox a, DT a, Num a) => Vector a -> aSource

Compute the sum all the elements of a array.

productUP :: (DT e, Num e, Unbox e) => Vector e -> eSource

Compute the product of all the elements of an array.

maximumUP :: (DT e, Ord e, Unbox e) => Vector e -> eSource

Determine the maximum element in an array.

maximumByUP :: (DT e, Unbox e) => (e -> e -> Ordering) -> Vector e -> eSource

Determine the maximum element in an array under the given ordering

maximumIndexByUP :: (DT e, Unbox e) => (e -> e -> Ordering) -> Vector e -> IntSource

Determine the index of the maximum element in an array under the given ordering