docs: def _wrap_OCLArray(cls):
      """
      WRAPPER
      """
  
      def prepare(arr):
          return np.require(arr, None, "C")
  
      @classmethod
      def from_array(cls, arr, *args, **kwargs):
          queue = get_device().queue
          return cl_array.to_device(queue, prepare(arr), *args, **kwargs)
  
      @classmethod
      def empty(cls, shape, dtype=np.float32):
          queue = get_device().queue
          return cl_array.empty(queue, shape, dtype)
  
      @classmethod
      def empty_like(cls, arr):
          return cls.empty(arr.shape, arr.dtype)
  
      @classmethod
      def zeros(cls, shape, dtype=np.float32):
          queue = get_device().queue
          return cl_array.zeros(queue, shape, dtype)
  
      @classmethod
      def zeros_like(cls, arr):
          queue = get_device().queue
          return cl_array.zeros_like(queue, arr)
  
      def copy_buffer(self, buf, **kwargs):
          queue = get_device().queue
          return cl.enqueue_copy(queue, self.data, buf.data,
                                 **kwargs)
  
      def write_array(self, data, **kwargs):
          queue = get_device().queue
          return cl.enqueue_copy(queue, self.data, prepare(data),
                                         **kwargs)
  
      def copy_image(self, img, **kwargs):
          queue = get_device().queue
          return cl.enqueue_copy(queue, self.data, img, offset=0,
                                 origin=(0,)*len(img.shape), region=img.shape,
                                 **kwargs)
  
      def copy_image_resampled(self, img, **kwargs):
          # if not self.dtype == img.dtype:
          #     raise NotImplementedError("images have different dtype!")
  
  
          if self.dtype.type == np.float32:
              type_str = "float"
          elif self.dtype.type == np.complex64:
              type_str = "complex"
          else:
              raise NotImplementedError("only resampling of float32 and complex64 arrays possible ")
  
          kern_str = "img%dd_to_buf_%s" % (len(img.shape), type_str)
  
          OCLArray._resample_prog.run_kernel(kern_str,
                                             self.shape[::-1], None,
                                             img, self.data)
  
      def wrap_module_func(mod, f):
          def func(self, *args, **kwargs):
              return getattr(mod, f)(self, *args, **kwargs)
  
          return func
  
      cls.from_array = from_array
      cls.empty = empty
      cls.empty_like = empty_like
      cls.zeros = zeros
      cls.zeros_like = zeros_like
  
      cls.copy_buffer = copy_buffer
      cls.copy_image = copy_image
      cls.copy_image_resampled = copy_image_resampled
      cls.write_array = write_array
  
      cls._resample_prog = OCLProgram(abspath("kernels/copy_resampled.cl"))
  
      for f in ["sum", "max", "min", "dot", "vdot"]:
          setattr(cls, f, wrap_module_func(cl_array, f))
  
      for f in dir(cl_math):
          if isinstance(getattr(cl_math, f), collections.Callable):
              setattr(cls, f, wrap_module_func(cl_math, f))
  
      # cls.sum = sum
      cls.__name__ = str("OCLArray")
      return cls