I am using Fiddle to call an external C Function for some heavy linear algebra calculations (Mac OSX).
The module definition looks like
module BLAS
extend Fiddle::Importer
dlload $BLAS_PATH
extern 'void cblas_dgemm(int, int, int, int, int, int, double, double*, int, double*, int, double, double*, int)'
extern 'void cblas_dgemv(int, int, int, int, double, double*, int, double*, int, double, double*, int)'
.......
The libraries have been optimized for mac osx and can use all the cores available. Unfortunately when I call these functions from Ruby with Fiddle only one core is used and my understanding is that this happens because of the GIL
.
Is there a way to release the lock during the execution of external functions?
I am using ruby 2.0.0-p247
(not the system Ruby).