An interface suggestion would be to transform all verbs that currently take 2 boxed arguments into unboxed dyad arguments.
this can be done by adding the adverb (@:;) for the dop class verbs. and (@:;~) for the reduce class verbs such that the operating axis is the x term. The reduce class could have the additional adverb (0&$: : ) to make supplying the axis an optional parameter. The explicitly constructed functions in arrayfire.ijs that take 2 boxed y parameters (matmul) can also be decorated with (@: ;) These changes would more naturally leverage J's processing/modifier capabilities, and processing list of arrayfire array handles. Arrayfire sparse support seems to be limited to rank 2 arrays. J could circumvent these limitations by shaping multiple arrayfire handles managing the nesting logic in J instead. There are many uses of arrayfire that are made easier with a list of array handles. On Tuesday, January 25, 2022, 04:39:36 p.m. EST, Eric Iverson <eric.b.iver...@gmail.com> wrote: Pascal, Thanks for the feedback. Coming from you, it means a lot to me. There are some rough edges for windows and mac (I work mostly in linux) that I will fix tomorrow morning. On Tue, Jan 25, 2022 at 3:52 PM 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > looks good. A small bug: > > if you define > > reduce_z_ =: ]: NB. adverb > > prior to loading arrayfire.ijs > > load will fail. > > The reason is the families.ijs file creates a bunch of forks with their > middle verbs defined after the forks are created. > > An easy fix is to define all of the explicit verbs used in families.ijs > above the line that "require families.ijs" > > > fixed it for me. > > > > On Tuesday, January 25, 2022, 10:56:54 a.m. EST, Eric Iverson < > eric.b.iver...@gmail.com> wrote: > > > > > > ~addons/math/arrayfire is a new addon for J903 and later. > > The addon allows high performance computing of matrix product > and many other mathematical array operations. Multiple cpu > cores and hardware such as Nvidia gpus are used as appropriate. > > Browse https://arrayfire.org for more info. > > The addon will prompt you for the ArrayFire software install if > it is not already installed. > > Use pacman to install the addon. For example, > load'pacman' > 'install' jpkg 'math/arrayfire' > > Get started: > load '~addons/math/arrayfire/arrayfire.ijs' > man_jaf_ 'intro' > ... > init_jaf_ 'cpu' > tut_jaf_ 'basic' NB. run basic tutorial > ... > man_jaf_ 'credits' NB. credit to some J-ArrayFire pioneers > ... > > *** preliminary version > We think this is an important step for J in high performance computing. > If this proves to be the case, Jsoftware will actively pursue further > development in this area. > > *** from the addon description > cd bindings and utilities for ArrayFire shared library > > https://arrayfire.org > > "ArrayFire is a high performance software library for > parallel computing with an easy-to-use API. Its array based > function set makes parallel programming more accessible." > > J-ArrayFire cd bindings make it easy to have > high performance computing for things like matrix multiply > with cpu cores, Nvidia gpus, and opencl. > *** > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm