Use vector 0.7 instead of arrays from dph-base
[packages/dph.git] / dph-prim-seq / Data / Array / Parallel / Unlifted.hs
1 {-# LANGUAGE CPP #-}
2
3 #include "DPH_Header.h"
4
5 import qualified Data.Array.Parallel.Unlifted.Sequential.Vector as V
6 import Data.Array.Parallel.Unlifted.Sequential.USel
7 import Data.Array.Parallel.Unlifted.Sequential.Segmented
8
9 #include "DPH_Interface.h"
10
11 class V.Unbox a => Elt a
12 type Array = V.Vector
13 type Segd = USegd
14 type Sel2 = USel2
15 type SelRep2 = ()
16
17 length = V.length
18 empty = V.empty
19 replicate = V.replicate
20 repeat n _ = V.repeat n
21 (!:) = (V.!)
22 extract = V.extract
23 drop = V.drop
24 permute = V.permute
25 bpermute = V.bpermute
26 mbpermute = V.mbpermute
27 bpermuteDft = V.bpermuteDft
28 update = V.update
29 (+:+) = (V.++)
30 interleave = V.interleave
31 pack = V.pack
32 combine = V.combine
33 combine2 tags _ = V.combine2ByTag tags
34 map = V.map
35 filter = V.filter
36 zip = V.zip
37 unzip = V.unzip
38 fsts = V.fsts
39 snds = V.snds
40 zipWith = V.zipWith
41 fold = V.fold
42 fold1 = V.fold1
43 and = V.and
44 sum = V.sum
45 scan = V.scan
46 indexed = V.indexed
47 enumFromTo = V.enumFromTo
48 enumFromThenTo = V.enumFromThenTo
49 enumFromStepLen = V.enumFromStepLen
50 enumFromStepLenEach = V.enumFromStepLenEach
51
52 mkSel2 tags idxs n0 n1 _ = mkUSel2 tags idxs n0 n1
53 tagsSel2 = tagsUSel2
54 indicesSel2 = indicesUSel2
55 elementsSel2_0 = elementsUSel2_0
56 elementsSel2_1 = elementsUSel2_1
57 repSel2 _ = ()
58
59 mkSelRep2 tags = ()
60 indicesSelRep2 tags _ = tagsToIndices2 tags
61 elementsSelRep2_0 tags _ = count tags 0
62 elementsSelRep2_1 tags _ = count tags 1
63
64 replicate_s = replicateSU
65 replicate_rs = replicateRSU
66 append_s _ = appendSU
67 fold_s = foldSU
68 fold1_s = fold1SU
69 fold_r = foldlRU
70 sum_r = sumRU
71
72 indices_s = indicesSU
73
74 lengthSegd = lengthUSegd
75 lengthsSegd = lengthsUSegd
76 indicesSegd = indicesUSegd
77 elementsSegd = elementsUSegd
78 mkSegd = mkUSegd
79 randoms = V.random
80 randomRs = V.randomR
81 class V.UIO a => IOElt a
82 hPut = V.hPut
83 hGet = V.hGet
84 toList = V.toList
85 fromList = V.fromList
86