Represents an online compiler for the language given as template parameter. More...
#include <sycl/ext/intel/experimental/online_compiler.hpp>
Public Member Functions | |
online_compiler (compiled_code_format fmt=compiled_code_format::spir_v) | |
Constructs online compiler which can target any device and produces given compiled code format. More... | |
online_compiler (sycl::info::device_type dev_type, device_arch arch, compiled_code_format fmt=compiled_code_format::spir_v) | |
Constructs online compiler which targets given architecture and produces given compiled code format. More... | |
online_compiler (const sycl::device &) | |
Constructs online compiler for the target specified by given SYCL device. More... | |
template<typename... Tys> | |
std::vector< byte > | compile (const std::string &src, const Tys &... args) |
Compiles given in-memory Lang source to a binary blob. More... | |
online_compiler< Lang > & | setOutputFormat (compiled_code_format fmt) |
Sets the compiled code format of the compilation target and returns *this. More... | |
online_compiler< Lang > & | setOutputFormatVersion (int major, int minor) |
Sets the compiled code format version of the compilation target and returns *this. More... | |
online_compiler< Lang > & | setTargetDeviceType (sycl::info::device_type type) |
Sets the device type of the compilation target and returns *this. More... | |
online_compiler< Lang > & | setTargetDeviceArch (device_arch arch) |
Sets the device architecture of the compilation target and returns *this. More... | |
online_compiler< Lang > & | set32bitTarget () |
Makes the compilation target 32-bit and returns *this. More... | |
online_compiler< Lang > & | set64bitTarget () |
Makes the compilation target 64-bit and returns *this. More... | |
online_compiler< Lang > & | setTargetDeviceStepping (const std::string &id) |
Sets implementation-defined target device stepping of the compilation target and returns *this. More... | |
std::vector< byte > | compile (const std::string &src, const std::vector< std::string > &options) |
Compiles the given OpenCL source. More... | |
std::vector< byte > | compile (const std::string &src) |
Compiles the given OpenCL source. More... | |
std::vector< byte > | compile (const std::string &src, const std::vector< std::string > &options) |
Compiles the given CM source src . More... | |
std::vector< byte > | compile (const std::string &src) |
Compiles the given CM source src . More... | |
std::vector< byte > | compile (const std::string &Source, const std::vector< std::string > &UserArgs) |
std::vector< byte > | compile (const std::string &Source, const std::vector< std::string > &UserArgs) |
Represents an online compiler for the language given as template parameter.
Definition at line 74 of file online_compiler.hpp.
|
inline |
Constructs online compiler which can target any device and produces given compiled code format.
Produces 64-bit device code. The created compiler is "optimistic" - it assumes all applicable SYCL device capabilities are supported by the target device(s).
Definition at line 80 of file online_compiler.hpp.
|
inline |
Constructs online compiler which targets given architecture and produces given compiled code format.
Produces 64-bit device code. Throws online_compile_error if values of constructor arguments are contradictory or not supported - e.g. if the source language is not supported for given device type.
Definition at line 90 of file online_compiler.hpp.
|
inline |
Constructs online compiler for the target specified by given SYCL device.
Definition at line 99 of file online_compiler.hpp.
References cl::sycl::ext::intel::experimental::spir_v.
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::opencl_c >::compile | ( | const std::string & | Source, |
const std::vector< std::string > & | UserArgs | ||
) |
Definition at line 198 of file online_compiler.cpp.
References cl::sycl::ext::intel::experimental::detail::compileToSPIRV().
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::cm >::compile | ( | const std::string & | Source, |
const std::vector< std::string > & | UserArgs | ||
) |
Definition at line 215 of file online_compiler.cpp.
References cl::sycl::ext::intel::experimental::detail::compileToSPIRV().
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::opencl_c >::compile | ( | const std::string & | src | ) |
Compiles the given OpenCL source.
May throw online_compile_error
.
src | - contents of the source. |
Definition at line 199 of file online_compiler.hpp.
References cl::sycl::compile().
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::cm >::compile | ( | const std::string & | src | ) |
Compiles the given CM source src
.
Definition at line 215 of file online_compiler.hpp.
References cl::sycl::compile().
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::opencl_c >::compile | ( | const std::string & | src, |
const std::vector< std::string > & | options | ||
) |
Compiles the given OpenCL source.
May throw online_compile_error
.
src | - contents of the source. |
options | - compilation options (implementation defined); standard OpenCL JIT compiler options must be supported. |
std::vector< byte > cl::sycl::ext::intel::experimental::online_compiler< source_language::cm >::compile | ( | const std::string & | src, |
const std::vector< std::string > & | options | ||
) |
Compiles the given CM source src
.
src | - contents of the source. |
options | - compilation options (implementation defined). |
std::vector<byte> cl::sycl::ext::intel::experimental::online_compiler< Lang >::compile | ( | const std::string & | src, |
const Tys &... | args | ||
) |
Compiles given in-memory Lang
source to a binary blob.
Blob format, other parameters are set in the constructor by the compilation target specification parameters. Specialization for each language will provide exact signatures, which can be different for different languages. Throws online_compile_error if compilation is not successful.
|
inline |
Makes the compilation target 32-bit and returns *this.
Definition at line 139 of file online_compiler.hpp.
|
inline |
Makes the compilation target 64-bit and returns *this.
Definition at line 145 of file online_compiler.hpp.
|
inline |
Sets the compiled code format of the compilation target and returns *this.
Definition at line 114 of file online_compiler.hpp.
|
inline |
Sets the compiled code format version of the compilation target and returns *this.
Definition at line 121 of file online_compiler.hpp.
|
inline |
Sets the device architecture of the compilation target and returns *this.
Definition at line 133 of file online_compiler.hpp.
|
inline |
Sets implementation-defined target device stepping of the compilation target and returns *this.
Definition at line 152 of file online_compiler.hpp.
|
inline |
Sets the device type of the compilation target and returns *this.
Definition at line 127 of file online_compiler.hpp.