kaleidicassociates / lubeck

High level linear algebra library for Dlang
http://lubeck.libmir.org/
Boost Software License 1.0
66 stars 14 forks source link
big-data blas dlang hedgefund high-performance linear-algebra matlab native-code ndslice numerical-methods numpy octave quantitative-finance symmetry-investments

Gitter Build Status Dub downloads Dub downloads License Latest version

Lubeck

High level linear algebra library for Dlang

Required system libraries

See wiki: Link with CBLAS & LAPACK.

API

Example

/+dub.sdl:
dependency "lubeck" version="~>0.1"
libs "lapack" "blas"
+/
// or libs "openblas"
import std.stdio;
import mir.ndslice: magic, repeat, as, slice;
import kaleidic.lubeck: mtimes;

void main()
{
    auto n = 5;
    // Magic Square
    auto matrix = n.magic.as!double.slice;
    // [1 1 1 1 1]
    auto vec = 1.repeat(n).as!double.slice;
    // Uses CBLAS for multiplication
    matrix.mtimes(vec).writeln;
    matrix.mtimes(matrix).writeln;
}

Open on run.dlang.io

Related packages


This work has been sponsored by Symmetry Investments and Kaleidic Associates.

About Kaleidic Associates

We are a boutique consultancy that advises a small number of hedge fund clients. We are not accepting new clients currently, but if you are interested in working either remotely or locally in London or Hong Kong, and if you are a talented hacker with a moral compass who aspires to excellence then feel free to drop me a line: laeeth at kaleidic.io

We work with our partner Symmetry Investments, and some background on the firm can be found here:

http://symmetryinvestments.com/about-us/