lapacke ~master

D bindings for lapacke


To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

D bindings for lapacke

Example usage: SVD

#!/usr/bin/env dub
/+ dub.json:
{
    "name": "testlapack",
    "dependencies": {"lapacke": "~>0.1.2"},
}
+/

/*
*  Compile example:
*  dub run --single testlapack.d
*/

import std.stdio : writefln;
import lapack;
import std.datetime : StopWatch;

void main()
{
	double[] a = [
			      8.79,  6.11, -9.15,  9.57, -3.49,  9.84,
            9.93,  6.91, -7.93,  1.64,  4.02,  0.15,
            9.83,  5.04,  4.86,  8.83,  9.80, -8.99,
            5.45, -0.27,  4.85,  0.74, 10.00, -6.02,
            3.16,  7.98,  3.01,  5.80,  4.27, -5.31
	];
  enum m = 5;
  enum n = 6;
  int info = 0; 
  double[m] s;
  double[m*m] u;
  double[m*n] vt;
  double[m-1] superb;
  int output = gesvd(RowMajor, 'A', 'A', m, n, a.ptr, n, s.ptr, u.ptr, m, vt.ptr, n, superb.ptr );
  writefln("Outputs: \n%s\n%s\n%s", s, u, vt);
}

The dstep D package was very useful in converting this library.

Authors:
Chibisi Chima-Okereke
Dependencies:
none
Versions:
~master 2017-May-26
Show all 1 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 2 downloads this month

  • 21 downloads total