Skip to content

Switch to functional backend #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions arrayfire/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,23 @@ def __init__(self):
except:
pass

c_dim4 = c_dim_t*4

out = c_dim_t(0)
dims = c_dim4(10, 10, 10, 10)

for key, value in self.__clibs:
err = value.af_randu(ct.pointer(out), 4, ct.pointer(dims), 0)
if (err == ERR.NONE.value):
if (self.__name != key):
self.__name = key
break
else:
self.__name = None
pass

if (self.__name is None):
raise RuntimeError("Could not load any ArrayFire libraries.\n" +
more_info_str)
raise RuntimeError("Could not load any ArrayFire libraries.\n" + more_info_str)

def get_id(self, name):
return self.__backend_name_map[name]
Expand Down