UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
IKernel.h
1#pragma once
2#include <UnCompute/Backend/IDeviceObject.h>
3#include <UnCompute/Base/Byte.h>
4#include <UnCompute/Containers/ArraySlice.h>
5
6namespace UN
7{
8 class IResourceBinding;
9
12 {
13 const char* Name = nullptr;
16
17 inline KernelDesc() = default;
18
19 inline KernelDesc(const char* name, IResourceBinding* pResourceBinding, const ArraySlice<const Byte>& bytecode)
20 : Name(name)
22 , Bytecode(bytecode)
23 {
24 }
25 };
26
28 class IKernel : public IDeviceObject
29 {
30 public:
32
33 [[nodiscard]] virtual const DescriptorType& GetDesc() const = 0;
34
40 virtual ResultCode Init(const DescriptorType& desc) = 0;
41 };
42} // namespace UN
Base interface for all compute backend objects.
Definition: IDeviceObject.h:30
An interface for compute kernel - a program running on the device.
Definition: IKernel.h:29
virtual ResultCode Init(const DescriptorType &desc)=0
Creates and initializes a kernel object.
Resource binding object used to bind resources to a compute kernel.
Definition: IResourceBinding.h:51
Kernel descriptor.
Definition: IKernel.h:12
const char * Name
Kernel debug name.
Definition: IKernel.h:13
ArraySlice< const Byte > Bytecode
Kernel program bytecode.
Definition: IKernel.h:15
IResourceBinding * pResourceBinding
Resource binding object that binds resources for the kernel.
Definition: IKernel.h:14