Skip to content
Snippets Groups Projects
Commit 6aa5778f authored by Matt Wala's avatar Matt Wala
Browse files

Merge branch 'master' into scan-actually-this-time

Conflicts:
	test/test_loopy.py
parents cd88b8b1 bd12a464
No related branches found
No related tags found
1 merge request!105Scans
......@@ -318,10 +318,16 @@ class SetOperationCacheManager:
return result
def dim_min(self, set, *args):
if set.plain_is_empty():
raise LoopyError("domain '%s' is empty" % set)
from loopy.isl_helpers import dim_min_with_elimination
return self.op(set, "dim_min", dim_min_with_elimination, args)
def dim_max(self, set, *args):
if set.plain_is_empty():
raise LoopyError("domain '%s' is empty" % set)
from loopy.isl_helpers import dim_max_with_elimination
return self.op(set, "dim_max", dim_max_with_elimination, args)
......
......@@ -455,9 +455,9 @@ def parse_reduction_op(name):
def reduction_function_mangler(kernel, func_id, arg_dtypes):
if isinstance(func_id, ArgExtFunction) and func_id.name == "init":
from loopy.target.opencl import OpenCLTarget
if not isinstance(kernel.target, OpenCLTarget):
raise LoopyError("only OpenCL supported for now")
from loopy.target.opencl import CTarget
if not isinstance(kernel.target, CTarget):
raise LoopyError("%s: only C-like targets supported for now" % func_id)
op = func_id.reduction_op
......@@ -471,9 +471,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif isinstance(func_id, ArgExtFunction) and func_id.name == "update":
from loopy.target.opencl import OpenCLTarget
if not isinstance(kernel.target, OpenCLTarget):
raise LoopyError("only OpenCL supported for now")
from loopy.target.opencl import CTarget
if not isinstance(kernel.target, CTarget):
raise LoopyError("%s: only C-like targets supported for now" % func_id)
op = func_id.reduction_op
......@@ -491,9 +491,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif isinstance(func_id, SegmentedFunction) and func_id.name == "init":
from loopy.target.opencl import OpenCLTarget
if not isinstance(kernel.target, OpenCLTarget):
raise LoopyError("only OpenCL supported for now")
from loopy.target.opencl import CTarget
if not isinstance(kernel.target, CTarget):
raise LoopyError("%s: only C-like targets supported for now" % func_id)
op = func_id.reduction_op
......@@ -507,9 +507,9 @@ def reduction_function_mangler(kernel, func_id, arg_dtypes):
)
elif isinstance(func_id, SegmentedFunction) and func_id.name == "update":
from loopy.target.opencl import OpenCLTarget
if not isinstance(kernel.target, OpenCLTarget):
raise LoopyError("only OpenCL supported for now")
from loopy.target.opencl import CTarget
if not isinstance(kernel.target, CTarget):
raise LoopyError("%s: only C-like targets supported for now" % func_id)
op = func_id.reduction_op
......
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