projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Vectorisation utilities
[ghc-hetmet.git]
/
compiler
/
vectorise
/
VectType.hs
diff --git
a/compiler/vectorise/VectType.hs
b/compiler/vectorise/VectType.hs
index
34a37bf
..
2f4ca2f
100644
(file)
--- a/
compiler/vectorise/VectType.hs
+++ b/
compiler/vectorise/VectType.hs
@@
-2,11
+2,12
@@
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
--- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings
+-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
module VectType ( vectTyCon, vectType, vectTypeEnv,
-- for details
module VectType ( vectTyCon, vectType, vectTypeEnv,
- PAInstance, buildPADict )
+ mkRepr, arrShapeTys, arrShapeVars, arrSelector,
+ PAInstance, buildPADict )
where
#include "HsVersions.h"
where
#include "HsVersions.h"
@@
-362,6
+363,10
@@
replicateShape (IdRepr _) _ _ = return []
replicateShape (VoidRepr {}) len _ = return [len]
replicateShape (EnumRepr {}) len _ = return [len]
replicateShape (VoidRepr {}) len _ = return [len]
replicateShape (EnumRepr {}) len _ = return [len]
+arrSelector :: Repr -> [a] -> a
+arrSelector (SumRepr {}) [_, sel, _] = sel
+arrSelector _ _ = panic "arrSelector"
+
emptyArrRepr :: Repr -> VM [CoreExpr]
emptyArrRepr (SumRepr { sum_components = prods })
= liftM concat $ mapM emptyArrRepr prods
emptyArrRepr :: Repr -> VM [CoreExpr]
emptyArrRepr (SumRepr { sum_components = prods })
= liftM concat $ mapM emptyArrRepr prods