Skip to content

Commit a9be255

Browse files
committed
Functions to check if arrayfire has imageio and lapack support
1 parent 842e427 commit a9be255

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

arrayfire/image.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ def transform(image, trans_mat, odim0 = 0, odim1 = 0, method=INTERP.NEAREST, is_
208208
method.value, is_inverse))
209209
return output
210210

211+
211212
def rotate(image, theta, is_crop = True, method = INTERP.NEAREST):
212213
"""
213214
Rotate an image.
@@ -1154,3 +1155,11 @@ def rgb2ycbcr(image, standard=YCC_STD.BT_601):
11541155
out = Array()
11551156
safe_call(backend.get().af_rgb2ycbcr(ct.pointer(out.arr), image.arr, standard.value))
11561157
return out
1158+
1159+
def is_image_io_available():
1160+
"""
1161+
Function to check if the arrayfire library was built with Image IO support.
1162+
"""
1163+
res = ct.c_bool(False)
1164+
safe_call(backend.get().af_is_image_io_available(ct.pointer(res)))
1165+
return res.value

arrayfire/lapack.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,3 +408,11 @@ def svd_inplace(A):
408408
safe_call(backend.get().af_svd_inplace(ct.pointer(U.arr), ct.pointer(S.arr), ct.pointer(Vt.arr),
409409
A.arr))
410410
return U, S, Vt
411+
412+
def is_lapack_available():
413+
"""
414+
Function to check if the arrayfire library was built with lapack support.
415+
"""
416+
res = ct.c_bool(False)
417+
safe_call(backend.get().af_is_lapack_available(ct.pointer(res)))
418+
return res.value

0 commit comments

Comments
 (0)