7

Is there a way to get J to use multiple cores ? I thought part of the benefit of APL/J was that the language constructs lent themselves well to parallel solutions.

Looking at my CPU usage (I'm on OSX) there's clearly only a single processor in use.

I've got a heavy-ish function f acting on a list, and I don't see why it couldn't divide the list into 4 pieces, and re-assemble the results ?

user1202733
  • 623
  • 4
  • 10
  • Unfortunately no, but if you've written your solution in array-oriented way, you can run multiple instances of your program for different segments of your arrays. – Eelvex Mar 29 '15 at 20:03
  • 2
    That's a pity. Does any dialect of APL run multi-core ? – user1202733 Mar 29 '15 at 20:09
  • I ran into basically the same problem, so I took a bit more of a radical approach, I decided to write a compiler for a language that is basically J. The goals include multi-core support, GPGPU (CUDA/OpenCL) support, and the distribution of task over LAN. It is not finished yet, but you can keep up with the progress at https://github.com/Synthetica9/HyperJ – Synthetica May 01 '15 at 19:28
  • @Synthetica that's awesome. Will keep an eye on that. – Alex Shroyer May 18 '15 at 13:38

1 Answers1

1

ArrayFire may be worth looking into. Its OpenCL with support for AMD/nvidia and backward fallback to CPU. Its array processing. It should bind easily to J, as it does in matlab.

pascalJ
  • 61
  • 1
  • 3