[python-arrayfire] 45/58: Adding get_size_of

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Sep 28 13:57:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository python-arrayfire.

commit 4b3369f664453c27a79a223dac3432b22bcc35f8
Author: Pavan Yalamanchili <contact at pavanky.com>
Date:   Fri Sep 23 16:15:03 2016 -0700

    Adding get_size_of
---
 arrayfire/library.py | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arrayfire/library.py b/arrayfire/library.py
index fc76c9f..c054162 100644
--- a/arrayfire/library.py
+++ b/arrayfire/library.py
@@ -671,4 +671,12 @@ def get_device_id(A):
     safe_call(backend.get().af_get_device_id(ct.pointer(device_id), A.arr))
     return device_id
 
+def get_size_of(dtype):
+    """
+    Get the size of the type represented by arrayfire.Dtype
+    """
+    size = ct.c_size_t(0)
+    safe_call(backend.get().af_get_size_of(ct.pointer(size), dtype.value))
+    return size.value
+
 from .util import safe_call

-- 
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