Sha256: 11abe97208bfa49d08a241fa1be41aca797368d25b3a1cb0625578033665eb54

Contents?: true

Size: 997 Bytes

Versions: 8

Compression:

Stored size: 997 Bytes

Contents

/**
 * Numo::OpenBLAS downloads and builds OpenBLAS during installation and
 * uses that as a background library for Numo::Linalg.
 */

#include <ruby.h>
#include <openblas_config.h>

VALUE mNumo;
VALUE mOpenBLAS;

void Init_openblas()
{
  /**
  * Document-module: Numo
  * Numo is the top level namespace of NUmerical MOdules for Ruby.
  */
  mNumo = rb_define_module("Numo");

  /**
   * Document-module: Numo::Liblinear
   * Numo::OpenBLAS loads Numo::NArray and Linalg with OpenBLAS used as backend library.
   */
  mOpenBLAS = rb_define_module_under(mNumo, "OpenBLAS");

  /* The number of cores detected by OpenBLAS. */
  rb_define_const(mOpenBLAS, "OPENBLAS_NUM_CORES", INT2NUM(OPENBLAS_NUM_CORES));

  /* The core name detected by OpenBLAS. */
  rb_define_const(mOpenBLAS, "OPENBLAS_CHAR_CORENAME", rb_str_new_cstr(OPENBLAS_CHAR_CORENAME));

  /* The version of OpenBLAS used in background library. */
  rb_define_const(mOpenBLAS, "OPENBLAS_VERSION", rb_str_new_cstr(OPENBLAS_VERSION));
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
numo-openblas-0.4.1 ext/numo/openblas/openblas.c
numo-openblas-0.4.0 ext/numo/openblas/openblas.c
numo-openblas-0.3.2 ext/numo/openblas/openblas.c
numo-openblas-0.3.1 ext/numo/openblas/openblas.c
numo-openblas-0.3.0 ext/numo/openblas/openblas.c
numo-openblas-0.2.2 ext/numo/openblas/openblas.c
numo-openblas-0.2.1 ext/numo/openblas/openblas.c
numo-openblas-0.2.0 ext/numo/openblas/openblas.c