Yes, harmless to quote lib even if it contains no spaces. Вт, 22 сен 2015, jprogramming написал(а): > if lib contains space > '"lib" af_get_device_count > i *i'&cd <n=. ,_1 > > thanks bill, that was it. > > '"D:/Program Files/ArrayFire/v3/lib/afcpu.dll" af_get_device_count i *i'&cd > <,n=. 1 > > I assume that its always safe to quote a path specificied dll/library (on > windows)? > > > > ----- Original Message ----- > From: bill lam <[email protected]> > To: 'Pascal Jasmin' via Programming <[email protected]> > Cc: > Sent: Monday, September 21, 2015 10:20 PM > Subject: Re: [Jprogramming] dll error passing pointer to integer > > assume type of af_err is int and type of size_t is long > > > n *c *c *c *c : void deviceInfo(char *d_name, char *d_platform, char > > *d_toolkit, char *d_compute) > > i *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 x : 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 *x *x *x *x :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 () > > thus try, > 'lib af_get_device_count > i *i'&cd <n=. ,_1 > if lib contains space > '"lib" af_get_device_count > i *i'&cd <n=. ,_1 > > Пн, 21 сен 2015, jprogramming написал(а): > > 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 > > -- > regards, > ==================================================== > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm
-- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 gpg --keyserver subkeys.pgp.net --armor --export 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
