Commit d65e87e795724729fe3aba24c008e47dab0bf8c5
- Diff rendering mode:
- inline
- side by side
sailfish/backend_opencl.py
(2 / 1)
|   | |||
| 3 | 3 | class CUDABackend(object): | |
| 4 | 4 | ||
| 5 | 5 | 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)]) | ||
| 7 | 8 | self.queue = cl.CommandQueue(self.ctx) | |
| 8 | 9 | self.buffers = {} | |
| 9 | 10 |

