Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.

mir.lapack

Low level ndslice wrapper for LAPACK.
Attention: LAPACK and this module has column major API. ndslice rows corresponds to LAPACK columns.
Functions with *_wq suffix are wrappers for workspace queries.
Authors:
Ilya Yaroshenko
lapackint ilaenv()(lapackint ispec, scope const(char)* name, scope const(char)* opts, lapackint n1, lapackint n2, lapackint n3, lapackint n4);
lapackint ilaenv2stage()(lapackint ispec, scope const(char)* name, scope const(char)* opts, lapackint n1, lapackint n2, lapackint n3, lapackint n4);
size_t getri_wq(T)(Slice!(T*, 2, Canonical) a);
getri work space query.
size_t getri(T)(Slice!(T*, 2, Canonical) a, Slice!(lapackint*) ipiv, Slice!(T*) work);
size_t getrf(T)(Slice!(T*, 2, Canonical) a, Slice!(lapackint*) ipiv);
size_t sptrf(T)(Slice!(StairsIterator!(T*, "+")) ap, Slice!(lapackint*) ipiv);
sptrf for upper triangular input.
size_t gesv(T)(Slice!(T*, 2, Canonical) a, Slice!(lapackint*) ipiv, Slice!(T*, 2, Canonical) b);
size_t gelsd_wq(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, ref size_t liwork)
if (!isComplex!T);

size_t gelsd_wq(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, ref size_t lrwork, ref size_t liwork)
if (isComplex!T);
gelsd work space query.
size_t gelsd(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, Slice!(T*) s, T rcond, ref size_t rank, Slice!(T*) work, Slice!(lapackint*) iwork)
if (!isComplex!T);

size_t gelsd(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, Slice!(realType!T*) s, realType!T rcond, ref size_t rank, Slice!(T*) work, Slice!(realType!T*) rwork, Slice!(lapackint*) iwork)
if (isComplex!T);
size_t gesdd_wq(T)(char jobz, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt);
gesdd work space query
size_t gesdd(T)(char jobz, Slice!(T*, 2, Canonical) a, Slice!(T*) s, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt, Slice!(T*) work, Slice!(lapackint*) iwork)
if (!isComplex!T);

size_t gesdd(T)(char jobz, Slice!(T*, 2, Canonical) a, Slice!(realType!T*) s, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt, Slice!(T*) work, Slice!(realType!T*) rwork, Slice!(lapackint*) iwork)
if (isComplex!T);
size_t gesvd_wq(T)(char jobu, char jobvt, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt);
gesvd work space query
size_t gesvd(T)(char jobu, char jobvt, Slice!(T*, 2, Canonical) a, Slice!(T*) s, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt, Slice!(T*) work)
if (!isComplex!T);

size_t gesvd(T)(char jobu, char jobvt, Slice!(T*, 2, Canonical) a, Slice!(realType!T*) s, Slice!(T*, 2, Canonical) u, Slice!(T*, 2, Canonical) vt, Slice!(T*) work, Slice!(realType!T*) rwork)
if (isComplex!T);
size_t spev(T)(char jobz, Slice!(StairsIterator!(T*, "+")) ap, Slice!(T*) w, Slice!(T*, 2, Canonical) z, Slice!(T*) work);
size_t sytrf(T)(char uplo, Slice!(T*, 2, Canonical) a, Slice!(lapackint*) ipiv, Slice!(T*) work);
size_t geqrf(T)(Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*) work);
size_t getrs(T)(char trans, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, Slice!(lapackint*) ipiv);
size_t potrs(T)(char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b);
size_t sytrs2(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, Slice!(lapackint*) ipiv, Slice!(T*) work, char uplo);
size_t geqrs(T)(Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b, Slice!(T*) tau, Slice!(T*) work);
size_t sysv_rook_wk(T)(char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) b);
size_t sysv_rook(T)(char uplo, Slice!(T*, 2, Canonical) a, Slice!(lapackint*) ipiv, Slice!(T*, 2, Canonical) b, Slice!(T*) work);
size_t syev_wk(T)(char jobz, char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*) w);
size_t syev(T)(char jobz, char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*) w, Slice!(T*) work);
size_t syev_2stage_wk(T)(char jobz, char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*) w);
size_t syev_2stage(T)(char jobz, char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*) w, Slice!(T*) work);
size_t potrf(T)(char uplo, Slice!(T*, 2, Canonical) a);
size_t pptrf(T)(char uplo, Slice!(T*, 2, Canonical) ap);
size_t sptri(T)(Slice!(StairsIterator!(T*, "+")) ap, Slice!(lapackint*) ipiv, Slice!(T*) work);
sptri for upper triangular input.
size_t potri(T)(char uplo, Slice!(T*, 2, Canonical) a);
size_t pptri(T)(Slice!(StairsIterator!(T*, "+")) ap);
pptri for upper triangular input.
size_t trtri(T)(char uplo, char diag, Slice!(T*, 2, Canonical) a);
size_t tptri(T)(char diag, Slice!(StairsIterator!(T*, "+")) ap);
tptri for upper triangular input.
size_t ormqr(T)(char side, char trans, Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*, 2, Canonical) c, Slice!(T*) work);
size_t unmqr(T)(char side, char trans, Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*, 2, Canonical) c, Slice!(T*) work);
size_t orgqr(T)(Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*) work);
size_t ungqr(T)(Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*) work);
size_t unghr(T)(Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*) work);
size_t gehrd(T)(Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*) work, lapackint ilo, lapackint ihi);
size_t unmhr(T)(char side, char trans, Slice!(T*, 2, Canonical) a, Slice!(T*) tau, Slice!(T*, 2, Canonical) c, Slice!(T*) work, lapackint ilo, lapackint ihi);
size_t hseqr(T)(char job, char compz, Slice!(T*, 2, Canonical) h, Slice!(T*) w, Slice!(T*, 2, Canonical) z, Slice!(T*) work, lapackint ilo, lapackint ihi)
if (isComplex!T);
size_t hseqr(T)(char job, char compz, Slice!(T*, 2, Canonical) h, Slice!(T*) wr, Slice!(T*) wi, Slice!(T*, 2, Canonical) z, Slice!(T*) work, lapackint ilo, lapackint ihi)
if (!isComplex!T);
size_t trevc(T)(char side, char howmany, lapackint select, Slice!(T*, 2, Canonical) t, Slice!(T*, 2, Canonical) vl, Slice!(T*, 2, Canonical) vr, lapackint m, Slice!(T*) work);
size_t gebal(T, realT)(char job, Slice!(T*, 2, Canonical) a, lapackint ilo, lapackint ihi, Slice!(realT*) scale)
if (!isComplex!T || isComplex!T && is(realType!T == realT));
size_t gebak(T, realT)(char job, char side, lapackint ilo, lapackint ihi, Slice!(realT*) scale, Slice!(T*, 2, Canonical) v)
if (!isComplex!T || isComplex!T && is(realType!T == realT));
size_t geev(T, realT)(char jobvl, char jobvr, Slice!(T*, 2, Canonical) a, Slice!(T*) w, Slice!(T*, 2, Canonical) vl, Slice!(T*, 2, Canonical) vr, Slice!(T*) work, Slice!(realT*) rwork)
if (isComplex!T && is(realType!T == realT));
size_t geev(T)(char jobvl, char jobvr, Slice!(T*, 2, Canonical) a, Slice!(T*) wr, Slice!(T*) wi, Slice!(T*, 2, Canonical) vl, Slice!(T*, 2, Canonical) vr, Slice!(T*) work)
if (!isComplex!T);
size_t steqr(T, realT = realType!T)(char compz, Slice!(realT*) d, Slice!(realT*) e, Slice!(T*, 2, Canonical) z, Slice!(realT*) work)
if (is(realType!T == realT));
@trusted size_t sytrs_3(T)(char uplo, Slice!(const(T)*, 2, Canonical) a, Slice!(const(T)*) e, Slice!(const(lapackint)*) ipiv, Slice!(T*, 2, Canonical) b);
@trusted size_t sytrf_rk(T)(char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*) e, Slice!(lapackint*) ipiv, Slice!(T*) work);
size_t sytrf_rk_wk(T)(char uplo, Slice!(T*, 2, Canonical) a);
@trusted size_t posvx(T)(char fact, char uplo, Slice!(T*, 2, Canonical) a, Slice!(T*, 2, Canonical) af, char equed, Slice!(T*) s, Slice!(T*, 2, Canonical) b, Slice!(T*, 2, Canonical) x, out T rcond, Slice!(T*) ferr, Slice!(T*) berr, Slice!(T*) work, Slice!(lapackint*) iwork)
if (is(T == double) || is(T == float));
size_t sytrf_wk(T)(char uplo, Slice!(T*, 2, Canonical) a);