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

Safe HaskellNone

Data.Array.Parallel.Unlifted.Distributed.Primitive.Operators

Description

Standard combinators for distributed types.

Synopsis

Documentation

generateDSource

Arguments

:: DT a 
=> What

What is the worker function doing.

-> Gang 
-> (Int -> a) 
-> Dist a 

Create a distributed value, given a function to create the instance for each thread.

generateD_cheapSource

Arguments

:: DT a 
=> What

What is the worker function doing.

-> Gang 
-> (Int -> a) 
-> Dist a 

Create a distributed value, but do it sequentially.

This function is used when we want to operate on a distributed value, but there isn't much data involved. For example, if we want to distribute a single integer to each thread, then there's no need to fire up the gang for this.

imapD' :: (DT a, DT b) => What -> Gang -> (Int -> a -> b) -> Dist a -> Dist bSource

Map a function across all elements of a distributed value. The worker function also gets the current thread index.

foldD :: DT a => What -> Gang -> (a -> a -> a) -> Dist a -> aSource

Fold all the instances of a distributed value.

scanD :: forall a. DT a => What -> Gang -> (a -> a -> a) -> a -> Dist a -> (Dist a, a)Source

Prefix sum of the instances of a distributed value.