Skip to content
Snippets Groups Projects
Commit a0034760 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Shortcut straight to ecm.map_constant when emitting (potentially large) array literals (#118)

parent 5d0af418
No related branches found
No related tags found
No related merge requests found
...@@ -194,7 +194,6 @@ def generate_array_literal(codegen_state, array, value): ...@@ -194,7 +194,6 @@ def generate_array_literal(codegen_state, array, value):
ecm = codegen_state.expression_to_code_mapper ecm = codegen_state.expression_to_code_mapper
from pymbolic.mapper.stringifier import PREC_NONE
from loopy.expression import dtype_to_type_context from loopy.expression import dtype_to_type_context
from loopy.symbolic import ArrayLiteral from loopy.symbolic import ArrayLiteral
...@@ -203,7 +202,7 @@ def generate_array_literal(codegen_state, array, value): ...@@ -203,7 +202,7 @@ def generate_array_literal(codegen_state, array, value):
codegen_state.ast_builder.get_c_expression_to_code_mapper(), codegen_state.ast_builder.get_c_expression_to_code_mapper(),
ArrayLiteral( ArrayLiteral(
tuple( tuple(
ecm(d_i, PREC_NONE, type_context, array.dtype).expr ecm.map_constant(d_i, type_context)
for d_i in data))) for d_i in data)))
# }}} # }}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment