UraniumCompute 0.1.0
A GPU accelerated parallel task scheduler
UN::VulkanFence Class Referencefinal
Inheritance diagram for UN::VulkanFence:
UN::FenceBase UN::DeviceObjectBase< IFence > UN::Object< IFence > UN::IFence UN::IDeviceObject UN::IObject

Public Member Functions

 VulkanFence (IComputeDevice *pDevice)
 
void Reset () override
 Reset the object to uninitialized state. More...
 
ResultCode SignalOnCpu () override
 Signal the fence on CPU. More...
 
ResultCode WaitOnCpu (std::chrono::nanoseconds timeout) override
 Wait for the fence to signal. More...
 
ResultCode WaitOnCpu () override
 Wait for the fence to signal. More...
 
void ResetState () override
 Reset fence state. More...
 
FenceState GetState () override
 Get current fence state. More...
 
VkFence GetNativeFence () const
 
- Public Member Functions inherited from UN::FenceBase
ResultCode Init (const DescriptorType &desc) override
 
- Public Member Functions inherited from UN::DeviceObjectBase< IFence >
const DescriptorTypeGetDesc () const override
 
std::string_view GetDebugName () const override
 
IComputeDeviceGetDevice () const override
 
UInt32 Release () override
 
- Public Member Functions inherited from UN::Object< IFence >
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 const DescriptorTypeGetDesc () const =0
 
virtual ResultCode Init (const DescriptorType &desc)=0
 
virtual ResultCode SignalOnCpu ()=0
 Signal the fence on CPU. More...
 
virtual ResultCode WaitOnCpu (std::chrono::nanoseconds timeout)=0
 Wait for the fence to signal. More...
 
virtual ResultCode WaitOnCpu ()=0
 Wait for the fence to signal. More...
 
virtual void ResetState ()=0
 Reset fence state. More...
 
virtual FenceState GetState ()=0
 Get current fence state. More...
 
virtual std::string_view GetDebugName () const =0
 Get debug name of the object.
 
virtual void Reset ()=0
 Reset the object to uninitialized state. More...
 
virtual IComputeDeviceGetDevice () const =0
 Get the compute device this object was created on. 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 (IComputeDevice *pDevice, IFence **ppFence)
 

Protected Member Functions

ResultCode InitInternal (const DescriptorType &desc) override
 
- Protected Member Functions inherited from UN::FenceBase
virtual ResultCode InitInternal (const DescriptorType &desc)=0
 
 FenceBase (IComputeDevice *pDevice)
 
- Protected Member Functions inherited from UN::DeviceObjectBase< IFence >
void Init (std::string_view name, const DescriptorType &desc)
 Common device object initializer. More...
 
 DeviceObjectBase (IComputeDevice *pDevice)
 
- Protected Member Functions inherited from UN::Object< IFence >
UInt32 Release (F &&destroyCallback)
 

Additional Inherited Members

- Public Types inherited from UN::DeviceObjectBase< IFence >
using DescriptorType = typename TInterface::DescriptorType
 
- Public Types inherited from UN::IFence
using DescriptorType = FenceDesc
 
- Protected Attributes inherited from UN::DeviceObjectBase< IFence >
Ptr< IComputeDevicem_pDevice
 
DescriptorType m_Desc
 
std::string m_Name
 

Member Function Documentation

◆ GetState()

FenceState UN::VulkanFence::GetState ( )
overridevirtual

Get current fence state.

Implements UN::IFence.

◆ InitInternal()

ResultCode UN::VulkanFence::InitInternal ( const DescriptorType desc)
overrideprotectedvirtual

Implements UN::FenceBase.

◆ Reset()

void UN::VulkanFence::Reset ( )
overridevirtual

Reset the object to uninitialized state.

Implements UN::IDeviceObject.

◆ ResetState()

void UN::VulkanFence::ResetState ( )
overridevirtual

Reset fence state.

Implements UN::IFence.

◆ SignalOnCpu()

ResultCode UN::VulkanFence::SignalOnCpu ( )
overridevirtual

Signal the fence on CPU.

Implements UN::IFence.

◆ WaitOnCpu() [1/2]

ResultCode UN::VulkanFence::WaitOnCpu ( )
inlineoverridevirtual

Wait for the fence to signal.

Same as WaitOnCpu(std::chrono::nanoseconds), but without a timeout.

Returns
ResultCode::Success or an error code.

Implements UN::IFence.

◆ WaitOnCpu() [2/2]

ResultCode UN::VulkanFence::WaitOnCpu ( std::chrono::nanoseconds  timeout)
overridevirtual

Wait for the fence to signal.

Parameters
timeout- Waiting timeout in nanoseconds.
Returns
ResultCode::Success, ResultCode::Timeout or an error code.

Implements UN::IFence.


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