its a 64bit dll, posting code I have so far (though doesn't work)
require 'dll'
pD_z_ =: 1!:2&2
cocurrent 'af'
pD 'Arrayfire libpath set to: ' ;libAFpath =: IFWIN pick '';'D:\Program
Files\ArrayFire\v3\lib'
libAFmainlib =: libAFpath , (IFIOS + (;: 'Win Linux Android Darwin') i.
<UNAME_z_) pick '\afcpu.dll'; ('afcpu.so';'/system/lib/afcpu.so'), (2 $
<'/usr/lib/afcpu.dylib ')
libAF =: 1 : '(libAFmainlib , '' '' , m)&cd'
cdparse =: 4 : '(y) =: (y , '' '' , x) libAF label_. 1'&>/"1
cdparse DT =: dltb leaf ((':' {.@:cut [), {.@:('('&cut)@])&>/"1 ] 2 {."1 (9{a.)
cut every cutLF 0 : 0
n *c *c *c *c : void deviceInfo(char *d_name, char *d_platform, char
*d_toolkit, char *d_compute)
n *c *c *c *c : af_err af_device_info(char* d_name, char* d_platform, char
*d_toolkit, char* d_compute)
i i : af_err af_get_device_count( int * num_of_devices )
i n : AFAPI int getDeviceCount()
i n : AFAPI af_err af_info()
i n : AFAPI af_err af_init()
i i : af_err af_sync(const int device)
i *i : af_err af_free_device(void *ptr)
i i : af_err af_set_device( const int device )
i *i : af_err af_get_device( int * device )
i *i i :af_err af_get_dbl_support (bool *available, const int device)
i *i *i *i *i :af_err af_device_mem_info (size_t *alloc_bytes, size_t
*alloc_buffers, size_t *lock_bytes, size_t *lock_buffers)
i n :af_err af_device_gc ()
)
cocurrent 'z'
cders_z_ =: cder ; cderx
creates
af_get_device_count_af_ NB. 3rd line in multiline noun
'D:\Program Files\ArrayFire\v3\lib\afcpu.dll af_get_device_count i *i'&cd
perhaps relevant af_err (return value) is an enum
n =. 0
af_get_device_count_af_ n
|domain error: cd
cders ''
┌───┬─┬───────────────────────────────────────┐
│5 0│0│The operation completed successfully. │
└───┴─┴───────────────────────────────────────┘
Does 5 0 on cder mean the return value signature is invalid or the first
parameter?
I've fiddled with signature, but always get 5 0 error.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm