From 8419b39e3cfd61d0975a098ff0614ebabbe4cd45 Mon Sep 17 00:00:00 2001 From: Marko Bencun <mbencun@gmail.com> Date: Sun, 8 Sep 2013 17:43:47 +0200 Subject: [PATCH] ImageFormat hashing --- pyopencl/cffi_cl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index dd9c5df8..a1f74b79 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -540,6 +540,7 @@ class ImageFormat(object): cls = type(cls.__name__, (cls,), {}) cls.channel_order = property(lambda self: args[0], lambda self, v: args.__setitem__(0, v)) cls.channel_data_type = property(lambda self: args[1], lambda self, v: args.__setitem__(1, v)) + cls.__hash__ = lambda self: hash(tuple(args)) return object.__new__(cls) @property -- GitLab