I'm wondering if there is a way to extend ruby Array type to do SIMD & SSE vector calculation.
I mean implement in an low-level language to be used in ruby programs to number crunching tasks.
I'm wondering if there is a way to extend ruby Array type to do SIMD & SSE vector calculation.
I mean implement in an low-level language to be used in ruby programs to number crunching tasks.
I suspect that you would need to write a Ruby C extension. I haven't used that tutorial, but it seems plausible. Just wrap the SIMD and SSE methods you want to use in your extension, et voila! I haven't developed this kind of extension before, so I'm not sure if this kind of operation would incur copying overhead when moving data between Ruby and C. You'd have to investigate that; a quick Google doesn't find any extensions like this already in the wild.