Sha256: c41e3b08d9fe96cf57289b7398e6b1ec9162410d08a75a1094d5ef70c14435b5
Contents?: true
Size: 496 Bytes
Versions: 11
Compression:
Stored size: 496 Bytes
Contents
#include <torch/torch.h> #include <rice/rice.hpp> #include "utils.h" void init_backends(Rice::Module& m) { auto rb_mBackends = Rice::define_module_under(m, "Backends"); Rice::define_module_under(rb_mBackends, "OpenMP") .add_handler<torch::Error>(handle_error) .define_singleton_function("available?", &torch::hasOpenMP); Rice::define_module_under(rb_mBackends, "MKL") .add_handler<torch::Error>(handle_error) .define_singleton_function("available?", &torch::hasMKL); }
Version data entries
11 entries across 11 versions & 1 rubygems