ConcurrentUtils-0.4.2.0: Concurrent utilities

Safe HaskellNone
LanguageHaskell98

Control.CUtils.DataParallel

Description

An implementation of nested data parallelism

Synopsis

Documentation

data ArrC t Source

The array interface

Constructors

ArrC !(Array Int t) !(Forest Int) 

inject :: Array Int e -> ArrC e Source

Inject a basic array into the ArrC type.

project :: ArrC t -> Array Int t Source

Get a basic array out.

newArray :: [e] -> Array Int e Source

Convenience for making an array from a list.

mirror :: Either a a1 -> Either a1 a Source

pairUp :: [b] -> [(b, b)] Source

mp :: (t -> t1) -> ArrC t -> ArrC t1 Source

Programs involving these array operations are optimized by a set of rules when GHC's -O option is set. Use +RTS -N to get parallelism.

index :: ArrC e -> Int -> e Source

zip :: ArrC t -> ArrC t1 -> ArrC (t, t1) Source

concat :: ArrC (ArrC t) -> ArrC t Source

fold :: (a -> a -> a) -> (a1 -> a) -> a -> ArrC a1 -> a Source

Associative fold

first :: (t -> t1) -> (t, t2) -> (t1, t2) Source

Control.Arrow substitutes

second :: (t -> t2) -> (t1, t) -> (t1, t2) Source

left :: (a -> b) -> Either a b1 -> Either b b1 Source

right :: (b -> b1) -> Either a b -> Either a b1 Source

and :: (t2 -> t) -> (t2 -> t1) -> t2 -> (t, t1) Source

__pack :: ArrC (ArrC t) -> ArrC t Source

Internals

__packProd :: (a, b) -> ArrC (Either a b) Source

__unpackProd :: ArrC (Either t t1) -> (t, t1) Source

__packSum2 :: Either (ArrC a1) a -> ArrC (Either a1 a) Source