litert:: Event
Summary
Inheritance
Inherits from: internal::Handle< LiteRtEvent, LiteRtDestroyEvent >
Public static functions |
|
|---|---|
CreateFromEglSyncFence(LiteRtEnvironment env, EGLSyncKHR egl_sync)
|
Creates an
Event object from an EGL sync fence. |
CreateFromOpenClEvent(LiteRtEnvironment env, cl_event cl_event)
|
Creates an
Event object from an OpenCL event. |
CreateFromSyncFenceFd(int sync_fence_fd, bool owns_fd)
|
Creates an
Event object from a sync fence file descriptor. |
CreateFromSyncFenceFd(LiteRtEnvironment env, int sync_fence_fd, bool owns_fd)
|
Creates an
Event object from a sync fence file descriptor. |
CreateManaged(LiteRtEnvironment env, LiteRtEventType type)
|
Creates a managed event of a given type.
|
WrapCObject(LiteRtEvent event, OwnHandle owned)
|
|
Public functions |
|
|---|---|
DupFd()
|
Expected< int >
Returns a duplicate of the event's sync fence file descriptor.
|
GetCustomNativeEvent()
|
Expected< void * >
|
GetEglSync()
|
Expected< EGLSyncKHR >
|
GetOpenClEvent()
|
Returns the underlying OpenCL event if the event type is OpenCL.
|
GetSyncFenceFd()
|
Expected< int >
|
IsSignaled()
|
Expected< bool >
Returns
true if the event is signaled. |
Signal()
|
Expected< void >
Signals the event.
|
Type() const
|
LiteRtEventType
Returns the underlying event type.
|
Wait(int64_t timeout_in_ms)
|
Expected< void >
Waits for the event to be signaled.
|
Public static functions
CreateFromEglSyncFence
Expected< Event > CreateFromEglSyncFence( LiteRtEnvironment env, EGLSyncKHR egl_sync )
Creates an Event object from an EGL sync fence.
CreateFromOpenClEvent
Expected< Event > CreateFromOpenClEvent( LiteRtEnvironment env, cl_event cl_event )
Creates an Event object from an OpenCL event.
CreateFromSyncFenceFd
Expected< Event > CreateFromSyncFenceFd( int sync_fence_fd, bool owns_fd )
Creates an Event object from a sync fence file descriptor.
This is a legacy API that does not take a LiteRtEnvironment. New code should use the overload that accepts an environment.
CreateFromSyncFenceFd
Expected< Event > CreateFromSyncFenceFd( LiteRtEnvironment env, int sync_fence_fd, bool owns_fd )
Creates an Event object from a sync fence file descriptor.
CreateManaged
Expected< Event > CreateManaged( LiteRtEnvironment env, LiteRtEventType type )
Creates a managed event of a given type.
Currently, only LiteRtEventTypeOpenCl is supported.
WrapCObject
Event WrapCObject( LiteRtEvent event, OwnHandle owned )
Public functions
GetCustomNativeEvent
Expected< void * > GetCustomNativeEvent()
GetEglSync
Expected< EGLSyncKHR > GetEglSync()
GetOpenClEvent
Expected< cl_event > GetOpenClEvent()
Returns the underlying OpenCL event if the event type is OpenCL.
GetSyncFenceFd
Expected< int > GetSyncFenceFd()
Type
LiteRtEventType Type() const
Returns the underlying event type.
Wait
Expected< void > Wait( int64_t timeout_in_ms )
Waits for the event to be signaled.
| Details | |||
|---|---|---|---|
| Parameters |
|