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
Kaushik Kulkarni
loopy
Commits
a0034760
Commit
a0034760
authored
7 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Shortcut straight to ecm.map_constant when emitting (potentially large) array literals (
#118
)
parent
5d0af418
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
loopy/target/c/__init__.py
+1
-2
1 addition, 2 deletions
loopy/target/c/__init__.py
with
1 addition
and
2 deletions
loopy/target/c/__init__.py
+
1
−
2
View file @
a0034760
...
...
@@ -194,7 +194,6 @@ def generate_array_literal(codegen_state, array, value):
ecm
=
codegen_state
.
expression_to_code_mapper
from
pymbolic.mapper.stringifier
import
PREC_NONE
from
loopy.expression
import
dtype_to_type_context
from
loopy.symbolic
import
ArrayLiteral
...
...
@@ -203,7 +202,7 @@ def generate_array_literal(codegen_state, array, value):
codegen_state
.
ast_builder
.
get_c_expression_to_code_mapper
(),
ArrayLiteral
(
tuple
(
ecm
(
d_i
,
PREC_NONE
,
type_context
,
array
.
dtype
).
expr
ecm
.
map_constant
(
d_i
,
type_context
)
for
d_i
in
data
)))
# }}}
...
...
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