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

An interface for fences - synchronization primitives that can be either signaled or reset. More...

#include <IFence.h>

Inheritance diagram for UN::IFence:
UN::IDeviceObject UN::IObject UN::Object< IFence > UN::DeviceObjectBase< IFence > UN::FenceBase UN::VulkanFence

Public Types

using DescriptorType = FenceDesc
 

Public Member Functions

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...
 
- Public Member Functions inherited from UN::IDeviceObject
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...
 
- 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

An interface for fences - synchronization primitives that can be either signaled or reset.

Member Function Documentation

◆ GetState()

virtual FenceState UN::IFence::GetState ( )
pure virtual

Get current fence state.

Implemented in UN::VulkanFence.

◆ ResetState()

virtual void UN::IFence::ResetState ( )
pure virtual

Reset fence state.

Implemented in UN::VulkanFence.

◆ SignalOnCpu()

virtual ResultCode UN::IFence::SignalOnCpu ( )
pure virtual

Signal the fence on CPU.

Implemented in UN::VulkanFence.

◆ WaitOnCpu() [1/2]

virtual ResultCode UN::IFence::WaitOnCpu ( )
pure virtual

Wait for the fence to signal.

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

Returns
ResultCode::Success or an error code.

Implemented in UN::VulkanFence.

◆ WaitOnCpu() [2/2]

virtual ResultCode UN::IFence::WaitOnCpu ( std::chrono::nanoseconds  timeout)
pure virtual

Wait for the fence to signal.

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

Implemented in UN::VulkanFence.


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