Sha256: a3163150a2a8b99b86ee6005c26ec74ed6ac788090ba3ffa30e3d78e64565786

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

module ThunderSVM
  module FFI
    extend Fiddle::Importer

    libs = Array(ThunderSVM.ffi_lib).dup
    begin
      dlload Fiddle.dlopen(libs.shift)
    rescue Fiddle::DLError => e
      retry if libs.any?
      raise e if ENV["THUNDERSVM_DEBUG"]
      raise LoadError, "Could not find ThunderSVM"
    end

    extern "void thundersvm_train(int argc, char **argv)"
    extern "void thundersvm_train_after_parse(char **option, int len, char *file_name)"
    extern "void thundersvm_predict(int argc, char **argv)"
    extern "void thundersvm_predict_after_parse(char *model_file_name, char *output_file_name, char **option, int len)"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thundersvm-0.1.2 lib/thundersvm/ffi.rb
thundersvm-0.1.1 lib/thundersvm/ffi.rb