I did not do this in any language, but I know that some projects use GPU for certain algorithms. Is it possible in Elixir?
There’s this presentation about interfacing with CUDA from Erlang. For an example of how to set up a CNode that you can talk to in order to execute stuff there’s this repository showing how to do it in Elixir.
Excellent, thank you very much!
Via a port is what I’d do, and personally I’d use OpenCL so it actually works on more hardware (can even fallback to the CPU if no GPU is available for it if you want).
This is not Elixir-specific and I don’t have experience with it, but there’s an entire section in the book “Seven Concurrency Models in Seven Weeks” on GPU programming in general.
I’ve also heard this link is very good to learn about GPU programming: http://courses.cms.caltech.edu/cs179/