1
0
mirror of https://github.com/fumiama/gozel.git synced 2026-06-05 00:10:24 +08:00
Files
gozel/gozel/core_eventQueryKernelTimestamps.go
fumiama 6522bde914 feat(examples): add image_scale (#7)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-29 17:11:22 +08:00

131 lines
8.0 KiB
Go

// Code generated by cmd/gen. DO NOT EDIT.
/*
*
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
* @file ze_api.h
* @version v1.15-r1.15.31
*
*/
package gozel
import (
"unsafe"
"github.com/fumiama/gozel/internal/zecall"
)
// ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME Event Query Kernel Timestamps Extension Name
const ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME = "ZE_extension_event_query_kernel_timestamps"
// ZeEventQueryKernelTimestampsExtVersion (ze_event_query_kernel_timestamps_ext_version_t) Event Query Kernel Timestamps Extension Version(s)
type ZeEventQueryKernelTimestampsExtVersion uint32
const (
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_1_0 version 1.0
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT ZeEventQueryKernelTimestampsExtVersion = /* ZE_MAKE_VERSION( 1, 0 ) */ ((1 << 16) | (0 & 0x0000ffff)) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_CURRENT latest known version
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 ZeEventQueryKernelTimestampsExtVersion = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_VERSION_* ENUMs
)
// ZeEventQueryKernelTimestampsExtFlags (ze_event_query_kernel_timestamps_ext_flags_t) Event query kernel timestamps flags
type ZeEventQueryKernelTimestampsExtFlags uint32
const (
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(0) */ (1 << 0) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_KERNEL Kernel timestamp results
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED ZeEventQueryKernelTimestampsExtFlags = /* ZE_BIT(1) */ (1 << 1) // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_SYNCHRONIZED Device event timestamps synchronized to the host time domain
ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 ZeEventQueryKernelTimestampsExtFlags = 0x7fffffff // ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_FLAG_* ENUMs
)
// ZeEventQueryKernelTimestampsExtProperties (ze_event_query_kernel_timestamps_ext_properties_t) Event query kernel timestamps properties
// /
// / @details
// / - This structure may be returned from ::zeDeviceGetProperties, via the
// / `pNext` member of ::ze_device_properties_t.
type ZeEventQueryKernelTimestampsExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Flags ZeEventQueryKernelTimestampsExtFlags // Flags [out] 0 or some combination of ::ze_event_query_kernel_timestamps_ext_flag_t flags
}
// ZeSynchronizedTimestampDataExt (ze_synchronized_timestamp_data_ext_t) Kernel timestamp clock data synchronized to the host time domain
type ZeSynchronizedTimestampDataExt struct {
Kernelstart uint64 // Kernelstart [out] synchronized clock at start of kernel execution
Kernelend uint64 // Kernelend [out] synchronized clock at end of kernel execution
}
// ZeSynchronizedTimestampResultExt (ze_synchronized_timestamp_result_ext_t) Synchronized kernel timestamp result
type ZeSynchronizedTimestampResultExt struct {
Global ZeSynchronizedTimestampDataExt // Global [out] wall-clock data
Context ZeSynchronizedTimestampDataExt // Context [out] context-active data; only includes clocks while device context was actively executing.
}
// ZeEventQueryKernelTimestampsResultsExtProperties (ze_event_query_kernel_timestamps_results_ext_properties_t) Event query kernel timestamps results properties
type ZeEventQueryKernelTimestampsResultsExtProperties struct {
Stype ZeStructureType // Stype [in] type of this structure
Pnext unsafe.Pointer // Pnext [in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
Pkerneltimestampsbuffer *ZeKernelTimestampResult // Pkerneltimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of kernel timestamp results
Psynchronizedtimestampsbuffer *ZeSynchronizedTimestampResultExt // Psynchronizedtimestampsbuffer [in,out][optional][range(0, *pCount)] pointer to destination buffer of synchronized timestamp results
}
// ZeEventQueryKernelTimestampsExt Query an event's timestamp value on the host, with domain preference.
// /
// / @details
// / - For collecting *only* kernel timestamps, the application must ensure
// / the event was created from an event pool that was created using
// / ::ZE_EVENT_POOL_FLAG_KERNEL_TIMESTAMP flag.
// / - For collecting synchronized timestamps, the application must ensure
// / the event was created from an event pool that was created using
// / ::ZE_EVENT_POOL_FLAG_KERNEL_MAPPED_TIMESTAMP flag. Kernel timestamps
// / are also available from this type of event pool, but there is a
// / performance cost.
// / - The destination memory will be unmodified if the event has not been
// / signaled.
// / - The application may call this function from simultaneous threads.
// / - The implementation of this function must be thread-safe.
// / - The implementation must support
// / ::ZE_EVENT_QUERY_KERNEL_TIMESTAMPS_EXT_NAME extension.
// / - The implementation must return all timestamps for the specified event
// / and device pair.
// / - The implementation must return all timestamps for all sub-devices when
// / device handle is parent device.
// / - The implementation may return all timestamps for sub-devices when
// / device handle is sub-device or may return 0 for count.
// /
// / @returns
// / - ::ZE_RESULT_SUCCESS
// / - ::ZE_RESULT_ERROR_UNINITIALIZED
// / - ::ZE_RESULT_ERROR_DEVICE_LOST
// / - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY
// / - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY
// / - ::ZE_RESULT_ERROR_INVALID_ARGUMENT
// / - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE
// / - ::ZE_RESULT_ERROR_DEPENDENCY_UNAVAILABLE
// / - ::ZE_RESULT_ERROR_INSUFFICIENT_PERMISSIONS
// / - ::ZE_RESULT_ERROR_NOT_AVAILABLE
// / - ::ZE_RESULT_ERROR_DEVICE_REQUIRES_RESET
// / - ::ZE_RESULT_ERROR_DEVICE_IN_LOW_POWER_STATE
// / - ::ZE_RESULT_ERROR_UNKNOWN
// / - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE
// / + `nullptr == hEvent`
// / + `nullptr == hDevice`
// / - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER
// / + `nullptr == pCount`
func ZeEventQueryKernelTimestampsExt(
hEvent ZeEventHandle, // hEvent [in] handle of the event
hDevice ZeDeviceHandle, // hDevice [in] handle of the device to query
pCount *uint32, // pCount [in,out] pointer to the number of event packets available. - This value is implementation specific. - if `*pCount` is zero, then the driver shall update the value with the total number of event packets available. - if `*pCount` is greater than the number of event packets available, the driver shall update the value with the correct value. - Buffer(s) for query results must be sized by the application to accommodate a minimum of `*pCount` elements.
pResults *ZeEventQueryKernelTimestampsResultsExtProperties, // pResults [in,out][optional][range(0, *pCount)] pointer to event query properties structure(s). - This parameter may be null when `*pCount` is zero. - if `*pCount` is less than the number of event packets available, the driver may only update `*pCount` elements, starting at element zero. - if `*pCount` is greater than the number of event packets available, the driver may only update the valid elements.
) (ZeResult, error) {
return zecall.Call[ZeResult]("zeEventQueryKernelTimestampsExt", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pResults)))
}