UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::DeviceObjectBase< TInterface, > Class Template Reference

Base class for all compute backend objects. More...

#include <DeviceObjectBase.h>

Inheritance diagram for UN::DeviceObjectBase< TInterface, >:
UN::Object< TInterface, >

Public Types

using DescriptorType = typename TInterface::DescriptorType
 

Public Member Functions

const DescriptorType & GetDesc () const override
 
std::string_view GetDebugName () const override
 
IComputeDeviceGetDevice () const override
 
UInt32 Release () override
 
- Public Member Functions inherited from UN::Object< TInterface, >
 Object (const Object &)=delete
 
 Object (Object &&)=delete
 
UInt32 AddRef () override
 Add a strong reference to the object. More...
 
UInt32 Release () override
 
void AttachRefCounter (ReferenceCounter *pRefCounter) override
 Attach a reference counter to the object. More...
 
ReferenceCounterGetRefCounter () override
 Get reference counter attached to this object.
 

Protected Member Functions

void Init (std::string_view name, const DescriptorType &desc)
 Common device object initializer. More...
 
 DeviceObjectBase (IComputeDevice *pDevice)
 
- Protected Member Functions inherited from UN::Object< TInterface, >
template<class F >
UInt32 Release (F &&destroyCallback)
 

Protected Attributes

Ptr< IComputeDevicem_pDevice
 
DescriptorType m_Desc
 
std::string m_Name
 

Detailed Description

template<class TInterface, std::enable_if_t< std::is_base_of_v< IDeviceObject, TInterface >, bool > = true>
class UN::DeviceObjectBase< TInterface, >

Base class for all compute backend objects.

TInterface must be derived from IDeviceObject and must have these members:

using DescriptorType = ...;
[[nodiscard]] virtual const DescriptorType& GetDesc() const = 0;

Member Function Documentation

◆ Init()

template<class TInterface , std::enable_if_t< std::is_base_of_v< IDeviceObject, TInterface >, bool > = true>
void UN::DeviceObjectBase< TInterface, >::Init ( std::string_view  name,
const DescriptorType &  desc 
)
inlineprotected

Common device object initializer.

Parameters
name- Object debug name.
desc- Object descriptor.

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