PragmaKernel
-
struct PragmaKernel : public kernel_launcher::IKernelDescriptor
This is a
IKernelDescriptor
that usesbuild_pragma_kernel
to construct aKernelBuilder
.Public Functions
-
PragmaKernel(std::string kernel_name, std::string path, std::vector<Value> template_args = {})
Construct
PragmaKernel
.- Parameters:
path – Filename of the source file.
kernel_name – The name of the kernel in the source code. It may contain namespaces such as
mypackage::kernels::vector_add
.template_args – Optional; template arguments passed to the kernel.
-
virtual KernelBuilder build() const override
Should return the
KernelBuilder
that can be used to build the kernel associated with this descriptor.
-
virtual bool equals(const IKernelDescriptor &that) const override
Check if this descriptor is equal to another descriptor.
-
virtual hash_t hash() const override
Return a hash of this descriptor. This is used to test for equality of two descriptors:
Two descriptors that return the same hash MAY be identical.
Two descriptors that return different hashes MUST be different.
This method is optional; its default implementation just returns
0
.
-
PragmaKernel(std::string kernel_name, std::string path, std::vector<Value> template_args = {})