File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -489,7 +489,8 @@ def device_ptr(self):
489
489
----
490
490
- This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
491
491
- No other arrays will share the same device pointer.
492
- - If multiple arrays share the same memory a copy of the memory is done and a pointer to the new copy is returned.
492
+ - A copy of the memory is done if multiple arrays share the same memory or the array is not the owner of the memory.
493
+ - In case of a copy the return value points to the newly allocated memory which is now exclusively owned by the array.
493
494
"""
494
495
ptr = ct .c_void_p (0 )
495
496
backend .get ().af_get_device_ptr (ct .pointer (ptr ), self .arr )
@@ -509,6 +510,8 @@ def raw_ptr(self):
509
510
- This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
510
511
- No mem copy is peformed, this function returns the raw device pointer.
511
512
- This pointer may be shared with other arrays. Use this function with caution.
513
+ - In particular the JIT compiler will not be aware of the shared arrays.
514
+ - This results in JITed operations not being immediately visible through the other array.
512
515
"""
513
516
ptr = ct .c_void_p (0 )
514
517
backend .get ().af_get_raw_ptr (ct .pointer (ptr ), self .arr )
You can’t perform that action at this time.
0 commit comments