Event class C wrapper

Overview

// global functions

DPCTL_API __dpctl_give DPCTLSyclEventRef
DPCTLEvent_Copy(__dpctl_keep const DPCTLSyclEventRef ERef);

DPCTL_API __dpctl_give DPCTLSyclEventRef
DPCTLEvent_Create(void);

DPCTL_API void
DPCTLEvent_Delete(__dpctl_take DPCTLSyclEventRef ERef);

DPCTL_API DPCTLSyclBackendType
DPCTLEvent_GetBackend(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API DPCTLSyclEventStatusType
DPCTLEvent_GetCommandExecutionStatus(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoEnd(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoStart(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoSubmit(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API __dpctl_give DPCTLEventVectorRef
DPCTLEvent_GetWaitList(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API void
DPCTLEvent_Wait(__dpctl_keep DPCTLSyclEventRef ERef);

DPCTL_API void
DPCTLEvent_WaitAndThrow(__dpctl_keep DPCTLSyclEventRef ERef);

Detailed Documentation

Global Functions

DPCTL_API __dpctl_give DPCTLSyclEventRef
DPCTLEvent_Copy(__dpctl_keep const DPCTLSyclEventRef ERef)

Returns a copy of the DPCTLSyclEventRef object.

Parameters:

ERef

DPCTLSyclEventRef object to be copied.

Returns:

A new DPCTLSyclEventRef created by copying the passed in DPCTLSyclEventRef object.

DPCTL_API __dpctl_give DPCTLSyclEventRef
DPCTLEvent_Create(void)

A wrapper for sycl::event constructor to construct a new event.

Returns:

An opaque DPCTLSyclEventRef pointer wrapping a sycl::event.

DPCTL_API void
DPCTLEvent_Delete(__dpctl_take DPCTLSyclEventRef ERef)

Deletes the DPCTLSyclEventRef after casting it to a sycl::event.

Parameters:

ERef

An opaque DPCTLSyclEventRef pointer that would be freed.

DPCTL_API DPCTLSyclBackendType
DPCTLEvent_GetBackend(__dpctl_keep DPCTLSyclEventRef ERef)

Returns a DPCTLSyclBackendType enum value identifying the SYCL backend associated with the event.

Parameters:

ERef

Opaque pointer to a sycl::event

Returns:

A DPCTLSyclBackendType enum value identifying the SYCL backend associated with the event.

DPCTL_API DPCTLSyclEventStatusType
DPCTLEvent_GetCommandExecutionStatus(__dpctl_keep DPCTLSyclEventRef ERef)

Returns the DPCTLSyclEventStatusType enum value for the DPCTLSyclEventRef argument.

Parameters:

ERef

Opaque pointer to a sycl::event

Returns:

The DPCTLSyclDEventStatusType value corresponding to the event.

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoEnd(__dpctl_keep DPCTLSyclEventRef ERef)

Wrapper over event.get_profiling_info<info::event_profiling::command_end>()

Parameters:

ERef

Opaque pointer to a sycl::event

Returns:

Returns a value describing the time in nanoseconds when the action associated with the command group (e.g. kernel invocation) finished executing on the device.

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoStart(__dpctl_keep DPCTLSyclEventRef ERef)

Wrapper over event.get_profiling_info<info::event_profiling::command_start>()

Parameters:

ERef

Opaque pointer to a sycl::event

Returns:

Returns a value describing the time in nanoseconds when the action associated with the command group (e.g. kernel invocation) started executing on the device.

DPCTL_API uint64_t
DPCTLEvent_GetProfilingInfoSubmit(__dpctl_keep DPCTLSyclEventRef ERef)

Wrapper over event.get_profiling_info<info::event_profiling::command_submit>()

Parameters:

ERef

Opaque pointer to a sycl::event

Returns:

Returns a value describing the time in nanoseconds when the associated command group was submitted to the queue.

DPCTL_API __dpctl_give DPCTLEventVectorRef
DPCTLEvent_GetWaitList(__dpctl_keep DPCTLSyclEventRef ERef)

C-API wrapper for sycl::event::get_wait_list. Returns a vector of events that this event still waits for.

Parameters:

ERef

Opaque pointer to a sycl::event.

Returns:

A DPCTLEventVectorRef of DPCTLSyclEventRef objects.

DPCTL_API void
DPCTLEvent_Wait(__dpctl_keep DPCTLSyclEventRef ERef)

C-API wrapper for sycl::event.wait.

Parameters:

ERef

An opaque DPCTLSyclEventRef pointer on which to wait.

DPCTL_API void
DPCTLEvent_WaitAndThrow(__dpctl_keep DPCTLSyclEventRef ERef)

C-API wrapper for ‘sycl::event.wait_and_throw’.

Parameters:

ERef

Opaque pointer to a sycl::event