Calling D from Ruby for GPU computing
Jacob Carlborg via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Tue Jul 25 23:37:26 PDT 2017
On 2017-07-25 22:19, Prasun Anand wrote:
> I wrote a Linear Mixed Model tool for Genome Wide Association
> Studies(GWAS) called
> [faster_lmm_d](https://github.com/prasunanand/faster_lmm_d). It is built
> on LDC
> and is faster than its Python alternative. Also, its the only GWAS tool
> with a GPU
> I am interested in porting ` faster_lmm_d` to Ruby. Though, it is still
> a work in progress, I have written a blog about my findings.
> I would love to hear your feedback.
I would go with the approach of using the native C interface (ruby.h)
from D. Perhaps add some wrappers to make the library simpler to use.
I'm not sure about the garbage collector, if it's a good idea to use it
or not. Note that anything that you return to the Ruby code would most
likely need to be allocated using some functionality of ruby.h, to
allocate the memory on the Ruby heap and not the D heap.
More information about the digitalmars-d-ldc