dph-par-0.4.0: Data structures for Nested Data-Parallel Haskell.Source codeContentsIndex
Portabilitynon-portable (GHC Extensions)
MaintainerRoman Leshchinskiy <rl@cse.unsw.edu.au>

User level interface of parallel arrays.

Description ---------------------------------------------------------------

Language: Haskell 98 plus parallel arrays

The semantic difference between standard Haskell arrays (aka lazy arrays) and parallel arrays (aka strict arrays) is that the evaluation of two different elements of a lazy array is independent, whereas in a strict array either non or all elements are evaluated. In other words, when a parallel array is evaluated to WHNF, all its elements will be evaluated to WHNF. The name parallel array indicates that all array elements may, in general, be evaluated to WHNF in parallel without any need to resort to speculative evaluation. This parallel evaluation semantics is also beneficial in the sequential case, as it facilitates loop-based array processing as known from classic array-based languages, such as Fortran.

The interface of this module is essentially a variant of the list component of the Prelude, but also includes some functions (such as permutations) that are not provided for lists. The following list operations are not supported on parallel arrays, as they would require the availability of infinite parallel arrays: iterate, repeat, and cycle.

emptyP :: [::] aSource
singletonP :: a -> [::] aSource
replicateP :: Int -> a -> [::] aSource
lengthP :: [::] a -> IntSource
(+:+) :: [::] a -> [::] a -> [::] aSource
concatP :: [::] ([::] a) -> [::] aSource
mapP :: (a -> b) -> [::] a -> [::] bSource
filterP :: (a -> Bool) -> [::] a -> [::] aSource
combineP :: [:a:] -> [:a:] -> [:Int:] -> [:a:]Source
zipP :: [::] a -> [::] b -> [::] (a, b)Source
unzipP :: [::] (a, b) -> ([::] a, [::] b)Source
Produced by Haddock version 2.6.1