Skip to content

Commit 6d5ba4c

Browse files
committed
Improved wording of setKernelArgValue
This identifies that the data pointed to needs to be copied.
1 parent 78c003e commit 6d5ba4c

File tree

8 files changed

+10
-1
lines changed

8 files changed

+10
-1
lines changed

include/ur_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4785,6 +4785,7 @@ urKernelSetArgValue(
47854785
size_t argSize, ///< [in] size of argument type
47864786
const ur_kernel_arg_value_properties_t *pProperties, ///< [in][optional] pointer to value properties.
47874787
const void *pArgValue ///< [in] argument value represented as matching arg type.
4788+
///< The data pointed to will be copied and therefore can be reused on return.
47884789
);
47894790

47904791
///////////////////////////////////////////////////////////////////////////////

scripts/core/kernel.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ params:
6464
desc: "[in][optional] pointer to value properties."
6565
- type: "const void*"
6666
name: pArgValue
67-
desc: "[in] argument value represented as matching arg type."
67+
desc: |
68+
[in] argument value represented as matching arg type.
69+
The data pointed to will be copied and therefore can be reused on return.
6870
returns:
6971
- $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX
7072
- $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE

source/adapters/mock/ur_mockddi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,6 +3864,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue(
38643864
*pProperties, ///< [in][optional] pointer to value properties.
38653865
const void
38663866
*pArgValue ///< [in] argument value represented as matching arg type.
3867+
///< The data pointed to will be copied and therefore can be reused on return.
38673868
) try {
38683869
ur_result_t result = UR_RESULT_SUCCESS;
38693870

source/loader/layers/tracing/ur_trcddi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2943,6 +2943,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue(
29432943
*pProperties, ///< [in][optional] pointer to value properties.
29442944
const void
29452945
*pArgValue ///< [in] argument value represented as matching arg type.
2946+
///< The data pointed to will be copied and therefore can be reused on return.
29462947
) {
29472948
auto pfnSetArgValue = getContext()->urDdiTable.Kernel.pfnSetArgValue;
29482949

source/loader/layers/validation/ur_valddi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3350,6 +3350,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue(
33503350
*pProperties, ///< [in][optional] pointer to value properties.
33513351
const void
33523352
*pArgValue ///< [in] argument value represented as matching arg type.
3353+
///< The data pointed to will be copied and therefore can be reused on return.
33533354
) {
33543355
auto pfnSetArgValue = getContext()->urDdiTable.Kernel.pfnSetArgValue;
33553356

source/loader/ur_ldrddi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3138,6 +3138,7 @@ __urdlllocal ur_result_t UR_APICALL urKernelSetArgValue(
31383138
*pProperties, ///< [in][optional] pointer to value properties.
31393139
const void
31403140
*pArgValue ///< [in] argument value represented as matching arg type.
3141+
///< The data pointed to will be copied and therefore can be reused on return.
31413142
) {
31423143
ur_result_t result = UR_RESULT_SUCCESS;
31433144

source/loader/ur_libapi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,6 +3646,7 @@ ur_result_t UR_APICALL urKernelSetArgValue(
36463646
*pProperties, ///< [in][optional] pointer to value properties.
36473647
const void
36483648
*pArgValue ///< [in] argument value represented as matching arg type.
3649+
///< The data pointed to will be copied and therefore can be reused on return.
36493650
) try {
36503651
auto pfnSetArgValue =
36513652
ur_lib::getContext()->urDdiTable.Kernel.pfnSetArgValue;

source/ur_api.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3113,6 +3113,7 @@ ur_result_t UR_APICALL urKernelSetArgValue(
31133113
*pProperties, ///< [in][optional] pointer to value properties.
31143114
const void
31153115
*pArgValue ///< [in] argument value represented as matching arg type.
3116+
///< The data pointed to will be copied and therefore can be reused on return.
31163117
) {
31173118
ur_result_t result = UR_RESULT_SUCCESS;
31183119
return result;

0 commit comments

Comments
 (0)