Woudln't the more accurate example of APL on the GPU be co-dfns?<p>Is there a way to make J target the GPU? I feel like APL stuff is more limiting because it invariably results in paying Dyalog for a toolkit (which severely limits my ability to use it at work).
Looks very interesting :) but I can't quite find out what is going on on the GPU. What GPU operations are executed for a sample program which contains various (scalar, vector, applying to different sizes and shapes etc.) operators?
Really what does this have to do with APL ( Ken Iverson )??<p><i></i>*<p>This is NOT APL.<p>Futhark is a functional language, we will start with the obligatory factorial program:<p>fun fact (n: i32): i32 = reduce (<i>) 1 (map (1+) (iota n))<p></i><i></i><p>This has nothing to do with APL.<p>Perhaps a more apt title would be "Python for the GPU".j<p><i></i>*<p>There is a paper on this subject, where an APL interpreter is written in FUTARK, but then most compilers are written in C. In reality the technology in question is Futark on GPU.<p><a href="https://futhark-lang.org/publications/fhpc16.pdf" rel="nofollow">https://futhark-lang.org/publications/fhpc16.pdf</a>