1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- I N T E R F A C E S . F O R T R A N . L A P A C K --
9 -- Copyright (C) 2006-2009, Free Software Foundation, Inc. --
11 -- GNAT is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- Package comment required if non-RM package ???
34 with Interfaces
.Fortran
.BLAS
;
35 package Interfaces
.Fortran
.LAPACK
is
38 type Integer_Vector
is array (Integer range <>) of Integer;
40 Upper
: aliased constant Character := 'U';
41 Lower
: aliased constant Character := 'L';
43 subtype Real_Vector
is BLAS
.Real_Vector
;
44 subtype Real_Matrix
is BLAS
.Real_Matrix
;
45 subtype Double_Precision_Vector
is BLAS
.Double_Precision_Vector
;
46 subtype Double_Precision_Matrix
is BLAS
.Double_Precision_Matrix
;
47 subtype Complex_Vector
is BLAS
.Complex_Vector
;
48 subtype Complex_Matrix
is BLAS
.Complex_Matrix
;
49 subtype Double_Complex_Vector
is BLAS
.Double_Complex_Vector
;
50 subtype Double_Complex_Matrix
is BLAS
.Double_Complex_Matrix
;
52 -- LAPACK Computational Routines
54 -- gerfs Refines the solution of a system of linear equations with
55 -- a general matrix and estimates its error
56 -- getrf Computes LU factorization of a general m-by-n matrix
57 -- getri Computes inverse of an LU-factored general matrix
58 -- square matrix, with multiple right-hand sides
59 -- getrs Solves a system of linear equations with an LU-factored
60 -- square matrix, with multiple right-hand sides
61 -- hetrd Reduces a complex Hermitian matrix to tridiagonal form
62 -- heevr Computes selected eigenvalues and, optionally, eigenvectors of
63 -- a Hermitian matrix using the Relatively Robust Representations
64 -- orgtr Generates the real orthogonal matrix Q determined by sytrd
65 -- steqr Computes all eigenvalues and eigenvectors of a symmetric or
66 -- Hermitian matrix reduced to tridiagonal form (QR algorithm)
67 -- sterf Computes all eigenvalues of a real symmetric
68 -- tridiagonal matrix using QR algorithm
69 -- sytrd Reduces a real symmetric matrix to tridiagonal form
74 A
: in out Real_Matrix
;
76 I_Piv
: out Integer_Vector
;
77 Info
: access Integer);
82 A
: in out Double_Precision_Matrix
;
84 I_Piv
: out Integer_Vector
;
85 Info
: access Integer);
90 A
: in out Complex_Matrix
;
92 I_Piv
: out Integer_Vector
;
93 Info
: access Integer);
98 A
: in out Double_Complex_Matrix
;
100 I_Piv
: out Integer_Vector
;
101 Info
: access Integer);
105 A
: in out Real_Matrix
;
107 I_Piv
: Integer_Vector
;
108 Work
: in out Real_Vector
;
110 Info
: access Integer);
114 A
: in out Double_Precision_Matrix
;
116 I_Piv
: Integer_Vector
;
117 Work
: in out Double_Precision_Vector
;
119 Info
: access Integer);
123 A
: in out Complex_Matrix
;
125 I_Piv
: Integer_Vector
;
126 Work
: in out Complex_Vector
;
128 Info
: access Integer);
132 A
: in out Double_Complex_Matrix
;
134 I_Piv
: Integer_Vector
;
135 Work
: in out Double_Complex_Vector
;
137 Info
: access Integer);
140 (Trans
: access constant Character;
145 I_Piv
: Integer_Vector
;
146 B
: in out Real_Matrix
;
148 Info
: access Integer);
151 (Trans
: access constant Character;
154 A
: Double_Precision_Matrix
;
156 I_Piv
: Integer_Vector
;
157 B
: in out Double_Precision_Matrix
;
159 Info
: access Integer);
162 (Trans
: access constant Character;
167 I_Piv
: Integer_Vector
;
168 B
: in out Complex_Matrix
;
170 Info
: access Integer);
173 (Trans
: access constant Character;
176 A
: Double_Complex_Matrix
;
178 I_Piv
: Integer_Vector
;
179 B
: in out Double_Complex_Matrix
;
181 Info
: access Integer);
184 (Job_Z
: access constant Character;
185 Rng
: access constant Character;
186 Uplo
: access constant Character;
188 A
: in out Complex_Matrix
;
190 Vl
, Vu
: Real
:= 0.0;
191 Il
, Iu
: Integer := 1;
192 Abs_Tol
: Real
:= 0.0;
195 Z
: out Complex_Matrix
;
197 I_Supp_Z
: out Integer_Vector
;
198 Work
: out Complex_Vector
;
200 R_Work
: out Real_Vector
;
202 I_Work
: out Integer_Vector
;
204 Info
: access Integer);
207 (Job_Z
: access constant Character;
208 Rng
: access constant Character;
209 Uplo
: access constant Character;
211 A
: in out Double_Complex_Matrix
;
213 Vl
, Vu
: Double_Precision
:= 0.0;
214 Il
, Iu
: Integer := 1;
215 Abs_Tol
: Double_Precision
:= 0.0;
217 W
: out Double_Precision_Vector
;
218 Z
: out Double_Complex_Matrix
;
220 I_Supp_Z
: out Integer_Vector
;
221 Work
: out Double_Complex_Vector
;
223 R_Work
: out Double_Precision_Vector
;
225 I_Work
: out Integer_Vector
;
227 Info
: access Integer);
230 (Uplo
: access constant Character;
232 A
: in out Complex_Matrix
;
236 Tau
: out Complex_Vector
;
237 Work
: out Complex_Vector
;
239 Info
: access Integer);
242 (Uplo
: access constant Character;
244 A
: in out Double_Complex_Matrix
;
246 D
: out Double_Precision_Vector
;
247 E
: out Double_Precision_Vector
;
248 Tau
: out Double_Complex_Vector
;
249 Work
: out Double_Complex_Vector
;
251 Info
: access Integer);
254 (Uplo
: access constant Character;
256 A
: in out Real_Matrix
;
260 Tau
: out Real_Vector
;
261 Work
: out Real_Vector
;
263 Info
: access Integer);
266 (Uplo
: access constant Character;
268 A
: in out Double_Precision_Matrix
;
270 D
: out Double_Precision_Vector
;
271 E
: out Double_Precision_Vector
;
272 Tau
: out Double_Precision_Vector
;
273 Work
: out Double_Precision_Vector
;
275 Info
: access Integer);
279 D
: in out Real_Vector
;
280 E
: in out Real_Vector
;
281 Info
: access Integer);
285 D
: in out Double_Precision_Vector
;
286 E
: in out Double_Precision_Vector
;
287 Info
: access Integer);
290 (Uplo
: access constant Character;
292 A
: in out Real_Matrix
;
295 Work
: out Real_Vector
;
297 Info
: access Integer);
300 (Uplo
: access constant Character;
302 A
: in out Double_Precision_Matrix
;
304 Tau
: Double_Precision_Vector
;
305 Work
: out Double_Precision_Vector
;
307 Info
: access Integer);
310 (Rng
: access constant Character;
311 Order
: access constant Character;
313 Vl
, Vu
: Real
:= 0.0;
314 Il
, Iu
: Integer := 1;
315 Abs_Tol
: Real
:= 0.0;
319 N_Split
: out Natural;
321 I_Block
: out Integer_Vector
;
322 I_Split
: out Integer_Vector
;
323 Work
: out Real_Vector
;
324 I_Work
: out Integer_Vector
;
325 Info
: access Integer);
328 (Rng
: access constant Character;
329 Order
: access constant Character;
331 Vl
, Vu
: Double_Precision
:= 0.0;
332 Il
, Iu
: Integer := 1;
333 Abs_Tol
: Double_Precision
:= 0.0;
334 D
: Double_Precision_Vector
;
335 E
: Double_Precision_Vector
;
337 N_Split
: out Natural;
338 W
: out Double_Precision_Vector
;
339 I_Block
: out Integer_Vector
;
340 I_Split
: out Integer_Vector
;
341 Work
: out Double_Precision_Vector
;
342 I_Work
: out Integer_Vector
;
343 Info
: access Integer);
346 (Comp_Z
: access constant Character;
348 D
: in out Real_Vector
;
349 E
: in out Real_Vector
;
350 Z
: in out Real_Matrix
;
352 Work
: out Real_Vector
;
353 Info
: access Integer);
356 (Comp_Z
: access constant Character;
358 D
: in out Double_Precision_Vector
;
359 E
: in out Double_Precision_Vector
;
360 Z
: in out Double_Precision_Matrix
;
362 Work
: out Double_Precision_Vector
;
363 Info
: access Integer);
366 (Comp_Z
: access constant Character;
368 D
: in out Real_Vector
;
369 E
: in out Real_Vector
;
370 Z
: in out Complex_Matrix
;
372 Work
: out Real_Vector
;
373 Info
: access Integer);
376 (Comp_Z
: access constant Character;
378 D
: in out Double_Precision_Vector
;
379 E
: in out Double_Precision_Vector
;
380 Z
: in out Double_Complex_Matrix
;
382 Work
: out Double_Precision_Vector
;
383 Info
: access Integer);
386 pragma Import
(Fortran
, csteqr
, "csteqr_");
387 pragma Import
(Fortran
, cgetrf
, "cgetrf_");
388 pragma Import
(Fortran
, cgetri
, "cgetri_");
389 pragma Import
(Fortran
, cgetrs
, "cgetrs_");
390 pragma Import
(Fortran
, cheevr
, "cheevr_");
391 pragma Import
(Fortran
, chetrd
, "chetrd_");
392 pragma Import
(Fortran
, dgetrf
, "dgetrf_");
393 pragma Import
(Fortran
, dgetri
, "dgetri_");
394 pragma Import
(Fortran
, dgetrs
, "dgetrs_");
395 pragma Import
(Fortran
, dsytrd
, "dsytrd_");
396 pragma Import
(Fortran
, dstebz
, "dstebz_");
397 pragma Import
(Fortran
, dsterf
, "dsterf_");
398 pragma Import
(Fortran
, dorgtr
, "dorgtr_");
399 pragma Import
(Fortran
, dsteqr
, "dsteqr_");
400 pragma Import
(Fortran
, sgetrf
, "sgetrf_");
401 pragma Import
(Fortran
, sgetri
, "sgetri_");
402 pragma Import
(Fortran
, sgetrs
, "sgetrs_");
403 pragma Import
(Fortran
, sorgtr
, "sorgtr_");
404 pragma Import
(Fortran
, sstebz
, "sstebz_");
405 pragma Import
(Fortran
, ssterf
, "ssterf_");
406 pragma Import
(Fortran
, ssteqr
, "ssteqr_");
407 pragma Import
(Fortran
, ssytrd
, "ssytrd_");
408 pragma Import
(Fortran
, zgetrf
, "zgetrf_");
409 pragma Import
(Fortran
, zgetri
, "zgetri_");
410 pragma Import
(Fortran
, zgetrs
, "zgetrs_");
411 pragma Import
(Fortran
, zheevr
, "zheevr_");
412 pragma Import
(Fortran
, zhetrd
, "zhetrd_");
413 pragma Import
(Fortran
, zsteqr
, "zsteqr_");
414 end Interfaces
.Fortran
.LAPACK
;