* gcc.dg/compat/struct-layout-1_generate.c (dg_options): New. Moved
[official-gcc.git] / gcc / ada / i-forlap.ads
blob37447deae8ead38f8495ba6f574a1abdbde00e1d
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME COMPONENTS --
4 -- --
5 -- I N T E R F A C E S . F O R T R A N . L A P A C K --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 2006-2007, Free Software Foundation, Inc. --
10 -- --
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 2, 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. See the GNU General Public License --
17 -- for more details. You should have received a copy of the GNU General --
18 -- Public License distributed with GNAT; see file COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- As a special exception, if other files instantiate generics from this --
23 -- unit, or you link this unit with other files to produce an executable, --
24 -- this unit does not by itself cause the resulting executable to be --
25 -- covered by the GNU General Public License. This exception does not --
26 -- however invalidate any other reasons why the executable file might be --
27 -- covered by the GNU Public License. --
28 -- --
29 -- GNAT was originally developed by the GNAT team at New York University. --
30 -- Extensive contributions were provided by Ada Core Technologies Inc. --
31 -- --
32 ------------------------------------------------------------------------------
34 -- Package comment required if non-RM package ???
36 with Interfaces.Fortran.BLAS;
37 package Interfaces.Fortran.LAPACK is
38 pragma Pure;
40 type Integer_Vector is array (Integer range <>) of Integer;
42 Upper : aliased constant Character := 'U';
43 Lower : aliased constant Character := 'L';
45 subtype Real_Vector is BLAS.Real_Vector;
46 subtype Real_Matrix is BLAS.Real_Matrix;
47 subtype Double_Precision_Vector is BLAS.Double_Precision_Vector;
48 subtype Double_Precision_Matrix is BLAS.Double_Precision_Matrix;
49 subtype Complex_Vector is BLAS.Complex_Vector;
50 subtype Complex_Matrix is BLAS.Complex_Matrix;
51 subtype Double_Complex_Vector is BLAS.Double_Complex_Vector;
52 subtype Double_Complex_Matrix is BLAS.Double_Complex_Matrix;
54 -- LAPACK Computational Routines
56 -- gerfs Refines the solution of a system of linear equations with
57 -- a general matrix and estimates its error
58 -- getrf Computes LU factorization of a general m-by-n matrix
59 -- getri Computes inverse of an LU-factored general matrix
60 -- square matrix, with multiple right-hand sides
61 -- getrs Solves a system of linear equations with an LU-factored
62 -- square matrix, with multiple right-hand sides
63 -- hetrd Reduces a complex Hermitian matrix to tridiagonal form
64 -- heevr Computes selected eigenvalues and, optionally, eigenvectors of
65 -- a Hermitian matrix using the Relatively Robust Representations
66 -- orgtr Generates the real orthogonal matrix Q determined by sytrd
67 -- steqr Computes all eigenvalues and eigenvectors of a symmetric or
68 -- Hermitian matrix reduced to tridiagonal form (QR algorithm)
69 -- sterf Computes all eigenvalues of a real symmetric
70 -- tridiagonal matrix using QR algorithm
71 -- sytrd Reduces a real symmetric matrix to tridiagonal form
73 procedure sgetrf
74 (M : Natural;
75 N : Natural;
76 A : in out Real_Matrix;
77 Ld_A : Positive;
78 I_Piv : out Integer_Vector;
79 Info : access Integer);
81 procedure dgetrf
82 (M : Natural;
83 N : Natural;
84 A : in out Double_Precision_Matrix;
85 Ld_A : Positive;
86 I_Piv : out Integer_Vector;
87 Info : access Integer);
89 procedure cgetrf
90 (M : Natural;
91 N : Natural;
92 A : in out Complex_Matrix;
93 Ld_A : Positive;
94 I_Piv : out Integer_Vector;
95 Info : access Integer);
97 procedure zgetrf
98 (M : Natural;
99 N : Natural;
100 A : in out Double_Complex_Matrix;
101 Ld_A : Positive;
102 I_Piv : out Integer_Vector;
103 Info : access Integer);
105 procedure sgetri
106 (N : Natural;
107 A : in out Real_Matrix;
108 Ld_A : Positive;
109 I_Piv : Integer_Vector;
110 Work : in out Real_Vector;
111 L_Work : Integer;
112 Info : access Integer);
114 procedure dgetri
115 (N : Natural;
116 A : in out Double_Precision_Matrix;
117 Ld_A : Positive;
118 I_Piv : Integer_Vector;
119 Work : in out Double_Precision_Vector;
120 L_Work : Integer;
121 Info : access Integer);
123 procedure cgetri
124 (N : Natural;
125 A : in out Complex_Matrix;
126 Ld_A : Positive;
127 I_Piv : Integer_Vector;
128 Work : in out Complex_Vector;
129 L_Work : Integer;
130 Info : access Integer);
132 procedure zgetri
133 (N : Natural;
134 A : in out Double_Complex_Matrix;
135 Ld_A : Positive;
136 I_Piv : Integer_Vector;
137 Work : in out Double_Complex_Vector;
138 L_Work : Integer;
139 Info : access Integer);
141 procedure sgetrs
142 (Trans : access constant Character;
143 N : Natural;
144 N_Rhs : Natural;
145 A : Real_Matrix;
146 Ld_A : Positive;
147 I_Piv : Integer_Vector;
148 B : in out Real_Matrix;
149 Ld_B : Positive;
150 Info : access Integer);
152 procedure dgetrs
153 (Trans : access constant Character;
154 N : Natural;
155 N_Rhs : Natural;
156 A : Double_Precision_Matrix;
157 Ld_A : Positive;
158 I_Piv : Integer_Vector;
159 B : in out Double_Precision_Matrix;
160 Ld_B : Positive;
161 Info : access Integer);
163 procedure cgetrs
164 (Trans : access constant Character;
165 N : Natural;
166 N_Rhs : Natural;
167 A : Complex_Matrix;
168 Ld_A : Positive;
169 I_Piv : Integer_Vector;
170 B : in out Complex_Matrix;
171 Ld_B : Positive;
172 Info : access Integer);
174 procedure zgetrs
175 (Trans : access constant Character;
176 N : Natural;
177 N_Rhs : Natural;
178 A : Double_Complex_Matrix;
179 Ld_A : Positive;
180 I_Piv : Integer_Vector;
181 B : in out Double_Complex_Matrix;
182 Ld_B : Positive;
183 Info : access Integer);
185 procedure cheevr
186 (Job_Z : access constant Character;
187 Rng : access constant Character;
188 Uplo : access constant Character;
189 N : Natural;
190 A : in out Complex_Matrix;
191 Ld_A : Positive;
192 Vl, Vu : Real := 0.0;
193 Il, Iu : Integer := 1;
194 Abs_Tol : Real := 0.0;
195 M : out Integer;
196 W : out Real_Vector;
197 Z : out Complex_Matrix;
198 Ld_Z : Positive;
199 I_Supp_Z : out Integer_Vector;
200 Work : out Complex_Vector;
201 L_Work : Integer;
202 R_Work : out Real_Vector;
203 LR_Work : Integer;
204 I_Work : out Integer_Vector;
205 LI_Work : Integer;
206 Info : access Integer);
208 procedure zheevr
209 (Job_Z : access constant Character;
210 Rng : access constant Character;
211 Uplo : access constant Character;
212 N : Natural;
213 A : in out Double_Complex_Matrix;
214 Ld_A : Positive;
215 Vl, Vu : Double_Precision := 0.0;
216 Il, Iu : Integer := 1;
217 Abs_Tol : Double_Precision := 0.0;
218 M : out Integer;
219 W : out Double_Precision_Vector;
220 Z : out Double_Complex_Matrix;
221 Ld_Z : Positive;
222 I_Supp_Z : out Integer_Vector;
223 Work : out Double_Complex_Vector;
224 L_Work : Integer;
225 R_Work : out Double_Precision_Vector;
226 LR_Work : Integer;
227 I_Work : out Integer_Vector;
228 LI_Work : Integer;
229 Info : access Integer);
231 procedure chetrd
232 (Uplo : access constant Character;
233 N : Natural;
234 A : in out Complex_Matrix;
235 Ld_A : Positive;
236 D : out Real_Vector;
237 E : out Real_Vector;
238 Tau : out Complex_Vector;
239 Work : out Complex_Vector;
240 L_Work : Integer;
241 Info : access Integer);
243 procedure zhetrd
244 (Uplo : access constant Character;
245 N : Natural;
246 A : in out Double_Complex_Matrix;
247 Ld_A : Positive;
248 D : out Double_Precision_Vector;
249 E : out Double_Precision_Vector;
250 Tau : out Double_Complex_Vector;
251 Work : out Double_Complex_Vector;
252 L_Work : Integer;
253 Info : access Integer);
255 procedure ssytrd
256 (Uplo : access constant Character;
257 N : Natural;
258 A : in out Real_Matrix;
259 Ld_A : Positive;
260 D : out Real_Vector;
261 E : out Real_Vector;
262 Tau : out Real_Vector;
263 Work : out Real_Vector;
264 L_Work : Integer;
265 Info : access Integer);
267 procedure dsytrd
268 (Uplo : access constant Character;
269 N : Natural;
270 A : in out Double_Precision_Matrix;
271 Ld_A : Positive;
272 D : out Double_Precision_Vector;
273 E : out Double_Precision_Vector;
274 Tau : out Double_Precision_Vector;
275 Work : out Double_Precision_Vector;
276 L_Work : Integer;
277 Info : access Integer);
279 procedure ssterf
280 (N : Natural;
281 D : in out Real_Vector;
282 E : in out Real_Vector;
283 Info : access Integer);
285 procedure dsterf
286 (N : Natural;
287 D : in out Double_Precision_Vector;
288 E : in out Double_Precision_Vector;
289 Info : access Integer);
291 procedure sorgtr
292 (Uplo : access constant Character;
293 N : Natural;
294 A : in out Real_Matrix;
295 Ld_A : Positive;
296 Tau : Real_Vector;
297 Work : out Real_Vector;
298 L_Work : Integer;
299 Info : access Integer);
301 procedure dorgtr
302 (Uplo : access constant Character;
303 N : Natural;
304 A : in out Double_Precision_Matrix;
305 Ld_A : Positive;
306 Tau : Double_Precision_Vector;
307 Work : out Double_Precision_Vector;
308 L_Work : Integer;
309 Info : access Integer);
311 procedure sstebz
312 (Rng : access constant Character;
313 Order : access constant Character;
314 N : Natural;
315 Vl, Vu : Real := 0.0;
316 Il, Iu : Integer := 1;
317 Abs_Tol : Real := 0.0;
318 D : Real_Vector;
319 E : Real_Vector;
320 M : out Natural;
321 N_Split : out Natural;
322 W : out Real_Vector;
323 I_Block : out Integer_Vector;
324 I_Split : out Integer_Vector;
325 Work : out Real_Vector;
326 I_Work : out Integer_Vector;
327 Info : access Integer);
329 procedure dstebz
330 (Rng : access constant Character;
331 Order : access constant Character;
332 N : Natural;
333 Vl, Vu : Double_Precision := 0.0;
334 Il, Iu : Integer := 1;
335 Abs_Tol : Double_Precision := 0.0;
336 D : Double_Precision_Vector;
337 E : Double_Precision_Vector;
338 M : out Natural;
339 N_Split : out Natural;
340 W : out Double_Precision_Vector;
341 I_Block : out Integer_Vector;
342 I_Split : out Integer_Vector;
343 Work : out Double_Precision_Vector;
344 I_Work : out Integer_Vector;
345 Info : access Integer);
347 procedure ssteqr
348 (Comp_Z : access constant Character;
349 N : Natural;
350 D : in out Real_Vector;
351 E : in out Real_Vector;
352 Z : in out Real_Matrix;
353 Ld_Z : Positive;
354 Work : out Real_Vector;
355 Info : access Integer);
357 procedure dsteqr
358 (Comp_Z : access constant Character;
359 N : Natural;
360 D : in out Double_Precision_Vector;
361 E : in out Double_Precision_Vector;
362 Z : in out Double_Precision_Matrix;
363 Ld_Z : Positive;
364 Work : out Double_Precision_Vector;
365 Info : access Integer);
367 procedure csteqr
368 (Comp_Z : access constant Character;
369 N : Natural;
370 D : in out Real_Vector;
371 E : in out Real_Vector;
372 Z : in out Complex_Matrix;
373 Ld_Z : Positive;
374 Work : out Real_Vector;
375 Info : access Integer);
377 procedure zsteqr
378 (Comp_Z : access constant Character;
379 N : Natural;
380 D : in out Double_Precision_Vector;
381 E : in out Double_Precision_Vector;
382 Z : in out Double_Complex_Matrix;
383 Ld_Z : Positive;
384 Work : out Double_Precision_Vector;
385 Info : access Integer);
387 private
388 pragma Import (Fortran, csteqr, "csteqr_");
389 pragma Import (Fortran, cgetrf, "cgetrf_");
390 pragma Import (Fortran, cgetri, "cgetri_");
391 pragma Import (Fortran, cgetrs, "cgetrs_");
392 pragma Import (Fortran, cheevr, "cheevr_");
393 pragma Import (Fortran, chetrd, "chetrd_");
394 pragma Import (Fortran, dgetrf, "dgetrf_");
395 pragma Import (Fortran, dgetri, "dgetri_");
396 pragma Import (Fortran, dgetrs, "dgetrs_");
397 pragma Import (Fortran, dsytrd, "dsytrd_");
398 pragma Import (Fortran, dstebz, "dstebz_");
399 pragma Import (Fortran, dsterf, "dsterf_");
400 pragma Import (Fortran, dorgtr, "dorgtr_");
401 pragma Import (Fortran, dsteqr, "dsteqr_");
402 pragma Import (Fortran, sgetrf, "sgetrf_");
403 pragma Import (Fortran, sgetri, "sgetri_");
404 pragma Import (Fortran, sgetrs, "sgetrs_");
405 pragma Import (Fortran, sorgtr, "sorgtr_");
406 pragma Import (Fortran, sstebz, "sstebz_");
407 pragma Import (Fortran, ssterf, "ssterf_");
408 pragma Import (Fortran, ssteqr, "ssteqr_");
409 pragma Import (Fortran, ssytrd, "ssytrd_");
410 pragma Import (Fortran, zgetrf, "zgetrf_");
411 pragma Import (Fortran, zgetri, "zgetri_");
412 pragma Import (Fortran, zgetrs, "zgetrs_");
413 pragma Import (Fortran, zheevr, "zheevr_");
414 pragma Import (Fortran, zhetrd, "zhetrd_");
415 pragma Import (Fortran, zsteqr, "zsteqr_");
416 end Interfaces.Fortran.LAPACK;