Skip to content

Commit d385b4d

Browse files
committed
Function to get the current revision of arrayfire
1 parent a1f48ac commit d385b4d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arrayfire/util.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,21 @@ def safe_call(af_error):
7575
raise RuntimeError(to_str(err_str), af_error)
7676

7777
def get_version():
78+
"""
79+
Function to get the version of arrayfire.
80+
"""
7881
major=ct.c_int(0)
7982
minor=ct.c_int(0)
8083
patch=ct.c_int(0)
8184
safe_call(backend.get().af_get_version(ct.pointer(major), ct.pointer(minor), ct.pointer(patch)))
8285
return major.value,minor.value,patch.value
8386

87+
def get_reversion():
88+
"""
89+
Function to get the revision hash of the library.
90+
"""
91+
return to_str(backend.get().af_get_revision())
92+
8493
to_dtype = {'f' : Dtype.f32,
8594
'd' : Dtype.f64,
8695
'b' : Dtype.b8,

0 commit comments

Comments
 (0)