1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- S Y S T E M . G E N E R I C _ C O M P L E X _ B L A S --
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 ???
34 with Ada
.Numerics
.Generic_Complex_Types
;
37 type Real
is digits <>;
38 with package Complex_Types
is new Ada
.Numerics
.Generic_Complex_Types
(Real
);
41 type Complex_Vector
is array (Integer range <>) of Complex
;
42 type Complex_Matrix
is array (Integer range <>, Integer range <>)
44 package System
.Generic_Complex_BLAS
is
47 -- Although BLAS support is only available for IEEE single and double
48 -- compatible floating-point types, this unit will accept any type
49 -- and apply conversions as necessary, with possible loss of
50 -- precision and range.
52 No_Trans
: aliased constant Character := 'N';
53 Trans
: aliased constant Character := 'T';
54 Conj_Trans
: aliased constant Character := 'C';
56 -- BLAS Level 1 Subprograms and Types
63 Inc_Y
: Integer := 1) return Complex
;
68 Inc_X
: Integer := 1) return Real
;
71 (Trans
: access constant Character;
74 Alpha
: Complex
:= (1.0, 0.0);
78 Inc_X
: Integer := 1; -- must be non-zero
79 Beta
: Complex
:= (0.0, 0.0);
80 Y
: in out Complex_Vector
;
81 Inc_Y
: Integer := 1); -- must be non-zero
85 -- gemm s, d, c, z Matrix-matrix product of general matrices
88 (Trans_A
: access constant Character;
89 Trans_B
: access constant Character;
93 Alpha
: Complex
:= (1.0, 0.0);
98 Beta
: Complex
:= (0.0, 0.0);
99 C
: in out Complex_Matrix
;
102 end System
.Generic_Complex_BLAS
;