Skip to content

Commit 3f7f99c

Browse files
authored
Merge pull request #720 from veselypeta/petr/add-nocheck-to-native-handle
[UR] Add nocheck to native handle types
2 parents 3c6f02c + dd0a598 commit 3f7f99c

File tree

16 files changed

+158
-198
lines changed

16 files changed

+158
-198
lines changed

include/ur_api.h

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -758,13 +758,11 @@ typedef struct ur_platform_native_properties_t {
758758
/// - ::UR_RESULT_ERROR_UNINITIALIZED
759759
/// - ::UR_RESULT_ERROR_DEVICE_LOST
760760
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
761-
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
762-
/// + `NULL == hNativePlatform`
763761
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
764762
/// + `NULL == phPlatform`
765763
UR_APIEXPORT ur_result_t UR_APICALL
766764
urPlatformCreateWithNativeHandle(
767-
ur_native_handle_t hNativePlatform, ///< [in] the native handle of the platform.
765+
ur_native_handle_t hNativePlatform, ///< [in][nocheck] the native handle of the platform.
768766
const ur_platform_native_properties_t *pProperties, ///< [in][optional] pointer to native platform properties struct.
769767
ur_platform_handle_t *phPlatform ///< [out] pointer to the handle of the platform object created.
770768
);
@@ -1564,13 +1562,12 @@ typedef struct ur_device_native_properties_t {
15641562
/// - ::UR_RESULT_ERROR_DEVICE_LOST
15651563
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
15661564
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
1567-
/// + `NULL == hNativeDevice`
15681565
/// + `NULL == hPlatform`
15691566
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
15701567
/// + `NULL == phDevice`
15711568
UR_APIEXPORT ur_result_t UR_APICALL
15721569
urDeviceCreateWithNativeHandle(
1573-
ur_native_handle_t hNativeDevice, ///< [in] the native handle of the device.
1570+
ur_native_handle_t hNativeDevice, ///< [in][nocheck] the native handle of the device.
15741571
ur_platform_handle_t hPlatform, ///< [in] handle of the platform instance
15751572
const ur_device_native_properties_t *pProperties, ///< [in][optional] pointer to native device properties struct.
15761573
ur_device_handle_t *phDevice ///< [out] pointer to the handle of the device object created.
@@ -1899,14 +1896,12 @@ typedef struct ur_context_native_properties_t {
18991896
/// - ::UR_RESULT_ERROR_UNINITIALIZED
19001897
/// - ::UR_RESULT_ERROR_DEVICE_LOST
19011898
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
1902-
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
1903-
/// + `NULL == hNativeContext`
19041899
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
19051900
/// + `NULL == phDevices`
19061901
/// + `NULL == phContext`
19071902
UR_APIEXPORT ur_result_t UR_APICALL
19081903
urContextCreateWithNativeHandle(
1909-
ur_native_handle_t hNativeContext, ///< [in] the native handle of the context.
1904+
ur_native_handle_t hNativeContext, ///< [in][nocheck] the native handle of the context.
19101905
uint32_t numDevices, ///< [in] number of devices associated with the context
19111906
const ur_device_handle_t *phDevices, ///< [in][range(0, numDevices)] list of devices associated with the context
19121907
const ur_context_native_properties_t *pProperties, ///< [in][optional] pointer to native context properties struct
@@ -2377,13 +2372,12 @@ typedef struct ur_mem_native_properties_t {
23772372
/// - ::UR_RESULT_ERROR_DEVICE_LOST
23782373
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
23792374
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
2380-
/// + `NULL == hNativeMem`
23812375
/// + `NULL == hContext`
23822376
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
23832377
/// + `NULL == phMem`
23842378
UR_APIEXPORT ur_result_t UR_APICALL
23852379
urMemBufferCreateWithNativeHandle(
2386-
ur_native_handle_t hNativeMem, ///< [in] the native handle to the memory.
2380+
ur_native_handle_t hNativeMem, ///< [in][nocheck] the native handle to the memory.
23872381
ur_context_handle_t hContext, ///< [in] handle of the context object.
23882382
const ur_mem_native_properties_t *pProperties, ///< [in][optional] pointer to native memory creation properties.
23892383
ur_mem_handle_t *phMem ///< [out] pointer to handle of buffer memory object created.
@@ -2403,15 +2397,14 @@ urMemBufferCreateWithNativeHandle(
24032397
/// - ::UR_RESULT_ERROR_DEVICE_LOST
24042398
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
24052399
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
2406-
/// + `NULL == hNativeMem`
24072400
/// + `NULL == hContext`
24082401
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
24092402
/// + `NULL == pImageFormat`
24102403
/// + `NULL == pImageDesc`
24112404
/// + `NULL == phMem`
24122405
UR_APIEXPORT ur_result_t UR_APICALL
24132406
urMemImageCreateWithNativeHandle(
2414-
ur_native_handle_t hNativeMem, ///< [in] the native handle to the memory.
2407+
ur_native_handle_t hNativeMem, ///< [in][nocheck] the native handle to the memory.
24152408
ur_context_handle_t hContext, ///< [in] handle of the context object.
24162409
const ur_image_format_t *pImageFormat, ///< [in] pointer to image format specification.
24172410
const ur_image_desc_t *pImageDesc, ///< [in] pointer to image description.
@@ -2740,13 +2733,12 @@ typedef struct ur_sampler_native_properties_t {
27402733
/// - ::UR_RESULT_ERROR_DEVICE_LOST
27412734
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
27422735
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
2743-
/// + `NULL == hNativeSampler`
27442736
/// + `NULL == hContext`
27452737
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
27462738
/// + `NULL == phSampler`
27472739
UR_APIEXPORT ur_result_t UR_APICALL
27482740
urSamplerCreateWithNativeHandle(
2749-
ur_native_handle_t hNativeSampler, ///< [in] the native handle of the sampler.
2741+
ur_native_handle_t hNativeSampler, ///< [in][nocheck] the native handle of the sampler.
27502742
ur_context_handle_t hContext, ///< [in] handle of the context object
27512743
const ur_sampler_native_properties_t *pProperties, ///< [in][optional] pointer to native sampler properties struct.
27522744
ur_sampler_handle_t *phSampler ///< [out] pointer to the handle of the sampler object created.
@@ -4073,13 +4065,12 @@ typedef struct ur_program_native_properties_t {
40734065
/// - ::UR_RESULT_ERROR_DEVICE_LOST
40744066
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
40754067
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4076-
/// + `NULL == hNativeProgram`
40774068
/// + `NULL == hContext`
40784069
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
40794070
/// + `NULL == phProgram`
40804071
UR_APIEXPORT ur_result_t UR_APICALL
40814072
urProgramCreateWithNativeHandle(
4082-
ur_native_handle_t hNativeProgram, ///< [in] the native handle of the program.
4073+
ur_native_handle_t hNativeProgram, ///< [in][nocheck] the native handle of the program.
40834074
ur_context_handle_t hContext, ///< [in] handle of the context instance
40844075
const ur_program_native_properties_t *pProperties, ///< [in][optional] pointer to native program properties struct.
40854076
ur_program_handle_t *phProgram ///< [out] pointer to the handle of the program object created.
@@ -4653,14 +4644,13 @@ typedef struct ur_kernel_native_properties_t {
46534644
/// - ::UR_RESULT_ERROR_DEVICE_LOST
46544645
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
46554646
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4656-
/// + `NULL == hNativeKernel`
46574647
/// + `NULL == hContext`
46584648
/// + `NULL == hProgram`
46594649
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
46604650
/// + `NULL == phKernel`
46614651
UR_APIEXPORT ur_result_t UR_APICALL
46624652
urKernelCreateWithNativeHandle(
4663-
ur_native_handle_t hNativeKernel, ///< [in] the native handle of the kernel.
4653+
ur_native_handle_t hNativeKernel, ///< [in][nocheck] the native handle of the kernel.
46644654
ur_context_handle_t hContext, ///< [in] handle of the context object
46654655
ur_program_handle_t hProgram, ///< [in] handle of the program associated with the kernel
46664656
const ur_kernel_native_properties_t *pProperties, ///< [in][optional] pointer to native kernel properties struct
@@ -4946,14 +4936,13 @@ typedef struct ur_queue_native_properties_t {
49464936
/// - ::UR_RESULT_ERROR_DEVICE_LOST
49474937
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
49484938
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
4949-
/// + `NULL == hNativeQueue`
49504939
/// + `NULL == hContext`
49514940
/// + `NULL == hDevice`
49524941
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
49534942
/// + `NULL == phQueue`
49544943
UR_APIEXPORT ur_result_t UR_APICALL
49554944
urQueueCreateWithNativeHandle(
4956-
ur_native_handle_t hNativeQueue, ///< [in] the native handle of the queue.
4945+
ur_native_handle_t hNativeQueue, ///< [in][nocheck] the native handle of the queue.
49574946
ur_context_handle_t hContext, ///< [in] handle of the context object
49584947
ur_device_handle_t hDevice, ///< [in] handle of the device object
49594948
const ur_queue_native_properties_t *pProperties, ///< [in][optional] pointer to native queue properties struct
@@ -5308,13 +5297,12 @@ typedef struct ur_event_native_properties_t {
53085297
/// - ::UR_RESULT_ERROR_DEVICE_LOST
53095298
/// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
53105299
/// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
5311-
/// + `NULL == hNativeEvent`
53125300
/// + `NULL == hContext`
53135301
/// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
53145302
/// + `NULL == phEvent`
53155303
UR_APIEXPORT ur_result_t UR_APICALL
53165304
urEventCreateWithNativeHandle(
5317-
ur_native_handle_t hNativeEvent, ///< [in] the native handle of the event.
5305+
ur_native_handle_t hNativeEvent, ///< [in][nocheck] the native handle of the event.
53185306
ur_context_handle_t hContext, ///< [in] handle of the context object
53195307
const ur_event_native_properties_t *pProperties, ///< [in][optional] pointer to native event properties struct
53205308
ur_event_handle_t *phEvent ///< [out] pointer to the handle of the event object created.

scripts/core/context.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ params:
224224
- type: $x_native_handle_t
225225
name: hNativeContext
226226
desc: |
227-
[in] the native handle of the context.
227+
[in][nocheck] the native handle of the context.
228228
- type: uint32_t
229229
name: numDevices
230230
desc: "[in] number of devices associated with the context"

scripts/core/device.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ details:
758758
params:
759759
- type: $x_native_handle_t
760760
name: hNativeDevice
761-
desc: "[in] the native handle of the device."
761+
desc: "[in][nocheck] the native handle of the device."
762762
- type: $x_platform_handle_t
763763
name: hPlatform
764764
desc: "[in] handle of the platform instance"

scripts/core/event.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ params:
294294
- type: $x_native_handle_t
295295
name: hNativeEvent
296296
desc: |
297-
[in] the native handle of the event.
297+
[in][nocheck] the native handle of the event.
298298
- type: $x_context_handle_t
299299
name: hContext
300300
desc: "[in] handle of the context object"

scripts/core/kernel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ params:
515515
- type: $x_native_handle_t
516516
name: hNativeKernel
517517
desc: |
518-
[in] the native handle of the kernel.
518+
[in][nocheck] the native handle of the kernel.
519519
- type: $x_context_handle_t
520520
name: hContext
521521
desc: "[in] handle of the context object"

scripts/core/memory.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ details:
463463
params:
464464
- type: $x_native_handle_t
465465
name: hNativeMem
466-
desc: "[in] the native handle to the memory."
466+
desc: "[in][nocheck] the native handle to the memory."
467467
- type: $x_context_handle_t
468468
name: hContext
469469
desc: "[in] handle of the context object."
@@ -487,7 +487,7 @@ details:
487487
params:
488488
- type: $x_native_handle_t
489489
name: hNativeMem
490-
desc: "[in] the native handle to the memory."
490+
desc: "[in][nocheck] the native handle to the memory."
491491
- type: $x_context_handle_t
492492
name: hContext
493493
desc: "[in] handle of the context object."

scripts/core/platform.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ details:
188188
params:
189189
- type: $x_native_handle_t
190190
name: hNativePlatform
191-
desc: "[in] the native handle of the platform."
191+
desc: "[in][nocheck] the native handle of the platform."
192192
- type: const $x_platform_native_properties_t*
193193
name: pProperties
194194
desc: "[in][optional] pointer to native platform properties struct."

scripts/core/program.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ details:
541541
params:
542542
- type: $x_native_handle_t
543543
name: hNativeProgram
544-
desc: "[in] the native handle of the program."
544+
desc: "[in][nocheck] the native handle of the program."
545545
- type: $x_context_handle_t
546546
name: hContext
547547
desc: "[in] handle of the context instance"

scripts/core/queue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ params:
272272
- type: $x_native_handle_t
273273
name: hNativeQueue
274274
desc: |
275-
[in] the native handle of the queue.
275+
[in][nocheck] the native handle of the queue.
276276
- type: $x_context_handle_t
277277
name: hContext
278278
desc: "[in] handle of the context object"

scripts/core/sampler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ details:
221221
params:
222222
- type: $x_native_handle_t
223223
name: hNativeSampler
224-
desc: "[in] the native handle of the sampler."
224+
desc: "[in][nocheck] the native handle of the sampler."
225225
- type: $x_context_handle_t
226226
name: hContext
227227
desc: "[in] handle of the context object"

0 commit comments

Comments
 (0)