• Home
  • Raw
  • Download

Lines Matching refs:prog

46       build_notifier(cl_program prog,  in build_notifier()  argument
48 prog_(prog), notifer(notifer), data_(data) { } in build_notifier()
62 validate_build_common(const program &prog, cl_uint num_devs, in validate_build_common() argument
69 if (prog.kernel_ref_count()) in validate_build_common()
73 return !count(dev, prog.devices()); in validate_build_common()
272 auto &prog = obj(d_prog); in clBuildProgram() local
274 (d_devs ? objs(d_devs, num_devs) : ref_vector<device>(prog.devices())); in clBuildProgram()
277 validate_build_common(prog, num_devs, d_devs, pfn_notify, user_data); in clBuildProgram()
281 if (prog.il_type() != program::il_type::none) { in clBuildProgram()
282 prog.compile(devs, opts); in clBuildProgram()
283 prog.link(devs, opts, { prog }); in clBuildProgram()
285 return prog.build(dev).binary_type() != CL_PROGRAM_BINARY_TYPE_EXECUTABLE; in clBuildProgram()
306 auto &prog = obj(d_prog); in clCompileProgram() local
308 (d_devs ? objs(d_devs, num_devs) : ref_vector<device>(prog.devices())); in clCompileProgram()
312 validate_build_common(prog, num_devs, d_devs, pfn_notify, user_data); in clCompileProgram()
319 if (prog.il_type() == program::il_type::none) in clCompileProgram()
333 prog.compile(devs, opts, headers); in clCompileProgram()
377 const auto has_binary = [&](const program &prog) { in validate_link_devices() argument
378 const auto t = prog.build(dev).binary_type(); in validate_link_devices()
389 if (create_library && any_of([&](const program &prog) { in validate_link_devices() argument
390 const auto t = prog.build(dev).binary_type(); in validate_link_devices()
412 else if (has_link_options && any_of([&](const program &prog) { in validate_link_devices() argument
413 const auto t = prog.build(dev).binary_type(); in validate_link_devices()
416 prog.build(dev).opts.find("-enable-link-options") != in validate_link_devices()
436 auto prog = create<program>(ctx, all_devs); in clLinkProgram() local
437 auto r_prog = ret_object(prog); in clLinkProgram()
443 validate_build_common(prog, num_devs, d_devs, pfn_notify, user_data); in clLinkProgram()
446 prog().link(devs, opts, progs); in clLinkProgram()
481 auto &prog = obj(d_prog); in clGetProgramInfo() local
485 buf.as_scalar<cl_uint>() = prog.ref_count(); in clGetProgramInfo()
489 buf.as_scalar<cl_context>() = desc(prog.context()); in clGetProgramInfo()
493 buf.as_scalar<cl_uint>() = (prog.devices().size() ? in clGetProgramInfo()
494 prog.devices().size() : in clGetProgramInfo()
495 prog.context().devices().size()); in clGetProgramInfo()
499 buf.as_vector<cl_device_id>() = (prog.devices().size() ? in clGetProgramInfo()
500 descs(prog.devices()) : in clGetProgramInfo()
501 descs(prog.context().devices())); in clGetProgramInfo()
505 buf.as_string() = prog.source(); in clGetProgramInfo()
510 return prog.build(dev).bin.size(); in clGetProgramInfo()
512 prog.devices()); in clGetProgramInfo()
519 prog.build(dev).bin.serialize(s); in clGetProgramInfo()
522 prog.devices()); in clGetProgramInfo()
526 buf.as_scalar<cl_uint>() = prog.symbols().size(); in clGetProgramInfo()
532 }, std::string(), prog.symbols()); in clGetProgramInfo()
541 if (prog.il_type() == program::il_type::spirv) in clGetProgramInfo()
542 buf.as_vector<char>() = prog.source(); in clGetProgramInfo()
561 auto &prog = obj(d_prog); in clGetProgramBuildInfo() local
564 if (!count(dev, prog.context().devices())) in clGetProgramBuildInfo()
569 buf.as_scalar<cl_build_status>() = prog.build(dev).status(); in clGetProgramBuildInfo()
573 buf.as_string() = prog.build(dev).opts; in clGetProgramBuildInfo()
577 buf.as_string() = prog.build(dev).log; in clGetProgramBuildInfo()
581 buf.as_scalar<cl_program_binary_type>() = prog.build(dev).binary_type(); in clGetProgramBuildInfo()