The arrayfire libraries have mapped out a lot of territory, but in many areas the implementation is far from complete. In general short-float is the most supported data type. What works and doesn't work varies across backend (cpu/cuda/opencl) and across OS/hardware. I have not seen any documentation on this so you pretty much have to try it. In your example, LASTERROR would have said something like 'unsupported data type'.
On Thu, Feb 3, 2022 at 1:33 AM William Szuch <[email protected]> wrote: > Multiplication of an integer array I get an error: > > AAA =: af_create_array_jaf_ i. 4 4 > get_jaf_ AAA > 0 1 2 3 > 4 5 6 7 > 8 9 10 11 > 12 13 14 15 > AAAA =: af_matmul_jaf_ AAA,AAA > |af cd call error result: assert > | 'af cd call error result' assert 0[LASTERROR=:(":0{::r),' ',(x{.~x i.' > '),' ',af_err_to_string 0{::r > |[-2] > > Whereas the following works > > AAA =: af_create_array_jaf_ 1.0* i. 4 4 > get_jaf_ AAA > 0 1 2 3 > 4 5 6 7 > 8 9 10 11 > 12 13 14 15 > AAAA =: af_matmul_jaf_ AAA,AAA > get_jaf_ AAAA > 56 62 68 74 > 152 174 196 218 > 248 286 324 362 > 344 398 452 506 > > Do arrays have to be non-integer? > > Regards > > Bill Szuch > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
