@@ -225,7 +225,7 @@ typedef enum ur_function_t {
225225 UR_FUNCTION_ENQUEUE_TIMESTAMP_RECORDING_EXP = 223, ///< Enumerator for ::urEnqueueTimestampRecordingExp
226226 UR_FUNCTION_ENQUEUE_KERNEL_LAUNCH_CUSTOM_EXP = 224, ///< Enumerator for ::urEnqueueKernelLaunchCustomExp
227227 UR_FUNCTION_KERNEL_GET_SUGGESTED_LOCAL_WORK_SIZE = 225, ///< Enumerator for ::urKernelGetSuggestedLocalWorkSize
228- UR_FUNCTION_LOADER_CONFIG_SET_LOGGER_CALLBACK = 226 , ///< Enumerator for ::urLoaderConfigSetLoggerCallback
228+ UR_FUNCTION_SET_LOGGER_CALLBACK = 227 , ///< Enumerator for ::urSetLoggerCallback
229229 /// @cond
230230 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
231231 /// @endcond
@@ -785,30 +785,6 @@ UR_APIEXPORT ur_result_t UR_APICALL
785785urLoaderTearDown(
786786 void);
787787
788- ///////////////////////////////////////////////////////////////////////////////
789- /// @brief Callback function to retrieve output from the logger.
790- typedef void (*ur_logger_output_callback_t)(
791- const char *pLoggerMsg, ///< [in][out] pointer to data to be passed to callback
792- void *pUserData ///< [in][out] pointer to data to be passed to callback
793- );
794-
795- ///////////////////////////////////////////////////////////////////////////////
796- /// @brief Set a callback function for use by the logger to retrieve logging
797- /// output.
798- ///
799- /// @returns
800- /// - ::UR_RESULT_SUCCESS
801- /// - ::UR_RESULT_ERROR_UNINITIALIZED
802- /// - ::UR_RESULT_ERROR_DEVICE_LOST
803- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
804- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
805- /// + `NULL == pfnLoggerCallback`
806- UR_APIEXPORT ur_result_t UR_APICALL
807- urLoaderConfigSetLoggerCallback(
808- ur_logger_output_callback_t pfnLoggerCallback, ///< [in] Function pointer to callback from the logger.
809- void *pUserData ///< [in][out][optional] pointer to data to be passed to callback
810- );
811-
812788#if !defined(__GNUC__)
813789#pragma endregion
814790#endif
@@ -1009,6 +985,33 @@ typedef enum ur_adapter_backend_t {
1009985
1010986} ur_adapter_backend_t;
1011987
988+ ///////////////////////////////////////////////////////////////////////////////
989+ /// @brief Callback function to retrieve output from the logger.
990+ typedef void (*ur_logger_output_callback_t)(
991+ const char *pLoggerMsg, ///< [in][out] pointer to data to be passed to callback
992+ void *pUserData ///< [in][out] pointer to data to be passed to callback
993+ );
994+
995+ ///////////////////////////////////////////////////////////////////////////////
996+ /// @brief Set a callback function for use by the logger to retrieve logging
997+ /// output.
998+ ///
999+ /// @returns
1000+ /// - ::UR_RESULT_SUCCESS
1001+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
1002+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
1003+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1004+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
1005+ /// + `NULL == hAdapter`
1006+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1007+ /// + `NULL == pfnLoggerCallback`
1008+ UR_APIEXPORT ur_result_t UR_APICALL
1009+ urSetLoggerCallback(
1010+ ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter
1011+ ur_logger_output_callback_t pfnLoggerCallback, ///< [in] Function pointer to callback from the logger.
1012+ void *pUserData ///< [in][out][optional] pointer to data to be passed to callback
1013+ );
1014+
10121015#if !defined(__GNUC__)
10131016#pragma endregion
10141017#endif
@@ -9541,15 +9544,6 @@ typedef struct ur_loader_config_set_code_location_callback_params_t {
95419544 void **ppUserData;
95429545} ur_loader_config_set_code_location_callback_params_t;
95439546
9544- ///////////////////////////////////////////////////////////////////////////////
9545- /// @brief Function parameters for urLoaderConfigSetLoggerCallback
9546- /// @details Each entry is a pointer to the parameter passed to the function;
9547- /// allowing the callback the ability to modify the parameter's value
9548- typedef struct ur_loader_config_set_logger_callback_params_t {
9549- ur_logger_output_callback_t *ppfnLoggerCallback;
9550- void **ppUserData;
9551- } ur_loader_config_set_logger_callback_params_t;
9552-
95539547///////////////////////////////////////////////////////////////////////////////
95549548/// @brief Function parameters for urPlatformGet
95559549/// @details Each entry is a pointer to the parameter passed to the function;
@@ -10458,6 +10452,16 @@ typedef struct ur_adapter_get_info_params_t {
1045810452 size_t **ppPropSizeRet;
1045910453} ur_adapter_get_info_params_t;
1046010454
10455+ ///////////////////////////////////////////////////////////////////////////////
10456+ /// @brief Function parameters for urSetLoggerCallback
10457+ /// @details Each entry is a pointer to the parameter passed to the function;
10458+ /// allowing the callback the ability to modify the parameter's value
10459+ typedef struct ur_set_logger_callback_params_t {
10460+ ur_adapter_handle_t *phAdapter;
10461+ ur_logger_output_callback_t *ppfnLoggerCallback;
10462+ void **ppUserData;
10463+ } ur_set_logger_callback_params_t;
10464+
1046110465///////////////////////////////////////////////////////////////////////////////
1046210466/// @brief Function parameters for urEnqueueKernelLaunch
1046310467/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments