From 7a6e2cc620f56de6b208e04753a8032377ff49a7 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 1 Jun 2017 22:43:28 -0400 Subject: [PATCH] Fix a few references to (deprecated) pyopencl.array.vec --- boxtree/area_query.py | 7 ++++--- boxtree/traversal.py | 3 ++- boxtree/tree_build_kernels.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/boxtree/area_query.py b/boxtree/area_query.py index a5ebdca..66ace90 100644 --- a/boxtree/area_query.py +++ b/boxtree/area_query.py @@ -28,6 +28,7 @@ THE SOFTWARE. import numpy as np import pyopencl as cl +import pyopencl.cltypes # noqa import pyopencl.array # noqa from mako.template import Template from boxtree.tools import AXIS_NAMES, DeviceDataRecord @@ -540,7 +541,7 @@ class AreaQueryElementwiseTemplate(object): ("box_id_dtype", box_id_dtype), ("particle_id_dtype", None), ("coord_dtype", coord_dtype), - ("vec_types", tuple(cl.array.vec.types.items())), + ("vec_types", tuple(cl.cltypes.vec_types.items())), ("max_levels", max_levels), ("AXIS_NAMES", AXIS_NAMES), ("box_flags_enum", box_flags_enum), @@ -654,7 +655,7 @@ class AreaQueryBuilder(object): box_id_dtype=box_id_dtype, particle_id_dtype=None, coord_dtype=coord_dtype, - vec_types=cl.array.vec.types, + vec_types=cl.cltypes.vec_types, max_levels=max_levels, AXIS_NAMES=AXIS_NAMES, box_flags_enum=box_flags_enum, @@ -1058,7 +1059,7 @@ class PeerListFinder(object): box_id_dtype=box_id_dtype, particle_id_dtype=None, coord_dtype=coord_dtype, - vec_types=cl.array.vec.types, + vec_types=cl.cltypes.vec_types, max_levels=max_levels, AXIS_NAMES=AXIS_NAMES, box_flags_enum=box_flags_enum, diff --git a/boxtree/traversal.py b/boxtree/traversal.py index f55310d..4f734e0 100644 --- a/boxtree/traversal.py +++ b/boxtree/traversal.py @@ -26,6 +26,7 @@ import numpy as np from pytools import Record, memoize_method, memoize_in import pyopencl as cl import pyopencl.array # noqa +import pyopencl.cltypes # noqa from pyopencl.elementwise import ElementwiseTemplate from mako.template import Template from boxtree.tools import AXIS_NAMES, DeviceDataRecord @@ -1163,7 +1164,7 @@ class FMMTraversalBuilder: box_id_dtype=box_id_dtype, box_flags_enum=box_flags_enum, coord_dtype=coord_dtype, - vec_types=cl.array.vec.types, + vec_types=cl.cltypes.vec_types, max_levels=max_levels, AXIS_NAMES=AXIS_NAMES, debug=debug, diff --git a/boxtree/tree_build_kernels.py b/boxtree/tree_build_kernels.py index b246899..2d8bb9a 100644 --- a/boxtree/tree_build_kernels.py +++ b/boxtree/tree_build_kernels.py @@ -1254,7 +1254,7 @@ def get_tree_build_kernel_info(context, dimensions, coord_dtype, "incorrect results.", stacklevel=4) from pyopencl.tools import dtype_to_c_struct, dtype_to_ctype - coord_vec_dtype = cl.array.vec.types[coord_dtype, dimensions] + coord_vec_dtype = cl.cltypes.vec_types[coord_dtype, dimensions] particle_id_dtype = np.dtype(particle_id_dtype) box_id_dtype = np.dtype(box_id_dtype) -- GitLab