TRIQS/nda 2.0.0
Multi-dimensional array library for C++
Loading...
Searching...
No Matches
cxx_interface.hpp
Go to the documentation of this file.
1// Copyright (c) 2019--present, The Simons Foundation
2// This file is part of TRIQS/nda and is licensed under the Apache License, Version 2.0.
3// SPDX-License-Identifier: Apache-2.0
4// See LICENSE in the root of this distribution for details.
5
10
11#pragma once
12
14#include "../../blas/tools.hpp"
15
16#include <complex>
17
18namespace nda::lapack::f77 {
19
20 void gelss(int m, int n, int nrhs, float *a, int lda, float *b, int ldb, float *s, float rcond, int &rank, float *work, int lwork, float *rwork,
21 int &info);
22 void gelss(int m, int n, int nrhs, std::complex<float> *a, int lda, std::complex<float> *b, int ldb, float *s, float rcond, int &rank,
23 std::complex<float> *work, int lwork, float *rwork, int &info);
24 void gelss(int m, int n, int nrhs, double *a, int lda, double *b, int ldb, double *s, double rcond, int &rank, double *work, int lwork,
25 double *rwork, int &info);
26 void gelss(int m, int n, int nrhs, std::complex<double> *a, int lda, std::complex<double> *b, int ldb, double *s, double rcond, int &rank,
27 std::complex<double> *work, int lwork, double *rwork, int &info);
28
29 void gesvd(char jobu, char jobvt, int m, int n, float *a, int lda, float *s, float *u, int ldu, float *vt, int ldvt, float *work, int lwork,
30 float *rwork, int &info);
31 void gesvd(char jobu, char jobvt, int m, int n, std::complex<float> *a, int lda, float *s, std::complex<float> *u, int ldu, std::complex<float> *vt,
32 int ldvt, std::complex<float> *work, int lwork, float *rwork, int &info);
33 void gesvd(char jobu, char jobvt, int m, int n, double *a, int lda, double *s, double *u, int ldu, double *vt, int ldvt, double *work, int lwork,
34 double *rwork, int &info);
35 void gesvd(char jobu, char jobvt, int m, int n, std::complex<double> *a, int lda, double *s, std::complex<double> *u, int ldu,
36 std::complex<double> *vt, int ldvt, std::complex<double> *work, int lwork, double *rwork, int &info);
37
38 void geqp3(int m, int n, float *a, int lda, int *jpvt, float *tau, float *work, int lwork, float *rwork, int &info);
39 void geqp3(int m, int n, std::complex<float> *a, int lda, int *jpvt, std::complex<float> *tau, std::complex<float> *work, int lwork, float *rwork,
40 int &info);
41 void geqp3(int m, int n, double *a, int lda, int *jpvt, double *tau, double *work, int lwork, double *rwork, int &info);
42 void geqp3(int m, int n, std::complex<double> *a, int lda, int *jpvt, std::complex<double> *tau, std::complex<double> *work, int lwork,
43 double *rwork, int &info);
44
45 void geqrf(int m, int n, float *a, int lda, float *tau, float *work, int lwork, int &info);
46 void geqrf(int m, int n, std::complex<float> *a, int lda, std::complex<float> *tau, std::complex<float> *work, int lwork, int &info);
47 void geqrf(int m, int n, double *a, int lda, double *tau, double *work, int lwork, int &info);
48 void geqrf(int m, int n, std::complex<double> *a, int lda, std::complex<double> *tau, std::complex<double> *work, int lwork, int &info);
49
50 void orgqr(int m, int n, int k, float *a, int lda, float const *tau, float *work, int lwork, int &info);
51 void orgqr(int m, int n, int k, double *a, int lda, double const *tau, double *work, int lwork, int &info);
52
53 void ungqr(int m, int n, int k, std::complex<float> *a, int lda, std::complex<float> const *tau, std::complex<float> *work, int lwork, int &info);
54 void ungqr(int m, int n, int k, std::complex<double> *a, int lda, std::complex<double> const *tau, std::complex<double> *work, int lwork,
55 int &info);
56
57 void getrf(int m, int n, float *a, int lda, int *ipiv, int &info);
58 void getrf(int m, int n, std::complex<float> *a, int lda, int *ipiv, int &info);
59 void getrf(int m, int n, double *a, int lda, int *ipiv, int &info);
60 void getrf(int m, int n, std::complex<double> *a, int lda, int *ipiv, int &info);
61
62 void getrs(char op, int n, int nrhs, float const *a, int lda, int const *ipiv, float *b, int ldb, int &info);
63 void getrs(char op, int n, int nrhs, std::complex<float> const *a, int lda, int const *ipiv, std::complex<float> *b, int ldb, int &info);
64 void getrs(char op, int n, int nrhs, double const *a, int lda, int const *ipiv, double *b, int ldb, int &info);
65 void getrs(char op, int n, int nrhs, std::complex<double> const *a, int lda, int const *ipiv, std::complex<double> *b, int ldb, int &info);
66
67 void getri(int n, float *a, int lda, int const *ipiv, float *work, int lwork, int &info);
68 void getri(int n, std::complex<float> *a, int lda, int const *ipiv, std::complex<float> *work, int lwork, int &info);
69 void getri(int n, double *a, int lda, int const *ipiv, double *work, int lwork, int &info);
70 void getri(int n, std::complex<double> *a, int lda, int const *ipiv, std::complex<double> *work, int lwork, int &info);
71
72 void gtsv(int n, int nrhs, float *dl, float *d, float *du, float *b, int ldb, int &info);
73 void gtsv(int n, int nrhs, std::complex<float> *dl, std::complex<float> *d, std::complex<float> *du, std::complex<float> *b, int ldb, int &info);
74 void gtsv(int n, int nrhs, double *dl, double *d, double *du, double *b, int ldb, int &info);
75 void gtsv(int n, int nrhs, std::complex<double> *dl, std::complex<double> *d, std::complex<double> *du, std::complex<double> *b, int ldb,
76 int &info);
77
78 void stev(char j, int n, float *d, float *e, float *z, int ldz, float *work, int &info);
79 void stev(char j, int n, double *d, double *e, double *z, int ldz, double *work, int &info);
80
81 void syev(char jobz, char uplo, int n, float *a, int lda, float *w, float *work, int lwork, int &info);
82 void syev(char jobz, char uplo, int n, double *a, int lda, double *w, double *work, int lwork, int &info);
83 void heev(char jobz, char uplo, int n, std::complex<float> *a, int lda, float *w, std::complex<float> *work, int lwork, float *rwork, int &info);
84 void heev(char jobz, char uplo, int n, std::complex<double> *a, int lda, double *w, std::complex<double> *work, int lwork, double *rwork,
85 int &info);
86
87 void sygv(int itype, char jobz, char uplo, int n, float *a, int lda, float *b, int ldb, float *w, float *work, int lwork, int &info);
88 void sygv(int itype, char jobz, char uplo, int n, double *a, int lda, double *b, int ldb, double *w, double *work, int lwork, int &info);
89
90 void hegv(int itype, char jobz, char uplo, int n, std::complex<float> *a, int lda, std::complex<float> *b, int ldb, float *w,
91 std::complex<float> *work, int lwork, float *rwork, int &info);
92 void hegv(int itype, char jobz, char uplo, int n, std::complex<double> *a, int lda, std::complex<double> *b, int ldb, double *w,
93 std::complex<double> *work, int lwork, double *rwork, int &info);
94
95 void geev(char jobvl, char jobvr, int n, float *a, int lda, float *wr, float *wi, float *vl, int ldvl, float *vr, int ldvr, float *work, int lwork,
96 int &info);
97 void geev(char jobvl, char jobvr, int n, std::complex<float> *a, int lda, std::complex<float> *w, std::complex<float> *vl, int ldvl,
98 std::complex<float> *vr, int ldvr, std::complex<float> *work, int lwork, float *rwork, int &info);
99 void geev(char jobvl, char jobvr, int n, double *a, int lda, double *wr, double *wi, double *vl, int ldvl, double *vr, int ldvr, double *work,
100 int lwork, int &info);
101 void geev(char jobvl, char jobvr, int n, std::complex<double> *a, int lda, std::complex<double> *w, std::complex<double> *vl, int ldvl,
102 std::complex<double> *vr, int ldvr, std::complex<double> *work, int lwork, double *rwork, int &info);
103
104 void ggev(char jobvl, char jobvr, int n, float *a, int lda, float *b, int ldb, float *alphar, float *alphai, float *beta, float *vl, int ldvl,
105 float *vr, int ldvr, float *work, int lwork, int &info);
106 void ggev(char jobvl, char jobvr, int n, std::complex<float> *a, int lda, std::complex<float> *b, int ldb, std::complex<float> *alpha,
107 std::complex<float> *beta, std::complex<float> *vl, int ldvl, std::complex<float> *vr, int ldvr, std::complex<float> *work, int lwork,
108 float *rwork, int &info);
109 void ggev(char jobvl, char jobvr, int n, double *a, int lda, double *b, int ldb, double *alphar, double *alphai, double *beta, double *vl, int ldvl,
110 double *vr, int ldvr, double *work, int lwork, int &info);
111 void ggev(char jobvl, char jobvr, int n, std::complex<double> *a, int lda, std::complex<double> *b, int ldb, std::complex<double> *alpha,
112 std::complex<double> *beta, std::complex<double> *vl, int ldvl, std::complex<double> *vr, int ldvr, std::complex<double> *work, int lwork,
113 double *rwork, int &info);
114
115} // namespace nda::lapack::f77
116
117namespace nda::lapack {
118
119 // Import tools from the blas_lapack namespace.
120 using namespace nda::blas_lapack;
121
122} // namespace nda::lapack
Provides various traits and utilities for the BLAS interface.
Provides a C++ interface for the GPU versions of various LAPACK routines.