Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
loopy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Sepanski
loopy
Commits
8c3c641a
Commit
8c3c641a
authored
9 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Tweak ispc target for ispc 1.9
parent
f1cf40a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loopy/target/ispc.py
+19
-1
19 additions, 1 deletion
loopy/target/ispc.py
with
19 additions
and
1 deletion
loopy/target/ispc.py
+
19
−
1
View file @
8c3c641a
...
...
@@ -43,7 +43,7 @@ class LoopyISPCCodeMapper(LoopyCCodeMapper):
raise
ValueError
(
"
unexpected index_type
"
)
def
map_group_hw_index
(
self
,
expr
,
enclosing_prec
,
type_context
):
return
"
((%s) taskIndex%d)
"
%
(
self
.
_get_index_ctype
(),
expr
.
axis
)
return
"
((
uniform
%s) taskIndex%d)
"
%
(
self
.
_get_index_ctype
(),
expr
.
axis
)
def
map_local_hw_index
(
self
,
expr
,
enclosing_prec
,
type_context
):
if
expr
.
axis
==
0
:
...
...
@@ -213,6 +213,24 @@ class ISPCTarget(CTarget):
from
cgen.ispc
import
ISPCUniform
return
ISPCUniform
(
result
)
def
emit_sequential_loop
(
self
,
codegen_state
,
iname
,
iname_dtype
,
static_lbound
,
static_ubound
,
inner
):
ecm
=
codegen_state
.
expression_to_code_mapper
from
loopy.symbolic
import
aff_to_expr
from
loopy.codegen
import
wrap_in
from
pymbolic.mapper.stringifier
import
PREC_NONE
from
cgen
import
For
return
wrap_in
(
For
,
"
uniform %s %s = %s
"
%
(
self
.
dtype_to_typename
(
iname_dtype
),
iname
,
ecm
(
aff_to_expr
(
static_lbound
),
PREC_NONE
,
"
i
"
)),
"
%s <= %s
"
%
(
iname
,
ecm
(
aff_to_expr
(
static_ubound
),
PREC_NONE
,
"
i
"
)),
"
++%s
"
%
iname
,
inner
)
# }}}
# TODO: Generate launch code
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment