Giter VIP home page Giter VIP logo

blas's Introduction

Gonum BLAS Build Status Coverage Status GoDoc

A collection of packages to provide BLAS functionality for the Go programming language

Installation

  go get github.com/gonum/blas

BLAS C-bindings

If you want to use OpenBLAS, install it in any directory:

  git clone https://github.com/xianyi/OpenBLAS
  cd OpenBLAS
  make

The blas/cgo package provides bindings to C-backed BLAS packages. blas/cgo needs the CGO_LDFLAGS environment variable to point to the blas installation. More information can be found in the cgo command documentation.

Then install the blas/cgo package:

  CGO_LDFLAGS="-L/path/to/OpenBLAS -lopenblas" go install github.com/gonum/blas/cgo

For Windows you can download binary packages for OpenBLAS at SourceForge.

If you want to use a different BLAS package such as the Intel MKL you can adjust the CGO_LDFLAGS variable:

  CGO_LDFLAGS="-lmkl_rt" go install github.com/gonum/blas/cgo

On OS X the easiest solution is to use the libraries provided by the system:

  CGO_LDFLAGS="-framework Accelerate" go install github.com/gonum/blas/cgo

Packages

blas

Defines BLAS API split in several interfaces.

blas/native

Go implementation of the BLAS API (incomplete, implements the float32 and float64 API)

blas/cgo

Binding to a C implementation of the cblas interface (e.g. ATLAS, OpenBLAS, Intel MKL)

The recommended (free) option for good performance on both Linux and Darwin is OpenBLAS.

blas/blas64 and blas/blas32

Wrappers for an implementation of the double (i.e., float64) and single (float32) precision real parts of the blas API

package main

import (
	"fmt"

	"github.com/gonum/blas/blas64"
)

func main() {
	v := blas64.Vector{Inc: 1, Data: []float64{1, 1, 1}}
	fmt.Println("v has length:", blas64.Nrm2(len(v.Data), v))
}

blas/cblas128 and blas/cblas64

Wrappers for an implementation of the double (i.e., complex128) and single (complex64) precision complex parts of the blas API

Currently blas/cblas64 and blas/cblas128 require blas/cgo.

Issues

If you find any bugs, feel free to file an issue on the github issue tracker. Discussions on API changes, added features, code review, or similar requests are preferred on the gonum-dev Google Group.

License

Please see github.com/gonum/license for general license information, contributors, authors, etc on the Gonum suite of packages.

blas's People

Contributors

btracey avatar fhs avatar jonlawlor avatar kortschak avatar pontusmelke avatar sbinet avatar shawnps avatar vladimir-ch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.