[python-arrayfire] 217/250: Improving the documentation of raw_ptr() and device_ptr()
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Mar 28 22:59:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository python-arrayfire.
commit f18515f710b2d385f4aed957d42bd3e1533dbbf3
Author: Filipe Maia <filipe.c.maia at gmail.com>
Date: Sun Feb 14 16:14:09 2016 +0100
Improving the documentation of raw_ptr() and device_ptr()
---
arrayfire/array.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arrayfire/array.py b/arrayfire/array.py
index d413a2d..40a0fcd 100644
--- a/arrayfire/array.py
+++ b/arrayfire/array.py
@@ -489,7 +489,8 @@ class Array(BaseArray):
----
- This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
- No other arrays will share the same device pointer.
- - If multiple arrays share the same memory a copy of the memory is done and a pointer to the new copy is returned.
+ - A copy of the memory is done if multiple arrays share the same memory or the array is not the owner of the memory.
+ - In case of a copy the return value points to the newly allocated memory which is now exclusively owned by the array.
"""
ptr = ct.c_void_p(0)
backend.get().af_get_device_ptr(ct.pointer(ptr), self.arr)
@@ -509,6 +510,8 @@ class Array(BaseArray):
- This can be used to integrate with custom C code and / or PyCUDA or PyOpenCL.
- No mem copy is peformed, this function returns the raw device pointer.
- This pointer may be shared with other arrays. Use this function with caution.
+ - In particular the JIT compiler will not be aware of the shared arrays.
+ - This results in JITed operations not being immediately visible through the other array.
"""
ptr = ct.c_void_p(0)
backend.get().af_get_raw_ptr(ct.pointer(ptr), self.arr)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-arrayfire.git
More information about the debian-science-commits
mailing list