@@ -196,7 +196,6 @@ typedef enum ur_function_t {
196196 UR_FUNCTION_ADAPTER_RETAIN = 179, ///< Enumerator for ::urAdapterRetain
197197 UR_FUNCTION_ADAPTER_GET_LAST_ERROR = 180, ///< Enumerator for ::urAdapterGetLastError
198198 UR_FUNCTION_ADAPTER_GET_INFO = 181, ///< Enumerator for ::urAdapterGetInfo
199- UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP = 182, ///< Enumerator for ::urCommandBufferUpdateKernelLaunchExp
200199 UR_FUNCTION_PROGRAM_BUILD_EXP = 197, ///< Enumerator for ::urProgramBuildExp
201200 UR_FUNCTION_PROGRAM_COMPILE_EXP = 198, ///< Enumerator for ::urProgramCompileExp
202201 UR_FUNCTION_PROGRAM_LINK_EXP = 199, ///< Enumerator for ::urProgramLinkExp
@@ -216,11 +215,13 @@ typedef enum ur_function_t {
216215 UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP = 213, ///< Enumerator for ::urCommandBufferAppendUSMAdviseExp
217216 UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP = 214, ///< Enumerator for ::urEnqueueCooperativeKernelLaunchExp
218217 UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP = 215, ///< Enumerator for ::urKernelSuggestMaxCooperativeGroupCountExp
219- UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP = 216, ///< Enumerator for ::urCommandBufferRetainCommandExp
220- UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP = 217, ///< Enumerator for ::urCommandBufferReleaseCommandExp
221- UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP = 218, ///< Enumerator for ::urCommandBufferGetInfoExp
222- UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP = 219, ///< Enumerator for ::urCommandBufferCommandGetInfoExp
223- UR_FUNCTION_DEVICE_GET_SELECTED = 220, ///< Enumerator for ::urDeviceGetSelected
218+ UR_FUNCTION_PROGRAM_GET_GLOBAL_VARIABLE_POINTER = 216, ///< Enumerator for ::urProgramGetGlobalVariablePointer
219+ UR_FUNCTION_DEVICE_GET_SELECTED = 217, ///< Enumerator for ::urDeviceGetSelected
220+ UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP = 218, ///< Enumerator for ::urCommandBufferRetainCommandExp
221+ UR_FUNCTION_COMMAND_BUFFER_RELEASE_COMMAND_EXP = 219, ///< Enumerator for ::urCommandBufferReleaseCommandExp
222+ UR_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP = 220, ///< Enumerator for ::urCommandBufferUpdateKernelLaunchExp
223+ UR_FUNCTION_COMMAND_BUFFER_GET_INFO_EXP = 221, ///< Enumerator for ::urCommandBufferGetInfoExp
224+ UR_FUNCTION_COMMAND_BUFFER_COMMAND_GET_INFO_EXP = 222, ///< Enumerator for ::urCommandBufferCommandGetInfoExp
224225 /// @cond
225226 UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
226227 /// @endcond
@@ -4327,6 +4328,42 @@ urProgramGetFunctionPointer(
43274328 void **ppFunctionPointer ///< [out] Returns the pointer to the function if it is found in the program.
43284329);
43294330
4331+ ///////////////////////////////////////////////////////////////////////////////
4332+ /// @brief Retrieves a pointer to a device global variable.
4333+ ///
4334+ /// @details
4335+ /// - Retrieves a pointer to a device global variable.
4336+ /// - The application may call this function from simultaneous threads for
4337+ /// the same device.
4338+ /// - The implementation of this function should be thread-safe.
4339+ ///
4340+ /// @remarks
4341+ /// _Analogues_
4342+ /// - **clGetDeviceGlobalVariablePointerINTEL**
4343+ ///
4344+ /// @returns
4345+ /// - ::UR_RESULT_SUCCESS
4346+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
4347+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
4348+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
4349+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4350+ /// + `NULL == hDevice`
4351+ /// + `NULL == hProgram`
4352+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
4353+ /// + `NULL == pGlobalVariableName`
4354+ /// + `NULL == ppGlobalVariablePointerRet`
4355+ /// - ::UR_RESULT_ERROR_INVALID_VALUE
4356+ /// + `name` is not a valid variable in the program.
4357+ UR_APIEXPORT ur_result_t UR_APICALL
4358+ urProgramGetGlobalVariablePointer(
4359+ ur_device_handle_t hDevice, ///< [in] handle of the device to retrieve the pointer for.
4360+ ur_program_handle_t hProgram, ///< [in] handle of the program where the global variable is.
4361+ const char *pGlobalVariableName, ///< [in] mangled name of the global variable to retrieve the pointer for.
4362+ size_t *pGlobalVariableSizeRet, ///< [out][optional] Returns the size of the global variable if it is found
4363+ ///< in the program.
4364+ void **ppGlobalVariablePointerRet ///< [out] Returns the pointer to the global variable if it is found in the program.
4365+ );
4366+
43304367///////////////////////////////////////////////////////////////////////////////
43314368/// @brief Get Program object information
43324369typedef enum ur_program_info_t {
@@ -9470,6 +9507,18 @@ typedef struct ur_program_get_function_pointer_params_t {
94709507 void ***pppFunctionPointer;
94719508} ur_program_get_function_pointer_params_t;
94729509
9510+ ///////////////////////////////////////////////////////////////////////////////
9511+ /// @brief Function parameters for urProgramGetGlobalVariablePointer
9512+ /// @details Each entry is a pointer to the parameter passed to the function;
9513+ /// allowing the callback the ability to modify the parameter's value
9514+ typedef struct ur_program_get_global_variable_pointer_params_t {
9515+ ur_device_handle_t *phDevice;
9516+ ur_program_handle_t *phProgram;
9517+ const char **ppGlobalVariableName;
9518+ size_t **ppGlobalVariableSizeRet;
9519+ void ***pppGlobalVariablePointerRet;
9520+ } ur_program_get_global_variable_pointer_params_t;
9521+
94739522///////////////////////////////////////////////////////////////////////////////
94749523/// @brief Function parameters for urProgramGetInfo
94759524/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments