Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
reference/norms.hpp
Go to the documentation of this file.
1#pragma once
2
16#include <uni20/config.hpp>
17
19{
20
21namespace detail
22{
23extern "C"
24{
25 float slange_(char const* norm, blas_int const* m, blas_int const* n, float* a, blas_int const* lda, float* work);
26
27 double dlange_(char const* norm, blas_int const* m, blas_int const* n, double* a, blas_int const* lda, double* work);
28
29 float clange_(char const* norm, blas_int const* m, blas_int const* n, uni20::complex<float>* a, blas_int const* lda,
30 float* work);
31
32 double zlange_(char const* norm, blas_int const* m, blas_int const* n, uni20::complex<double>* a, blas_int const* lda,
33 double* work);
34
35 float slansy_(char const* norm, char const* uplo, blas_int const* n, float* a, blas_int const* lda, float* work);
36
37 double dlansy_(char const* norm, char const* uplo, blas_int const* n, double* a, blas_int const* lda, double* work);
38
39 float clanhe_(char const* norm, char const* uplo, blas_int const* n, uni20::complex<float>* a, blas_int const* lda,
40 float* work);
41
42 double zlanhe_(char const* norm, char const* uplo, blas_int const* n, uni20::complex<double>* a, blas_int const* lda,
43 double* work);
44
45 float slantr_(char const* norm, char const* uplo, char const* diag, blas_int const* m, blas_int const* n, float* a,
46 blas_int const* lda, float* work);
47
48 double dlantr_(char const* norm, char const* uplo, char const* diag, blas_int const* m, blas_int const* n, double* a,
49 blas_int const* lda, double* work);
50
51 float clantr_(char const* norm, char const* uplo, char const* diag, blas_int const* m, blas_int const* n,
52 uni20::complex<float>* a, blas_int const* lda, float* work);
53
54 double zlantr_(char const* norm, char const* uplo, char const* diag, blas_int const* m, blas_int const* n,
55 uni20::complex<double>* a, blas_int const* lda, double* work);
56
57 float slangb_(char const* norm, blas_int const* n, blas_int const* kl, blas_int const* ku, float* ab,
58 blas_int const* ldab, float* work);
59
60 double dlangb_(char const* norm, blas_int const* n, blas_int const* kl, blas_int const* ku, double* ab,
61 blas_int const* ldab, double* work);
62}
63} // namespace detail
64
65[[nodiscard]] inline float lange(char norm, blas_int m, blas_int n, float* a, blas_int lda, float* work)
66{
67 UNI20_EXTERNAL_API_CALL(LAPACK, slange_, norm, m, n, a, lda, work);
68 return detail::slange_(&norm, &m, &n, a, &lda, work);
69}
70
71[[nodiscard]] inline double lange(char norm, blas_int m, blas_int n, double* a, blas_int lda, double* work)
72{
73 UNI20_EXTERNAL_API_CALL(LAPACK, dlange_, norm, m, n, a, lda, work);
74 return detail::dlange_(&norm, &m, &n, a, &lda, work);
75}
76
77[[nodiscard]] inline float lange(char norm, blas_int m, blas_int n, uni20::complex<float>* a, blas_int lda, float* work)
78{
79 UNI20_EXTERNAL_API_CALL(LAPACK, clange_, norm, m, n, a, lda, work);
80 return detail::clange_(&norm, &m, &n, a, &lda, work);
81}
82
83[[nodiscard]] inline double lange(char norm, blas_int m, blas_int n, uni20::complex<double>* a, blas_int lda,
84 double* work)
85{
86 UNI20_EXTERNAL_API_CALL(LAPACK, zlange_, norm, m, n, a, lda, work);
87 return detail::zlange_(&norm, &m, &n, a, &lda, work);
88}
89
90[[nodiscard]] inline float lansy(char norm, char uplo, blas_int n, float* a, blas_int lda, float* work)
91{
92 UNI20_EXTERNAL_API_CALL(LAPACK, slansy_, norm, uplo, n, a, lda, work);
93 return detail::slansy_(&norm, &uplo, &n, a, &lda, work);
94}
95
96[[nodiscard]] inline double lansy(char norm, char uplo, blas_int n, double* a, blas_int lda, double* work)
97{
98 UNI20_EXTERNAL_API_CALL(LAPACK, dlansy_, norm, uplo, n, a, lda, work);
99 return detail::dlansy_(&norm, &uplo, &n, a, &lda, work);
100}
101
102[[nodiscard]] inline float lanhe(char norm, char uplo, blas_int n, uni20::complex<float>* a, blas_int lda, float* work)
103{
104 UNI20_EXTERNAL_API_CALL(LAPACK, clanhe_, norm, uplo, n, a, lda, work);
105 return detail::clanhe_(&norm, &uplo, &n, a, &lda, work);
106}
107
108[[nodiscard]] inline double lanhe(char norm, char uplo, blas_int n, uni20::complex<double>* a, blas_int lda,
109 double* work)
110{
111 UNI20_EXTERNAL_API_CALL(LAPACK, zlanhe_, norm, uplo, n, a, lda, work);
112 return detail::zlanhe_(&norm, &uplo, &n, a, &lda, work);
113}
114
115[[nodiscard]] inline float lantr(char norm, char uplo, char diag, blas_int m, blas_int n, float* a, blas_int lda,
116 float* work)
117{
118 UNI20_EXTERNAL_API_CALL(LAPACK, slantr_, norm, uplo, diag, m, n, a, lda, work);
119 return detail::slantr_(&norm, &uplo, &diag, &m, &n, a, &lda, work);
120}
121
122[[nodiscard]] inline double lantr(char norm, char uplo, char diag, blas_int m, blas_int n, double* a, blas_int lda,
123 double* work)
124{
125 UNI20_EXTERNAL_API_CALL(LAPACK, dlantr_, norm, uplo, diag, m, n, a, lda, work);
126 return detail::dlantr_(&norm, &uplo, &diag, &m, &n, a, &lda, work);
127}
128
129[[nodiscard]] inline float lantr(char norm, char uplo, char diag, blas_int m, blas_int n, uni20::complex<float>* a,
130 blas_int lda, float* work)
131{
132 UNI20_EXTERNAL_API_CALL(LAPACK, clantr_, norm, uplo, diag, m, n, a, lda, work);
133 return detail::clantr_(&norm, &uplo, &diag, &m, &n, a, &lda, work);
134}
135
136[[nodiscard]] inline double lantr(char norm, char uplo, char diag, blas_int m, blas_int n, uni20::complex<double>* a,
137 blas_int lda, double* work)
138{
139 UNI20_EXTERNAL_API_CALL(LAPACK, zlantr_, norm, uplo, diag, m, n, a, lda, work);
140 return detail::zlantr_(&norm, &uplo, &diag, &m, &n, a, &lda, work);
141}
142
143[[nodiscard]] inline float langb(char norm, blas_int n, blas_int kl, blas_int ku, float* ab, blas_int ldab, float* work)
144{
145 UNI20_EXTERNAL_API_CALL(LAPACK, slangb_, norm, n, kl, ku, ab, ldab, work);
146 return detail::slangb_(&norm, &n, &kl, &ku, ab, &ldab, work);
147}
148
149[[nodiscard]] inline double langb(char norm, blas_int n, blas_int kl, blas_int ku, double* ab, blas_int ldab,
150 double* work)
151{
152 UNI20_EXTERNAL_API_CALL(LAPACK, dlangb_, norm, n, kl, ku, ab, ldab, work);
153 return detail::dlangb_(&norm, &n, &kl, &ku, ab, &ldab, work);
154}
155
156} // namespace uni20::lapack::unchecked
#define UNI20_EXTERNAL_API_CALL(module, func,...)
Emits a trace log entry for an outgoing backend API call.
Definition backend.hpp:90
typename detail::complex_type< Real >::type complex
Project-level complex scalar spelling.
Definition types.hpp:66
Definition mplapack/band.hpp:25
float lansy(char norm, char uplo, blas_int n, float *a, blas_int lda, float *work)
Definition reference/norms.hpp:90
float lange(char norm, blas_int m, blas_int n, float *a, blas_int lda, float *work)
Definition reference/norms.hpp:65
float lanhe(char norm, char uplo, blas_int n, uni20::complex< float > *a, blas_int lda, float *work)
Definition reference/norms.hpp:102
float langb(char norm, blas_int n, blas_int kl, blas_int ku, float *ab, blas_int ldab, float *work)
Definition reference/norms.hpp:143
float lantr(char norm, char uplo, char diag, blas_int m, blas_int n, float *a, blas_int lda, float *work)
Definition reference/norms.hpp:115
mpreal norm(mpcomplex const &z)
Definition mpcomplex.hpp:494