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; }
79 template <source_language Lang>
81 "experimental online_compiler is being deprecated. See "
82 "'sycl_ext_oneapi_kernel_compiler.asciidoc'
instead for new
kernel "
83 "compiler extension to
kernel_bundle implementation.") online_compiler {
90 : OutputFormat(fmt), OutputFormatVersion({0, 0}),
92 Is64Bit(
true), DeviceStepping(
"") {}
101 : OutputFormat(fmt), OutputFormatVersion({0, 0}), DeviceType(dev_type),
102 DeviceArch(arch), Is64Bit(
true), DeviceStepping(
"") {}
111 Is64Bit(
true), DeviceStepping(
"") {}
119 template <
typename... Tys>
120 std::vector<byte>
compile(
const std::string &src,
const Tys &...args);
130 online_compiler<Lang> &setOutputFormatVersion(
int major,
int minor) {
131 OutputFormatVersion = {major, minor};
142 online_compiler<Lang> &setTargetDeviceArch(device_arch arch) {
148 online_compiler<Lang> &set32bitTarget() {
154 online_compiler<Lang> &set64bitTarget() {
161 online_compiler<Lang> &setTargetDeviceStepping(
const std::string &
id) {
171 std::pair<int, int> OutputFormatVersion;
177 device_arch DeviceArch;
183 std::string DeviceStepping;
186 void *CompileToSPIRVHandle =
nullptr;
187 void *FreeSPIRVOutputsHandle =
nullptr;
199 __SYCL_EXPORT std::vector<byte>
201 const std::string &src,
const std::vector<std::string> &options);
209 return compile(src, std::vector<std::string>{});
218 const std::string &src,
const std::vector<std::string> &options);
225 return compile(src, std::vector<std::string>{});
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Represents an error happend during online compilation.
online_compile_error(const std::string &Msg)
online_compile_error()=default
The kernel_bundle class represents collection of device images in a particular state.
Provides an abstraction of a SYCL kernel.
source_language
Designates a source language for the online compiler.
kernel_bundle< bundle_state::object > compile(const kernel_bundle< bundle_state::input > &InputBundle, const std::vector< device > &Devs, const property_list &PropList={})
signed char __SYCL2020_DEPRECATED
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()