UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::VulkanDeviceFactory Class Referencefinal

This class holds a Vulkan API instance. More...

#include <VulkanDeviceFactory.h>

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

Public Member Functions

ResultCode Init (const DeviceFactoryDesc &desc) override
 Create a VkInstance, VkDebugReportCallbackEXT (if needed) and get physical device properties. More...
 
void Reset () override
 Reset the compute device factory. More...
 
ArraySlice< const AdapterInfoEnumerateAdapters () override
 Get all adapters supported by the specified backend. More...
 
ArraySlice< const VkPhysicalDevice > GetVulkanAdapters () const
 
ArraySlice< const VkPhysicalDeviceProperties > GetVulkanAdapterProperties () const
 
BackendKind GetBackendKind () const override
 Get kind of backend for the compute devices created by this factory. More...
 
ResultCode CreateDevice (IComputeDevice **ppDevice) override
 Create a compute device. More...
 
ResultCode CreateKernelCompiler (IKernelCompiler **ppCompiler) override
 Create a kernel compiler. More...
 
- Public Member Functions inherited from UN::Object< IDeviceFactory >
UInt32 Release () override
 
 Object (const Object &)=delete
 
 Object (Object &&)=delete
 
UInt32 AddRef () override
 Add a strong reference to the object. More...
 
void AttachRefCounter (ReferenceCounter *pRefCounter) override
 Attach a reference counter to the object. More...
 
ReferenceCounterGetRefCounter () override
 Get reference counter attached to this object. More...
 
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...
 
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...
 

Static Public Member Functions

static ResultCode Create (VulkanDeviceFactory **ppInstance)
 

Additional Inherited Members

- Protected Member Functions inherited from UN::Object< IDeviceFactory >
UInt32 Release (F &&destroyCallback)
 

Detailed Description

This class holds a Vulkan API instance.

Member Function Documentation

◆ CreateDevice()

ResultCode UN::VulkanDeviceFactory::CreateDevice ( IComputeDevice **  ppDevice)
overridevirtual

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.

Implements UN::IDeviceFactory.

◆ CreateKernelCompiler()

ResultCode UN::VulkanDeviceFactory::CreateKernelCompiler ( IKernelCompiler **  ppCompiler)
overridevirtual

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.

Implements UN::IDeviceFactory.

◆ EnumerateAdapters()

ArraySlice< const AdapterInfo > UN::VulkanDeviceFactory::EnumerateAdapters ( )
overridevirtual

Get all adapters supported by the specified backend.

Implements UN::IDeviceFactory.

◆ GetBackendKind()

BackendKind UN::VulkanDeviceFactory::GetBackendKind ( ) const
overridevirtual

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

Implements UN::IDeviceFactory.

◆ Init()

ResultCode UN::VulkanDeviceFactory::Init ( const DeviceFactoryDesc desc)
overridevirtual

Create a VkInstance, VkDebugReportCallbackEXT (if needed) and get physical device properties.

Implements UN::IDeviceFactory.

◆ Reset()

void UN::VulkanDeviceFactory::Reset ( )
overridevirtual

Reset the compute device factory.

Implements UN::IDeviceFactory.


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