Skip to content

Commit

Permalink
Merge pull request #112 from coneoproject/py3-minor-edit
Browse files Browse the repository at this point in the history
Resolving SLATE conflicts in type checking
  • Loading branch information
thomasgibson authored Dec 15, 2016
2 parents 955d29d + ca50dfc commit 5a39a14
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions coffee/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ def plan_cpu(self, opts):
parent, nest = expr_info
if not nest:
continue
metaexpr = MetaExpr(check_type(stmt, info['decls']), parent, nest)
if kernel.template:
typ = "double"
else:
typ = check_type(stmt, info['decls'])
metaexpr = MetaExpr(typ, parent, nest)
nests[nest[0]].update({stmt: metaexpr})
loop_opts = [CPULoopOptimizer(loop, header, exprs)
for (loop, header), exprs in nests.items()]
Expand Down Expand Up @@ -186,7 +190,11 @@ def plan_gpu(self):
parent, nest = expr_info
if not nest:
continue
metaexpr = MetaExpr(check_type(stmt, info['decls']), parent, nest)
if kernel.template:
typ = "double"
else:
typ = check_type(stmt, info['decls'])
metaexpr = MetaExpr(typ, parent, nest)
nests[nest[0]].update({stmt: metaexpr})
loop_opts = [GPULoopOptimizer(loop, header, exprs)
for (loop, header), exprs in nests.items()]
Expand Down

0 comments on commit 5a39a14

Please sign in to comment.