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):
489489 ----
490490 - This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
491491 - 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.
493494 """
494495 ptr = ct .c_void_p (0 )
495496 backend .get ().af_get_device_ptr (ct .pointer (ptr ), self .arr )
@@ -509,6 +510,8 @@ def raw_ptr(self):
509510 - This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
510511 - No mem copy is peformed, this function returns the raw device pointer.
511512 - 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.
512515 """
513516 ptr = ct .c_void_p (0 )
514517 backend .get ().af_get_raw_ptr (ct .pointer (ptr ), self .arr )
You can’t perform that action at this time.
0 commit comments