On Wed, 26 Feb 2014 09:44:12 -0800
Eric89GXL <notifications@github.com> wrote:

> > @@ -177,6 +178,36 @@ def _update(self):
> >                  else:
> >                      raise
> >  
> > +    def get_ocl(self, ctx=None):
> > +        """
> > +        Retrieves an OpenCL view on the Buffer.
> > +
> > +        To use it you need to grab it using:
> > +        pyopencl.enqueue_acquire_gl_objects(queue, [ocl_buf])
> > +
> > +        Parameters
> > +        ----------
> > +        ctx : OpenCL Context
> > +            If None is provided, generate/reuse an existing one
> > +        """
> > +        if (opencl is None) or (opencl.pyopencl is None):
> > +            return
> 
> Shouldn't this raise an error instead of failing silently? If this method is only called by users trying to actually use `OpenCL`, then I think it should tell them there is a problem with the installation of OpenCL here.

There was already an error message at import opencl ... putting too many error messages is likely to confuse users...

-- 
Jérôme Kieffer <jerome.kieffer@terre-adelie.org>