mirror of
https://github.com/fumiama/gozel.git
synced 2026-06-05 00:10:24 +08:00
80 lines
3.6 KiB
Go
80 lines
3.6 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_TIMESTAMPS_EXP_NAME Event Query Timestamps Extension Name
|
|
const ZE_EVENT_QUERY_TIMESTAMPS_EXP_NAME = "ZE_experimental_event_query_timestamps"
|
|
|
|
// ZeEventQueryTimestampsExpVersion (ze_event_query_timestamps_exp_version_t) Event Query Timestamps Extension Version(s)
|
|
type ZeEventQueryTimestampsExpVersion uintptr
|
|
const (
|
|
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_1_0 version 1.0
|
|
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT ZeEventQueryTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_CURRENT latest known version
|
|
ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeEventQueryTimestampsExpVersion = 0x7fffffff // ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_EVENT_QUERY_TIMESTAMPS_EXP_VERSION_* ENUMs
|
|
|
|
)
|
|
|
|
// ZeEventQueryTimestampsExp Query event timestamps for a device or sub-device.
|
|
///
|
|
/// @details
|
|
/// - 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_TIMESTAMPS_EXP_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.
|
|
///
|
|
/// @remarks
|
|
/// _Analogues_
|
|
/// - None
|
|
///
|
|
/// @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 ZeEventQueryTimestampsExp(
|
|
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 timestamp results. if count is zero, then the driver shall update the value with the total number of timestamps available. if count is greater than the number of timestamps available, then the driver shall update the value with the correct number of timestamps available.
|
|
pTimestamps *ZeKernelTimestampResult, // pTimestamps [in,out][optional][range(0, *pCount)] array of timestamp results. if count is less than the number of timestamps available, then driver shall only retrieve that number of timestamps.
|
|
) (ZeResult, error) {
|
|
return zecall.Call[ZeResult]("zeEventQueryTimestampsExp", uintptr(hEvent), uintptr(hDevice), uintptr(unsafe.Pointer(pCount)), uintptr(unsafe.Pointer(pTimestamps)))
|
|
}
|
|
|