diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 13:07:49 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 13:07:49 +0000 |
commit | 2a82929413ade6657b461f3342a5e9b198027bb9 (patch) | |
tree | ecbe2dead819e7af1e373e6b8a742174d0e44087 /gcc/ada/s-gearop.ads | |
parent | 962f9261e0cab281bcdaaa9974a2ea33d1cb39eb (diff) | |
download | gcc-2a82929413ade6657b461f3342a5e9b198027bb9.tar.gz |
2011-08-29 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Expand_Allocator_Expression): Add code to set attribute
Finalize_Address of the access type's finalization master.
(Expand_N_Allocator): Add code to set attribute Finalize_Address of the
access type's finalization master. Add a guard to prevent
Associated_Storage_Pool from being set on .NET/JVM.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Add code to set
attribute Finalize_Address of the access type's finalization master.
* exp_ch7.adb (Make_Finalize_Address_Call): New routine.
* exp_ch7.ads (Make_Finalize_Address_Call): New routine.
* rtsfind.ads: Add RE_Set_Finalize_Address to tables RE_Id and
RE_Unit_Table.
* s-finmas.adb: Add with clause for System.Address_Image. Add with and
use clause for System.IO
(Detach): Relax the assertion, to be reinstated later.
(Finalize): Rewrite the iteration loop to avoid pointer comparison.
Relax the assertion on Finalize_Address, to be reinstated later.
(Is_Empty_List): New routine.
(pm): New debug routine.
(Set_Finalize_Address): New routine.
* s-finmas.ads (pm): New debug routine.
(Set_Finalize_Address): New routine.
* s-stposu.adb (Allocate_Any_Controlled): Code reformatting.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* a-exexpr-gcc.adb (GCC_Exception_Access, GNAT_GCC_Exception_Access):
Remove convention C.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* s-taprop-vms.adb (Get_Exc_Stack_Addr): Remove.
(Initialize_TCB): Remove Exc_Stack_Ptr initialization.
(Finalize_TCB): Remove its finalization.
(Initialize): Remove assignment of GET_Exc_Stack_Addr
* s-soflin.adb (NT_Exc_Stack): Remove
(Get_Exc_Stack_Addr_NT): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise.
* s-soflin.ads (Get_Exc_Stack_Addr_NT): Remove.
(Get_Exc_Stack_Addr): Likewise.
(Get_Exc_Stack_Addr_Soft): Likewise
* s-taspri-vms.ads (Exc_Stack_T): Remove.
(Exc_Stack_Ptr_T): Likewise.
(Private_Data): Remove Exc_Stack_Ptr component.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* raise-gcc.c (get_ip_from_context): New function. Factorize code.
2011-08-29 Tristan Gingold <gingold@adacore.com>
* gnat_ugn.texi: Fix aix and x86-solaris info for run-time.
2011-08-29 Geert Bosch <bosch@adacore.com>
* s-gearop.ads (Back_Substitute, Diagonal, Forward_Eliminate,
L2_Norm, Swap_Column): New generic subprograms
* s-gearop.adb (Back_Substitute, Diagonal, Forward_Eliminate,
L2_Norm, Swap_Column): Implement new subprograms in order to
eliminate dependency on BLAS and LAPACK libraries in
Ada.Numerics.Generic_Real_Arrays and eventually also the complex
version. Forward_Eliminate/Back_Substitute can be used to put a
matrix in row echelon or reduced row echelon form using partial
pivoting.
* a-ngrear.adb: (Back_Substitute, Diagonal, Forward_Eleminate,
Swap_Column): Instantiate from System.Generic_Array_Operations.
("*", "abs"): Implement by instantiation from Generic_Array_Operations.
(Sqrt): Local function for simple computation of square root without
adding dependencies on Generic_Elementary_Functions.
(Swap): New subprogram to exchange floating point numbers.
(Inverse): Reimplement using Jordan-Gauss elimination.
(Jacobi): New procedure implementing Jacobi's method for computation
of eigensystems, based on Rutishauser's implementation.
(L2_Norm): Implement directly using the inner product.
(Sort_Eigensystem): Sort eigenvalue/eigenvector pairs in order of
decreasing eigenvalue as required by the Ada RM.
(Swap_Column): New helper procedure for Sort_Eigensystem.
Remove with of System.Generic_Real_BLAS and System.Generic_Real_LAPACK.
Add with of Ada.Containers.Generic_Anonymous_Array_Sort, for
Sort_Eigensystems.
2011-08-29 Thomas Quinot <quinot@adacore.com>
* put_scos.adb (Put_SCOs): Do not emit a newline for an empty
statements line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178220 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-gearop.ads')
-rw-r--r-- | gcc/ada/s-gearop.ads | 66 |
1 files changed, 65 insertions, 1 deletions
diff --git a/gcc/ada/s-gearop.ads b/gcc/ada/s-gearop.ads index dfbceb3d058..51e3b92c201 100644 --- a/gcc/ada/s-gearop.ads +++ b/gcc/ada/s-gearop.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2006-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2006-2011, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -32,6 +32,50 @@ package System.Generic_Array_Operations is pragma Pure (Generic_Array_Operations); + --------------------- + -- Back_Substitute -- + --------------------- + + generic + type Scalar is private; + type Matrix is array (Integer range <>, Integer range <>) of Scalar; + with function "-" (Left, Right : Scalar) return Scalar is <>; + with function "*" (Left, Right : Scalar) return Scalar is <>; + with function "/" (Left, Right : Scalar) return Scalar is <>; + with function Is_Non_Zero (X : Scalar) return Boolean is <>; + procedure Back_Substitute (M, N : in out Matrix); + + -------------- + -- Diagonal -- + -------------- + + generic + type Scalar is private; + type Vector is array (Integer range <>) of Scalar; + type Matrix is array (Integer range <>, Integer range <>) of Scalar; + function Diagonal (A : Matrix) return Vector; + + ----------------------- + -- Forward_Eliminate -- + ----------------------- + + -- Use elementary row operations to put square matrix M in row echolon + -- form. Identical row operations are performed on matrix N, must have the + -- same number of rows as M. + + generic + type Scalar is private; + type Matrix is array (Integer range <>, Integer range <>) of Scalar; + with function "-" (Left, Right : Scalar) return Scalar is <>; + with function "*" (Left, Right : Scalar) return Scalar is <>; + with function "/" (Left, Right : Scalar) return Scalar is <>; + with function "<" (Left, Right : Scalar) return Boolean is <>; + Zero, One : Scalar; + procedure Forward_Eliminate + (M : in out Matrix; + N : in out Matrix; + Det : out Scalar); + -------------------------- -- Square_Matrix_Length -- -------------------------- @@ -242,6 +286,17 @@ pragma Pure (Generic_Array_Operations); (Left : Left_Vector; Right : Right_Vector) return Result_Scalar; + ------------- + -- L2_Norm -- + ------------- + + generic + type Scalar is private; + type Vector is array (Integer range <>) of Scalar; + with function Inner_Product (Left, Right : Vector) return Scalar is <>; + with function Sqrt (X : Scalar) return Scalar is <>; + function L2_Norm (X : Vector) return Scalar; + ------------------- -- Outer_Product -- ------------------- @@ -332,6 +387,15 @@ pragma Pure (Generic_Array_Operations); (Left : Left_Matrix; Right : Right_Matrix) return Result_Matrix; + ----------------- + -- Swap_Column -- + ----------------- + + generic + type Scalar is private; + type Matrix is array (Integer range <>, Integer range <>) of Scalar; + procedure Swap_Column (A : in out Matrix; Left, Right : Integer); + --------------- -- Transpose -- --------------- |