• This repository has been archived on 09/Dec/2018
  • Stars
    star
    171
  • Rank 222,229 (Top 5 %)
  • Language
    Go
  • Created over 11 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A BLAS implementation for Go [DEPRECATED]

Gonum BLAS Build Status Coverage Status GoDoc

This repository is no longer maintained. Development has moved to https://github.com/gonum/gonum.

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 for gonum/gonum or gonum/netlib for the CGO implementation if the bug exists in that reposity; no code changes will be made to this repository. Other discussions should be taken to the gonum-dev Google Group.

https://groups.google.com/forum/#!forum/gonum-dev

License

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

More Repositories

1

gonum

Gonum is a set of numeric libraries for the Go programming language. It contains libraries for matrices, statistics, optimization, and more
Go
7,465
star
2

plot

A repository for plotting and visualizing data
Go
2,700
star
3

matrix

Matrix packages for the Go language [DEPRECATED]
Go
446
star
4

graph

Graph packages for the Go language [DEPRECATED]
Go
250
star
5

stat

Statistics package for Go [DEPRECATED]
Go
195
star
6

hdf5

hdf5 is a wrapper for the HDF5 library
Go
131
star
7

lapack

A LAPACK implementation for Go [DEPRECATED]
Go
69
star
8

optimize

Packages for solving minimization problems [DEPRECATED]
Go
66
star
9

floats

Operations on slices of floats [DEPRECATED]
Go
56
star
10

netlib

netlib contains C wrappers for netlib code in particular BLAS and LAPACK
C++
39
star
11

unit

Package for converting between scientific units [DEPRECATED]
Go
27
star
12

diff

Set of tools for computing derivatives of a function [DEPRECATED]
Go
23
star
13

internal

Internal routines for the gonum project [DEPRECATED]
Go
21
star
14

mathext

mathext implements basic elementary functions not included in the Go standard library [DEPRECATED]
Fortran
16
star
15

exp

Experimental packages
Go
13
star
16

talks

Talks given about Go and Gonum delivered by Gonum developers.
Go
12
star
17

integrate

integrate implements routines for numerical integration for the Go language [DEPRECATED]
Go
9
star
18

tools

Tools that are used by Gonum with general utility
Go
5
star
19

gonum.github.io

Gonum website
HTML
3
star
20

old-website

Code for the Gonum website
CSS
2
star
21

license

Master license, author, contributor etc information [DEPRECATED]
2
star
22

website

updated website for gonum.org
Go
1
star