@@ -226,7 +226,7 @@ typedef enum ur_function_t {
226226 UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_MEMORY_EXP = 226, ///< Enumerator for ::urBindlessImagesImportExternalMemoryExp
227227 UR_FUNCTION_BINDLESS_IMAGES_IMPORT_EXTERNAL_SEMAPHORE_EXP = 227, ///< Enumerator for ::urBindlessImagesImportExternalSemaphoreExp
228228 UR_FUNCTION_ENQUEUE_NATIVE_COMMAND_EXP = 228, ///< Enumerator for ::urEnqueueNativeCommandExp
229- UR_FUNCTION_LOADER_CONFIG_SET_LOGGER_CALLBACK = 229 , ///< Enumerator for ::urLoaderConfigSetLoggerCallback
229+ UR_FUNCTION_SET_LOGGER_CALLBACK = 230 , ///< Enumerator for ::urSetLoggerCallback
230230 /// @cond
231231 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
232232 /// @endcond
@@ -787,30 +787,6 @@ UR_APIEXPORT ur_result_t UR_APICALL
787787urLoaderTearDown(
788788 void);
789789
790- ///////////////////////////////////////////////////////////////////////////////
791- /// @brief Callback function to retrieve output from the logger.
792- typedef void (*ur_logger_output_callback_t)(
793- const char *pLoggerMsg, ///< [in][out] pointer to data to be passed to callback
794- void *pUserData ///< [in][out] pointer to data to be passed to callback
795- );
796-
797- ///////////////////////////////////////////////////////////////////////////////
798- /// @brief Set a callback function for use by the logger to retrieve logging
799- /// output.
800- ///
801- /// @returns
802- /// - ::UR_RESULT_SUCCESS
803- /// - ::UR_RESULT_ERROR_UNINITIALIZED
804- /// - ::UR_RESULT_ERROR_DEVICE_LOST
805- /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
806- /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
807- /// + `NULL == pfnLoggerCallback`
808- UR_APIEXPORT ur_result_t UR_APICALL
809- urLoaderConfigSetLoggerCallback(
810- ur_logger_output_callback_t pfnLoggerCallback, ///< [in] Function pointer to callback from the logger.
811- void *pUserData ///< [in][out][optional] pointer to data to be passed to callback
812- );
813-
814790#if !defined(__GNUC__)
815791#pragma endregion
816792#endif
@@ -1011,6 +987,33 @@ typedef enum ur_adapter_backend_t {
1011987
1012988} ur_adapter_backend_t;
1013989
990+ ///////////////////////////////////////////////////////////////////////////////
991+ /// @brief Callback function to retrieve output from the logger.
992+ typedef void (*ur_logger_output_callback_t)(
993+ const char *pLoggerMsg, ///< [in][out] pointer to data to be passed to callback
994+ void *pUserData ///< [in][out] pointer to data to be passed to callback
995+ );
996+
997+ ///////////////////////////////////////////////////////////////////////////////
998+ /// @brief Set a callback function for use by the logger to retrieve logging
999+ /// output.
1000+ ///
1001+ /// @returns
1002+ /// - ::UR_RESULT_SUCCESS
1003+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
1004+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
1005+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1006+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
1007+ /// + `NULL == hAdapter`
1008+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
1009+ /// + `NULL == pfnLoggerCallback`
1010+ UR_APIEXPORT ur_result_t UR_APICALL
1011+ urSetLoggerCallback(
1012+ ur_adapter_handle_t hAdapter, ///< [in] handle of the adapter
1013+ ur_logger_output_callback_t pfnLoggerCallback, ///< [in] Function pointer to callback from the logger.
1014+ void *pUserData ///< [in][out][optional] pointer to data to be passed to callback
1015+ );
1016+
10141017#if !defined(__GNUC__)
10151018#pragma endregion
10161019#endif
@@ -9667,15 +9670,6 @@ typedef struct ur_loader_config_set_code_location_callback_params_t {
96679670 void **ppUserData;
96689671} ur_loader_config_set_code_location_callback_params_t;
96699672
9670- ///////////////////////////////////////////////////////////////////////////////
9671- /// @brief Function parameters for urLoaderConfigSetLoggerCallback
9672- /// @details Each entry is a pointer to the parameter passed to the function;
9673- /// allowing the callback the ability to modify the parameter's value
9674- typedef struct ur_loader_config_set_logger_callback_params_t {
9675- ur_logger_output_callback_t *ppfnLoggerCallback;
9676- void **ppUserData;
9677- } ur_loader_config_set_logger_callback_params_t;
9678-
96799673///////////////////////////////////////////////////////////////////////////////
96809674/// @brief Function parameters for urPlatformGet
96819675/// @details Each entry is a pointer to the parameter passed to the function;
@@ -10585,6 +10579,16 @@ typedef struct ur_adapter_get_info_params_t {
1058510579 size_t **ppPropSizeRet;
1058610580} ur_adapter_get_info_params_t;
1058710581
10582+ ///////////////////////////////////////////////////////////////////////////////
10583+ /// @brief Function parameters for urSetLoggerCallback
10584+ /// @details Each entry is a pointer to the parameter passed to the function;
10585+ /// allowing the callback the ability to modify the parameter's value
10586+ typedef struct ur_set_logger_callback_params_t {
10587+ ur_adapter_handle_t *phAdapter;
10588+ ur_logger_output_callback_t *ppfnLoggerCallback;
10589+ void **ppUserData;
10590+ } ur_set_logger_callback_params_t;
10591+
1058810592///////////////////////////////////////////////////////////////////////////////
1058910593/// @brief Function parameters for urEnqueueKernelLaunch
1059010594/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments