// Code generated by cmd/gen. DO NOT EDIT. /* * * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * * @file zet_api.h * @version v1.15-r1.15.31 * */ package gozel import ( "unsafe" "github.com/fumiama/gozel/internal/zecall" ) // ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME Global Metric Timestamps Experimental Extension Name const ZET_GLOBAL_METRICS_TIMESTAMPS_EXP_NAME = "ZET_experimental_global_metric_timestamps" // ZeMetricGlobalTimestampsExpVersion (ze_metric_global_timestamps_exp_version_t) Global Metric Timestamps Experimental Extension Version(s) type ZeMetricGlobalTimestampsExpVersion uintptr const ( ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_1_0 version 1.0 ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT ZeMetricGlobalTimestampsExpVersion = /* ZE_MAKE_VERSION( 1, 0 ) */((( 1 << 16 )|( 0 & 0x0000ffff))) // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_CURRENT latest known version ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 ZeMetricGlobalTimestampsExpVersion = 0x7fffffff // ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_FORCE_UINT32 Value marking end of ZE_METRIC_GLOBAL_TIMESTAMPS_EXP_VERSION_* ENUMs ) // ZetMetricGlobalTimestampsResolutionExp (zet_metric_global_timestamps_resolution_exp_t) Metric timestamps resolution /// /// @details /// - This structure may be returned from ::zetMetricGroupGetProperties via /// the `pNext` member of ::zet_metric_group_properties_t. /// - Used for mapping metric timestamps to other timers. type ZetMetricGlobalTimestampsResolutionExp struct { Stype ZetStructureType // Stype [in] type of this structure Pnext unsafe.Pointer // Pnext [in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext). Timerresolution uint64 // Timerresolution [out] Returns the resolution of metrics timer (used for timestamps) in cycles/sec. Timestampvalidbits uint64 // Timestampvalidbits [out] Returns the number of valid bits in the timestamp value. } // ZetMetricGroupGetGlobalTimestampsExp Returns metric timestamps synchronized with global device timestamps, /// optionally synchronized with host /// /// @details /// - The application may call this function from simultaneous threads. /// - By default, the global and metrics timestamps are synchronized to the /// device. /// /// @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 == hMetricGroup` /// - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER /// + `nullptr == globalTimestamp` /// + `nullptr == metricTimestamp` func ZetMetricGroupGetGlobalTimestampsExp( hMetricGroup ZetMetricGroupHandle, // hMetricGroup [in] handle of the metric group synchronizedWithHost ZeBool, // synchronizedWithHost [in] Returns the timestamps synchronized to the host or the device. globalTimestamp *uint64, // globalTimestamp [out] Device timestamp. metricTimestamp *uint64, // metricTimestamp [out] Metric timestamp. ) (ZeResult, error) { return zecall.Call[ZeResult]("zetMetricGroupGetGlobalTimestampsExp", uintptr(hMetricGroup), uintptr(synchronizedWithHost), uintptr(unsafe.Pointer(globalTimestamp)), uintptr(unsafe.Pointer(metricTimestamp))) }