linalg 1.8.2
A linear algebra library that provides a user-friendly interface to several BLAS and LAPACK routines.
Loading...
Searching...
No Matches
lapack.f90
1module lapack
2 implicit none
3
4 interface
5 pure function dlamch(cmach) result(x)
6 use iso_fortran_env, only : real64
7 character, intent(in) :: cmach
8 real(real64) :: x
9 end function
10
11 subroutine dgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, &
12 work, lwork, info)
13 use iso_fortran_env, only : int32, real64
14 character, intent(in) :: jobu, jobvt
15 integer(int32), intent(in) :: m, n, lda, ldu, ldvt, lwork
16 integer(int32), intent(out) :: info
17 real(real64), intent(inout) :: a(lda,*)
18 real(real64), intent(out) :: s(*), u(ldu,*), vt(ldvt,*), work(*)
19 end subroutine
20
21 subroutine zgesvd(jobu, jobvt, m, n, a, lda, s, u, ldu, vt, ldvt, &
22 work, lwork, rwork, info)
23 use iso_fortran_env, only : int32, real64
24 character, intent(in) :: jobu, jobvt
25 integer(int32), intent(in) :: m, n, lda, ldu, ldvt, lwork
26 integer(int32), intent(out) :: info
27 complex(real64), intent(inout) :: a(lda,*)
28 real(real64), intent(out) :: s(*), rwork(*)
29 complex(real64), intent(out) :: u(ldu,*), vt(ldvt,*), work(*)
30 end subroutine
31
32 subroutine dgetrf(m, n, a, lda, ipiv, info)
33 use iso_fortran_env, only : int32, real64
34 integer(int32), intent(in) :: m, n, lda
35 real(real64), intent(inout) :: a(lda,*)
36 integer(int32), intent(out) :: ipiv(*), info
37 end subroutine
38
39 subroutine zgetrf(m, n, a, lda, ipiv, info)
40 use iso_fortran_env, only : int32, real64
41 integer(int32), intent(in) :: m, n, lda
42 complex(real64), intent(inout) :: a(lda,*)
43 integer(int32), intent(out) :: ipiv(*), info
44 end subroutine
45
46 subroutine dsyev(jobz, uplo, n, a, lda, w, work, lwork, info)
47 use iso_fortran_env, only : int32, real64
48 character, intent(in) :: jobz, uplo
49 integer(int32), intent(in) :: n, lda, lwork
50 real(real64), intent(inout) :: a(lda,*)
51 real(real64), intent(out) :: w(*), work(*)
52 integer(int32), intent(out) :: info
53 end subroutine
54
55 subroutine dgeev(jobvl, jobvr, n, a, lda, wr, wi, vl, ldvl, vr, ldvr, &
56 work, lwork, info)
57 use iso_fortran_env, only : int32, real64
58 character, intent(in) :: jobvl, jobvr
59 integer(int32), intent(in) :: n, lda, ldvl, ldvr, lwork
60 real(real64), intent(inout) :: a(lda,*)
61 real(real64), intent(out) :: wr(*), wi(*), vl(ldvl,*), vr(ldvr,*), &
62 work(*)
63 integer(int32), intent(out) :: info
64 end subroutine
65
66 subroutine dggev(jobvl, jobvr, n, a, lda, b, ldb, alphar, alphai, &
67 beta, vl, ldvl, vr, ldvr, work, lwork, info)
68 use iso_fortran_env, only : int32, real64
69 character, intent(in) :: jobvl, jobvr
70 integer(int32) :: n, lda, ldb, ldvl, ldvr, lwork
71 real(real64), intent(inout) :: a(lda,*), b(ldb,*)
72 real(real64), intent(out) :: alphar(*), alphai(*), beta(*), &
73 vl(ldvl,*), vr(ldvr,*), work(*)
74 integer(int32), intent(out) :: info
75 end subroutine
76
77 subroutine zgeev(jobvl, jobvr, n, a, lda, w, vl, ldvl, vr, ldvr, work, &
78 lwork, rwork, info)
79 use iso_fortran_env, only : int32, real64
80 character, intent(in) :: jobvl, jobvr
81 integer(int32), intent(in) :: n, lda, ldvl, ldvr, lwork
82 complex(real64), intent(inout) :: a(lda,*)
83 complex(real64), intent(out) :: w(*), vl(ldvl,*), vr(ldvr,*), &
84 work(*)
85 real(real64), intent(out) :: rwork(*)
86 integer(int32), intent(out) :: info
87 end subroutine
88
89 subroutine dlaset(uplo, m, n, alpha, beta, a, lda)
90 use iso_fortran_env, only : int32, real64
91 character, intent(in) :: uplo
92 integer(int32), intent(in) :: m, n, lda
93 real(real64), intent(in) :: alpha, beta
94 real(real64), intent(out) :: a(lda,*)
95 end subroutine
96
97 subroutine dgeqrf(m, n, a, lda, tau, work, lwork, info)
98 use iso_fortran_env, only : int32, real64
99 integer(int32), intent(in) :: m, n, lda, lwork
100 real(real64), intent(inout) :: a(lda,*)
101 real(real64), intent(out) :: tau(*), work(*)
102 integer(int32), intent(out) :: info
103 end subroutine
104
105 subroutine zgeqrf(m, n, a, lda, tau, work, lwork, info)
106 use iso_fortran_env, only : int32, real64
107 integer(int32), intent(in) :: m, n, lda, lwork
108 complex(real64), intent(inout) :: a(lda,*)
109 complex(real64), intent(out) :: tau(*), work(*)
110 integer(int32), intent(out) :: info
111 end subroutine
112
113 subroutine dgeqp3(m, n, a, lda, jpvt, tau, work, lwork, info)
114 use iso_fortran_env, only : int32, real64
115 integer(int32), intent(in) :: m, n, lda, lwork
116 real(real64), intent(inout) :: a(lda,*)
117 integer(int32), intent(inout) :: jpvt(*)
118 real(real64), intent(out) :: tau(*), work(*)
119 integer(int32), intent(out) :: info
120 end subroutine
121
122 subroutine zgeqp3(m, n, a, lda, jpvt, tau, work, lwork, rwork, info)
123 use iso_fortran_env, only : int32, real64
124 integer(int32), intent(in) :: m, n, lda, lwork
125 complex(real64), intent(inout) :: a(lda,*)
126 integer(int32), intent(inout) :: jpvt(*)
127 complex(real64), intent(out) :: tau(*), work(*)
128 real(real64), intent(out) :: rwork(*)
129 integer(int32), intent(out) :: info
130 end subroutine
131
132 subroutine dorgqr(m, n, k, a, lda, tau, work, lwork, info)
133 use iso_fortran_env, only : int32, real64
134 integer(int32), intent(in) :: m, n, k, lda, lwork
135 real(real64), intent(inout) :: a(lda,*)
136 real(real64), intent(in) :: tau(*)
137 real(real64), intent(out) :: work(*)
138 integer(int32), intent(out) :: info
139 end subroutine
140
141 subroutine zungqr(m, n, k, a, lda, tau, work, lwork, info)
142 use iso_fortran_env, only : int32, real64
143 integer(int32), intent(in) :: m, n, k, lda, lwork
144 complex(real64), intent(inout) :: a(lda,*)
145 complex(real64), intent(in) :: tau(*)
146 complex(real64), intent(out) :: work(*)
147 integer(int32), intent(out) :: info
148 end subroutine
149
150 subroutine dormqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, &
151 lwork, info)
152 use iso_fortran_env, only : int32, real64
153 character, intent(in) :: side, trans
154 integer(int32), intent(in) :: m, n, k, lda, ldc, lwork
155 real(real64), intent(in) :: a(lda,*), tau(*)
156 real(real64), intent(inout) :: c(ldc,*)
157 real(real64), intent(out) :: work(*)
158 integer(int32), intent(out) :: info
159 end subroutine
160
161 subroutine zunmqr(side, trans, m, n, k, a, lda, tau, c, ldc, work, &
162 lwork, info)
163 use iso_fortran_env, only : int32, real64
164 character, intent(in) :: side, trans
165 integer(int32), intent(in) :: m, n, k, lda, ldc, lwork
166 complex(real64), intent(in) :: a(lda,*), tau(*)
167 complex(real64), intent(inout) :: c(ldc,*)
168 complex(real64), intent(out) :: work(*)
169 integer(int32), intent(out) :: info
170 end subroutine
171
172 subroutine dpotrf(uplo, n, a, lda, info)
173 use iso_fortran_env, only : int32, real64
174 character, intent(in) :: uplo
175 integer(int32), intent(in) :: n, lda
176 real(real64), intent(inout) :: a(lda,*)
177 integer(int32), intent(out) :: info
178 end subroutine
179
180 subroutine zpotrf(uplo, n, a, lda, info)
181 use iso_fortran_env, only : int32, real64
182 character, intent(in) :: uplo
183 integer(int32), intent(in) :: n, lda
184 complex(real64), intent(inout) :: a(lda,*)
185 integer(int32), intent(out) :: info
186 end subroutine
187
188 subroutine dtzrzf(m, n, a, lda, tau, work, lwork, info)
189 use iso_fortran_env, only : int32, real64
190 integer(int32), intent(in) :: m, n, lda, lwork
191 real(real64), intent(inout) :: a(lda,*)
192 real(real64), intent(out) :: tau(*), work(*)
193 integer(int32), intent(out) :: info
194 end subroutine
195
196 subroutine ztzrzf(m, n, a, lda, tau, work, lwork, info)
197 use iso_fortran_env, only : int32, real64
198 integer(int32), intent(in) :: m, n, lda, lwork
199 complex(real64), intent(inout) :: a(lda,*)
200 complex(real64), intent(out) :: tau(*), work(*)
201 integer(int32), intent(out) :: info
202 end subroutine
203
204 subroutine dormrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, &
205 lwork, info)
206 use iso_fortran_env, only : int32, real64
207 character, intent(in) :: side, trans
208 integer(int32), intent(in) :: m, n, k, l, lda, ldc, lwork
209 real(real64), intent(in) :: a(lda,*), tau(*)
210 real(real64), intent(inout) :: c(ldc,*)
211 real(real64), intent(out) :: work(*)
212 integer(int32), intent(out) :: info
213 end subroutine
214
215 subroutine zunmrz(side, trans, m, n, k, l, a, lda, tau, c, ldc, work, &
216 lwork, info)
217 use iso_fortran_env, only : int32, real64
218 character, intent(in) :: side, trans
219 integer(int32), intent(in) :: m, n, k, l, lda, ldc, lwork
220 complex(real64), intent(in) :: a(lda,*), tau(*)
221 complex(real64), intent(inout) :: c(ldc,*)
222 complex(real64), intent(out) :: work(*)
223 integer(int32), intent(out) :: info
224 end subroutine
225
226 subroutine dgelqf(m, n, a, lda, tau, work, lwork, info)
227 use iso_fortran_env, only : int32, real64
228 integer(int32), intent(in) :: m, n, lda, lwork
229 real(real64), intent(inout) :: a(lda,*)
230 real(real64), intent(out) :: tau(*), work(*)
231 integer(int32), intent(out) :: info
232 end subroutine
233
234 subroutine zgelqf(m, n, a, lda, tau, work, lwork, info)
235 use iso_fortran_env, only : int32, real64
236 integer(int32), intent(in) :: m, n, lda, lwork
237 complex(real64), intent(inout) :: a(lda,*)
238 complex(real64), intent(out) :: tau(*), work(*)
239 integer(int32), intent(out) :: info
240 end subroutine
241
242 subroutine dorglq(m, n, k, a, lda, tau, work, lwork, info)
243 use iso_fortran_env, only : int32, real64
244 integer(int32), intent(in) :: m, n, k, lda, lwork
245 real(real64), intent(inout) :: a(lda,*)
246 real(real64), intent(in) :: tau(*)
247 real(real64), intent(out) :: work(*)
248 integer(int32), intent(out) :: info
249 end subroutine
250
251 subroutine zunglq(m, n, k, a, lda, tau, work, lwork, info)
252 use iso_fortran_env, only : int32, real64
253 integer(int32), intent(in) :: m, n, k, lda, lwork
254 complex(real64), intent(inout) :: a(lda,*)
255 complex(real64), intent(in) :: tau(*)
256 complex(real64), intent(out) :: work(*)
257 integer(int32), intent(out) :: info
258 end subroutine
259
260 subroutine dormlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, &
261 lwork, info)
262 use iso_fortran_env, only : int32, real64
263 character, intent(in) :: side, trans
264 integer(int32) :: m, n, k, lda, ldc, lwork
265 real(real64), intent(in) :: a(lda,*), tau(*)
266 real(real64), intent(inout) :: c(ldc,*)
267 real(real64), intent(out) :: work(*)
268 integer(int32), intent(out) :: info
269 end subroutine
270
271 subroutine zunmlq(side, trans, m, n, k, a, lda, tau, c, ldc, work, &
272 lwork, info)
273 use iso_fortran_env, only : int32, real64
274 character, intent(in) :: side, trans
275 integer(int32) :: m, n, k, lda, ldc, lwork
276 complex(real64), intent(in) :: a(lda,*), tau(*)
277 complex(real64), intent(inout) :: c(ldc,*)
278 complex(real64), intent(out) :: work(*)
279 integer(int32), intent(out) :: info
280 end subroutine
281
282 subroutine dgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
283 use iso_fortran_env, only : int32, real64
284 character, intent(in) :: trans
285 integer(int32), intent(in) :: n, nrhs, lda, ldb
286 real(real64), intent(in) :: a(lda,*)
287 integer(int32), intent(in) :: ipiv(*)
288 real(real64), intent(inout) :: b(ldb,*)
289 integer(int32), intent(out) :: info
290 end subroutine
291
292 subroutine zgetrs(trans, n, nrhs, a, lda, ipiv, b, ldb, info)
293 use iso_fortran_env, only : int32, real64
294 character, intent(in) :: trans
295 integer(int32), intent(in) :: n, nrhs, lda, ldb
296 complex(real64), intent(in) :: a(lda,*)
297 integer(int32), intent(in) :: ipiv(*)
298 complex(real64), intent(inout) :: b(ldb,*)
299 integer(int32), intent(out) :: info
300 end subroutine
301
302 subroutine dlaic1(job, j, x, sest, w, gamma, sestpr, s, c)
303 use iso_fortran_env, only : int32, real64
304 integer(int32), intent(in) :: job, j
305 real(real64), intent(in) :: x(j), w(j), sest, gamma
306 real(real64), intent(out) :: sestpr, s, c
307 end subroutine
308
309 subroutine zlaic1(job, j, x, sest, w, gamma, sestpr, s, c)
310 use iso_fortran_env, only : int32, real64
311 integer(int32), intent(in) :: job, j
312 complex(real64), intent(in) :: x(j), w(j), gamma
313 real(real64), intent(in) :: sest
314 real(real64), intent(out) :: sestpr
315 complex(real64), intent(out) :: s, c
316 end subroutine
317
318 subroutine dpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
319 use iso_fortran_env, only : int32, real64
320 character, intent(in) :: uplo
321 integer(int32), intent(in) :: n, nrhs, lda, ldb
322 real(real64), intent(in) :: a(lda,*)
323 real(real64), intent(inout) :: b(ldb,*)
324 integer(int32), intent(out) :: info
325 end subroutine
326
327 subroutine zpotrs(uplo, n, nrhs, a, lda, b, ldb, info)
328 use iso_fortran_env, only : int32, real64
329 character, intent(in) :: uplo
330 integer(int32), intent(in) :: n, nrhs, lda, ldb
331 complex(real64), intent(in) :: a(lda,*)
332 complex(real64), intent(inout) :: b(ldb,*)
333 integer(int32), intent(out) :: info
334 end subroutine
335
336 subroutine dgetri(n, a, lda, ipiv, work, lwork, info)
337 use iso_fortran_env, only : int32, real64
338 integer(int32), intent(in) :: n, lda, lwork, ipiv(*)
339 real(real64), intent(inout) :: a(lda,*)
340 real(real64), intent(out) :: work(*)
341 integer(int32), intent(out) :: info
342 end subroutine
343
344 subroutine zgetri(n, a, lda, ipiv, work, lwork, info)
345 use iso_fortran_env, only : int32, real64
346 integer(int32), intent(in) :: n, lda, lwork, ipiv(*)
347 complex(real64), intent(inout) :: a(lda,*)
348 complex(real64), intent(out) :: work(*)
349 integer(int32), intent(out) :: info
350 end subroutine
351
352 subroutine dgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
353 use iso_fortran_env, only : int32, real64
354 character, intent(in) :: trans
355 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
356 real(real64), intent(inout) :: a(lda,*), b(ldb,*)
357 real(real64), intent(out) :: work(*)
358 integer(int32), intent(out) :: info
359 end subroutine
360
361 subroutine zgels(trans, m, n, nrhs, a, lda, b, ldb, work, lwork, info)
362 use iso_fortran_env, only : int32, real64
363 character, intent(in) :: trans
364 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
365 complex(real64), intent(inout) :: a(lda,*), b(ldb,*)
366 complex(real64), intent(out) :: work(*)
367 integer(int32), intent(out) :: info
368 end subroutine
369
370 subroutine dgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, &
371 lwork, info)
372 use iso_fortran_env, only : int32, real64
373 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
374 real(real64), intent(inout) :: a(lda,*), b(ldb,*)
375 integer(int32), intent(inout) :: jpvt(*)
376 real(real64), intent(in) :: rcond
377 integer(int32), intent(out) :: rank, info
378 real(real64), intent(out) :: work(*)
379 end subroutine
380
381 subroutine zgelsy(m, n, nrhs, a, lda, b, ldb, jpvt, rcond, rank, work, &
382 lwork, rwork, info)
383 use iso_fortran_env, only : int32, real64
384 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
385 complex(real64), intent(inout) :: a(lda,*), b(ldb,*)
386 integer(int32), intent(inout) :: jpvt(*)
387 real(real64), intent(in) :: rcond
388 integer(int32), intent(out) :: rank, info
389 complex(real64), intent(out) :: work(*)
390 real(real64), intent(out) :: rwork(*)
391 end subroutine
392
393 subroutine dgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, &
394 lwork, info)
395 use iso_fortran_env, only : int32, real64
396 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
397 real(real64), intent(inout) :: a(lda,*), b(ldb,*)
398 real(real64), intent(out) :: s(*)
399 real(real64), intent(in) :: rcond
400 integer(int32), intent(out) :: rank, info
401 real(real64), intent(out) :: work(*)
402 end subroutine
403
404 subroutine zgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, &
405 lwork, rwork, info)
406 use iso_fortran_env, only : int32, real64
407 integer(int32), intent(in) :: m, n, nrhs, lda, ldb, lwork
408 complex(real64), intent(inout) :: a(lda,*), b(ldb,*)
409 real(real64), intent(out) :: s(*)
410 real(real64), intent(in) :: rcond
411 integer(int32), intent(out) :: rank, info
412 complex(real64), intent(out) :: work(*)
413 real(real64), intent(out) :: rwork(*)
414 end subroutine
415
416 subroutine dlasrt(id, n, d, info)
417 use iso_fortran_env, only : int32, real64
418 character, intent(in) :: id
419 integer(int32), intent(in) :: n
420 real(real64), intent(inout) :: d(*)
421 integer(int32), intent(out) :: info
422 end subroutine
423 end interface
424end module