| 229 | } |
| 230 | |
| 231 | void CLCompileContext::set_context(cl::Context context) |
| 232 | { |
| 233 | _context = std::move(context); |
| 234 | if (_context.get() != nullptr) |
| 235 | { |
| 236 | const auto cl_devices = _context.getInfo<CL_CONTEXT_DEVICES>(); |
| 237 | |
| 238 | if (!cl_devices.empty()) |
| 239 | { |
| 240 | _device = CLDevice(cl_devices[0]); |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | std::string CLCompileContext::generate_build_options(const StringSet &build_options_set, |
| 246 | const std::string &kernel_path) const |