Skip to content

Commit

Permalink
rename structure
Browse files Browse the repository at this point in the history
Signed-off-by: Tikhomirova, Kseniya <kseniya.tikhomirova@intel.com>
  • Loading branch information
KseniyaTikhomirova committed Jun 15, 2023
1 parent 051b0c0 commit 8539350
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 31 deletions.
10 changes: 5 additions & 5 deletions include/ur.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class ur_structure_type_v(IntEnum):
DEVICE_PARTITION_PROPERTIES = 26 ## ::ur_device_partition_properties_t
EXP_COMMAND_BUFFER_DESC = 27 ## ::ur_exp_command_buffer_desc_t
EXP_SAMPLER_MIP_PROPERTIES = 28 ## ::ur_exp_sampler_mip_properties_t
MEM_OBJ_PROPERTIES = 29 ## ::ur_mem_obj_properties_t
MEM_OBJ_PROPERTIES = 29 ## ::ur_kernel_arg_mem_obj_properties_t

class ur_structure_type_t(c_int):
def __str__(self):
Expand Down Expand Up @@ -1517,10 +1517,10 @@ def __str__(self):

###############################################################################
## @brief Properties for for ::urKernelSetArgMemObj.
class ur_mem_obj_properties_t(Structure):
class ur_kernel_arg_mem_obj_properties_t(Structure):
_fields_ = [
("stype", ur_structure_type_t), ## [in] type of this structure, must be
## ::UR_STRUCTURE_TYPE_MEM_OBJ_PROPERTIES
## ::UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES
("pNext", c_void_p), ## [in,out][optional] pointer to extension-specific structure
("memoryAccess", ur_mem_flags_t) ## [in] Memory access flag. Allowed values are: ::UR_MEM_FLAG_READ_WRITE,
## ::UR_MEM_FLAG_WRITE_ONLY, ::UR_MEM_FLAG_READ_ONLY.
Expand Down Expand Up @@ -2400,9 +2400,9 @@ class ur_program_dditable_t(Structure):
###############################################################################
## @brief Function-pointer for urKernelSetArgMemObj
if __use_win_types:
_urKernelSetArgMemObj_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_mem_obj_properties_t), ur_mem_handle_t )
_urKernelSetArgMemObj_t = WINFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_mem_obj_properties_t), ur_mem_handle_t )
else:
_urKernelSetArgMemObj_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_mem_obj_properties_t), ur_mem_handle_t )
_urKernelSetArgMemObj_t = CFUNCTYPE( ur_result_t, ur_kernel_handle_t, c_ulong, POINTER(ur_kernel_arg_mem_obj_properties_t), ur_mem_handle_t )

###############################################################################
## @brief Function-pointer for urKernelSetSpecializationConstants
Expand Down
18 changes: 9 additions & 9 deletions include/ur_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ typedef enum ur_structure_type_t {
UR_STRUCTURE_TYPE_DEVICE_PARTITION_PROPERTIES = 26, ///< ::ur_device_partition_properties_t
UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_DESC = 27, ///< ::ur_exp_command_buffer_desc_t
UR_STRUCTURE_TYPE_EXP_SAMPLER_MIP_PROPERTIES = 28, ///< ::ur_exp_sampler_mip_properties_t
UR_STRUCTURE_TYPE_MEM_OBJ_PROPERTIES = 29, ///< ::ur_mem_obj_properties_t
UR_STRUCTURE_TYPE_MEM_OBJ_PROPERTIES = 29, ///< ::ur_kernel_arg_mem_obj_properties_t
/// @cond
UR_STRUCTURE_TYPE_FORCE_UINT32 = 0x7fffffff
/// @endcond
Expand Down Expand Up @@ -3880,14 +3880,14 @@ urKernelSetArgSampler(

///////////////////////////////////////////////////////////////////////////////
/// @brief Properties for for ::urKernelSetArgMemObj.
typedef struct ur_mem_obj_properties_t {
typedef struct ur_kernel_arg_mem_obj_properties_t {
ur_structure_type_t stype; ///< [in] type of this structure, must be
///< ::UR_STRUCTURE_TYPE_MEM_OBJ_PROPERTIES
///< ::UR_STRUCTURE_TYPE_KERNEL_ARG_MEM_OBJ_PROPERTIES
void *pNext; ///< [in,out][optional] pointer to extension-specific structure
ur_mem_flags_t memoryAccess; ///< [in] Memory access flag. Allowed values are: ::UR_MEM_FLAG_READ_WRITE,
///< ::UR_MEM_FLAG_WRITE_ONLY, ::UR_MEM_FLAG_READ_ONLY.

} ur_mem_obj_properties_t;
} ur_kernel_arg_mem_obj_properties_t;

///////////////////////////////////////////////////////////////////////////////
/// @brief Set a Memory object as the argument value of a Kernel.
Expand All @@ -3906,10 +3906,10 @@ typedef struct ur_mem_obj_properties_t {
/// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
UR_APIEXPORT ur_result_t UR_APICALL
urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t *pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_kernel_arg_mem_obj_properties_t *pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
);

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -7418,7 +7418,7 @@ typedef struct ur_kernel_set_arg_sampler_params_t {
typedef struct ur_kernel_set_arg_mem_obj_params_t {
ur_kernel_handle_t *phKernel;
uint32_t *pargIndex;
const ur_mem_obj_properties_t **ppProperties;
const ur_kernel_arg_mem_obj_properties_t **ppProperties;
ur_mem_handle_t *phArgValue;
} ur_kernel_set_arg_mem_obj_params_t;

Expand Down
2 changes: 1 addition & 1 deletion include/ur_ddi.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgSampler_t)(
typedef ur_result_t(UR_APICALL *ur_pfnKernelSetArgMemObj_t)(
ur_kernel_handle_t,
uint32_t,
const ur_mem_obj_properties_t *,
const ur_kernel_arg_mem_obj_properties_t *,
ur_mem_handle_t);

///////////////////////////////////////////////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion scripts/core/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ etors:
- name: EXP_SAMPLER_MIP_PROPERTIES
desc: $x_exp_sampler_mip_properties_t
- name: MEM_OBJ_PROPERTIES
desc: $x_mem_obj_properties_t
desc: $x_kernel_arg_mem_obj_properties_t
--- #--------------------------------------------------------------------------
type: struct
desc: "Base for all properties types"
Expand Down
4 changes: 2 additions & 2 deletions scripts/core/kernel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ returns:
type: struct
desc: "Properties for for $xKernelSetArgMemObj."
class: $xKernel
name: $x_mem_obj_properties_t
name: $x_kernel_arg_mem_obj_properties_t
base: $x_base_properties_t
members:
- type: $x_mem_flags_t
Expand All @@ -382,7 +382,7 @@ params:
- type: "uint32_t"
name: argIndex
desc: "[in] argument index in range [0, num args - 1]"
- type: "const $x_mem_obj_properties_t*"
- type: "const $x_kernel_arg_mem_obj_properties_t*"
name: pProperties
desc: "[in][optional] pointer to Memory object properties."
- type: "$x_mem_handle_t"
Expand Down
2 changes: 1 addition & 1 deletion source/adapters/null/ur_nullddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1951,7 +1951,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler(
__urdlllocal ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) try {
Expand Down
16 changes: 9 additions & 7 deletions source/common/ur_params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,9 @@ inline std::ostream &operator<<(std::ostream &os,
enum ur_kernel_cache_config_t value);
inline std::ostream &operator<<(std::ostream &os,
enum ur_kernel_exec_info_t value);
inline std::ostream &operator<<(std::ostream &os,
const struct ur_mem_obj_properties_t params);
inline std::ostream &
operator<<(std::ostream &os,
const struct ur_kernel_arg_mem_obj_properties_t params);
inline std::ostream &
operator<<(std::ostream &os, const struct ur_kernel_native_properties_t params);
inline std::ostream &operator<<(std::ostream &os, enum ur_queue_info_t value);
Expand Down Expand Up @@ -946,8 +947,8 @@ inline void serializeStruct(std::ostream &os, const void *ptr) {
} break;

case UR_STRUCTURE_TYPE_MEM_OBJ_PROPERTIES: {
const ur_mem_obj_properties_t *pstruct =
(const ur_mem_obj_properties_t *)ptr;
const ur_kernel_arg_mem_obj_properties_t *pstruct =
(const ur_kernel_arg_mem_obj_properties_t *)ptr;
ur_params::serializePtr(os, pstruct);
} break;
default:
Expand Down Expand Up @@ -7252,9 +7253,10 @@ inline void serializeTagged(std::ostream &os, const void *ptr,
}
}
} // namespace ur_params
inline std::ostream &operator<<(std::ostream &os,
const struct ur_mem_obj_properties_t params) {
os << "(struct ur_mem_obj_properties_t){";
inline std::ostream &
operator<<(std::ostream &os,
const struct ur_kernel_arg_mem_obj_properties_t params) {
os << "(struct ur_kernel_arg_mem_obj_properties_t){";

os << ".stype = ";

Expand Down
2 changes: 1 addition & 1 deletion source/loader/layers/tracing/ur_trcddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler(
__urdlllocal ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) {
Expand Down
2 changes: 1 addition & 1 deletion source/loader/layers/validation/ur_valddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler(
__urdlllocal ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) {
Expand Down
2 changes: 1 addition & 1 deletion source/loader/ur_ldrddi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgSampler(
__urdlllocal ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) {
Expand Down
2 changes: 1 addition & 1 deletion source/loader/ur_libapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3021,7 +3021,7 @@ ur_result_t UR_APICALL urKernelSetArgSampler(
ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) try {
Expand Down
2 changes: 1 addition & 1 deletion source/ur_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,7 @@ ur_result_t UR_APICALL urKernelSetArgSampler(
ur_result_t UR_APICALL urKernelSetArgMemObj(
ur_kernel_handle_t hKernel, ///< [in] handle of the kernel object
uint32_t argIndex, ///< [in] argument index in range [0, num args - 1]
const ur_mem_obj_properties_t
const ur_kernel_arg_mem_obj_properties_t
*pProperties, ///< [in][optional] pointer to Memory object properties.
ur_mem_handle_t hArgValue ///< [in][optional] handle of Memory object.
) {
Expand Down

0 comments on commit 8539350

Please sign in to comment.