UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::IDeviceFactory Class Referenceabstract

This class is used to create backend-specific compute devices and related objects. More...

#include <IDeviceFactory.h>

Inheritance diagram for UN::IDeviceFactory:
UN::IObject UN::Object< IDeviceFactory > UN::VulkanDeviceFactory

Public Member Functions

virtual ResultCode Init (const DeviceFactoryDesc &desc)=0
 Initialize the compute device factory. More...
 
virtual void Reset ()=0
 Reset the compute device factory. More...
 
virtual BackendKind GetBackendKind () const =0
 Get kind of backend for the compute devices created by this factory. More...
 
virtual ArraySlice< const AdapterInfoEnumerateAdapters ()=0
 Get all adapters supported by the specified backend. More...
 
virtual ResultCode CreateDevice (IComputeDevice **ppDevice)=0
 Create a compute device. More...
 
virtual ResultCode CreateKernelCompiler (IKernelCompiler **ppCompiler)=0
 Create a kernel compiler. More...
 
- Public Member Functions inherited from UN::IObject
virtual UInt32 AddRef ()=0
 Add a strong reference to object's reference counter. More...
 
virtual UInt32 Release ()=0
 Remove a strong reference from object's reference counter. More...
 
virtual void AttachRefCounter (ReferenceCounter *counter)=0
 Attach a ReferenceCounter to this object. More...
 
virtual ReferenceCounterGetRefCounter ()=0
 Get reference counter that belongs to this object. More...
 

Detailed Description

This class is used to create backend-specific compute devices and related objects.

Member Function Documentation

◆ CreateDevice()

virtual ResultCode UN::IDeviceFactory::CreateDevice ( IComputeDevice **  ppDevice)
pure virtual

Create a compute device.

Parameters
ppDevice- A pointer to memory where the pointer to the created device will be written.
Returns
ResultCode::Success or an error code.

Implemented in UN::VulkanDeviceFactory.

◆ CreateKernelCompiler()

virtual ResultCode UN::IDeviceFactory::CreateKernelCompiler ( IKernelCompiler **  ppCompiler)
pure virtual

Create a kernel compiler.

Parameters
ppCompiler- A pointer to memory where the pointer to the created compiler will be written.
Returns
ResultCode::Success or an error code.

Implemented in UN::VulkanDeviceFactory.

◆ EnumerateAdapters()

virtual ArraySlice< const AdapterInfo > UN::IDeviceFactory::EnumerateAdapters ( )
pure virtual

Get all adapters supported by the specified backend.

Implemented in UN::VulkanDeviceFactory.

◆ GetBackendKind()

virtual BackendKind UN::IDeviceFactory::GetBackendKind ( ) const
pure virtual

Get kind of backend for the compute devices created by this factory.

Implemented in UN::VulkanDeviceFactory.

◆ Init()

virtual ResultCode UN::IDeviceFactory::Init ( const DeviceFactoryDesc desc)
pure virtual

Initialize the compute device factory.

Parameters
desc- Device factory descriptor.
Returns
ResultCode::Success or an error code.

Implemented in UN::VulkanDeviceFactory.

◆ Reset()

virtual void UN::IDeviceFactory::Reset ( )
pure virtual

Reset the compute device factory.

Implemented in UN::VulkanDeviceFactory.


The documentation for this class was generated from the following file: