Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
3a90968f
Commit
3a90968f
authored
Mar 16, 2010
by
benl@ouroborus.net
Browse files
Add sliceP mapping to vectoriser builtins
parent
23f1f679
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/VectBuiltIn.hs
View file @
3a90968f
...
...
@@ -330,6 +330,16 @@ preludeDataCons (Modules { dph_Prelude_Tuple = dph_Prelude_Tuple })
where
mk_tup
n
mod
name
=
(
tupleCon
Boxed
n
,
mod
,
name
)
-- | Mapping of prelude functions to vectorised versions.
-- Functions like filterP currently have a working but naive version in GHC.PArr
-- During vectorisation we replace these by calls to filterPA, which are
-- defined in dph-common Data.Array.Parallel.Lifted.Combinators
--
-- As renamer only sees the GHC.PArr functions, if you want to add a new function
-- to the vectoriser there has to be a definition for it in GHC.PArr, even though
-- it will never be used at runtime.
--
preludeVars
::
Modules
->
[(
Module
,
FastString
,
Module
,
FastString
)]
preludeVars
(
Modules
{
dph_Combinators
=
dph_Combinators
,
dph_PArray
=
dph_PArray
...
...
@@ -348,6 +358,7 @@ preludeVars (Modules { dph_Combinators = dph_Combinators
,
mk
gHC_PARR
(
fsLit
"lengthP"
)
dph_Combinators
(
fsLit
"lengthPA"
)
,
mk
gHC_PARR
(
fsLit
"replicateP"
)
dph_Combinators
(
fsLit
"replicatePA"
)
,
mk
gHC_PARR
(
fsLit
"!:"
)
dph_Combinators
(
fsLit
"indexPA"
)
,
mk
gHC_PARR
(
fsLit
"sliceP"
)
dph_Combinators
(
fsLit
"slicePA"
)
,
mk
gHC_PARR
(
fsLit
"crossMapP"
)
dph_Combinators
(
fsLit
"crossMapPA"
)
,
mk
gHC_PARR
(
fsLit
"singletonP"
)
dph_Combinators
(
fsLit
"singletonPA"
)
,
mk
gHC_PARR
(
fsLit
"concatP"
)
dph_Combinators
(
fsLit
"concatPA"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment