[commit: dph] master: Comments and formatting to dph-prim-seq/D.A.P.Unlifted (4db329b)
Ben Lippmeier
benl at ouroborus.net
Wed Apr 13 08:04:12 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/dph
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4db329bdf42487d160b35a30c70cc43fe3e63a94
>---------------------------------------------------------------
commit 4db329bdf42487d160b35a30c70cc43fe3e63a94
Author: benl23 <benl at ouroborus.net>
Date: Thu Apr 7 14:17:16 2011 +1000
Comments and formatting to dph-prim-seq/D.A.P.Unlifted
>---------------------------------------------------------------
dph-prim-seq/Data/Array/Parallel/Unlifted.hs | 139 ++++++++++++++------------
1 files changed, 75 insertions(+), 64 deletions(-)
diff --git a/dph-prim-seq/Data/Array/Parallel/Unlifted.hs b/dph-prim-seq/Data/Array/Parallel/Unlifted.hs
index fec2116..72645da 100644
--- a/dph-prim-seq/Data/Array/Parallel/Unlifted.hs
+++ b/dph-prim-seq/Data/Array/Parallel/Unlifted.hs
@@ -1,5 +1,15 @@
{-# LANGUAGE CPP #-}
+-- | Primitive sequential combinators that work on flat, unlifted arrays.
+--
+-- This set of combinators is used when the program is comiled with -fdph-seq.
+-- When compiling with -fdph-par, the ones in the dph-prim-par package are used
+-- instead. The dph-prim-par package exports the same names, but all combinators
+-- are implemented sequentially.
+--
+-- The API is defined in DPH_Header.h and DPH_Interface.h to ensure that both
+-- dph-prim-par and dph-prim-seq really do export the same symbols.
+
#include "DPH_Header.h"
import qualified Data.Array.Parallel.Unlifted.Sequential.Vector as V
@@ -9,78 +19,79 @@ import Data.Array.Parallel.Unlifted.Sequential.Segmented
#include "DPH_Interface.h"
class V.Unbox a => Elt a
-type Array = V.Vector
-type Segd = USegd
-type Sel2 = USel2
-type SelRep2 = ()
+type Array = V.Vector
+type Segd = USegd
+type Sel2 = USel2
+type SelRep2 = ()
-length = V.length
-empty = V.empty
-replicate = V.replicate
-repeat n _ = V.repeat n
-(!:) = (V.!)
-extract = V.extract
-drop = V.drop
-permute = V.permute
-bpermute = V.bpermute
-mbpermute = V.mbpermute
-bpermuteDft = V.bpermuteDft
-update = V.update
-(+:+) = (V.++)
-interleave = V.interleave
-pack = V.pack
-combine = V.combine
-combine2 tags _ = V.combine2ByTag tags
-map = V.map
-filter = V.filter
-zip = V.zip
-unzip = V.unzip
-fsts = V.fsts
-snds = V.snds
-zipWith = V.zipWith
-fold = V.fold
-fold1 = V.fold1
-and = V.and
-sum = V.sum
-scan = V.scan
-indexed = V.indexed
-enumFromTo = V.enumFromTo
-enumFromThenTo = V.enumFromThenTo
-enumFromStepLen = V.enumFromStepLen
-enumFromStepLenEach = V.enumFromStepLenEach
+length = V.length
+empty = V.empty
+replicate = V.replicate
+repeat n _ = V.repeat n
+(!:) = (V.!)
+extract = V.extract
+drop = V.drop
+permute = V.permute
+bpermute = V.bpermute
+mbpermute = V.mbpermute
+bpermuteDft = V.bpermuteDft
+update = V.update
+(+:+) = (V.++)
+interleave = V.interleave
+pack = V.pack
+combine = V.combine
+combine2 tags _ = V.combine2ByTag tags
+map = V.map
+filter = V.filter
+zip = V.zip
+unzip = V.unzip
+fsts = V.fsts
+snds = V.snds
+zipWith = V.zipWith
+fold = V.fold
+fold1 = V.fold1
+and = V.and
+sum = V.sum
+scan = V.scan
+indexed = V.indexed
+enumFromTo = V.enumFromTo
+enumFromThenTo = V.enumFromThenTo
+enumFromStepLen = V.enumFromStepLen
+enumFromStepLenEach = V.enumFromStepLenEach
mkSel2 tags idxs n0 n1 _ = mkUSel2 tags idxs n0 n1
-tagsSel2 = tagsUSel2
-indicesSel2 = indicesUSel2
-elementsSel2_0 = elementsUSel2_0
-elementsSel2_1 = elementsUSel2_1
-repSel2 _ = ()
+tagsSel2 = tagsUSel2
+indicesSel2 = indicesUSel2
+elementsSel2_0 = elementsUSel2_0
+elementsSel2_1 = elementsUSel2_1
+repSel2 _ = ()
-mkSelRep2 tags = ()
-indicesSelRep2 tags _ = tagsToIndices2 tags
+mkSelRep2 tags = ()
+indicesSelRep2 tags _ = tagsToIndices2 tags
elementsSelRep2_0 tags _ = count tags 0
elementsSelRep2_1 tags _ = count tags 1
-replicate_s = replicateSU
-replicate_rs = replicateRSU
-append_s _ = appendSU
-fold_s = foldSU
-fold1_s = fold1SU
-fold_r = foldlRU
-sum_r = sumRU
+replicate_s = replicateSU
+replicate_rs = replicateRSU
+append_s _ = appendSU
+fold_s = foldSU
+fold1_s = fold1SU
+fold_r = foldlRU
+sum_r = sumRU
+
+indices_s = indicesSU
-indices_s = indicesSU
+lengthSegd = lengthUSegd
+lengthsSegd = lengthsUSegd
+indicesSegd = indicesUSegd
+elementsSegd = elementsUSegd
+mkSegd = mkUSegd
+randoms = V.random
+randomRs = V.randomR
-lengthSegd = lengthUSegd
-lengthsSegd = lengthsUSegd
-indicesSegd = indicesUSegd
-elementsSegd = elementsUSegd
-mkSegd = mkUSegd
-randoms = V.random
-randomRs = V.randomR
class V.UIO a => IOElt a
-hPut = V.hPut
-hGet = V.hGet
-toList = V.toList
-fromList = V.fromList
+hPut = V.hPut
+hGet = V.hGet
+toList = V.toList
+fromList = V.fromList
More information about the Cvs-libraries
mailing list