Commit d65e87e795724729fe3aba24c008e47dab0bf8c5

  • avatar
  • MichaƂ Januszewski <spock @gen…oo.org>
  • Sun Jan 24 22:11:33 CET 2010
Fix OpenCL platform selection.

This commit makes it possible for Sailfish to work with the latest
NVIDIA OpenCL implementation.
  
33class CUDABackend(object):
44
55 def __init__(self):
6 self.ctx = cl.Context(dev_type=cl.device_type.ALL)
6 self.platform = cl.get_platforms()[0]
7 self.ctx = cl.Context(dev_type=cl.device_type.ALL, properties=[(cl.context_properties.PLATFORM, self.platform)])
78 self.queue = cl.CommandQueue(self.ctx)
89 self.buffers = {}
910