From 43043b7cd4269e13d635afec430d12cd736e3b50 Mon Sep 17 00:00:00 2001 From: Rajiv Deodhar Date: Fri, 7 Jul 2023 14:57:35 -0700 Subject: [PATCH 1/2] Added const qualifier to some parameters. --- include/ur_api.h | 18 +++++++++--------- include/ur_ddi.h | 8 ++++---- scripts/core/exp-usm-import-release.yml | 8 ++++---- source/adapters/null/ur_nullddi.cpp | 8 ++++---- source/loader/layers/tracing/ur_trcddi.cpp | 8 ++++---- source/loader/layers/validation/ur_valddi.cpp | 8 ++++---- source/loader/ur_ldrddi.cpp | 8 ++++---- source/loader/ur_libapi.cpp | 8 ++++---- source/ur_api.cpp | 8 ++++---- 9 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/ur_api.h b/include/ur_api.h index aab6a9c50b..b08fac3ce9 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -7685,9 +7685,9 @@ urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_SIZE UR_APIEXPORT ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object - size_t size ///< [in] size in bytes of the host memory object to be imported + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object + size_t size ///< [in] size in bytes of the host memory object to be imported ); /////////////////////////////////////////////////////////////////////////////// @@ -7708,8 +7708,8 @@ urUSMImportExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT UR_APIEXPORT ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ); #if !defined(__GNUC__) @@ -9389,8 +9389,8 @@ typedef struct ur_usm_pitched_alloc_exp_params_t { /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value typedef struct ur_usm_import_exp_params_t { - ur_context_handle_t *phContext; - void **ppMem; + const ur_context_handle_t *phContext; + const void **ppMem; size_t *psize; } ur_usm_import_exp_params_t; @@ -9399,8 +9399,8 @@ typedef struct ur_usm_import_exp_params_t { /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value typedef struct ur_usm_release_exp_params_t { - ur_context_handle_t *phContext; - void **ppMem; + const ur_context_handle_t *phContext; + const void **ppMem; } ur_usm_release_exp_params_t; /////////////////////////////////////////////////////////////////////////////// diff --git a/include/ur_ddi.h b/include/ur_ddi.h index 3729208835..b2ed80906f 100644 --- a/include/ur_ddi.h +++ b/include/ur_ddi.h @@ -1593,15 +1593,15 @@ typedef ur_result_t(UR_APICALL *ur_pfnUSMPitchedAllocExp_t)( /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urUSMImportExp typedef ur_result_t(UR_APICALL *ur_pfnUSMImportExp_t)( - ur_context_handle_t, - void *, + const ur_context_handle_t, + const void *, size_t); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urUSMReleaseExp typedef ur_result_t(UR_APICALL *ur_pfnUSMReleaseExp_t)( - ur_context_handle_t, - void *); + const ur_context_handle_t, + const void *); /////////////////////////////////////////////////////////////////////////////// /// @brief Table of USMExp functions pointers diff --git a/scripts/core/exp-usm-import-release.yml b/scripts/core/exp-usm-import-release.yml index 869bff64e8..0c90becd55 100644 --- a/scripts/core/exp-usm-import-release.yml +++ b/scripts/core/exp-usm-import-release.yml @@ -10,10 +10,10 @@ name: ImportExp details: - "Import memory into USM" params: - - type: $x_context_handle_t + - type: "const $x_context_handle_t" name: hContext desc: "[in] handle of the context object" - - type: "void*" + - type: "const void*" name: pMem desc: "[in] pointer to host memory object" - type: "size_t" @@ -30,10 +30,10 @@ name: ReleaseExp details: - "Release memory from USM" params: - - type: $x_context_handle_t + - type: "const $x_context_handle_t" name: hContext desc: "[in] handle of the context object" - - type: "void*" + - type: "const void*" name: pMem desc: "[in] pointer to host memory object" returns: diff --git a/source/adapters/null/ur_nullddi.cpp b/source/adapters/null/ur_nullddi.cpp index e2c4956c14..a0e486ee6f 100644 --- a/source/adapters/null/ur_nullddi.cpp +++ b/source/adapters/null/ur_nullddi.cpp @@ -4782,8 +4782,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) try { ur_result_t result = UR_RESULT_SUCCESS; @@ -4804,8 +4804,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) try { ur_result_t result = UR_RESULT_SUCCESS; diff --git a/source/loader/layers/tracing/ur_trcddi.cpp b/source/loader/layers/tracing/ur_trcddi.cpp index b66101ddc6..a0500987da 100644 --- a/source/loader/layers/tracing/ur_trcddi.cpp +++ b/source/loader/layers/tracing/ur_trcddi.cpp @@ -5524,8 +5524,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { auto pfnImportExp = context.urDdiTable.USMExp.pfnImportExp; @@ -5549,8 +5549,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { auto pfnReleaseExp = context.urDdiTable.USMExp.pfnReleaseExp; diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 5f7290cb24..0c59e344f0 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -6867,8 +6867,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { auto pfnImportExp = context.urDdiTable.USMExp.pfnImportExp; @@ -6895,8 +6895,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { auto pfnReleaseExp = context.urDdiTable.USMExp.pfnReleaseExp; diff --git a/source/loader/ur_ldrddi.cpp b/source/loader/ur_ldrddi.cpp index 049f618703..5bdd9d5b4e 100644 --- a/source/loader/ur_ldrddi.cpp +++ b/source/loader/ur_ldrddi.cpp @@ -6658,8 +6658,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -6683,8 +6683,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { ur_result_t result = UR_RESULT_SUCCESS; diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 238079ebe7..1b532db934 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -7201,8 +7201,8 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_SIZE ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) try { auto pfnImportExp = ur_lib::context->urDdiTable.USMExp.pfnImportExp; @@ -7232,8 +7232,8 @@ ur_result_t UR_APICALL urUSMImportExp( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) try { auto pfnReleaseExp = ur_lib::context->urDdiTable.USMExp.pfnReleaseExp; if (nullptr == pfnReleaseExp) { diff --git a/source/ur_api.cpp b/source/ur_api.cpp index 4a9b80695a..ddc784faa3 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -6050,8 +6050,8 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_SIZE ur_result_t UR_APICALL urUSMImportExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem, ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -6075,8 +6075,8 @@ ur_result_t UR_APICALL urUSMImportExp( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT ur_result_t UR_APICALL urUSMReleaseExp( - ur_context_handle_t hContext, ///< [in] handle of the context object - void *pMem ///< [in] pointer to host memory object + const ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { ur_result_t result = UR_RESULT_SUCCESS; return result; From 30ef01c422bb91a7e49ecd8b76319e15d5213930 Mon Sep 17 00:00:00 2001 From: Rajiv Deodhar Date: Mon, 10 Jul 2023 09:44:36 -0700 Subject: [PATCH 2/2] Removed a const qualifier. --- include/ur_api.h | 14 +++++++------- include/ur_ddi.h | 4 ++-- scripts/core/exp-usm-import-release.yml | 4 ++-- source/adapters/null/ur_nullddi.cpp | 8 ++++---- source/loader/layers/tracing/ur_trcddi.cpp | 8 ++++---- source/loader/layers/validation/ur_valddi.cpp | 8 ++++---- source/loader/ur_ldrddi.cpp | 8 ++++---- source/loader/ur_libapi.cpp | 8 ++++---- source/ur_api.cpp | 8 ++++---- 9 files changed, 35 insertions(+), 35 deletions(-) diff --git a/include/ur_api.h b/include/ur_api.h index b08fac3ce9..8370c9df5a 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -7685,9 +7685,9 @@ urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_SIZE UR_APIEXPORT ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object - size_t size ///< [in] size in bytes of the host memory object to be imported + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object + size_t size ///< [in] size in bytes of the host memory object to be imported ); /////////////////////////////////////////////////////////////////////////////// @@ -7708,8 +7708,8 @@ urUSMImportExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT UR_APIEXPORT ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ); #if !defined(__GNUC__) @@ -9389,7 +9389,7 @@ typedef struct ur_usm_pitched_alloc_exp_params_t { /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value typedef struct ur_usm_import_exp_params_t { - const ur_context_handle_t *phContext; + ur_context_handle_t *phContext; const void **ppMem; size_t *psize; } ur_usm_import_exp_params_t; @@ -9399,7 +9399,7 @@ typedef struct ur_usm_import_exp_params_t { /// @details Each entry is a pointer to the parameter passed to the function; /// allowing the callback the ability to modify the parameter's value typedef struct ur_usm_release_exp_params_t { - const ur_context_handle_t *phContext; + ur_context_handle_t *phContext; const void **ppMem; } ur_usm_release_exp_params_t; diff --git a/include/ur_ddi.h b/include/ur_ddi.h index b2ed80906f..17975ea7c0 100644 --- a/include/ur_ddi.h +++ b/include/ur_ddi.h @@ -1593,14 +1593,14 @@ typedef ur_result_t(UR_APICALL *ur_pfnUSMPitchedAllocExp_t)( /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urUSMImportExp typedef ur_result_t(UR_APICALL *ur_pfnUSMImportExp_t)( - const ur_context_handle_t, + ur_context_handle_t, const void *, size_t); /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urUSMReleaseExp typedef ur_result_t(UR_APICALL *ur_pfnUSMReleaseExp_t)( - const ur_context_handle_t, + ur_context_handle_t, const void *); /////////////////////////////////////////////////////////////////////////////// diff --git a/scripts/core/exp-usm-import-release.yml b/scripts/core/exp-usm-import-release.yml index 0c90becd55..216f60a032 100644 --- a/scripts/core/exp-usm-import-release.yml +++ b/scripts/core/exp-usm-import-release.yml @@ -10,7 +10,7 @@ name: ImportExp details: - "Import memory into USM" params: - - type: "const $x_context_handle_t" + - type: $x_context_handle_t name: hContext desc: "[in] handle of the context object" - type: "const void*" @@ -30,7 +30,7 @@ name: ReleaseExp details: - "Release memory from USM" params: - - type: "const $x_context_handle_t" + - type: $x_context_handle_t name: hContext desc: "[in] handle of the context object" - type: "const void*" diff --git a/source/adapters/null/ur_nullddi.cpp b/source/adapters/null/ur_nullddi.cpp index a0e486ee6f..2c5741ebf0 100644 --- a/source/adapters/null/ur_nullddi.cpp +++ b/source/adapters/null/ur_nullddi.cpp @@ -4782,8 +4782,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) try { ur_result_t result = UR_RESULT_SUCCESS; @@ -4804,8 +4804,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) try { ur_result_t result = UR_RESULT_SUCCESS; diff --git a/source/loader/layers/tracing/ur_trcddi.cpp b/source/loader/layers/tracing/ur_trcddi.cpp index a0500987da..93cf935e3b 100644 --- a/source/loader/layers/tracing/ur_trcddi.cpp +++ b/source/loader/layers/tracing/ur_trcddi.cpp @@ -5524,8 +5524,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { auto pfnImportExp = context.urDdiTable.USMExp.pfnImportExp; @@ -5549,8 +5549,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { auto pfnReleaseExp = context.urDdiTable.USMExp.pfnReleaseExp; diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 0c59e344f0..0742ff8dc3 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -6867,8 +6867,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { auto pfnImportExp = context.urDdiTable.USMExp.pfnImportExp; @@ -6895,8 +6895,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { auto pfnReleaseExp = context.urDdiTable.USMExp.pfnReleaseExp; diff --git a/source/loader/ur_ldrddi.cpp b/source/loader/ur_ldrddi.cpp index 5bdd9d5b4e..7f11addad1 100644 --- a/source/loader/ur_ldrddi.cpp +++ b/source/loader/ur_ldrddi.cpp @@ -6658,8 +6658,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMImportExp __urdlllocal ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -6683,8 +6683,8 @@ __urdlllocal ur_result_t UR_APICALL urUSMImportExp( /////////////////////////////////////////////////////////////////////////////// /// @brief Intercept function for urUSMReleaseExp __urdlllocal ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { ur_result_t result = UR_RESULT_SUCCESS; diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 1b532db934..b98338cc62 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -7201,8 +7201,8 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_SIZE ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) try { auto pfnImportExp = ur_lib::context->urDdiTable.USMExp.pfnImportExp; @@ -7232,8 +7232,8 @@ ur_result_t UR_APICALL urUSMImportExp( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) try { auto pfnReleaseExp = ur_lib::context->urDdiTable.USMExp.pfnReleaseExp; if (nullptr == pfnReleaseExp) { diff --git a/source/ur_api.cpp b/source/ur_api.cpp index ddc784faa3..a54d707926 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -6050,8 +6050,8 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// - ::UR_RESULT_ERROR_INVALID_CONTEXT /// - ::UR_RESULT_ERROR_INVALID_SIZE ur_result_t UR_APICALL urUSMImportExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem, ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem, ///< [in] pointer to host memory object size_t size ///< [in] size in bytes of the host memory object to be imported ) { ur_result_t result = UR_RESULT_SUCCESS; @@ -6075,8 +6075,8 @@ ur_result_t UR_APICALL urUSMImportExp( /// + `NULL == pMem` /// - ::UR_RESULT_ERROR_INVALID_CONTEXT ur_result_t UR_APICALL urUSMReleaseExp( - const ur_context_handle_t hContext, ///< [in] handle of the context object - const void *pMem ///< [in] pointer to host memory object + ur_context_handle_t hContext, ///< [in] handle of the context object + const void *pMem ///< [in] pointer to host memory object ) { ur_result_t result = UR_RESULT_SUCCESS; return result;