Home

Awesome

Numo::BLIS

Build Status Gem Version BSD 3-Clause License

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

Installation

Building LAPACK with BLIS requires cmake and Fortran compiler.

macOS:

$ brew install gcc gfortran cmake

Ubuntu:

$ sudo apt-get install gcc gfortran cmake

Add this line to your application's Gemfile:

gem 'numo-blis'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install numo-blis

Note: Currently, when installing on Apple M1 mac, Numo::BLIS gives generic to the CPU type option of BLIS. It is possible that BLIS is not fully optimized and has low performance.

Usage

Numo::BLIS loads Numo::NArray and Numo::Linalg using BLIS as a background library. You can use Numo::NArray and Numo::Linalg just by loading Numo::BLIS.

require 'numo/blis'

x = Numo::DFloat.new(5, 2).rand
c = x.transpose.dot(x)
eig_val, eig_vec = Numo::Linalg.eigh(c)

Moreover, the versions of background libraries are defined by constants.

> Numo::BLIS::BLIS_VERSION
=> "0.8.1"
> Numo::BLIS::LAPACK_VERSION
=> "3.10.0"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-blis. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the BSD-3-Clause License