78 program_impl(std::vector<std::shared_ptr<program_impl>> ProgramList,
109 return MPropList.has_property<propertyT>();
119 return MPropList.get_property<propertyT>();
129 cl_program
get()
const;
139 bool is_host()
const {
return MContext->is_host(); }
155 void compile_with_kernel_name(std::string KernelName,
156 std::string CompileOptions,
172 void compile_with_source(std::string KernelSource,
173 std::string CompileOptions =
"");
190 void build_with_kernel_name(std::string KernelName, std::string BuildOptions,
206 void build_with_source(std::string KernelSource,
207 std::string BuildOptions =
"");
220 void link(std::string LinkOptions =
"");
228 bool has_kernel(std::string KernelName,
bool IsCreatedFromSource)
const;
237 kernel get_kernel(std::string KernelName,
238 std::shared_ptr<program_impl> PtrToSelf,
239 bool IsCreatedFromSource)
const;
244 template <info::program param>
256 std::vector<std::vector<char>> get_binaries()
const;
262 return createSyclObjFromImpl<context>(MContext);
267 assert(!is_host() &&
"Plugin is not available for Host.");
268 return MContext->getPlugin();
315 void set_spec_constant_impl(
const char *Name,
const void *ValAddr,
361 template <info::device param>
362 void check_device_feature_support(
const std::vector<device> &Devices) {
363 for (
const auto &Device : Devices) {
364 if (!Device.get_info<param>()) {
366 "Online compilation is not supported by this device",
380 const std::string &KernelName,
381 bool JITCompilationIsRequired =
false);
386 void create_cl_program_with_source(
const std::string &Source);
391 void compile(
const std::string &Options);
396 void build(
const std::string &Options);
399 std::vector<RT::PiDevice> get_pi_devices()
const;
403 static bool is_cacheable_with_options(
const std::string &Options) {
404 return Options.empty();
409 bool has_cl_kernel(
const std::string &KernelName)
const;
414 RT::PiKernel get_pi_kernel(
const std::string &KernelName)
const;
417 std::vector<device> sort_devices_by_cl_device_id(std::vector<device> Devices);
423 void throw_if_state_is(program_state State)
const;
429 void throw_if_state_is_not(program_state State)
const;
432 program_state MState = program_state::none;
435 bool MLinkable =
false;
436 std::vector<device> MDevices;
437 property_list MPropList;
438 std::string MCompileOptions;
439 std::string MLinkOptions;
440 std::string MBuildOptions;
452 bool MProgramAndKernelCachingAllowed =
false;
454 bool MIsInterop =
false;
458 cl_uint program_impl::get_info<info::program::reference_count>()
const;
460 template <>
context program_impl::get_info<info::program::context>()
const;
463 std::vector<device> program_impl::get_info<info::program::devices>()
const;