aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-coprnu.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-coprnu.ads')
-rw-r--r--gcc/ada/a-coprnu.ads30
1 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ada/a-coprnu.ads b/gcc/ada/a-coprnu.ads
index 20e49d8..0f832d1 100644
--- a/gcc/ada/a-coprnu.ads
+++ b/gcc/ada/a-coprnu.ads
@@ -6,13 +6,34 @@
-- --
-- S p e c --
-- --
--- This specification is adapted from the Ada Reference Manual for use with --
--- GNAT. In accordance with the copyright of that document, you can freely --
--- copy and modify this specification, provided that if you redistribute a --
--- modified version, any changes that you have made are clearly indicated. --
+-- Copyright (C) 2004-2006, 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- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
+-- Boston, MA 02110-1301, USA. --
+-- --
+-- As a special exception, if other files instantiate generics from this --
+-- unit, or you link this unit with other files to produce an executable, --
+-- this unit does not by itself cause the resulting executable to be --
+-- covered by the GNU General Public License. This exception does not --
+-- however invalidate any other reasons why the executable file might be --
+-- covered by the GNU Public License. --
+-- --
+-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
+-- This package declares the prime numbers array used to implement hashed
+-- containers. Bucket arrays are always allocated with a prime-number
+-- length (computed using To_Prime below), as this produces better scatter
+-- when hash values are folded.
+
package Ada.Containers.Prime_Numbers is
pragma Pure;
@@ -27,5 +48,6 @@ package Ada.Containers.Prime_Numbers is
1610612741, 3221225473, 4294967291);
function To_Prime (Length : Count_Type) return Hash_Type;
+ -- Returns the smallest value in Primes not less than Length
end Ada.Containers.Prime_Numbers;