19 inline namespace _V1 {
20 namespace ext::intel::experimental {
22 using byte =
unsigned char;
30 static constexpr
int any = 0;
60 operator int() {
return Val; }
78 template <source_language Lang>
80 "experimental online_compiler is being deprecated. See "
81 "'sycl_ext_oneapi_kernel_compiler.asciidoc'
instead for new
kernel "
82 "compiler extension to
kernel_bundle implementation.") online_compiler {
89 : OutputFormat(fmt), OutputFormatVersion({0, 0}),
91 Is64Bit(
true), DeviceStepping(
"") {}
100 : OutputFormat(fmt), OutputFormatVersion({0, 0}), DeviceType(dev_type),
101 DeviceArch(arch), Is64Bit(
true), DeviceStepping(
"") {}
110 Is64Bit(
true), DeviceStepping(
"") {}
118 template <
typename... Tys>
119 std::vector<byte>
compile(
const std::string &src,
const Tys &...args);
129 online_compiler<Lang> &setOutputFormatVersion(
int major,
int minor) {
130 OutputFormatVersion = {major, minor};
141 online_compiler<Lang> &setTargetDeviceArch(
device_arch arch) {
147 online_compiler<Lang> &set32bitTarget() {
153 online_compiler<Lang> &set64bitTarget() {
160 online_compiler<Lang> &setTargetDeviceStepping(
const std::string &
id) {
170 std::pair<int, int> OutputFormatVersion;
182 std::string DeviceStepping;
185 void *CompileToSPIRVHandle =
nullptr;
186 void *FreeSPIRVOutputsHandle =
nullptr;
198 __SYCL_EXPORT std::vector<byte>
200 const std::string &src,
const std::vector<std::string> &options);
208 return compile(src, std::vector<std::string>{});
217 const std::string &src,
const std::vector<std::string> &options);
224 return compile(src, std::vector<std::string>{});