code: def _convolve3_old(data, h, dev=None):
      
  
      if dev is None:
          dev = get_device()
  
      if dev is None:
          raise ValueError("no OpenCLDevice found...")
  
      dtype = data.dtype.type
  
      dtypes_options = {np.float32: "",
                        np.uint16: "-D SHORTTYPE"}
  
      if not dtype in dtypes_options:
          raise TypeError("data type %s not supported yet, please convert to:" % dtype, list(dtypes_options.keys()))
  
      prog = OCLProgram(abspath("kernels/convolve3.cl"),
                        build_options=dtypes_options[dtype])
  
      hbuf = OCLArray.from_array(h.astype(np.float32))
      img = OCLImage.from_array(data)
      res = OCLArray.empty(data.shape, dtype=np.float32)
  
      Ns = [np.int32(n) for n in data.shape + h.shape]
  
      prog.run_kernel("convolve3d", img.shape, None,
                      img, hbuf.data, res.data,
                      *Ns)
  
      return res.get()
docs: convolves 3d data with kernel h on the GPU Device dev
      boundary conditions are clamping to edge.
      h is converted to float32
  
      if dev == None the default one is used