hexsha
stringlengths 40
40
| size
int64 3
1.05M
| ext
stringclasses 163
values | lang
stringclasses 53
values | max_stars_repo_path
stringlengths 3
945
| max_stars_repo_name
stringlengths 4
112
| max_stars_repo_head_hexsha
stringlengths 40
78
| max_stars_repo_licenses
sequencelengths 1
10
| max_stars_count
float64 1
191k
⌀ | max_stars_repo_stars_event_min_datetime
stringlengths 24
24
⌀ | max_stars_repo_stars_event_max_datetime
stringlengths 24
24
⌀ | max_issues_repo_path
stringlengths 3
945
| max_issues_repo_name
stringlengths 4
113
| max_issues_repo_head_hexsha
stringlengths 40
78
| max_issues_repo_licenses
sequencelengths 1
10
| max_issues_count
float64 1
116k
⌀ | max_issues_repo_issues_event_min_datetime
stringlengths 24
24
⌀ | max_issues_repo_issues_event_max_datetime
stringlengths 24
24
⌀ | max_forks_repo_path
stringlengths 3
945
| max_forks_repo_name
stringlengths 4
113
| max_forks_repo_head_hexsha
stringlengths 40
78
| max_forks_repo_licenses
sequencelengths 1
10
| max_forks_count
float64 1
105k
⌀ | max_forks_repo_forks_event_min_datetime
stringlengths 24
24
⌀ | max_forks_repo_forks_event_max_datetime
stringlengths 24
24
⌀ | content
stringlengths 3
1.05M
| avg_line_length
float64 1
966k
| max_line_length
int64 1
977k
| alphanum_fraction
float64 0
1
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1352a1c09c8faed9ca7e82fe1a2b6c33a1206515 | 3,500 | adb | Ada | src/sparknacl-cryptobox.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 76 | 2020-02-24T20:30:15.000Z | 2022-02-16T15:10:56.000Z | src/sparknacl-cryptobox.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 10 | 2020-04-15T10:02:49.000Z | 2022-02-24T20:10:46.000Z | src/sparknacl-cryptobox.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 4 | 2020-03-10T15:19:45.000Z | 2022-02-17T09:46:20.000Z | with SPARKNaCl.Scalar;
with SPARKNaCl.Secretbox;
package body SPARKNaCl.Cryptobox
with SPARK_Mode => On
is
procedure Keypair (Raw_SK : in Bytes_32;
PK : out Public_Key;
SK : out Secret_Key)
is
begin
SK.F := Raw_SK;
PK.F := Scalar.Mult_Base (Raw_SK);
end Keypair;
function Construct (K : in Bytes_32) return Secret_Key
is
begin
return Secret_Key'(F => K);
end Construct;
function Construct (K : in Bytes_32) return Public_Key
is
begin
return Public_Key'(F => K);
end Construct;
function Serialize (K : in Secret_Key) return Bytes_32
is
begin
return K.F;
end Serialize;
function Serialize (K : in Public_Key) return Bytes_32
is
begin
return K.F;
end Serialize;
procedure Sanitize (K : out Secret_Key)
is
begin
Sanitize (K.F);
end Sanitize;
procedure Sanitize (K : out Public_Key)
is
begin
Sanitize (K.F);
end Sanitize;
procedure BeforeNM (K : out Core.Salsa20_Key;
PK : in Public_Key;
SK : in Secret_Key)
is
S : Bytes_32;
LK : Bytes_32;
begin
S := Scalar.Mult (SK.F, PK.F);
Core.HSalsa20 (Output => LK,
Input => Zero_Bytes_16,
K => Core.Construct (S),
C => Sigma);
Core.Construct (K, LK);
pragma Warnings (GNATProve, Off, "statement has no effect");
Sanitize (S);
Sanitize (LK);
pragma Unreferenced (S, LK);
end BeforeNM;
procedure AfterNM (C : out Byte_Seq;
Status : out Boolean;
M : in Byte_Seq;
N : in Stream.HSalsa20_Nonce;
K : in Core.Salsa20_Key)
is
begin
Secretbox.Create (C, Status, M, N, K);
end AfterNM;
procedure Open_AfterNM
(M : out Byte_Seq; -- Output plaintext
Status : out Boolean;
C : in Byte_Seq; -- Input ciphertext
N : in Stream.HSalsa20_Nonce;
K : in Core.Salsa20_Key)
is
begin
Secretbox.Open (M, Status, C, N, K);
end Open_AfterNM;
procedure Create (C : out Byte_Seq;
Status : out Boolean;
M : in Byte_Seq;
N : in Stream.HSalsa20_Nonce;
Recipient_PK : in Public_Key;
Sender_SK : in Secret_Key)
is
K : Core.Salsa20_Key;
begin
BeforeNM (K, Recipient_PK, Sender_SK);
AfterNM (C, Status, M, N, K);
pragma Warnings (GNATProve, Off, "statement has no effect");
Core.Sanitize (K);
pragma Unreferenced (K);
end Create;
procedure Open (M : out Byte_Seq;
Status : out Boolean;
C : in Byte_Seq;
N : in Stream.HSalsa20_Nonce;
Sender_PK : in Public_Key;
Recipient_SK : in Secret_Key)
is
K : Core.Salsa20_Key;
begin
BeforeNM (K, Sender_PK, Recipient_SK);
Open_AfterNM (M, Status, C, N, K);
pragma Warnings (GNATProve, Off, "statement has no effect");
Core.Sanitize (K);
pragma Unreferenced (K);
end Open;
end SPARKNaCl.Cryptobox;
| 27.777778 | 66 | 0.512857 |
13e021dba69d1c8256e279d05c5d2af180f2a25c | 13,184 | adb | Ada | release/src-rt-6.x.4708/router/samba-3.5.8/lib/zlib/contrib/ada/test.adb | ghsecuritylab/tomato-arm | a577df43e55d2a0ae3ae06ed73e02ca68d5a3903 | [
"FSFAP"
] | 4 | 2017-05-17T11:27:04.000Z | 2020-05-24T07:23:26.000Z | release/src-rt-6.x.4708/router/samba-3.5.8/lib/zlib/contrib/ada/test.adb | ghsecuritylab/tomato-arm | a577df43e55d2a0ae3ae06ed73e02ca68d5a3903 | [
"FSFAP"
] | 1 | 2018-08-21T03:43:09.000Z | 2018-08-21T03:43:09.000Z | release/src-rt-6.x.4708/router/samba-3.5.8/lib/zlib/contrib/ada/test.adb | nbclare/tomato-arm | 07d4af129164298070830b808868a99f1189c953 | [
"FSFAP"
] | 5 | 2017-10-11T08:09:11.000Z | 2020-10-14T04:10:13.000Z | ----------------------------------------------------------------
-- ZLib for Ada thick binding. --
-- --
-- Copyright (C) 2002-2003 Dmitriy Anisimkov --
-- --
-- Open source license information is in the zlib.ads file. --
----------------------------------------------------------------
-- $Id: test.adb,v 1.1.1.1 2011/06/10 09:34:40 andrew Exp $
-- The program has a few aims.
-- 1. Test ZLib.Ada95 thick binding functionality.
-- 2. Show the example of use main functionality of the ZLib.Ada95 binding.
-- 3. Build this program automatically compile all ZLib.Ada95 packages under
-- GNAT Ada95 compiler.
with ZLib.Streams;
with Ada.Streams.Stream_IO;
with Ada.Numerics.Discrete_Random;
with Ada.Text_IO;
with Ada.Calendar;
procedure Test is
use Ada.Streams;
use Stream_IO;
------------------------------------
-- Test configuration parameters --
------------------------------------
File_Size : Count := 100_000;
Continuous : constant Boolean := False;
Header : constant ZLib.Header_Type := ZLib.Default;
-- ZLib.None;
-- ZLib.Auto;
-- ZLib.GZip;
-- Do not use Header other then Default in ZLib versions 1.1.4
-- and older.
Strategy : constant ZLib.Strategy_Type := ZLib.Default_Strategy;
Init_Random : constant := 10;
-- End --
In_File_Name : constant String := "testzlib.in";
-- Name of the input file
Z_File_Name : constant String := "testzlib.zlb";
-- Name of the compressed file.
Out_File_Name : constant String := "testzlib.out";
-- Name of the decompressed file.
File_In : File_Type;
File_Out : File_Type;
File_Back : File_Type;
File_Z : ZLib.Streams.Stream_Type;
Filter : ZLib.Filter_Type;
Time_Stamp : Ada.Calendar.Time;
procedure Generate_File;
-- Generate file of spetsified size with some random data.
-- The random data is repeatable, for the good compression.
procedure Compare_Streams
(Left, Right : in out Root_Stream_Type'Class);
-- The procedure compearing data in 2 streams.
-- It is for compare data before and after compression/decompression.
procedure Compare_Files (Left, Right : String);
-- Compare files. Based on the Compare_Streams.
procedure Copy_Streams
(Source, Target : in out Root_Stream_Type'Class;
Buffer_Size : in Stream_Element_Offset := 1024);
-- Copying data from one stream to another. It is for test stream
-- interface of the library.
procedure Data_In
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset);
-- this procedure is for generic instantiation of
-- ZLib.Generic_Translate.
-- reading data from the File_In.
procedure Data_Out (Item : in Stream_Element_Array);
-- this procedure is for generic instantiation of
-- ZLib.Generic_Translate.
-- writing data to the File_Out.
procedure Stamp;
-- Store the timestamp to the local variable.
procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count);
-- Print the time statistic with the message.
procedure Translate is new ZLib.Generic_Translate
(Data_In => Data_In,
Data_Out => Data_Out);
-- This procedure is moving data from File_In to File_Out
-- with compression or decompression, depend on initialization of
-- Filter parameter.
-------------------
-- Compare_Files --
-------------------
procedure Compare_Files (Left, Right : String) is
Left_File, Right_File : File_Type;
begin
Open (Left_File, In_File, Left);
Open (Right_File, In_File, Right);
Compare_Streams (Stream (Left_File).all, Stream (Right_File).all);
Close (Left_File);
Close (Right_File);
end Compare_Files;
---------------------
-- Compare_Streams --
---------------------
procedure Compare_Streams
(Left, Right : in out Ada.Streams.Root_Stream_Type'Class)
is
Left_Buffer, Right_Buffer : Stream_Element_Array (0 .. 16#FFF#);
Left_Last, Right_Last : Stream_Element_Offset;
begin
loop
Read (Left, Left_Buffer, Left_Last);
Read (Right, Right_Buffer, Right_Last);
if Left_Last /= Right_Last then
Ada.Text_IO.Put_Line ("Compare error :"
& Stream_Element_Offset'Image (Left_Last)
& " /= "
& Stream_Element_Offset'Image (Right_Last));
raise Constraint_Error;
elsif Left_Buffer (0 .. Left_Last)
/= Right_Buffer (0 .. Right_Last)
then
Ada.Text_IO.Put_Line ("ERROR: IN and OUT files is not equal.");
raise Constraint_Error;
end if;
exit when Left_Last < Left_Buffer'Last;
end loop;
end Compare_Streams;
------------------
-- Copy_Streams --
------------------
procedure Copy_Streams
(Source, Target : in out Ada.Streams.Root_Stream_Type'Class;
Buffer_Size : in Stream_Element_Offset := 1024)
is
Buffer : Stream_Element_Array (1 .. Buffer_Size);
Last : Stream_Element_Offset;
begin
loop
Read (Source, Buffer, Last);
Write (Target, Buffer (1 .. Last));
exit when Last < Buffer'Last;
end loop;
end Copy_Streams;
-------------
-- Data_In --
-------------
procedure Data_In
(Item : out Stream_Element_Array;
Last : out Stream_Element_Offset) is
begin
Read (File_In, Item, Last);
end Data_In;
--------------
-- Data_Out --
--------------
procedure Data_Out (Item : in Stream_Element_Array) is
begin
Write (File_Out, Item);
end Data_Out;
-------------------
-- Generate_File --
-------------------
procedure Generate_File is
subtype Visible_Symbols is Stream_Element range 16#20# .. 16#7E#;
package Random_Elements is
new Ada.Numerics.Discrete_Random (Visible_Symbols);
Gen : Random_Elements.Generator;
Buffer : Stream_Element_Array := (1 .. 77 => 16#20#) & 10;
Buffer_Count : constant Count := File_Size / Buffer'Length;
-- Number of same buffers in the packet.
Density : constant Count := 30; -- from 0 to Buffer'Length - 2;
procedure Fill_Buffer (J, D : in Count);
-- Change the part of the buffer.
-----------------
-- Fill_Buffer --
-----------------
procedure Fill_Buffer (J, D : in Count) is
begin
for K in 0 .. D loop
Buffer
(Stream_Element_Offset ((J + K) mod (Buffer'Length - 1) + 1))
:= Random_Elements.Random (Gen);
end loop;
end Fill_Buffer;
begin
Random_Elements.Reset (Gen, Init_Random);
Create (File_In, Out_File, In_File_Name);
Fill_Buffer (1, Buffer'Length - 2);
for J in 1 .. Buffer_Count loop
Write (File_In, Buffer);
Fill_Buffer (J, Density);
end loop;
-- fill remain size.
Write
(File_In,
Buffer
(1 .. Stream_Element_Offset
(File_Size - Buffer'Length * Buffer_Count)));
Flush (File_In);
Close (File_In);
end Generate_File;
---------------------
-- Print_Statistic --
---------------------
procedure Print_Statistic (Msg : String; Data_Size : ZLib.Count) is
use Ada.Calendar;
use Ada.Text_IO;
package Count_IO is new Integer_IO (ZLib.Count);
Curr_Dur : Duration := Clock - Time_Stamp;
begin
Put (Msg);
Set_Col (20);
Ada.Text_IO.Put ("size =");
Count_IO.Put
(Data_Size,
Width => Stream_IO.Count'Image (File_Size)'Length);
Put_Line (" duration =" & Duration'Image (Curr_Dur));
end Print_Statistic;
-----------
-- Stamp --
-----------
procedure Stamp is
begin
Time_Stamp := Ada.Calendar.Clock;
end Stamp;
begin
Ada.Text_IO.Put_Line ("ZLib " & ZLib.Version);
loop
Generate_File;
for Level in ZLib.Compression_Level'Range loop
Ada.Text_IO.Put_Line ("Level ="
& ZLib.Compression_Level'Image (Level));
-- Test generic interface.
Open (File_In, In_File, In_File_Name);
Create (File_Out, Out_File, Z_File_Name);
Stamp;
-- Deflate using generic instantiation.
ZLib.Deflate_Init
(Filter => Filter,
Level => Level,
Strategy => Strategy,
Header => Header);
Translate (Filter);
Print_Statistic ("Generic compress", ZLib.Total_Out (Filter));
ZLib.Close (Filter);
Close (File_In);
Close (File_Out);
Open (File_In, In_File, Z_File_Name);
Create (File_Out, Out_File, Out_File_Name);
Stamp;
-- Inflate using generic instantiation.
ZLib.Inflate_Init (Filter, Header => Header);
Translate (Filter);
Print_Statistic ("Generic decompress", ZLib.Total_Out (Filter));
ZLib.Close (Filter);
Close (File_In);
Close (File_Out);
Compare_Files (In_File_Name, Out_File_Name);
-- Test stream interface.
-- Compress to the back stream.
Open (File_In, In_File, In_File_Name);
Create (File_Back, Out_File, Z_File_Name);
Stamp;
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.Out_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => True,
Level => Level,
Strategy => Strategy,
Header => Header);
Copy_Streams
(Source => Stream (File_In).all,
Target => File_Z);
-- Flushing internal buffers to the back stream.
ZLib.Streams.Flush (File_Z, ZLib.Finish);
Print_Statistic ("Write compress",
ZLib.Streams.Write_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
-- Compare reading from original file and from
-- decompression stream.
Open (File_In, In_File, In_File_Name);
Open (File_Back, In_File, Z_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.In_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => True,
Header => Header);
Stamp;
Compare_Streams (Stream (File_In).all, File_Z);
Print_Statistic ("Read decompress",
ZLib.Streams.Read_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
-- Compress by reading from compression stream.
Open (File_Back, In_File, In_File_Name);
Create (File_Out, Out_File, Z_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.In_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => False,
Level => Level,
Strategy => Strategy,
Header => Header);
Stamp;
Copy_Streams
(Source => File_Z,
Target => Stream (File_Out).all);
Print_Statistic ("Read compress",
ZLib.Streams.Read_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_Out);
Close (File_Back);
-- Decompress to decompression stream.
Open (File_In, In_File, Z_File_Name);
Create (File_Back, Out_File, Out_File_Name);
ZLib.Streams.Create
(Stream => File_Z,
Mode => ZLib.Streams.Out_Stream,
Back => ZLib.Streams.Stream_Access
(Stream (File_Back)),
Back_Compressed => False,
Header => Header);
Stamp;
Copy_Streams
(Source => Stream (File_In).all,
Target => File_Z);
Print_Statistic ("Write decompress",
ZLib.Streams.Write_Total_Out (File_Z));
ZLib.Streams.Close (File_Z);
Close (File_In);
Close (File_Back);
Compare_Files (In_File_Name, Out_File_Name);
end loop;
Ada.Text_IO.Put_Line (Count'Image (File_Size) & " Ok.");
exit when not Continuous;
File_Size := File_Size + 1;
end loop;
end Test;
| 28.413793 | 77 | 0.545661 |
c7b1b5185f1c37c36ec488328fabca5b8b9a9616 | 1,919 | ads | Ada | source/web-html.ads | ytomino/web-ada | 376fe024e4c8784bd4350a343a1416b79292fbb5 | [
"FSFAP"
] | 2 | 2015-02-09T21:09:15.000Z | 2021-11-17T19:53:08.000Z | source/web-html.ads | ytomino/web-ada | 376fe024e4c8784bd4350a343a1416b79292fbb5 | [
"FSFAP"
] | null | null | null | source/web-html.ads | ytomino/web-ada | 376fe024e4c8784bd4350a343a1416b79292fbb5 | [
"FSFAP"
] | null | null | null | package Web.HTML is
-- input
function Checkbox_Value (S : String) return Boolean;
-- output
type HTML_Version is (HTML, XHTML);
generic
with procedure Write (Item : in String);
Version : in HTML_Version;
procedure Generic_Write_In_HTML (
Item : in String;
Pre : in Boolean := False);
procedure Write_In_HTML (
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Version : in HTML_Version;
Item : in String;
Pre : in Boolean := False);
generic
with procedure Write (Item : in String);
procedure Generic_Write_Begin_Attribute (Name : in String);
procedure Write_Begin_Attribute (
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Name : in String);
generic
with procedure Write (Item : in String);
Version : in HTML_Version;
procedure Generic_Write_In_Attribute (Item : in String);
procedure Write_In_Attribute (
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Version : in HTML_Version;
Item : in String);
generic
with procedure Write (Item : in String);
procedure Generic_Write_End_Attribute;
procedure Write_End_Attribute (
Stream : not null access Ada.Streams.Root_Stream_Type'Class);
-- write <input type="hidden" name="KEY" value="ELEMENT">...
generic
with procedure Write (Item : in String);
Version : in HTML_Version;
procedure Generic_Write_Query_In_HTML (Item : in Query_Strings);
procedure Write_Query_In_HTML (
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Version : in HTML_Version;
Item : in Query_Strings);
-- write ?KEY=ELEMENT&...
generic
with procedure Write (Item : in String);
Version : in HTML_Version;
procedure Generic_Write_Query_In_Attribute (Item : in Query_Strings);
procedure Write_Query_In_Attribute (
Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Version : in HTML_Version;
Item : in Query_Strings);
end Web.HTML;
| 26.652778 | 70 | 0.737884 |
add6b938d834f700d79cf274d7c43c80e38d6180 | 12,380 | ads | Ada | src/keystore-files.ads | thierr26/ada-keystore | 25099a9df3ce9b48a401148eb1b84442011759a0 | [
"Apache-2.0"
] | null | null | null | src/keystore-files.ads | thierr26/ada-keystore | 25099a9df3ce9b48a401148eb1b84442011759a0 | [
"Apache-2.0"
] | null | null | null | src/keystore-files.ads | thierr26/ada-keystore | 25099a9df3ce9b48a401148eb1b84442011759a0 | [
"Apache-2.0"
] | null | null | null | -----------------------------------------------------------------------
-- keystore-files -- Ada keystore files
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Keystore.Passwords.Keys;
private with Keystore.Containers;
package Keystore.Files is
type Wallet_File is limited new Wallet with private;
-- Open the keystore file and unlock the wallet using the given password.
-- Raises the Bad_Password exception if no key slot match the password.
procedure Open (Container : in out Wallet_File;
Password : in Secret_Key;
Path : in String;
Data_Path : in String := "";
Config : in Wallet_Config := Secure_Config) with
Pre => not Container.Is_Open,
Post => Container.Is_Open;
-- Open the keystore file without unlocking the wallet but get some information
-- from the header section.
procedure Open (Container : in out Wallet_File;
Path : in String;
Data_Path : in String := "";
Config : in Wallet_Config := Secure_Config;
Info : out Wallet_Info) with
Pre => not Container.Is_Open,
Post => Container.State = S_PROTECTED;
-- Create the keystore file and protect it with the given password.
-- The key slot #1 is used.
procedure Create (Container : in out Wallet_File;
Password : in Secret_Key;
Path : in String;
Data_Path : in String := "";
Config : in Wallet_Config := Secure_Config) with
Pre => not Container.Is_Open,
Post => Container.Is_Open;
procedure Create (Container : in out Wallet_File;
Password : in out Keystore.Passwords.Provider'Class;
Path : in String;
Data_Path : in String := "";
Config : in Wallet_Config := Secure_Config) with
Pre => not Container.Is_Open,
Post => Container.Is_Open;
-- Set the keystore master key before creating or opening the keystore.
procedure Set_Master_Key (Container : in out Wallet_File;
Password : in out Keystore.Passwords.Keys.Key_Provider'Class) with
Pre => not Container.Is_Open;
-- Unlock the wallet with the password.
-- Raises the Bad_Password exception if no key slot match the password.
procedure Unlock (Container : in out Wallet_File;
Password : in Secret_Key) with
Pre => Container.State = S_PROTECTED,
Post => Container.Is_Open;
procedure Unlock (Container : in out Wallet_File;
Password : in out Keystore.Passwords.Provider'Class;
Slot : out Key_Slot) with
Pre => Container.State = S_PROTECTED,
Post => Container.Is_Open;
-- Close the keystore file.
procedure Close (Container : in out Wallet_File) with
Pre => Container.Is_Open,
Post => not Container.Is_Open;
-- Set some header data in the keystore file.
procedure Set_Header_Data (Container : in out Wallet_File;
Index : in Header_Slot_Index_Type;
Kind : in Header_Slot_Type;
Data : in Ada.Streams.Stream_Element_Array) with
Pre => Container.State in S_OPEN | S_PROTECTED and Data'Length <= 1024;
-- Get the header data information from the keystore file.
procedure Get_Header_Data (Container : in out Wallet_File;
Index : in Header_Slot_Index_Type;
Kind : out Header_Slot_Type;
Data : out Ada.Streams.Stream_Element_Array;
Last : out Ada.Streams.Stream_Element_Offset) with
Pre => Container.State = S_PROTECTED;
-- Add in the wallet the named entry and associate it the children wallet.
-- The children wallet meta data is protected by the container.
-- The children wallet has its own key to protect the named entries it manages.
procedure Add (Container : in out Wallet_File;
Name : in String;
Password : in out Keystore.Passwords.Provider'Class;
Wallet : in out Wallet_File'Class) with
Pre => Container.Is_Open and not Wallet.Is_Open,
Post => Container.Is_Open and Wallet.Is_Open;
procedure Add (Container : in out Wallet_File;
Name : in String;
Password : in Keystore.Secret_Key;
Wallet : in out Wallet_File'Class) with
Pre => Container.Is_Open and not Wallet.Is_Open,
Post => Container.Is_Open and Wallet.Is_Open;
-- Load from the container the named children wallet.
procedure Open (Container : in out Wallet_File;
Name : in String;
Password : in out Keystore.Passwords.Provider'Class;
Wallet : in out Wallet_File'Class) with
Pre => Container.Is_Open and not Wallet.Is_Open,
Post => Container.Is_Open and Wallet.Is_Open;
procedure Open (Container : in out Wallet_File;
Name : in String;
Password : in Secret_Key;
Wallet : in out Wallet_File'Class) with
Pre => Container.Is_Open and not Wallet.Is_Open,
Post => Container.Is_Open and Wallet.Is_Open;
-- Return True if the container was configured.
overriding
function Is_Configured (Container : in Wallet_File) return Boolean;
-- Return True if the container can be accessed.
overriding
function Is_Open (Container : in Wallet_File) return Boolean;
-- Get the wallet state.
overriding
function State (Container : in Wallet_File) return State_Type;
-- Set the key to encrypt and decrypt the container meta data.
overriding
procedure Set_Key (Container : in out Wallet_File;
Password : in Secret_Key;
New_Password : in Secret_Key;
Config : in Wallet_Config;
Mode : in Mode_Type) with
Pre => Container.Is_Open;
procedure Set_Key (Container : in out Wallet_File;
Password : in out Keystore.Passwords.Provider'Class;
New_Password : in out Keystore.Passwords.Provider'Class;
Config : in Wallet_Config := Secure_Config;
Mode : in Mode_Type := KEY_REPLACE) with
Pre'Class => Container.Is_Open;
-- Remove the key from the key slot identified by `Slot`. The password is necessary to
-- make sure a valid password is available. The `Remove_Current` must be set to remove
-- the slot when it corresponds to the used password.
procedure Remove_Key (Container : in out Wallet_File;
Password : in out Keystore.Passwords.Provider'Class;
Slot : in Key_Slot;
Force : in Boolean);
-- Return True if the container contains the given named entry.
overriding
function Contains (Container : in Wallet_File;
Name : in String) return Boolean with
Pre => Container.Is_Open;
-- Add in the wallet the named entry and associate it the content.
-- The content is encrypted in AES-CBC with a secret key and an IV vector
-- that is created randomly for the new named entry.
overriding
procedure Add (Container : in out Wallet_File;
Name : in String;
Kind : in Entry_Type := T_BINARY;
Content : in Ada.Streams.Stream_Element_Array) with
Pre => Container.Is_Open,
Post => Container.Contains (Name);
overriding
procedure Add (Container : in out Wallet_File;
Name : in String;
Kind : in Entry_Type := T_BINARY;
Input : in out Util.Streams.Input_Stream'Class) with
Pre'Class => Container.Is_Open,
Post'Class => Container.Contains (Name);
-- Add or update in the wallet the named entry and associate it the content.
-- The content is encrypted in AES-CBC with a secret key and an IV vector
-- that is created randomly for the new or updated named entry.
overriding
procedure Set (Container : in out Wallet_File;
Name : in String;
Kind : in Entry_Type := T_BINARY;
Content : in Ada.Streams.Stream_Element_Array) with
Pre => Container.Is_Open,
Post => Container.Contains (Name);
overriding
procedure Set (Container : in out Wallet_File;
Name : in String;
Kind : in Entry_Type := T_BINARY;
Input : in out Util.Streams.Input_Stream'Class) with
Pre => Container.Is_Open,
Post => Container.Contains (Name);
-- Update in the wallet the named entry and associate it the new content.
-- The secret key and IV vectors are not changed.
procedure Update (Container : in out Wallet_File;
Name : in String;
Kind : in Entry_Type := T_BINARY;
Content : in Ada.Streams.Stream_Element_Array) with
Pre => Container.Is_Open,
Post => Container.Contains (Name);
-- Delete from the wallet the named entry.
overriding
procedure Delete (Container : in out Wallet_File;
Name : in String) with
Pre => Container.Is_Open,
Post => not Container.Contains (Name);
overriding
procedure Get (Container : in out Wallet_File;
Name : in String;
Info : out Entry_Info;
Content : out Ada.Streams.Stream_Element_Array) with
Pre => Container.Is_Open;
-- Write in the output stream the named entry value from the wallet.
overriding
procedure Get (Container : in out Wallet_File;
Name : in String;
Output : in out Util.Streams.Output_Stream'Class) with
Pre => Container.Is_Open;
-- Get the list of entries contained in the wallet that correspond to the optional filter.
overriding
procedure List (Container : in out Wallet_File;
Filter : in Filter_Type := (others => True);
Content : out Entry_Map) with
Pre => Container.Is_Open;
-- Get the list of entries contained in the wallet that correspond to the optiona filter
-- and whose name matches the pattern.
procedure List (Container : in out Wallet_File;
Pattern : in GNAT.Regpat.Pattern_Matcher;
Filter : in Filter_Type := (others => True);
Content : out Entry_Map) with
Pre => Container.Is_Open;
overriding
function Find (Container : in out Wallet_File;
Name : in String) return Entry_Info;
-- Get wallet file information and statistics.
procedure Get_Stats (Container : in out Wallet_File;
Stats : out Wallet_Stats);
procedure Set_Work_Manager (Container : in out Wallet_File;
Workers : in Keystore.Task_Manager_Access);
private
type Wallet_File is limited new Wallet with record
Container : Keystore.Containers.Wallet_Container;
end record;
overriding
procedure Initialize (Wallet : in out Wallet_File);
overriding
procedure Finalize (Wallet : in out Wallet_File);
end Keystore.Files;
| 44.05694 | 96 | 0.602019 |
ad83f88c384983abfdd616f1891e8705487a89fd | 11,627 | adb | Ada | regtests/keystore-io-tests.adb | stcarrez/ada-keystore | b6020aa8343a51ec436752bed5d2ba0d6b8587e9 | [
"Apache-2.0"
] | 25 | 2019-05-07T20:35:50.000Z | 2021-11-30T10:35:47.000Z | regtests/keystore-io-tests.adb | stcarrez/ada-keystore | b6020aa8343a51ec436752bed5d2ba0d6b8587e9 | [
"Apache-2.0"
] | 12 | 2019-12-16T23:30:00.000Z | 2021-09-26T18:52:41.000Z | regtests/keystore-io-tests.adb | stcarrez/ada-keystore | b6020aa8343a51ec436752bed5d2ba0d6b8587e9 | [
"Apache-2.0"
] | 3 | 2019-12-18T21:30:04.000Z | 2021-01-06T08:30:36.000Z | -----------------------------------------------------------------------
-- keystore-io-tests -- Tests for keystore IO
-- Copyright (C) 2019, 2021 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Test_Caller;
with Util.Measures;
with Util.Encoders.AES;
with Keystore.IO.Files;
with Keystore.Buffers;
with Keystore.Marshallers;
package body Keystore.IO.Tests is
use type Keystore.Buffers.Block_Number;
package Caller is new Util.Test_Caller (Test, "Keystore.IO");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test Keystore.IO.Files.Create+Open+Write+Read",
Test_File_IO'Access);
Caller.Add_Test (Suite, "Test Keystore.IO.Files.Perf",
Test_Perf_IO'Access);
end Add_Tests;
procedure Test_File_IO (T : in out Test) is
Path : constant String := Util.Tests.Get_Test_Path ("test-io.ks");
Secret : Secret_Key := Util.Encoders.Create ("0123456789abcdef");
Secret2 : Secret_Key := Util.Encoders.Create ("0123456789abcdef0123456789abcdef");
Block : Storage_Block;
Sign : constant Secret_Key := Util.Encoders.Create ("0123456789abcdef0123456789abcdef");
begin
-- Make a file with a zero-ed block.
declare
Stream : Keystore.IO.Files.Wallet_Stream;
Buffer : Keystore.IO.Marshaller;
Cipher : Util.Encoders.AES.Encoder;
Config : Keystore.Wallet_Config := Keystore.Unsecure_Config;
begin
Config.Overwrite := True;
Cipher.Set_Key (Secret);
Cipher.Set_Padding (Util.Encoders.AES.NO_PADDING);
Stream.Create (Path => Path, Data_Path => "", Config => Config);
Stream.Allocate (IO.DATA_BLOCK, Block);
T.Assert (Block.Block = 1, "Allocate should return first block");
Buffer.Buffer := Buffers.Allocate (Block);
Buffer.Buffer.Data.Value.Data := (others => 0);
Marshallers.Set_Header (Buffer, Tag => BT_WALLET_HEADER, Id => 12);
Marshallers.Put_Unsigned_32 (Buffer, 12345);
Stream.Write (Cipher => Cipher,
Sign => Sign,
From => Buffer.Buffer);
Stream.Close;
end;
-- Read same file and verify we can extract correctly the block data.
declare
Stream : Keystore.IO.Files.Wallet_Stream;
Buffer : Keystore.IO.Marshaller;
Decipher : Util.Encoders.AES.Decoder;
Size : Block_Index;
begin
Decipher.Set_Key (Secret);
Decipher.Set_Padding (Util.Encoders.AES.NO_PADDING);
Stream.Open (Path => Path, Data_Path => "");
Buffer.Buffer := Buffers.Allocate (Storage_Block '(DEFAULT_STORAGE_ID, 1));
Stream.Read (Decipher => Decipher,
Sign => Sign,
Decrypt_Size => Size,
Into => Buffer.Buffer);
Util.Tests.Assert_Equals (T, BT_WALLET_HEADER,
Integer (Marshallers.Get_Header_16 (Buffer)),
"Invalid wallet header tag");
Util.Tests.Assert_Equals (T, Natural (Size),
Integer (Marshallers.Get_Unsigned_16 (Buffer)),
"Invalid wallet encryption size");
Util.Tests.Assert_Equals (T, 12,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid wallet id");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, 12345,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid number extracted from block");
Stream.Close;
end;
-- Use a wrong decompression key and verify we get an error.
declare
Stream : Keystore.IO.Files.Wallet_Stream;
Buffer : Keystore.IO.Marshaller;
Decipher : Util.Encoders.AES.Decoder;
Size : Block_Index;
begin
Decipher.Set_Key (Secret2);
Decipher.Set_Padding (Util.Encoders.AES.NO_PADDING);
Stream.Open (Path => Path, Data_Path => "");
begin
Buffer.Buffer := Buffers.Allocate (Storage_Block '(DEFAULT_STORAGE_ID, 1));
Stream.Read (Decipher => Decipher,
Sign => Sign,
Decrypt_Size => Size,
Into => Buffer.Buffer);
T.Fail ("An Invalid_Block exception is expected.");
exception
when Invalid_Block | Invalid_Signature =>
null;
end;
Stream.Close;
end;
end Test_File_IO;
procedure Test_Perf_IO (T : in out Test) is
Path : constant String := Util.Tests.Get_Test_Path ("test-io-perf.ks");
Secret : Secret_Key := Util.Encoders.Create ("0123456789abcdef");
Block : Storage_Block;
Sign : constant Secret_Key := Util.Encoders.Create ("123456789abcdef0");
begin
-- Make a file with filled blocks.
declare
Start : Util.Measures.Stamp;
Stream : Keystore.IO.Files.Wallet_Stream;
Buffer : Keystore.IO.Marshaller;
Cipher : Util.Encoders.AES.Encoder;
Config : Keystore.Wallet_Config := Keystore.Unsecure_Config;
begin
Config.Overwrite := True;
Cipher.Set_Key (Secret);
Cipher.Set_Padding (Util.Encoders.AES.NO_PADDING);
Stream.Create (Path => Path, Data_Path => "", Config => Config);
Stream.Allocate (IO.DATA_BLOCK, Block);
T.Assert (Block.Block = 1, "Allocate should return first block");
Buffer.Buffer := Buffers.Allocate (Block);
Buffer.Buffer.Data.Value.Data := (others => 0);
Marshallers.Set_Header (Buffer, Tag => BT_WALLET_HEADER, Id => 12);
Marshallers.Put_Unsigned_32 (Buffer, 12345);
Stream.Write (Cipher => Cipher,
Sign => Sign,
From => Buffer.Buffer);
for I in 1 .. 1000 loop
Stream.Allocate (IO.DATA_BLOCK, Block);
Buffer.Buffer := Buffers.Allocate (Block);
Buffer.Buffer.Data.Value.Data := (others => Stream_Element (I mod 255));
Marshallers.Set_Header (Buffer, Tag => BT_WALLET_DATA, Id => 12);
Stream.Write (Cipher => Cipher,
Sign => Sign,
From => Buffer.Buffer);
end loop;
Stream.Close;
Util.Measures.Report (Start, "Write 1000 blocks");
end;
-- Read same file and verify we can extract correctly the block data.
declare
Start : Util.Measures.Stamp;
Stream : Keystore.IO.Files.Wallet_Stream;
Buffer : Keystore.IO.Marshaller;
Decipher : Util.Encoders.AES.Decoder;
Size : Block_Index;
begin
Decipher.Set_Key (Secret);
Decipher.Set_Padding (Util.Encoders.AES.NO_PADDING);
Stream.Open (Path => Path, Data_Path => "");
Buffer.Buffer := Buffers.Allocate (Storage_Block '(DEFAULT_STORAGE_ID, 1));
-- Read first block
Stream.Read (Decipher => Decipher,
Sign => Sign,
Decrypt_Size => Size,
Into => Buffer.Buffer);
Util.Tests.Assert_Equals (T, BT_WALLET_HEADER,
Integer (Marshallers.Get_Header_16 (Buffer)),
"Invalid wallet header tag");
Util.Tests.Assert_Equals (T, Natural (Size),
Integer (Marshallers.Get_Unsigned_16 (Buffer)),
"Invalid wallet encryption size");
Util.Tests.Assert_Equals (T, 12,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid wallet id");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, 12345,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid number extracted from block");
-- Read other blocks
for I in 1 .. 1000 loop
Buffer.Buffer := Buffers.Allocate (Storage_Block '(DEFAULT_STORAGE_ID,
IO.Block_Number (I + 1)));
Stream.Read (Decipher => Decipher,
Sign => Sign,
Decrypt_Size => Size,
Into => Buffer.Buffer);
Util.Tests.Assert_Equals (T, BT_WALLET_DATA,
Integer (Marshallers.Get_Header_16 (Buffer)),
"Invalid wallet header tag");
Util.Tests.Assert_Equals (T, Natural (Size),
Integer (Marshallers.Get_Unsigned_16 (Buffer)),
"Invalid wallet encryption size");
Util.Tests.Assert_Equals (T, 12,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid wallet id");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, 0,
Integer (Marshallers.Get_Unsigned_32 (Buffer)),
"Invalid PAD 0");
Util.Tests.Assert_Equals (T, I mod 255,
Integer (Buffer.Buffer.Data.Value.Data (Buffer.Pos + 1)),
"Invalid number extracted from block");
Util.Tests.Assert_Equals (T, I mod 255,
Integer (Buffer.Buffer.Data.Value.Data (Buffer.Pos + 123)),
"Invalid number extracted from block");
end loop;
Stream.Close;
Util.Measures.Report (Start, "Read 1000 blocks");
end;
end Test_Perf_IO;
end Keystore.IO.Tests;
| 46.508 | 98 | 0.532898 |
1c25153298df022765576739d114ec40772f38f1 | 1,939 | ads | Ada | boards/stm32f769_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 192 | 2016-06-01T18:32:04.000Z | 2022-03-26T22:52:31.000Z | boards/stm32f769_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 239 | 2016-05-26T20:02:01.000Z | 2022-03-31T09:46:56.000Z | boards/stm32f769_discovery/src/full/adl_config.ads | mbdme26/Ada_Drivers_Library | dc9cc80f5338c9d1ae942dd461eef6a2402e44de | [
"BSD-3-Clause"
] | 142 | 2016-06-05T08:12:20.000Z | 2022-03-24T17:37:17.000Z | -- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Architecture : constant String := "ARM"; -- From board definition
Board : constant String := "STM32F769_Discovery"; -- From command line
CPU_Core : constant String := "ARM Cortex-M7F"; -- From mcu definition
Device_Family : constant String := "STM32F7"; -- From board definition
Device_Name : constant String := "STM32F769NIHx"; -- From board definition
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
Has_ZFP_Runtime : constant String := "False"; -- From board definition
High_Speed_External_Clock : constant := 25000000; -- From board definition
Max_Mount_Name_Length : constant := 128; -- From default value
Max_Mount_Points : constant := 2; -- From default value
Max_Path_Length : constant := 1024; -- From default value
Number_Of_Interrupts : constant := 0; -- From default value
Runtime_Name : constant String := "ravenscar-full-stm32f769disco"; -- From default value
Runtime_Name_Suffix : constant String := "stm32f769disco"; -- From board definition
Runtime_Profile : constant String := "ravenscar-full"; -- From command line
Use_Startup_Gen : constant Boolean := False; -- From command line
Vendor : constant String := "STMicro"; -- From board definition
end ADL_Config;
| 88.136364 | 110 | 0.548221 |
134c047896406f6ce815121f4b84a4d25fed9325 | 12,280 | adb | Ada | bb-runtimes/examples/monitor/p5566/mpc55xx.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/examples/monitor/p5566/mpc55xx.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/examples/monitor/p5566/mpc55xx.adb | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT EXAMPLE --
-- --
-- Copyright (C) 2013, AdaCore --
-- --
-- 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Interfaces; use Interfaces;
with Commands; use Commands;
with Console; use Console;
with Term; use Term;
with Dumps; use Dumps;
with System.Machine_Code; use System.Machine_Code;
pragma Warnings (Off);
with System.Text_IO;
pragma Warnings (On);
with Srec;
package body Mpc55xx is
procedure Disable_Watchdog is
begin
Set_Tcr (Get_Tcr and not 16#c01e_0000#);
end Disable_Watchdog;
function Field (V : Unsigned_32; F, L : Natural) return Unsigned_32 is
begin
return Shift_Right (V, 63 - L)
and Shift_Right (16#ffff_ffff#, 32 - (L - F + 1));
end Field;
procedure Put_Bit (V : Unsigned_32; F : Natural; Name : Character) is
begin
Put_Bit (Field (V, F, F) = 1, Name);
end Put_Bit;
procedure Proc_Cr is
begin
Put_Line ("PIR: " & Image8 (Get_Pir));
Put_Line ("PVR: " & Image8 (Get_Pvr));
Put_Line ("SVR: " & Image8 (Get_Svr));
Put_Line ("MSR: " & Image8 (Get_Msr));
New_Line;
Put_Line ("HID0: " & Image8 (Get_Hid0));
Put_Line ("HID1: " & Image8 (Get_Hid1));
end Proc_Cr;
procedure Set_L1csr0 (V : Unsigned_32) is
begin
Asm ("msync" & ASCII.LF & ASCII.HT &
"isync" & ASCII.LF & ASCII.HT &
"mtspr 1010,%0",
Inputs => Unsigned_32'Asm_Input ("r", V),
Volatile => True);
end Set_L1csr0;
procedure Proc_Cache is
begin
Next_Word;
if Line (Pos .. End_Pos) = "on" then
Put_Line ("Invalidating and enabling cache");
Set_L1csr0 (2#10#);
loop
exit when (Get_L1csr0 and 2#10#) = 0;
end loop;
if (Get_L1csr0 and 2#100#) /= 0 then
Put_Line ("cache operation aborted");
return;
end if;
Put_Line ("Enabling");
Set_L1csr0 (2#1#);
else
Put_Register
("L1CFG0", Get_L1cfg0,
"2:carch,cwpa,cfaha,cfiswa,2,2:cbsize,2:crepl," &
"cla,cpa,8:cnway,11:csize");
Put_Register
("L1CSR0", Get_L1csr0,
"4:wid,4:wdd,awid,awdd,1,cwm,dpb,dsb," &
"dstrm,cpe,5,cul,clo,clfr,5,cabt,cfi,ce");
end if;
end Proc_Cache;
procedure Proc_Timer is
begin
Put_Line ("TCR: " & Image8 (Get_Tcr));
Put_Line ("TSR: " & Image8 (Get_Tsr));
Put_Line ("TBU: " & Image8 (Get_Tbu) & " TBL: " & Image8 (Get_Tbl));
end Proc_Timer;
procedure Proc_Pll is
FMPLL_SYNCR : Unsigned_32;
for FMPLL_SYNCR'Address use System'To_Address (16#c3f8_0000#);
pragma Import (Ada, FMPLL_SYNCR);
pragma Volatile (FMPLL_SYNCR);
FMPLL_SYNSR : Unsigned_32;
for FMPLL_SYNSR'Address use System'To_Address (16#c3f8_0004#);
pragma Import (Ada, FMPLL_SYNSR);
pragma Volatile (FMPLL_SYNSR);
begin
Put_Line ("SYNCR: " & Image8 (FMPLL_SYNCR));
Put_Line ("SYNSR: " & Image8 (FMPLL_SYNSR));
end Proc_Pll;
procedure Proc_Tlb is
Val : Unsigned_32;
Npids : Unsigned_32;
Ntlbs : Unsigned_32;
Nent : Unsigned_32;
begin
Val := Get_Mmucfg;
Put_Line ("MMUCFG: " & Image8 (Val));
Npids := Field (Val, 49, 52);
Ntlbs := 1 + Field (Val, 60, 61);
Put ("NPIDS: " & Image8 (Npids));
Put (", PIDSIZE: " & Image8 (1 + Field (Val, 53, 57)));
Put (", NTLBS: " & Image8 (Ntlbs));
Put (", MAVN: " & Image8 (1 + Field (Val, 62, 63)));
New_Line;
Put ("PID0: " & Image8 (Get_Pid0));
if Npids > 1 then
Put (", PID1: " & Image8 (Get_Pid1));
if Npids > 2 then
Put (", PID2: " & Image8 (Get_Pid2));
end if;
end if;
New_Line;
for I in 0 .. Ntlbs - 1 loop
case I is
when 0 => Val := Get_Tlb0cfg;
when 1 => Val := Get_Tlb1cfg;
when others => exit;
end case;
Put_Line ("TLB" & Character'Val (48 + I) & "CFG: " & Image8 (Val));
Put (" Assoc: " & Image4 (Field (Val, 32, 39)));
Put (", MinSz: " & Image1 (Field (Val, 40, 43)));
Put (", MaxSz: " & Image1 (Field (Val, 44, 47)));
Put (", Iprot: " & Image1 (Field (Val, 48, 48)));
Put (", Avail: " & Image1 (Field (Val, 49, 49)));
Put (", Nentry: " & Image4 (Field (Val, 52, 63)));
New_Line;
end loop;
New_Line;
Put_Line ("TLB1:");
Val := Get_Tlb1cfg;
Nent := Field (Val, 52, 63);
Put_Line (" #: P Pid S VA Flags PA U USUSUS");
for I in 0 .. Nent - 1 loop
Set_Mas0 (2 ** 28 + I * 2 ** 16);
Asm ("tlbre", Volatile => True);
Val := Get_Mas1;
if Field (Val, 32, 32) = 1 then
declare
Sz : Unsigned_32;
Mask : Unsigned_32;
begin
-- Valid
Put (Image4 (I) & ": ");
Put_Bit (Val, 33, 'P'); -- Protected
Put (' ');
Put (Image4 (Field (Val, 34, 47))); -- PID
Put (' ');
Put (Image1 (Field (Val, 51, 51))); -- Space
Put (' ');
Sz := Field (Val, 52, 55);
Mask := Shift_Right (16#ffff_ffff#,
Natural (32 - (10 + 2 * Sz)));
Val := Get_Mas2;
Put (Image8 (Val and not Mask)); -- VA
Put ('-');
Put (Image8 (Val or Mask));
Put (' ');
Put (Image1 (Field (Val, 56, 57)));
Put_Bit (Val, 58, 'V'); -- VLE
Put_Bit (Val, 59, 'W'); -- Write through
Put_Bit (Val, 60, 'I'); -- Cache inhibited
Put_Bit (Val, 61, 'M'); -- Memory coherence
Put_Bit (Val, 62, 'G'); -- Guarded
Put_Bit (Val, 63, 'E'); -- Endian
Put (' ');
Val := Get_Mas3;
Put (Image8 (Val and not Mask));
Put (' ');
Put (Image1 (Field (Val, 54, 57))); -- User flags
Put (' ');
Put_Bit (Val, 58, 'x');
Put_Bit (Val, 59, 'X');
Put_Bit (Val, 60, 'w');
Put_Bit (Val, 61, 'W');
Put_Bit (Val, 62, 'r');
Put_Bit (Val, 63, 'R');
New_Line;
end;
end if;
end loop;
New_Line;
end Proc_Tlb;
SIU_PCR : array (0 .. 230) of Unsigned_16;
for SIU_PCR'Address use System'To_Address (16#c3f9_0040#);
pragma Import (Ada, SIU_PCR);
pragma Volatile (SIU_PCR);
EBI_BR0 : Unsigned_32;
for EBI_BR0'Address use System'To_Address (16#c3f8_4010#);
pragma Import (Ada, EBI_BR0);
pragma Volatile (EBI_BR0);
EBI_OR0 : Unsigned_32;
for EBI_OR0'Address use System'To_Address (16#c3f8_4014#);
pragma Import (Ada, EBI_OR0);
pragma Volatile (EBI_OR0);
procedure Extsram is
begin
-- SIU
-- 0x440: primary assignment, 10pF drive strength
-- 0x443: likewise + weak pull-up
-- PCR 4-27 (Addresses) = 0x440
-- PCR 28-43 (Data) = 0x440
for I in 4 .. 43 loop
SIU_PCR (I) := 16#440#;
end loop;
-- PCR 62,63 (RD/WR, BDIP) = 0x440
for I in 62 .. 63 loop
SIU_PCR (I) := 16#440#;
end loop;
-- PCR 64-65 (W[0-1]) = 0x443
-- PCR 68-69 (OE, TS) = 0x443
for I in 64 .. 69 loop
SIU_PCR (I) := 16#443#;
end loop;
-- PCR 0-3 (CS[0-3]) = 0x443
for I in 0 .. 3 loop
SIU_PCR (I) := 16#443#;
end loop;
-- EBI CS
-- EBI_CR0 =
-- EBI_OR0 =
-- Note that burst cannot be enabled, as burst length is at least
-- 4*4 bytes, while SRAM burst is only 4*2 bytes.
EBI_BR0 := 16#0000_0843#; -- BA=0,PS=1,BL=1,WEBS=0,TBDIP=0,BI=1,V=1
EBI_OR0 := 16#fff8_0000#; -- AM=fff8 (512KB),SCY=0,BSCY=0
-- MMU
-- use tlb#2, Enable cache
Set_Mas0 (2 ** 28 + 2 * 2 ** 16);
Set_Mas1 (2 ** 31 + 2 ** 30 + 7 * 2 ** 8); -- TSIZE=16MB
Set_Mas2 (16#2000_0000#); -- Cachable
Set_Mas3 (16#2000_003f#); -- RWX
Asm ("tlbwe", Volatile => True);
end Extsram;
ESCI_CR1 : Unsigned_32;
for ESCI_CR1'Address use System'To_Address (16#Fffb_0000# + 0);
pragma Import (Ada, ESCI_CR1);
pragma Volatile (ESCI_CR1);
procedure Serial_Br (Baud : Unsigned_32) is
begin
-- 8 bits, no parity, Tx & Rx enabled, br = Fsys/(16 * baud)
ESCI_CR1 := 16#000c# + (Fsys / (16 * Baud)) * 2 ** 16;
end Serial_Br;
procedure Proc_Br is
Speed : Unsigned_32;
Ok : Boolean;
begin
Next_Word;
if End_Pos <= Line_Len then
Parse_Unsigned32 (Speed, Ok);
if not Ok then
return;
end if;
Serial_Br (Speed);
else
Put ("Speed: ");
Put (Natural (Fsys / (16 * (ESCI_CR1 / 2 ** 16))));
New_Line;
end if;
end Proc_Br;
procedure Sync is
begin
Asm ("msync", Volatile => True);
Asm ("isync", Volatile => True);
end Sync;
procedure Proc_Load is
begin
Put_Line ("Waiting for srec.");
Srec.Read_Srec;
Sync;
end Proc_Load;
Commands : aliased Command_List :=
(7,
((new String'("tlb - Display TLB configuration and content"),
Proc_Tlb'Access),
(new String'("cache [on] - Display cache registers or enable cache"),
Proc_Cache'Access),
(new String'("cr - Display some config registers"),
Proc_Cr'Access),
(new String'("timer - Display time registers"),
Proc_Timer'Access),
(new String'("pll - Display PLL registers"),
Proc_Pll'Access),
(new String'("br [SPEED] - Display or set uart baud rate"),
Proc_Br'Access),
(new String'("load - S-Record loader"),
Proc_Load'Access)),
null);
begin
-- Set speed
Serial_Br (57600);
-- Disable watchdog (in case of running from BAM)
Disable_Watchdog;
-- Enable external ram
Extsram;
Register_Commands (Commands'Access);
end Mpc55xx;
| 34.301676 | 78 | 0.506352 |
572ef86de29285dcca5e864edbd2b5c6f77635dc | 1,097 | ads | Ada | src/ada-libc/src/libc-errno.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-libc/src/libc-errno.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | src/ada-libc/src/libc-errno.ads | mstewartgallus/linted | 4d4cf9390353ea045b95671474ab278456793a35 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2015, 2017 Steven Stewart-Gallus
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-- implied. See the License for the specific language governing
-- permissions and limitations under the License.
with Interfaces.C;
package Libc.Errno with
Spark_Mode => Off is
pragma Preelaborate;
function Errno return Interfaces.C.int with
Volatile_Function;
pragma Import (C, Errno, "linted_adarts_libc_errno");
procedure Errno_Get (Err : out Interfaces.C.int);
procedure Errno_Set (Err : Interfaces.C.int);
pragma Import (C, Errno_Set, "linted_adarts_libc_errno_set");
EDOM : constant := 33;
EILSEQ : constant := 84;
ERANGE : constant := 34;
end Libc.Errno;
| 33.242424 | 70 | 0.726527 |
04ce76803715f1b7cdcb9710e570f803be56dcaa | 7,194 | adb | Ada | source/amf/uml/amf-internals-uml_qualifier_values.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-internals-uml_qualifier_values.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-internals-uml_qualifier_values.adb | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
package body AMF.Internals.UML_Qualifier_Values is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Qualifier_Value_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Enter_Qualifier_Value
(AMF.UML.Qualifier_Values.UML_Qualifier_Value_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Qualifier_Value_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Leave_Qualifier_Value
(AMF.UML.Qualifier_Values.UML_Qualifier_Value_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Qualifier_Value_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
AMF.Visitors.UML_Iterators.UML_Iterator'Class
(Iterator).Visit_Qualifier_Value
(Visitor,
AMF.UML.Qualifier_Values.UML_Qualifier_Value_Access (Self),
Control);
end if;
end Visit_Element;
-------------------
-- Get_Qualifier --
-------------------
overriding function Get_Qualifier
(Self : not null access constant UML_Qualifier_Value_Proxy)
return AMF.UML.Properties.UML_Property_Access is
begin
return
AMF.UML.Properties.UML_Property_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualifier
(Self.Element)));
end Get_Qualifier;
-------------------
-- Set_Qualifier --
-------------------
overriding procedure Set_Qualifier
(Self : not null access UML_Qualifier_Value_Proxy;
To : AMF.UML.Properties.UML_Property_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Qualifier
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Qualifier;
---------------
-- Get_Value --
---------------
overriding function Get_Value
(Self : not null access constant UML_Qualifier_Value_Proxy)
return AMF.UML.Input_Pins.UML_Input_Pin_Access is
begin
return
AMF.UML.Input_Pins.UML_Input_Pin_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Value
(Self.Element)));
end Get_Value;
---------------
-- Set_Value --
---------------
overriding procedure Set_Value
(Self : not null access UML_Qualifier_Value_Proxy;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Value
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Value;
end AMF.Internals.UML_Qualifier_Values;
| 43.865854 | 78 | 0.53072 |
0485bd818c5e63855d37cf68c97d2f44a1fe6836 | 189 | adb | Ada | tests/typing/good/testfile-rec-3.adb | xuedong/mini-ada | 59a8b966cf50ba22a3b5a7cb449f671e4da32e44 | [
"MIT"
] | null | null | null | tests/typing/good/testfile-rec-3.adb | xuedong/mini-ada | 59a8b966cf50ba22a3b5a7cb449f671e4da32e44 | [
"MIT"
] | 1 | 2019-03-10T19:13:21.000Z | 2019-03-10T19:19:46.000Z | tests/typing/good/testfile-rec-3.adb | xuedong/mini-ada | 59a8b966cf50ba22a3b5a7cb449f671e4da32e44 | [
"MIT"
] | null | null | null | with Ada.Text_IO; use Ada.Text_IO;
procedure Test is
function Oups(N: Integer) return Integer is
L : Integer := Oups(N);
begin
return 0;
end;
begin
New_Line;
end;
| 14.538462 | 46 | 0.640212 |
5876da156d506e96b91ba922e8e482e3a3cdcd12 | 2,788 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__vxworks.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__vxworks.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnarl/a-intnam__vxworks.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1998-2020, Free Software Foundation, Inc. --
-- --
-- GNARL 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is the VxWorks version of this package
with System.OS_Interface;
package Ada.Interrupts.Names is
-- All identifiers in this unit are implementation defined
pragma Implementation_Defined;
subtype Hardware_Interrupts is Interrupt_ID
range Interrupt_ID'First .. System.OS_Interface.Max_HW_Interrupt;
-- Range of values that can be used for hardware interrupts
end Ada.Interrupts.Names;
| 59.319149 | 78 | 0.431851 |
4b05c5f9ae29e63c631ffbb3d2880648723ae0ee | 45,213 | adb | Ada | boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/dilate_0_0_2160_3840_0_3_3_1_1_26.adb | Kgfu/PYNQ_HelloWorld | a5197130e7d4a5e7f382c3963349c1c0bd213213 | [
"BSD-3-Clause"
] | null | null | null | boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/dilate_0_0_2160_3840_0_3_3_1_1_26.adb | Kgfu/PYNQ_HelloWorld | a5197130e7d4a5e7f382c3963349c1c0bd213213 | [
"BSD-3-Clause"
] | null | null | null | boards/ip_colordetect_test/colordetect/colordetect/.autopilot/db/dilate_0_0_2160_3840_0_3_3_1_1_26.adb | Kgfu/PYNQ_HelloWorld | a5197130e7d4a5e7f382c3963349c1c0bd213213 | [
"BSD-3-Clause"
] | null | null | null | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="15">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName/>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>dilate_0_0_2160_3840_0_3_3_1_1_26</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>imgHelper2_4102</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>0</coreId>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>imgHelper3_4103</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>49</coreId>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>p_src_rows</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>1769353058</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>p_src_cols</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName>FIFO_SRL</coreName>
<coreId>97</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>p_src_rows_read</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>340</lineNumber>
<contextFuncName>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>dilate_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second class_id="11" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</first>
<second>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>340</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>srl</implIndex>
<coreName>FIFO_SRL</coreName>
<coreId>81</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>19</item>
<item>20</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.32</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>p_src_cols_read</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>341</lineNumber>
<contextFuncName>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>dilate_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</first>
<second>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>341</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control>auto</control>
<opType>fifo</opType>
<implIndex>srl</implIndex>
<coreName>FIFO_SRL</coreName>
<coreId>81</coreId>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>21</item>
<item>22</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>3.32</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>trunc_ln340</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>340</lineNumber>
<contextFuncName>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>dilate_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</first>
<second>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>340</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>trunc_ln340_fu_52_p1</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>3</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>14</id>
<name>trunc_ln341</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>341</lineNumber>
<contextFuncName>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>dilate_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</first>
<second>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>341</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>trunc_ln341_fu_57_p1</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>4</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>_ln376</name>
<fileName>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>376</lineNumber>
<contextFuncName>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</contextFuncName>
<contextNormFuncName>dilate_0_0_2160_3840_0_3_3_1_1_s</contextNormFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>/home/willychiang/Desktop/PYNQ-HelloWorld/boards/ip/vitis_lib/vision/L1/include/imgproc/xf_dilation.hpp</first>
<second>dilate&lt;0, 0, 2160, 3840, 0, 3, 3, 1, 1&gt;</second>
</first>
<second>376</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42</rtlName>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>5</count>
<item_version>0</item_version>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>5</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name>_ln0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>113</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>6</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_11">
<Value>
<Obj>
<type>2</type>
<id>25</id>
<name>xfdilate_2160_3840_1_0_1_0_3841_3_3_s</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>3409872361</coreId>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:xfdilate<2160, 3840, 1, 0, 1, 0, 3841, 3, 3>></content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_12">
<Obj>
<type>3</type>
<id>17</id>
<name>dilate<0, 0, 2160, 3840, 0, 3, 3, 1, 1>26</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<contextNormFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<control/>
<opType/>
<implIndex/>
<coreName/>
<coreId>1768189039</coreId>
</Obj>
<node_objs>
<count>6</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>14</item>
<item>15</item>
<item>16</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_13">
<id>20</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>11</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_14">
<id>22</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>12</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_15">
<id>23</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>13</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_16">
<id>24</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>14</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_17">
<id>26</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_18">
<id>27</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_19">
<id>28</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_20">
<id>29</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_21">
<id>30</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>15</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_22">
<mId>1</mId>
<mTag>dilate<0, 0, 2160, 3840, 0, 3, 3, 1, 1>26</mTag>
<mNormTag>dilate_0_0_2160_3840_0_3_3_1_1_26</mNormTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>17</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>13</mMinLatency>
<mMaxLatency>8319373</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_23">
<states class_id="25" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_24">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_25">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_26">
<id>12</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_27">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_28">
<id>14</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_29">
<id>15</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_30">
<id>2</id>
<operations>
<count>8</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_31">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_32">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_33">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_34">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_35">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_36">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_37">
<id>15</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_38">
<id>16</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_39">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>-1</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="34" tracking_level="1" version="0" object_id="_40">
<dp_component_resource class_id="35" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="36" tracking_level="0" version="0">
<first>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xfdilate_2160_3840_1_0_1_0_3841_3_3_s)</first>
<second class_id="37" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>BRAM</first>
<second>6</second>
</item>
<item>
<first>FF</first>
<second>611</second>
</item>
<item>
<first>LUT</first>
<second>819</second>
</item>
</second>
</item>
</dp_component_resource>
<dp_expression_resource>
<count>1</count>
<item_version>0</item_version>
<item>
<first>ap_block_state1 ( or ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>1</second>
</item>
</second>
</item>
</dp_expression_resource>
<dp_fifo_resource>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_resource>
<dp_memory_resource>
<count>0</count>
<item_version>0</item_version>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>6</count>
<item_version>0</item_version>
<item>
<first>ap_NS_fsm</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>3</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>3</second>
</item>
<item>
<first>LUT</first>
<second>13</second>
</item>
</second>
</item>
<item>
<first>ap_done</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>imgHelper2_4102_read</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>imgHelper3_4103_write</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_src_cols_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
<item>
<first>p_src_rows_blk_n</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>2</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>5</count>
<item_version>0</item_version>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>2</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_done_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42_ap_start_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>1</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>trunc_ln340_reg_62</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>16</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>16</second>
</item>
</second>
</item>
<item>
<first>trunc_ln341_reg_67</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>16</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>16</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>1</count>
<item_version>0</item_version>
<item>
<first>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first>
<second>
<count>0</count>
<item_version>0</item_version>
</second>
</item>
</dp_dsp_resource>
<dp_component_map class_id="39" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42 (xfdilate_2160_3840_1_0_1_0_3841_3_3_s)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</dp_component_map>
<dp_expression_map>
<count>0</count>
<item_version>0</item_version>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>0</count>
<item_version>0</item_version>
</dp_memory_map>
</res>
<node_label_latency class_id="41" tracking_level="0" version="0">
<count>6</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>11</first>
<second class_id="43" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>14</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="44" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>17</first>
<second class_id="46" tracking_level="0" version="0">
<first>0</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="47" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</regions>
<dp_fu_nodes class_id="48" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>30</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
<item>
<first>36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>42</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>15</item>
<item>15</item>
</second>
</item>
<item>
<first>52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="51" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="52" tracking_level="0" version="0">
<first>trunc_ln340_fu_52</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>trunc_ln341_fu_57</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>1</count>
<item_version>0</item_version>
<item>
<first>grp_xfdilate_2160_3840_1_0_1_0_3841_3_3_s_fu_42</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>15</item>
<item>15</item>
</second>
</item>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>p_src_cols_read_read_fu_36</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
<item>
<first>p_src_rows_read_read_fu_30</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="53" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>2</count>
<item_version>0</item_version>
<item>
<first>62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>2</count>
<item_version>0</item_version>
<item>
<first>trunc_ln340_reg_62</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>13</item>
</second>
</item>
<item>
<first>trunc_ln341_reg_67</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="54" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>imgHelper2_4102</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</second>
</item>
<item>
<first>imgHelper3_4103</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>15</item>
</second>
</item>
</second>
</item>
<item>
<first>p_src_cols</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
</second>
</item>
<item>
<first>p_src_rows</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>11</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core>
<count>4</count>
<item_version>0</item_version>
<item>
<first>1</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>2</first>
<second>
<first>1151</first>
<second>10</second>
</second>
</item>
<item>
<first>3</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>4</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
</port2core>
<node2core>
<count>3</count>
<item_version>0</item_version>
<item>
<first>11</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1150</first>
<second>10</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>-1</first>
<second>-1</second>
</second>
</item>
</node2core>
</syndb>
</boost_serialization>
| 32.271949 | 142 | 0.477429 |
2e767f6725f2bfa72f807d78cbc69decfb5fe421 | 918 | ads | Ada | build_gnu/binutils/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2017-05-31T21:42:12.000Z | 2017-05-31T21:42:12.000Z | build_gnu/binutils/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | null | null | null | build_gnu/binutils/gdb/testsuite/gdb.ada/set_pckd_arr_elt/pck.ads | jed-frey/e200-gcc | df1421b421a8ec8729d70791129f5283dee5f9ea | [
"BSD-3-Clause"
] | 1 | 2019-12-17T22:04:07.000Z | 2019-12-17T22:04:07.000Z | -- Copyright 2012-2014 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT 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
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package Pck is
type Small is new Integer range 0 .. 2 ** 6 - 1;
type Simple_Array is array (1 .. 4) of Small;
pragma Pack (Simple_Array);
procedure Update_Small (S : in out Small);
end Pck;
| 39.913043 | 73 | 0.721133 |
adb60fcde82552b2f12bc85682613d37b9c11976 | 2,649 | ads | Ada | source/oasis/program-elements-exception_renaming_declarations.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | null | null | null | source/oasis/program-elements-exception_renaming_declarations.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | null | null | null | source/oasis/program-elements-exception_renaming_declarations.ads | optikos/oasis | 9f64d46d26d964790d69f9db681c874cfb3bf96d | [
"MIT"
] | 2 | 2019-09-14T23:18:50.000Z | 2019-10-02T10:11:40.000Z | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Elements.Declarations;
with Program.Elements.Defining_Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Aspect_Specifications;
package Program.Elements.Exception_Renaming_Declarations is
pragma Pure (Program.Elements.Exception_Renaming_Declarations);
type Exception_Renaming_Declaration is
limited interface and Program.Elements.Declarations.Declaration;
type Exception_Renaming_Declaration_Access is
access all Exception_Renaming_Declaration'Class with Storage_Size => 0;
not overriding function Names
(Self : Exception_Renaming_Declaration)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Vector_Access is abstract;
not overriding function Renamed_Exception
(Self : Exception_Renaming_Declaration)
return not null Program.Elements.Expressions.Expression_Access
is abstract;
not overriding function Aspects
(Self : Exception_Renaming_Declaration)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access is abstract;
type Exception_Renaming_Declaration_Text is limited interface;
type Exception_Renaming_Declaration_Text_Access is
access all Exception_Renaming_Declaration_Text'Class
with Storage_Size => 0;
not overriding function To_Exception_Renaming_Declaration_Text
(Self : aliased in out Exception_Renaming_Declaration)
return Exception_Renaming_Declaration_Text_Access is abstract;
not overriding function Colon_Token
(Self : Exception_Renaming_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Exception_Token
(Self : Exception_Renaming_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function Renames_Token
(Self : Exception_Renaming_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
not overriding function With_Token
(Self : Exception_Renaming_Declaration_Text)
return Program.Lexical_Elements.Lexical_Element_Access is abstract;
not overriding function Semicolon_Token
(Self : Exception_Renaming_Declaration_Text)
return not null Program.Lexical_Elements.Lexical_Element_Access
is abstract;
end Program.Elements.Exception_Renaming_Declarations;
| 36.287671 | 76 | 0.784824 |
13b038b0d7b8958c9bb1c29e3b255c773972a933 | 4,132 | ads | Ada | tools/scitools/conf/understand/ada/ada12/s-imgllw.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada12/s-imgllw.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada12/s-imgllw.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ L L W --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009 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 3, 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. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Contains the routine for computing the image of signed and unsigned
-- integers whose size > Integer'Size for use by Text_IO.Integer_IO,
-- Text_IO.Modular_IO.
with System.Unsigned_Types;
package System.Img_LLW is
pragma Pure;
procedure Set_Image_Width_Long_Long_Integer
(V : Long_Long_Integer;
W : Integer;
S : out String;
P : in out Natural);
-- Sets the signed image of V in decimal format, starting at S (P + 1),
-- updating P to point to the last character stored. The image includes
-- a leading minus sign if necessary, but no leading spaces unless W is
-- positive, in which case leading spaces are output if necessary to ensure
-- that the output string is no less than W characters long. The caller
-- promises that the buffer is large enough and no check is made for this.
-- Constraint_Error will not necessarily be raised if this is violated,
-- since it is perfectly valid to compile this unit with checks off.
procedure Set_Image_Width_Long_Long_Unsigned
(V : System.Unsigned_Types.Long_Long_Unsigned;
W : Integer;
S : out String;
P : in out Natural);
-- Sets the unsigned image of V in decimal format, starting at S (P + 1),
-- updating P to point to the last character stored. The image includes no
-- leading spaces unless W is positive, in which case leading spaces are
-- output if necessary to ensure that the output string is no less than
-- W characters long. The caller promises that the buffer is large enough
-- and no check is made for this. Constraint_Error will not necessarily be
-- raised if this is violated, since it is perfectly valid to compile this
-- unit with checks off.
end System.Img_LLW;
| 59.028571 | 79 | 0.473863 |
225757dae3bfb1ce93a199102c1e05963319a96c | 13,088 | adb | Ada | source/s-stposu.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/s-stposu.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/s-stposu.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | with Ada.Exceptions;
with System.Address_To_Named_Access_Conversions;
with System.Runtime_Context;
with System.Shared_Locking;
package body System.Storage_Pools.Subpools is
pragma Suppress (All_Checks);
use type Finalization_Masters.Finalization_Master_Ptr;
use type Finalization_Masters.Finalize_Address_Ptr;
use type Storage_Barriers.Flag;
package FM_Node_Ptr_Conv is
new Address_To_Named_Access_Conversions (
Finalization_Masters.FM_Node,
Finalization_Masters.FM_Node_Ptr);
-- hooks for smart linking, making code of subpool as removable
procedure Setup_Allocation (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Subpool : out Subpool_Handle;
Master : out Finalization_Masters.Finalization_Master_Ptr);
procedure Setup_Allocation (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Subpool : out Subpool_Handle;
Master : out Finalization_Masters.Finalization_Master_Ptr)
is
pragma Unreferenced (Pool);
pragma Unreferenced (Fin_Address);
pragma Assert (Context_Subpool = null);
begin
Subpool := null;
Master := Context_Master;
end Setup_Allocation;
procedure Setup_Allocation_With_Subpools (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Subpool : out Subpool_Handle;
Master : out Finalization_Masters.Finalization_Master_Ptr);
procedure Setup_Allocation_With_Subpools (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Subpool : out Subpool_Handle;
Master : out Finalization_Masters.Finalization_Master_Ptr) is
begin
if Pool in Root_Storage_Pool_With_Subpools'Class then
if Context_Subpool = null then
Subpool := Default_Subpool_For_Pool (
Root_Storage_Pool_With_Subpools'Class (Pool));
else
Subpool := Context_Subpool;
end if;
if Subpool.Owner /=
Root_Storage_Pool_With_Subpools'Class (Pool)'Unchecked_Access
then
raise Program_Error;
end if;
if Fin_Address /= null then
Master := Subpool.Master'Access;
end if;
else
Setup_Allocation (
Pool,
Context_Subpool,
Context_Master,
Fin_Address,
Subpool,
Master);
end if;
end Setup_Allocation_With_Subpools;
type Setup_Allocation_Handler is access procedure (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Subpool : out Subpool_Handle;
Master : out Finalization_Masters.Finalization_Master_Ptr);
pragma Favor_Top_Level (Setup_Allocation_Handler);
Setup_Allocation_Hook : not null Setup_Allocation_Handler :=
Setup_Allocation'Access;
-- subpools and theirs owner
procedure Attach (
Owner : not null Root_Storage_Pool_With_Subpools_Access;
Item : not null Subpool_Handle);
procedure Detach (Item : not null Subpool_Handle);
procedure Finalize_Subpool (Subpool : not null Subpool_Handle);
procedure Attach (
Owner : not null Root_Storage_Pool_With_Subpools_Access;
Item : not null Subpool_Handle) is
begin
pragma Assert (Item.Owner = null);
Shared_Locking.Enter;
Item.Owner := Owner;
Item.Previous := Owner.Last;
if Item.Previous /= null then
Item.Previous.Next := Item;
end if;
Item.Next := null;
Owner.Last := Item;
Shared_Locking.Leave;
end Attach;
procedure Detach (Item : not null Subpool_Handle) is
begin
pragma Assert (Item.Owner /= null);
Shared_Locking.Enter;
if Item.Previous /= null then
Item.Previous.Next := Item.Next;
end if;
if Item.Next /= null then
Item.Next.Previous := Item.Previous;
else
Item.Owner.Last := Item.Previous;
end if;
Item.Owner := null;
Shared_Locking.Leave;
end Detach;
procedure Finalize_Subpool (Subpool : not null Subpool_Handle) is
begin
if Subpool.Owner /= null then
Finalization_Masters.Finalize (Subpool.Master);
Detach (Subpool);
end if;
end Finalize_Subpool;
-- implementation
function Pool_Of_Subpool (
Subpool : not null Subpool_Handle)
return access Root_Storage_Pool_With_Subpools'Class is
begin
return Subpool.Owner;
end Pool_Of_Subpool;
procedure Set_Pool_Of_Subpool (
Subpool : not null Subpool_Handle;
To : in out Root_Storage_Pool_With_Subpools'Class) is
begin
if Subpool.Owner /= null
or else Storage_Barriers.atomic_load (
To.Finalization_Started'Access) /= 0
then
raise Program_Error;
else
Attach (To'Unrestricted_Access, Subpool);
end if;
end Set_Pool_Of_Subpool;
function Default_Subpool_For_Pool (
Pool : in out Root_Storage_Pool_With_Subpools)
return not null Subpool_Handle is
begin
-- RM 13.11.4(35/3)
-- The pool implementor should override Default_Subpool_For_Pool
-- if the pool is to support a default subpool for the pool.
raise Program_Error;
return Default_Subpool_For_Pool (Pool);
end Default_Subpool_For_Pool;
overriding procedure Allocate (
Pool : in out Root_Storage_Pool_With_Subpools;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count) is
begin
Allocate_From_Subpool (
Root_Storage_Pool_With_Subpools'Class (Pool),
Storage_Address,
Size_In_Storage_Elements,
Alignment,
Default_Subpool_For_Pool (
Root_Storage_Pool_With_Subpools'Class (Pool)));
end Allocate;
procedure Unchecked_Deallocate_Subpool (Subpool : in out Subpool_Handle) is
begin
-- (s-spsufi.adb)
if Subpool /= null then
if Subpool.Owner = null then
raise Program_Error;
else
declare
Pool : constant access Root_Storage_Pool_With_Subpools'Class :=
Pool_Of_Subpool (Subpool); -- save it before finalize
begin
Finalize_Subpool (Subpool);
Deallocate_Subpool (Pool.all, Subpool);
end;
Subpool := null;
end if;
end if;
end Unchecked_Deallocate_Subpool;
overriding procedure Initialize (
Object : in out Root_Storage_Pool_With_Subpools) is
begin
Storage_Barriers.atomic_clear (Object.Finalization_Started'Access);
Setup_Allocation_Hook := Setup_Allocation_With_Subpools'Access;
end Initialize;
overriding procedure Finalize (
Object : in out Root_Storage_Pool_With_Subpools) is
begin
if not Storage_Barriers.atomic_test_and_set (
Object.Finalization_Started'Access)
then
declare
X : Ada.Exceptions.Exception_Occurrence;
Raised : Boolean := False;
begin
while Object.Last /= null loop
begin
Finalize_Subpool (Object.Last);
exception
when E : others =>
if not Raised then
Raised := True;
Ada.Exceptions.Save_Occurrence (X, E);
end if;
end;
end loop;
if Raised then
Ada.Exceptions.Reraise_Nonnull_Occurrence (X);
end if;
end;
end if;
end Finalize;
procedure Allocate_Any_Controlled (
Pool : in out Root_Storage_Pool'Class;
Context_Subpool : Subpool_Handle;
Context_Master : Finalization_Masters.Finalization_Master_Ptr;
Fin_Address : Finalization_Masters.Finalize_Address_Ptr;
Addr : out Address;
Storage_Size : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count;
Is_Controlled : Boolean;
On_Subpool : Boolean)
is
Overlaid_Allocation : Address := Null_Address;
Subpool : Subpool_Handle := null;
Master : Finalization_Masters.Finalization_Master_Ptr := null;
Actual_Storage_Address : Address;
Actual_Size : Storage_Elements.Storage_Count;
Header_And_Padding : Storage_Elements.Storage_Offset;
begin
Setup_Allocation_Hook (
Pool,
Context_Subpool,
Context_Master,
Fin_Address,
Subpool,
Master);
pragma Assert (On_Subpool <= (Subpool /= null));
if Is_Controlled then
if Master = null
or else Finalization_Masters.Finalization_Started (Master.all)
or else Fin_Address = null
then
raise Program_Error;
else
Header_And_Padding := Header_Size_With_Padding (Alignment);
Actual_Size := Storage_Size + Header_And_Padding;
declare
TLS : constant
not null Runtime_Context.Task_Local_Storage_Access :=
Runtime_Context.Get_Task_Local_Storage;
begin
Overlaid_Allocation := TLS.Overlaid_Allocation;
end;
end if;
else
Actual_Size := Storage_Size;
end if;
-- allocation
if Subpool /= null then
Allocate_From_Subpool (
Root_Storage_Pool_With_Subpools'Class (Pool),
Actual_Storage_Address,
Actual_Size,
Alignment,
Subpool);
else
Allocate (Pool, Actual_Storage_Address, Actual_Size, Alignment);
end if;
-- fix address
if Is_Controlled
and then Actual_Storage_Address /=
Overlaid_Allocation -- for System.Storage_Pools.Overlaps
then
Shared_Locking.Enter;
declare
N_Ptr : constant Finalization_Masters.FM_Node_Ptr :=
FM_Node_Ptr_Conv.To_Pointer (
Actual_Storage_Address
+ Header_And_Padding
- Finalization_Masters.Header_Size);
begin
Finalization_Masters.Attach_Unprotected (
N_Ptr,
Finalization_Masters.Objects_Unprotected (
Master.all,
Fin_Address));
end;
Addr := Actual_Storage_Address + Header_And_Padding;
Finalization_Masters.Set_Finalize_Address_Unprotected (
Master.all,
Fin_Address);
Shared_Locking.Leave;
else
Addr := Actual_Storage_Address;
end if;
end Allocate_Any_Controlled;
procedure Deallocate_Any_Controlled (
Pool : in out Root_Storage_Pool'Class;
Addr : Address;
Storage_Size : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count;
Is_Controlled : Boolean)
is
Actual_Storage_Address : Address;
Actual_Size : Storage_Elements.Storage_Count;
begin
-- fix address
if Is_Controlled
and then Addr /=
Runtime_Context.Get_Task_Local_Storage.Overlaid_Allocation
-- for System.Storage_Pools.Overlaps
then
Shared_Locking.Enter;
declare
Header_And_Padding : constant Storage_Elements.Storage_Offset :=
Header_Size_With_Padding (Alignment);
N_Ptr : constant Finalization_Masters.FM_Node_Ptr :=
FM_Node_Ptr_Conv.To_Pointer (
Addr - Finalization_Masters.Header_Size);
begin
Finalization_Masters.Detach_Unprotected (N_Ptr);
Actual_Storage_Address := Addr - Header_And_Padding;
Actual_Size := Storage_Size + Header_And_Padding;
end;
Shared_Locking.Leave;
else
Actual_Storage_Address := Addr;
Actual_Size := Storage_Size;
end if;
-- deallocation
Deallocate (Pool, Actual_Storage_Address, Actual_Size, Alignment);
end Deallocate_Any_Controlled;
function Header_Size_With_Padding (
Alignment : Storage_Elements.Storage_Count)
return Storage_Elements.Storage_Count is
begin
return Finalization_Masters.Header_Size
+ (-Finalization_Masters.Header_Size) mod Alignment;
end Header_Size_With_Padding;
end System.Storage_Pools.Subpools;
| 34.532982 | 78 | 0.657167 |
57368d25d24415c519659055eb8641b9dade8c96 | 1,626 | ads | Ada | src/Ada/c-kernel.ads | wookey-project/ewok-legacy | c973752dac3a0ebe3f7cfca062f50744578f051b | [
"Apache-2.0"
] | null | null | null | src/Ada/c-kernel.ads | wookey-project/ewok-legacy | c973752dac3a0ebe3f7cfca062f50744578f051b | [
"Apache-2.0"
] | null | null | null | src/Ada/c-kernel.ads | wookey-project/ewok-legacy | c973752dac3a0ebe3f7cfca062f50744578f051b | [
"Apache-2.0"
] | null | null | null | --
-- Copyright 2018 The wookey project team <[email protected]>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with types.c;
package c.kernel is
procedure log (s : types.c.c_string)
with
convention => c,
import => true,
external_name => "dbg_log",
global => null;
procedure flush
with
convention => c,
import => true,
external_name => "dbg_flush",
global => null;
function get_random
(s : out types.c.c_string;
len : in unsigned_16)
return types.c.t_retval
with
convention => c,
import => true,
external_name => "get_random",
global => null;
function get_random_u32
(rng : out unsigned_32)
return types.c.t_retval
with
convention => c,
import => true,
external_name => "get_random_u32",
global => null;
end c.kernel;
| 26.655738 | 79 | 0.602091 |
1312f5ac162a7face71410e3f4dc401f395eabf6 | 6,650 | adb | Ada | tools-src/gnu/gcc/gcc/ada/5vosprim.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/5vosprim.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/5vosprim.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ P R I M I T I V E S --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1998-2001 Free Software Foundation, Inc. --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, 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. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the OpenVMS/Alpha version of this file
with System.Aux_DEC;
package body System.OS_Primitives is
--------------------------------------
-- Local functions and declarations --
--------------------------------------
function Get_GMToff return Integer;
pragma Import (C, Get_GMToff, "get_gmtoff");
-- Get the offset from GMT for this timezone
VMS_Epoch_Offset : constant Long_Integer :=
10_000_000 *
(3_506_716_800 + Long_Integer (Get_GMToff));
-- The offset between the Unix Epoch and the VMS Epoch
subtype Cond_Value_Type is System.Aux_DEC.Unsigned_Longword;
-- Condition Value return type
----------------
-- Sys_Schdwk --
----------------
--
-- Schedule Wakeup
--
-- status = returned status
-- pidadr = address of process id to be woken up
-- prcnam = name of process to be woken up
-- daytim = time to wake up
-- reptim = repitition interval of wakeup calls
--
procedure Sys_Schdwk
(
Status : out Cond_Value_Type;
Pidadr : in Address := Null_Address;
Prcnam : in String := String'Null_Parameter;
Daytim : in Long_Integer;
Reptim : in Long_Integer := Long_Integer'Null_Parameter
);
pragma Interface (External, Sys_Schdwk);
-- VMS system call to schedule a wakeup event
pragma Import_Valued_Procedure
(Sys_Schdwk, "SYS$SCHDWK",
(Cond_Value_Type, Address, String, Long_Integer, Long_Integer),
(Value, Value, Descriptor (S), Reference, Reference)
);
----------------
-- Sys_Gettim --
----------------
--
-- Get System Time
--
-- status = returned status
-- tim = current system time
--
procedure Sys_Gettim
(
Status : out Cond_Value_Type;
Tim : out OS_Time
);
-- VMS system call to get the current system time
pragma Interface (External, Sys_Gettim);
pragma Import_Valued_Procedure
(Sys_Gettim, "SYS$GETTIM",
(Cond_Value_Type, OS_Time),
(Value, Reference)
);
---------------
-- Sys_Hiber --
---------------
--
-- Hibernate (until woken up)
--
-- status = returned status
--
procedure Sys_Hiber (Status : out Cond_Value_Type);
-- VMS system call to hibernate the current process
pragma Interface (External, Sys_Hiber);
pragma Import_Valued_Procedure
(Sys_Hiber, "SYS$HIBER",
(Cond_Value_Type),
(Value)
);
-----------
-- Clock --
-----------
function OS_Clock return OS_Time is
Status : Cond_Value_Type;
T : OS_Time;
begin
Sys_Gettim (Status, T);
return (T);
end OS_Clock;
-----------
-- Clock --
-----------
function Clock return Duration is
begin
return To_Duration (OS_Clock, Absolute_Calendar);
end Clock;
---------------------
-- Monotonic_Clock --
---------------------
function Monotonic_Clock return Duration renames Clock;
-----------------
-- Timed_Delay --
-----------------
procedure Timed_Delay
(Time : Duration;
Mode : Integer)
is
Sleep_Time : OS_Time;
Status : Cond_Value_Type;
begin
Sleep_Time := To_OS_Time (Time, Mode);
Sys_Schdwk (Status => Status, Daytim => Sleep_Time);
Sys_Hiber (Status);
end Timed_Delay;
-----------------
-- To_Duration --
-----------------
function To_Duration (T : OS_Time; Mode : Integer) return Duration is
begin
return Duration'Fixed_Value (T - VMS_Epoch_Offset) * 100;
end To_Duration;
----------------
-- To_OS_Time --
----------------
function To_OS_Time (D : Duration; Mode : Integer) return OS_Time is
begin
if Mode = Relative then
return -(Long_Integer'Integer_Value (D) / 100);
else
return Long_Integer'Integer_Value (D) / 100 + VMS_Epoch_Offset;
end if;
end To_OS_Time;
end System.OS_Primitives;
| 33.928571 | 78 | 0.498045 |
13e2d8ba79ac5cf8f3c620b32ae656b7d9ab9040 | 4,286 | ads | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-poosiz.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-poosiz.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-poosiz.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . P O O L _ S I Z E --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Pools;
with System.Storage_Elements;
package System.Pool_Size is
pragma Elaborate_Body;
-- Needed to ensure that library routines can execute allocators
------------------------
-- Stack_Bounded_Pool --
------------------------
-- Allocation strategy:
-- Pool is a regular stack array, no use of malloc
-- user specified size
-- Space of pool is globally reclaimed by normal stack management
-- Used in the compiler for access types with 'STORAGE_SIZE rep. clause
-- Only used for allocating objects of the same type.
type Stack_Bounded_Pool
(Pool_Size : System.Storage_Elements.Storage_Count;
Elmt_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count)
is
new System.Storage_Pools.Root_Storage_Pool with record
First_Free : System.Storage_Elements.Storage_Count;
First_Empty : System.Storage_Elements.Storage_Count;
Aligned_Elmt_Size : System.Storage_Elements.Storage_Count;
The_Pool : System.Storage_Elements.Storage_Array
(1 .. Pool_Size);
end record;
overriding function Storage_Size
(Pool : Stack_Bounded_Pool) return System.Storage_Elements.Storage_Count;
overriding procedure Allocate
(Pool : in out Stack_Bounded_Pool;
Address : out System.Address;
Storage_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count);
overriding procedure Deallocate
(Pool : in out Stack_Bounded_Pool;
Address : System.Address;
Storage_Size : System.Storage_Elements.Storage_Count;
Alignment : System.Storage_Elements.Storage_Count);
overriding procedure Initialize (Pool : in out Stack_Bounded_Pool);
end System.Pool_Size;
| 51.638554 | 79 | 0.505133 |
adc93dbd17e1ba45cc5dbf2fbb811c29673913e6 | 5,011 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tienio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tienio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-tienio.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . E N U M E R A T I O N _ I O --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO.Enumeration_Aux;
package body Ada.Text_IO.Enumeration_IO is
package Aux renames Ada.Text_IO.Enumeration_Aux;
---------
-- Get --
---------
procedure Get (File : File_Type; Item : out Enum) is
Buf : String (1 .. Enum'Width + 1);
Buflen : Natural;
begin
Aux.Get_Enum_Lit (File, Buf, Buflen);
declare
Buf_Str : String renames Buf (1 .. Buflen);
pragma Unsuppress (Range_Check);
begin
Item := Enum'Value (Buf_Str);
end;
exception
when Constraint_Error => raise Data_Error;
end Get;
procedure Get (Item : out Enum) is
pragma Unsuppress (Range_Check);
begin
Get (Current_In, Item);
end Get;
procedure Get
(From : String;
Item : out Enum;
Last : out Positive)
is
Start : Natural;
begin
Aux.Scan_Enum_Lit (From, Start, Last);
declare
From_Str : String renames From (Start .. Last);
pragma Unsuppress (Range_Check);
begin
Item := Enum'Value (From_Str);
end;
exception
when Constraint_Error => raise Data_Error;
end Get;
---------
-- Put --
---------
procedure Put
(File : File_Type;
Item : Enum;
Width : Field := Default_Width;
Set : Type_Set := Default_Setting)
is
begin
-- Ensure that Item is valid before attempting to retrieve the Image, to
-- prevent the possibility of out-of-bounds addressing of index or image
-- tables. Units in the run-time library are normally compiled with
-- checks suppressed, which includes instantiated generics.
if not Item'Valid then
raise Constraint_Error with "invalid enumeration value";
end if;
Aux.Put (File, Enum'Image (Item), Width, Set);
end Put;
procedure Put
(Item : Enum;
Width : Field := Default_Width;
Set : Type_Set := Default_Setting)
is
begin
Put (Current_Out, Item, Width, Set);
end Put;
procedure Put
(To : out String;
Item : Enum;
Set : Type_Set := Default_Setting)
is
begin
-- Ensure that Item is valid before attempting to retrieve the Image, to
-- prevent the possibility of out-of-bounds addressing of index or image
-- tables. Units in the run-time library are normally compiled with
-- checks suppressed, which includes instantiated generics.
if not Item'Valid then
raise Constraint_Error with "invalid enumeration value";
end if;
Aux.Puts (To, Enum'Image (Item), Set);
end Put;
end Ada.Text_IO.Enumeration_IO;
| 36.311594 | 79 | 0.496907 |
1375de6b5007dc74c6842044dc56796a3fe0be10 | 58 | ads | Ada | Ada/inc/Problem_38.ads | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/inc/Problem_38.ads | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/inc/Problem_38.ads | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | package Problem_38 is
procedure Solve;
end Problem_38;
| 14.5 | 21 | 0.793103 |
0441a15ad27bbcce407b6543a4ea32ac6ac49200 | 562 | ads | Ada | tests/utils-test_data.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 80 | 2017-04-08T23:14:07.000Z | 2022-02-10T22:30:51.000Z | tests/utils-test_data.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 89 | 2017-06-24T08:18:26.000Z | 2021-11-12T04:37:36.000Z | tests/utils-test_data.ads | thindil/steamsky | d5d7fea622f7994c91017c4cd7ba5e188153556c | [
"TCL",
"MIT"
] | 9 | 2018-04-14T16:37:25.000Z | 2020-03-21T14:33:49.000Z | -- This package is intended to set up and tear down the test environment.
-- Once created by GNATtest, this package will never be overwritten
-- automatically. Contents of this package can be modified in any way
-- except for sections surrounded by a 'read only' marker.
with AUnit.Test_Fixtures;
package Utils.Test_Data is
-- begin read only
type Test is new AUnit.Test_Fixtures.Test_Fixture
-- end read only
with null record;
procedure Set_Up(Gnattest_T: in out Test);
procedure Tear_Down(Gnattest_T: in out Test);
end Utils.Test_Data;
| 29.578947 | 75 | 0.754448 |
1d7d86de3a0b816cc6b3d96055010d96b6ef4b02 | 8,440 | adb | Ada | src/sys/http/aws/aws-client-ext.adb | My-Colaborations/ada-util | 039b219f8247e541e281bba73b61f683c52db579 | [
"Apache-2.0"
] | null | null | null | src/sys/http/aws/aws-client-ext.adb | My-Colaborations/ada-util | 039b219f8247e541e281bba73b61f683c52db579 | [
"Apache-2.0"
] | null | null | null | src/sys/http/aws/aws-client-ext.adb | My-Colaborations/ada-util | 039b219f8247e541e281bba73b61f683c52db579 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2005-2018, 2020, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or modify --
-- it under terms of the GNU General Public License as published by the --
-- Free Software Foundation; either version 3, or (at your option) any --
-- later version. This library is distributed in the hope that it will be --
-- useful, but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are --
-- granted additional permissions described in the GCC Runtime Library --
-- Exception, version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- 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. --
------------------------------------------------------------------------------
pragma Ada_2012;
with AWS.Messages;
with AWS.Net.Buffered;
with AWS.Translator;
with AWS.Client.HTTP_Utils;
package body AWS.Client.Ext is
procedure Do_Options
(Connection : in out HTTP_Connection;
Result : out Response.Data;
URI : String := No_Data;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, OPTIONS, Result, URI, No_Content, Headers);
end Do_Options;
function Do_Options
(URL : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Options (Connection, Result, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Options;
procedure Do_Patch
(Connection : in out HTTP_Connection;
Result : out Response.Data;
URI : String := No_Data;
Data : String;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, PATCH, Result, URI, Translator.To_Stream_Element_Array (Data), Headers);
end Do_Patch;
function Do_Patch
(URL : String;
Data : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Patch (Connection, Result, Data => Data, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Patch;
function Do_Delete
(URL : String;
Data : String;
User : String := No_Data;
Pwd : String := No_Data;
Proxy : String := No_Data;
Proxy_User : String := No_Data;
Proxy_Pwd : String := No_Data;
Timeouts : Timeouts_Values := No_Timeout;
Headers : Header_List := Empty_Header_List;
User_Agent : String := Default.User_Agent) return Response.Data
is
Connection : HTTP_Connection;
Result : Response.Data;
begin
Create (Connection,
URL, User, Pwd, Proxy, Proxy_User, Proxy_Pwd,
Persistent => False,
Timeouts => Timeouts,
User_Agent => User_Agent);
Do_Delete (Connection, Result, Data, Headers => Headers);
Close (Connection);
return Result;
exception
when others =>
Close (Connection);
raise;
end Do_Delete;
procedure Do_Delete
(Connection : in out HTTP_Connection;
Result : out Response.Data;
Data : String;
URI : String := No_Data;
Headers : Header_List := Empty_Header_List) is
begin
Send_Request
(Connection, DELETE, Result, URI, Translator.To_Stream_Element_Array (Data), Headers);
end Do_Delete;
------------------
-- Send_Request --
------------------
procedure Send_Request
(Connection : in out HTTP_Connection;
Kind : Method_Kind;
Result : out Response.Data;
URI : String;
Data : Stream_Element_Array := No_Content;
Headers : Header_List := Empty_Header_List)
is
use Ada.Real_Time;
Stamp : constant Time := Clock;
Try_Count : Natural := Connection.Retry;
Auth_Attempts : Auth_Attempts_Count := (others => 2);
Auth_Is_Over : Boolean;
begin
Retry : loop
begin
HTTP_Utils.Open_Send_Common_Header
(Connection, Method_Kind'Image (Kind), URI, Headers);
-- If there is some data to send
if Data'Length > 0 then
HTTP_Utils.Send_Header
(Connection.Socket.all,
Messages.Content_Length (Data'Length));
Net.Buffered.New_Line (Connection.Socket.all);
-- Send message body
Net.Buffered.Write (Connection.Socket.all, Data);
else
Net.Buffered.New_Line (Connection.Socket.all);
end if;
HTTP_Utils.Get_Response
(Connection, Result,
Get_Body => Kind /= HEAD and then not Connection.Streaming);
HTTP_Utils.Decrement_Authentication_Attempt
(Connection, Auth_Attempts, Auth_Is_Over);
if Auth_Is_Over then
return;
elsif Kind /= HEAD and then Connection.Streaming then
HTTP_Utils.Read_Body (Connection, Result, Store => False);
end if;
exception
when E : Net.Socket_Error | HTTP_Utils.Connection_Error =>
Error_Processing
(Connection, Try_Count, Result,
Method_Kind'Image (Kind), E, Stamp);
exit Retry when not Response.Is_Empty (Result);
end;
end loop Retry;
end Send_Request;
end AWS.Client.Ext;
| 37.017544 | 94 | 0.531517 |
ad0d7773c5dbfe6b7d9c93b20c0ec420fba45b4c | 17,863 | adb | Ada | apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/linebuffer.bind.adb | dillonhuff/Halide-HLS | e9f4c3ac7915e5a52f211ce65004ae17890515a0 | [
"MIT"
] | 1 | 2020-06-18T16:51:39.000Z | 2020-06-18T16:51:39.000Z | apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/linebuffer.bind.adb | dillonhuff/Halide-HLS | e9f4c3ac7915e5a52f211ce65004ae17890515a0 | [
"MIT"
] | null | null | null | apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b/conv2d_b2b/hls_target/.autopilot/db/linebuffer.bind.adb | dillonhuff/Halide-HLS | e9f4c3ac7915e5a52f211ce65004ae17890515a0 | [
"MIT"
] | 1 | 2020-03-18T00:43:22.000Z | 2020-03-18T00:43:22.000Z | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>linebuffer</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>in_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>in_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<direction>0</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>out_stream_V_value_V</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>out_stream.V.value.V</originalName>
<rtlName></rtlName>
<coreName>FIFO_SRL</coreName>
</Obj>
<bitwidth>72</bitwidth>
</Value>
<direction>1</direction>
<if_type>3</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b</fileDirectory>
<lineNumber>403</lineNumber>
<contextFuncName>linebuffer_2D&lt;1920, 1080, 1, 1, 1, 1, 3, 3, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b</first>
<second class_id="11" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="12" tracking_level="0" version="0">
<first class_id="13" tracking_level="0" version="0">
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>530</second>
</item>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer_2D&lt;1920, 1080, 1, 1, 1, 1, 3, 3, unsigned char&gt;</second>
</first>
<second>403</second>
</item>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer_3D&lt;1920, 1080, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>492</second>
</item>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer_4D&lt;1920, 1080, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>505</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>16</item>
<item>17</item>
<item>18</item>
</oprand_edges>
<opcode>call</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b</fileDirectory>
<lineNumber>531</lineNumber>
<contextFuncName>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_8_shifts/conv2d_b2b</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>linebuffer&lt;1920, 1080, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, unsigned char&gt;</second>
</first>
<second>531</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_5">
<Value>
<Obj>
<type>2</type>
<id>15</id>
<name>call</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<const_type>6</const_type>
<content><constant:call></content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_6">
<Obj>
<type>3</type>
<id>14</id>
<name>linebuffer</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>13</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>3</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_7">
<id>16</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_8">
<id>17</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_9">
<id>18</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>12</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_10">
<mId>1</mId>
<mTag>linebuffer</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>2077921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>1</mIsDfPipe>
<mDfPipe class_id="23" tracking_level="1" version="0" object_id="_11">
<port_list class_id="24" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port_list>
<process_list class_id="25" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_12">
<type>0</type>
<name>call_U0</name>
<ssdmobj_id>12</ssdmobj_id>
<pins class_id="27" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_13">
<port class_id="29" tracking_level="1" version="0" object_id="_14">
<name>in_stream_V_value_V</name>
<dir>0</dir>
<type>0</type>
</port>
<inst class_id="30" tracking_level="1" version="0" object_id="_15">
<type>0</type>
<name>call_U0</name>
<ssdmobj_id>12</ssdmobj_id>
</inst>
</item>
<item class_id_reference="28" object_id="_16">
<port class_id_reference="29" object_id="_17">
<name>out_stream_V_value_V</name>
<dir>0</dir>
<type>1</type>
</port>
<inst class_id_reference="30" object_id_reference="_15"></inst>
</item>
</pins>
</item>
</process_list>
<channel_list class_id="31" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</channel_list>
<net_list class_id="32" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</net_list>
</mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="33" tracking_level="1" version="0" object_id="_18">
<states class_id="34" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="35" tracking_level="1" version="0" object_id="_19">
<id>1</id>
<operations class_id="36" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="37" tracking_level="1" version="0" object_id="_20">
<id>12</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="35" object_id="_21">
<id>2</id>
<operations>
<count>11</count>
<item_version>0</item_version>
<item class_id_reference="37" object_id="_22">
<id>3</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_23">
<id>4</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_24">
<id>5</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_25">
<id>6</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_26">
<id>7</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_27">
<id>8</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_28">
<id>9</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_29">
<id>10</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_30">
<id>11</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="37" object_id="_31">
<id>12</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="37" object_id="_32">
<id>13</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="38" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="39" tracking_level="1" version="0" object_id="_33">
<inState>1</inState>
<outState>2</outState>
<condition class_id="40" tracking_level="0" version="0">
<id>0</id>
<sop class_id="41" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="44" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="45" tracking_level="0" version="0">
<first>12</first>
<second class_id="46" tracking_level="0" version="0">
<first>0</first>
<second>1</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="47" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="48" tracking_level="0" version="0">
<first>14</first>
<second class_id="49" tracking_level="0" version="0">
<first>0</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="50" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="51" tracking_level="1" version="0" object_id="_34">
<region_name>linebuffer</region_name>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>14</item>
</basic_blocks>
<nodes>
<count>11</count>
<item_version>0</item_version>
<item>3</item>
<item>4</item>
<item>5</item>
<item>6</item>
<item>7</item>
<item>8</item>
<item>9</item>
<item>10</item>
<item>11</item>
<item>12</item>
<item>13</item>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>16</region_type>
<interval>0</interval>
<pipe_depth>0</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="52" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="53" tracking_level="0" version="0">
<first>36</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>12</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="55" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>1</count>
<item_version>0</item_version>
<item class_id="56" tracking_level="0" version="0">
<first>grp_call_fu_36</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>12</item>
<item>12</item>
</second>
</item>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="57" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_reg_nodes>
<dp_regname_nodes>
<count>0</count>
<item_version>0</item_version>
</dp_regname_nodes>
<dp_reg_phi>
<count>0</count>
<item_version>0</item_version>
</dp_reg_phi>
<dp_regname_phi>
<count>0</count>
<item_version>0</item_version>
</dp_regname_phi>
<dp_port_io_nodes class_id="58" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="59" tracking_level="0" version="0">
<first>in_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
</second>
</item>
<item>
<first>out_stream_V_value_V</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>call</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>12</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="60" tracking_level="0" version="0">
<count>2</count>
<item_version>0</item_version>
<item class_id="61" tracking_level="0" version="0">
<first>1</first>
<second>FIFO_SRL</second>
</item>
<item>
<first>2</first>
<second>FIFO_SRL</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
| 29.72213 | 139 | 0.610984 |
5727ef9b112146fd8f72c808c93f4886da2723aa | 3,141 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/s-pack55.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/s-pack55.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/s-pack55.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 5 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handling of packed arrays with Component_Size = 55
package System.Pack_55 is
pragma Preelaborate;
Bits : constant := 55;
type Bits_55 is mod 2 ** Bits;
for Bits_55'Size use Bits;
function Get_55 (Arr : System.Address; N : Natural) return Bits_55;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_55 (Arr : System.Address; N : Natural; E : Bits_55);
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_55;
| 59.264151 | 78 | 0.463865 |
1aa2b9933746ae02676475ffd2073c8829e6504c | 8,333 | adb | Ada | Source/board.adb | bkold/Terminal-Chess | 65235b3db47d4ec02677873b4f6e2531e9f4ffba | [
"MIT"
] | null | null | null | Source/board.adb | bkold/Terminal-Chess | 65235b3db47d4ec02677873b4f6e2531e9f4ffba | [
"MIT"
] | null | null | null | Source/board.adb | bkold/Terminal-Chess | 65235b3db47d4ec02677873b4f6e2531e9f4ffba | [
"MIT"
] | null | null | null | with NCurses; use NCurses;
package body Board is
procedure Set_Variables(Channel : Stream_Access) is
begin
Board_Type'Output(Channel, Our_Board);
Player_Counter'Output(Channel, Turn);
King_Status_Array'Output(Channel, King_Status);
Cordinate_Type'Output(Channel, Last_Moved);
end Set_Variables;
procedure Get_Variables(Channel : Stream_Access) is
begin
Our_Board := Board_Type'Input(Channel);
Turn := Player_Counter'Input(Channel);
King_Status := King_Status_Array'Input(Channel);
Last_Moved := Cordinate_Type'Input(Channel);
end Get_Variables;
procedure Reset_Board is
begin -- Reset_Board
for I of Our_Board loop
I := (others=>Empty_Piece);
end loop;
for I of Our_Board(Position'First + 1) loop
I := Player_1_Pawn;
end loop;
Our_Board(Position'First) := Starting_Backrow_Order(1);
for I of Our_Board(Position'Last - 1) loop
I := Player_2_Pawn;
end loop;
Our_Board(Position'Last) := Starting_Backrow_Order(2);
King_Status(0) := (X=>3, Y=>0);
King_Status(1) := (X=>3, Y=>7);
Last_Moved := (0, 0);
end Reset_Board;
procedure Print_Board is
Small_String : String(1..6);
begin -- Print_Board
Clear;
Attribute_On(1);
Pretty_Print_Line_Window(Owner_Type'Image(Owner_Type'Val(Turn)));
for I in reverse Our_Board'Range loop
Pretty_Print_Line_Window(" -------------------------------------------------------------------------");
Pretty_Print_Line_Window(" | | | | | | | | | ");
Pretty_Print_Window(Integer'Image(Integer(I) + 1) & " | ");
for J of Our_Board(I) loop
if J /= Empty_Piece then
if J.Owner = Player_1 then
Attribute_On(2);
end if;
Put(To=>Small_String, Item=>J.Name);
Pretty_Print_Window(Small_String);
Attribute_On(1);
else
Pretty_Print_Window(" ");
end if;
Pretty_Print_Window(" | ");
end loop;
Pretty_Print_Line_Window(ASCII.lf & " | | | | | | | | | ");
end loop;
Pretty_Print_Line_Window(" -------------------------------------------------------------------------");
Pretty_Print_Line_Window(" A B C D E F G H ");
Refresh;
end Print_Board;
procedure Move (From, To : in Cordinate_Type) is
begin -- Move
if Our_Board(From.Y)(From.X).Owner /= Owner_Type'Val(Turn) then -- check if it's their piece
raise Not_Allowed;
end if;
case Our_Board(From.Y)(From.X).Name is
-- check to see if move if possible
when Pawn => --since the pawn move logic is so complex, it's best to do it all here
declare
Turn_Test : Integer;
function "+" (Left: in Position; Right : in Integer) return Position is
(Position(Integer(Left) + Right));
begin
Turn_Test := (if Turn = 0 then -1 else 1);
if Integer(From.X - To.X) = 0 then -- advance
if Our_Board(To.Y)(To.X).Owner = None and -- can't attack forward
then (Integer(From.Y - To.Y) = Turn_Test or (Integer(From.Y - To.Y) = Turn_Test*2 and Our_Board(From.Y)(From.X).Has_Moved = No and Our_Board(To.Y + Turn_Test)(To.X).Owner = None)) then --check if move is valid
Take_Space(From, To);
else
raise Not_Allowed;
end if;
elsif Integer(From.X - To.X) in -1..1 then -- attack move
if Integer(From.Y - To.Y) = Turn_Test then --check if move is valid
if Our_Board(To.Y)(To.X).Owner /= None then
Take_Space(From, To);
elsif Our_Board(Last_Moved.Y)(Last_Moved.X).Name = Pawn and -- en passent
then Last_Moved = (X=>To.X, Y=>To.Y + Turn_Test) then
Our_Board(Last_Moved.Y)(Last_Moved.X) := Empty_Piece;
Take_Space(From, To);
else
raise Not_Allowed;
end if;
else
raise Not_Allowed;
end if;
else
raise Not_Allowed;
end if;
end;
when Knight =>
if abs(From.X - To.X) = 1 and
then abs(From.Y - To.Y) = 2 then
Take_Space(From, To);
elsif abs(From.X - To.X) = 2 and
then abs(From.Y - To.Y) = 1 then
Take_Space(From, To);
else
raise Not_Allowed;
end if;
when Rook =>
if (From.X = To.X and From.Y /= To.Y) or
else (From.Y = To.Y and From.X /= To.X) then
Take_Space(From, To);
else
raise Not_Allowed;
end if;
when Bishop =>
if abs(From.X - To.X) = abs(From.Y - To.Y) then
Take_Space(From, To);
else
raise Not_Allowed;
end if;
when Queen =>
if (From.X = To.X and From.Y /= To.Y) or
else (From.Y = To.Y and From.X /= To.X) then
Take_Space(From, To);
elsif abs(From.X - To.X) = abs(From.Y - To.Y) then
Take_Space(From, To);
else
raise Not_Allowed;
end if;
when King =>
if To.X - From.X in -1..1 and To.Y - From.Y in -1..1 then
Take_Space(From, To);
elsif abs(To.X - From.X) = 2 and To.Y = From.Y then
Castle(From, To);
else
raise Not_Allowed;
end if;
when others => raise Empty_Zone;
end case;
end Move;
procedure End_Turn is
begin
Turn := Turn + 1;
end End_Turn;
Procedure Castle (From, To : in Cordinate_Type) is
Rook_Position : Position;
Loop_Range_Start : Position;
Loop_Range_End : Position;
begin
if From.X > To.X then
Rook_Position := 0;
Loop_Range_Start := 1;
Loop_Range_End := 2;
else
Rook_Position := 7;
Loop_Range_Start := 4;
Loop_Range_End := 6;
end if;
if Our_Board(From.Y)(From.X).Has_Moved = No and
then Our_Board(From.Y)(Rook_Position).Has_Moved = No then
if (for all I of Our_Board(From.Y)(Loop_Range_Start..Loop_Range_End) => I.Name = Empty) then
if Rook_Position = 0 then
Take_Space((X=>Rook_Position, Y=>From.Y), (X=>Loop_Range_End, Y=>From.Y)); -- Move Rook;
else
Take_Space((X=>Rook_Position, Y=>From.Y), (X=>Loop_Range_Start, Y=>From.Y)); -- Move Rook;
end if;
Take_Space(From, To); -- Move King
else
raise Collision;
end if;
else
raise Not_Allowed;
end if;
end Castle;
function Is_Winner return Integer is
begin
if Our_Board(King_Status(0).Y)(King_Status(0).X).Name /= King and
Our_Board(King_Status(0).Y)(King_Status(0).X).Owner /= Player_1 then
return 2;
elsif Our_Board(King_Status(1).Y)(King_Status(1).X).Name /= King and
Our_Board(King_Status(1).Y)(King_Status(1).X).Owner /= Player_2 then
return 1;
else
return 0;
end if;
end Is_Winner;
--physically move, checks for collisions
procedure Take_Space (From, To : in Cordinate_Type) is
Old_Piece : constant Piece_Type := Our_Board(From.Y)(From.X);
--From acts as old spot, since 'in'
Temp_Position : Cordinate_Type := From;
Step_Size : Unit_Position;
begin
if Our_Board(To.Y)(To.X).Owner = Owner_Type'Val(Turn) then
raise Collision;
end if;
case Our_Board(From.Y)(From.X).Name is
when Pawn..Knight =>
Our_Board(From.Y)(From.X) := Empty_Piece;
Our_Board(To.Y)(To.X) := Old_Piece;
when Bishop..Queen =>
Step_Size := To & From;
while Temp_Position /= To loop -- walk the line
Temp_Position := Temp_Position + Step_Size;
exit when Our_Board(Temp_Position.Y)(Temp_Position.X) /= Empty_Piece;
end loop;
if Temp_Position = To then
Our_Board(From.Y)(From.X) := Empty_Piece;
Our_Board(To.Y)(To.X) := Old_Piece;
else
raise Collision;
end if;
when King =>
Our_Board(From.Y)(From.X) := Empty_Piece;
Our_Board(To.Y)(To.X) := Old_Piece;
King_Status(Integer(Turn)) := To;
when Empty =>
raise Unknown;
end case;
Our_Board(To.Y)(To.X).Has_Moved := Yes;
if Our_Board(To.Y)(To.X).Name = Pawn and then (To.Y = 7 or To.Y = 0) then
Our_Board(To.Y)(To.X).Name := Queen;
end if;
Last_Moved := To;
end Take_Space;
function "&" (Left, Right : in Cordinate_Type) return Unit_Position is
Local : Unit_Position := (0, 0);
begin
if Left.X - Right.X > 0 then
Local.X := 1;
elsif Left.X - Right.X < 0 then
Local.X := -1;
end if;
if Left.Y - Right.Y > 0 then
Local.Y := 1;
elsif Left.Y - Right.Y < 0 then
Local.Y := -1;
end if;
return Local;
end "&";
end Board;
| 29.97482 | 218 | 0.599664 |
2ee455c732cd7ef826f6e3610460fd2a3c049cf9 | 18,833 | ads | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-gearop.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-gearop.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-gearop.ads | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . G E N E R I C _ A R R A Y _ O P E R A T I O N S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2020, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
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 Real is digits <>;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
with function "abs" (Right : Scalar) return Real'Base is <>;
with function "-" (Left, Right : Scalar) return Scalar is <>;
with function "*" (Left, Right : Scalar) return Scalar is <>;
with function "/" (Left, Right : Scalar) return Scalar is <>;
Zero : Scalar;
One : Scalar;
procedure Forward_Eliminate
(M : in out Matrix;
N : in out Matrix;
Det : out Scalar);
--------------------------
-- Square_Matrix_Length --
--------------------------
generic
type Scalar is private;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
function Square_Matrix_Length (A : Matrix) return Natural;
-- If A is non-square, raise Constraint_Error, else return its dimension
----------------------------------
-- Vector_Elementwise_Operation --
----------------------------------
generic
type X_Scalar is private;
type Result_Scalar is private;
type X_Vector is array (Integer range <>) of X_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
with function Operation (X : X_Scalar) return Result_Scalar;
function Vector_Elementwise_Operation (X : X_Vector) return Result_Vector;
----------------------------------
-- Matrix_Elementwise_Operation --
----------------------------------
generic
type X_Scalar is private;
type Result_Scalar is private;
type X_Matrix is array (Integer range <>, Integer range <>) of X_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function Operation (X : X_Scalar) return Result_Scalar;
function Matrix_Elementwise_Operation (X : X_Matrix) return Result_Matrix;
-----------------------------------------
-- Vector_Vector_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Vector is array (Integer range <>) of Left_Scalar;
type Right_Vector is array (Integer range <>) of Right_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Vector_Vector_Elementwise_Operation
(Left : Left_Vector;
Right : Right_Vector) return Result_Vector;
------------------------------------------------
-- Vector_Vector_Scalar_Elementwise_Operation --
------------------------------------------------
generic
type X_Scalar is private;
type Y_Scalar is private;
type Z_Scalar is private;
type Result_Scalar is private;
type X_Vector is array (Integer range <>) of X_Scalar;
type Y_Vector is array (Integer range <>) of Y_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
with function Operation
(X : X_Scalar;
Y : Y_Scalar;
Z : Z_Scalar) return Result_Scalar;
function Vector_Vector_Scalar_Elementwise_Operation
(X : X_Vector;
Y : Y_Vector;
Z : Z_Scalar) return Result_Vector;
-----------------------------------------
-- Matrix_Matrix_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Matrix is array (Integer range <>, Integer range <>)
of Left_Scalar;
type Right_Matrix is array (Integer range <>, Integer range <>)
of Right_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Matrix_Matrix_Elementwise_Operation
(Left : Left_Matrix;
Right : Right_Matrix) return Result_Matrix;
------------------------------------------------
-- Matrix_Matrix_Scalar_Elementwise_Operation --
------------------------------------------------
generic
type X_Scalar is private;
type Y_Scalar is private;
type Z_Scalar is private;
type Result_Scalar is private;
type X_Matrix is array (Integer range <>, Integer range <>) of X_Scalar;
type Y_Matrix is array (Integer range <>, Integer range <>) of Y_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function Operation
(X : X_Scalar;
Y : Y_Scalar;
Z : Z_Scalar) return Result_Scalar;
function Matrix_Matrix_Scalar_Elementwise_Operation
(X : X_Matrix;
Y : Y_Matrix;
Z : Z_Scalar) return Result_Matrix;
-----------------------------------------
-- Vector_Scalar_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Vector is array (Integer range <>) of Left_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Vector_Scalar_Elementwise_Operation
(Left : Left_Vector;
Right : Right_Scalar) return Result_Vector;
-----------------------------------------
-- Matrix_Scalar_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Matrix is array (Integer range <>, Integer range <>)
of Left_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Matrix_Scalar_Elementwise_Operation
(Left : Left_Matrix;
Right : Right_Scalar) return Result_Matrix;
-----------------------------------------
-- Scalar_Vector_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Right_Vector is array (Integer range <>) of Right_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Scalar_Vector_Elementwise_Operation
(Left : Left_Scalar;
Right : Right_Vector) return Result_Vector;
-----------------------------------------
-- Scalar_Matrix_Elementwise_Operation --
-----------------------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Right_Matrix is array (Integer range <>, Integer range <>)
of Right_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function Operation
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar;
function Scalar_Matrix_Elementwise_Operation
(Left : Left_Scalar;
Right : Right_Matrix) return Result_Matrix;
-------------------
-- Inner_Product --
-------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Vector is array (Integer range <>) of Left_Scalar;
type Right_Vector is array (Integer range <>) of Right_Scalar;
Zero : Result_Scalar;
with function "*"
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar is <>;
with function "+"
(Left : Result_Scalar;
Right : Result_Scalar) return Result_Scalar is <>;
function Inner_Product
(Left : Left_Vector;
Right : Right_Vector) return Result_Scalar;
-------------
-- L2_Norm --
-------------
generic
type X_Scalar is private;
type Result_Real is digits <>;
type X_Vector is array (Integer range <>) of X_Scalar;
with function "abs" (Right : X_Scalar) return Result_Real is <>;
with function Sqrt (X : Result_Real'Base) return Result_Real'Base is <>;
function L2_Norm (X : X_Vector) return Result_Real'Base;
-------------------
-- Outer_Product --
-------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Vector is array (Integer range <>) of Left_Scalar;
type Right_Vector is array (Integer range <>) of Right_Scalar;
type Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
with function "*"
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar is <>;
function Outer_Product
(Left : Left_Vector;
Right : Right_Vector) return Matrix;
---------------------------
-- Matrix_Vector_Product --
---------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Matrix is array (Integer range <>, Integer range <>)
of Left_Scalar;
type Right_Vector is array (Integer range <>) of Right_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
Zero : Result_Scalar;
with function "*"
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar is <>;
with function "+"
(Left : Result_Scalar;
Right : Result_Scalar) return Result_Scalar is <>;
function Matrix_Vector_Product
(Left : Matrix;
Right : Right_Vector) return Result_Vector;
---------------------------
-- Vector_Matrix_Product --
---------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Vector is array (Integer range <>) of Left_Scalar;
type Matrix is array (Integer range <>, Integer range <>)
of Right_Scalar;
type Result_Vector is array (Integer range <>) of Result_Scalar;
Zero : Result_Scalar;
with function "*"
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar is <>;
with function "+"
(Left : Result_Scalar;
Right : Result_Scalar) return Result_Scalar is <>;
function Vector_Matrix_Product
(Left : Left_Vector;
Right : Matrix) return Result_Vector;
---------------------------
-- Matrix_Matrix_Product --
---------------------------
generic
type Left_Scalar is private;
type Right_Scalar is private;
type Result_Scalar is private;
type Left_Matrix is array (Integer range <>, Integer range <>)
of Left_Scalar;
type Right_Matrix is array (Integer range <>, Integer range <>)
of Right_Scalar;
type Result_Matrix is array (Integer range <>, Integer range <>)
of Result_Scalar;
Zero : Result_Scalar;
with function "*"
(Left : Left_Scalar;
Right : Right_Scalar) return Result_Scalar is <>;
with function "+"
(Left : Result_Scalar;
Right : Result_Scalar) return Result_Scalar is <>;
function Matrix_Matrix_Product
(Left : Left_Matrix;
Right : Right_Matrix) return Result_Matrix;
----------------------------
-- Matrix_Vector_Solution --
----------------------------
generic
type Scalar is private;
Zero : Scalar;
type Vector is array (Integer range <>) of Scalar;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
with procedure Back_Substitute (M, N : in out Matrix) is <>;
with procedure Forward_Eliminate
(M : in out Matrix;
N : in out Matrix;
Det : out Scalar) is <>;
function Matrix_Vector_Solution (A : Matrix; X : Vector) return Vector;
----------------------------
-- Matrix_Matrix_Solution --
----------------------------
generic
type Scalar is private;
Zero : Scalar;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
with procedure Back_Substitute (M, N : in out Matrix) is <>;
with procedure Forward_Eliminate
(M : in out Matrix;
N : in out Matrix;
Det : out Scalar) is <>;
function Matrix_Matrix_Solution (A : Matrix; X : Matrix) return Matrix;
----------
-- Sqrt --
----------
generic
type Real is digits <>;
function Sqrt (X : Real'Base) return Real'Base;
-----------------
-- 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 --
---------------
generic
type Scalar is private;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
procedure Transpose (A : Matrix; R : out Matrix);
-------------------------------
-- Update_Vector_With_Vector --
-------------------------------
generic
type X_Scalar is private;
type Y_Scalar is private;
type X_Vector is array (Integer range <>) of X_Scalar;
type Y_Vector is array (Integer range <>) of Y_Scalar;
with procedure Update (X : in out X_Scalar; Y : Y_Scalar);
procedure Update_Vector_With_Vector (X : in out X_Vector; Y : Y_Vector);
-------------------------------
-- Update_Matrix_With_Matrix --
-------------------------------
generic
type X_Scalar is private;
type Y_Scalar is private;
type X_Matrix is array (Integer range <>, Integer range <>) of X_Scalar;
type Y_Matrix is array (Integer range <>, Integer range <>) of Y_Scalar;
with procedure Update (X : in out X_Scalar; Y : Y_Scalar);
procedure Update_Matrix_With_Matrix (X : in out X_Matrix; Y : Y_Matrix);
-----------------
-- Unit_Matrix --
-----------------
generic
type Scalar is private;
type Matrix is array (Integer range <>, Integer range <>) of Scalar;
Zero : Scalar;
One : Scalar;
function Unit_Matrix
(Order : Positive;
First_1 : Integer := 1;
First_2 : Integer := 1) return Matrix;
-----------------
-- Unit_Vector --
-----------------
generic
type Scalar is private;
type Vector is array (Integer range <>) of Scalar;
Zero : Scalar;
One : Scalar;
function Unit_Vector
(Index : Integer;
Order : Positive;
First : Integer := 1) return Vector;
end System.Generic_Array_Operations;
| 37.441352 | 78 | 0.551532 |
04006bfabed05be3beafcf8dbd0f99db20b69047 | 2,582 | ads | Ada | src/zmq-utilities-stream_element_array_image.ads | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 33 | 2015-01-16T13:42:55.000Z | 2021-11-30T21:28:50.000Z | src/zmq-utilities-stream_element_array_image.ads | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 6 | 2016-03-23T01:26:36.000Z | 2021-05-13T04:24:53.000Z | src/zmq-utilities-stream_element_array_image.ads | persan/zeromq-Ada | 651ca44cce831c2d717338eab65a60fbfca7ec44 | [
"MIT"
] | 5 | 2016-03-09T20:20:09.000Z | 2020-06-17T06:59:39.000Z | -------------------------------------------------------------------------------
-- --
-- 0MQ Ada-binding --
-- --
-- ZMQ.Utilities.Stream_Element_Array_Image --
-- --
-- S p e c --
-- --
-- Copyright (C) 2020-2030, [email protected] --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files --
-- (the "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, sublicense, and / or sell copies of the Software, and to --
-- permit persons to whom the Software is furnished to do so, subject to --
-- the following conditions : --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, --
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL --
-- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR --
-- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, --
-- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR --
-- OTHER DEALINGS IN THE SOFTWARE. --
-------------------------------------------------------------------------------
with Ada.Streams;
function ZMQ.Utilities.Stream_Element_Array_Image
(Item : Ada.Streams.Stream_Element_Array) return String;
-- Returns an hex image of the Stream_Element_Array.
| 71.722222 | 79 | 0.413633 |
04e6b234c99cf975e8214c288c9631c00b43307f | 1,500 | ads | Ada | tier-1/xcb/source/thin/xcb-xcb_glx_get_tex_level_parameterfv_cookie_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/xcb/source/thin/xcb-xcb_glx_get_tex_level_parameterfv_cookie_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/xcb/source/thin/xcb-xcb_glx_get_tex_level_parameterfv_cookie_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_get_tex_level_parameterfv_cookie_t is
-- Item
--
type Item is record
sequence : aliased Interfaces.C.unsigned;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_get_tex_level_parameterfv_cookie_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_tex_level_parameterfv_cookie_t.Item,
Element_Array =>
xcb.xcb_glx_get_tex_level_parameterfv_cookie_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_glx_get_tex_level_parameterfv_cookie_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_get_tex_level_parameterfv_cookie_t.Pointer,
Element_Array =>
xcb.xcb_glx_get_tex_level_parameterfv_cookie_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_get_tex_level_parameterfv_cookie_t;
| 26.315789 | 78 | 0.69 |
add8f36d7e43370367c3b398e2c4ba9b9a115e52 | 862 | ads | Ada | ada-synchronous_barriers.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 15 | 2018-07-08T07:09:19.000Z | 2021-11-21T09:58:55.000Z | ada-synchronous_barriers.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 4 | 2019-11-17T20:04:33.000Z | 2021-08-29T21:24:55.000Z | ada-synchronous_barriers.ads | mgrojo/adalib | dc1355a5b65c2843e702ac76252addb2caf3c56b | [
"BSD-3-Clause"
] | 3 | 2020-04-23T11:17:11.000Z | 2021-08-29T19:31:09.000Z | -- Standard Ada library specification
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
package Ada.Synchronous_Barriers is
pragma Preelaborate(Synchronous_Barriers);
subtype Barrier_Limit is Positive range 1 .. implementation_defined;
type Synchronous_Barrier (Release_Threshold : Barrier_Limit) is limited private;
procedure Wait_For_Release (The_Barrier : in out Synchronous_Barrier;
Notified : out Boolean);
private
-- not specified by the language
end Ada.Synchronous_Barriers;
| 39.181818 | 83 | 0.656613 |
04a7240bc9c2116a7037c193ab662501c468e4b0 | 8,054 | adb | Ada | tests/tk-toplevel-toplevel_create_options_test_data-toplevel_create_options_tests.adb | thindil/tashy2 | 43fcbadb33c0062b2c8d6138a8238441dec5fd80 | [
"Apache-2.0"
] | 2 | 2020-12-09T07:27:07.000Z | 2021-10-19T13:31:54.000Z | tests/tk-toplevel-toplevel_create_options_test_data-toplevel_create_options_tests.adb | thindil/tashy2 | 43fcbadb33c0062b2c8d6138a8238441dec5fd80 | [
"Apache-2.0"
] | null | null | null | tests/tk-toplevel-toplevel_create_options_test_data-toplevel_create_options_tests.adb | thindil/tashy2 | 43fcbadb33c0062b2c8d6138a8238441dec5fd80 | [
"Apache-2.0"
] | null | null | null | -- This package has been generated automatically by GNATtest.
-- You are allowed to add your code to the bodies of test routines.
-- Such changes will be kept during further regeneration of this file.
-- All code placed outside of test routine bodies will be lost. The
-- code intended to set up and tear down the test environment should be
-- placed into Tk.TopLevel.Toplevel_Create_Options_Test_Data.
with AUnit.Assertions; use AUnit.Assertions;
with System.Assertions;
-- begin read only
-- id:2.2/00/
--
-- This section can be used to add with clauses if necessary.
--
-- end read only
with Ada.Environment_Variables; use Ada.Environment_Variables;
-- begin read only
-- end read only
package body Tk.TopLevel.Toplevel_Create_Options_Test_Data
.Toplevel_Create_Options_Tests is
-- begin read only
-- id:2.2/01/
--
-- This section can be used to add global variables and other elements.
--
-- end read only
-- begin read only
-- end read only
-- begin read only
function Wrap_Test_Create_32e405_9db90c
(Path_Name: Tk_Path_String; Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter) return Tk_Toplevel is
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(tk-toplevel.ads:0):Test_Create_TopLevel1 test requirement violated");
end;
declare
Test_Create_32e405_9db90c_Result: constant Tk_Toplevel :=
GNATtest_Generated.GNATtest_Standard.Tk.TopLevel.Create
(Path_Name, Options, Interpreter);
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(tk-toplevel.ads:0:):Test_Create_TopLevel1 test commitment violated");
end;
return Test_Create_32e405_9db90c_Result;
end;
end Wrap_Test_Create_32e405_9db90c;
-- end read only
-- begin read only
procedure Test_1_Create_test_create_toplevel1
(Gnattest_T: in out Test_Toplevel_Create_Options);
procedure Test_Create_32e405_9db90c
(Gnattest_T: in out Test_Toplevel_Create_Options) renames
Test_1_Create_test_create_toplevel1;
-- id:2.2/32e405543423d7b8/Create/1/0/test_create_toplevel1/
procedure Test_1_Create_test_create_toplevel1
(Gnattest_T: in out Test_Toplevel_Create_Options) is
function Create
(Path_Name: Tk_Path_String; Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter)
return Tk_Toplevel renames
Wrap_Test_Create_32e405_9db90c;
-- end read only
pragma Unreferenced(Gnattest_T);
TopLevel: Tk_Toplevel := Null_Widget;
begin
if Value("DISPLAY", "")'Length = 0 then
Assert(True, "No display, can't test");
return;
end if;
Create(TopLevel, ".mydialog", Toplevel_Create_Options'(others => <>));
Assert(TopLevel /= Null_Widget, "Failed to create a new toplevel.");
Destroy(TopLevel);
-- begin read only
end Test_1_Create_test_create_toplevel1;
-- end read only
-- begin read only
procedure Wrap_Test_Create_ebbdc1_055047
(Toplevel_Widget: out Tk_Toplevel; Path_Name: Tk_Path_String;
Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter) is
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(tk-toplevel.ads:0):Test_Create_TopLevel2 test requirement violated");
end;
GNATtest_Generated.GNATtest_Standard.Tk.TopLevel.Create
(Toplevel_Widget, Path_Name, Options, Interpreter);
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(tk-toplevel.ads:0:):Test_Create_TopLevel2 test commitment violated");
end;
end Wrap_Test_Create_ebbdc1_055047;
-- end read only
-- begin read only
procedure Test_2_Create_test_create_toplevel2
(Gnattest_T: in out Test_Toplevel_Create_Options);
procedure Test_Create_ebbdc1_055047
(Gnattest_T: in out Test_Toplevel_Create_Options) renames
Test_2_Create_test_create_toplevel2;
-- id:2.2/ebbdc1934f0fa33d/Create/0/0/test_create_toplevel2/
procedure Test_2_Create_test_create_toplevel2
(Gnattest_T: in out Test_Toplevel_Create_Options) is
procedure Create
(Toplevel_Widget: out Tk_Toplevel; Path_Name: Tk_Path_String;
Options: Toplevel_Create_Options;
Interpreter: Tcl_Interpreter := Get_Interpreter) renames
Wrap_Test_Create_ebbdc1_055047;
-- end read only
pragma Unreferenced(Gnattest_T);
TopLevel: Tk_Toplevel := Null_Widget;
begin
if Value("DISPLAY", "")'Length = 0 then
Assert(True, "No display, can't test");
return;
end if;
TopLevel := Create(".mydialog", Toplevel_Create_Options'(others => <>));
Assert(TopLevel /= Null_Widget, "Failed to create a new toplevel.");
Destroy(TopLevel);
-- begin read only
end Test_2_Create_test_create_toplevel2;
-- end read only
-- begin read only
function Wrap_Test_Get_Options_ded36e_2e13ca
(Toplevel_Widget: Tk_Toplevel) return Toplevel_Create_Options is
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(tk-toplevel.ads:0):Test_Get_Options_TopLevel test requirement violated");
end;
declare
Test_Get_Options_ded36e_2e13ca_Result: constant Toplevel_Create_Options :=
GNATtest_Generated.GNATtest_Standard.Tk.TopLevel.Get_Options
(Toplevel_Widget);
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(tk-toplevel.ads:0:):Test_Get_Options_TopLevel test commitment violated");
end;
return Test_Get_Options_ded36e_2e13ca_Result;
end;
end Wrap_Test_Get_Options_ded36e_2e13ca;
-- end read only
-- begin read only
procedure Test_Get_Options_test_get_options_toplevel
(Gnattest_T: in out Test_Toplevel_Create_Options);
procedure Test_Get_Options_ded36e_2e13ca
(Gnattest_T: in out Test_Toplevel_Create_Options) renames
Test_Get_Options_test_get_options_toplevel;
-- id:2.2/ded36e34d54c20f9/Get_Options/1/0/test_get_options_toplevel/
procedure Test_Get_Options_test_get_options_toplevel
(Gnattest_T: in out Test_Toplevel_Create_Options) is
function Get_Options
(Toplevel_Widget: Tk_Toplevel) return Toplevel_Create_Options renames
Wrap_Test_Get_Options_ded36e_2e13ca;
-- end read only
pragma Unreferenced(Gnattest_T);
TopLevel: Tk_Toplevel;
Options: Toplevel_Create_Options;
begin
if Value("DISPLAY", "")'Length = 0 then
Assert(True, "No display, can't test");
return;
end if;
Create
(TopLevel, ".mydialog",
Toplevel_Create_Options'(Relief => RAISED, others => <>));
Options := Get_Options(TopLevel);
Assert(Options.Relief = RAISED, "Failed to get toplevel options.");
Destroy(TopLevel);
-- begin read only
end Test_Get_Options_test_get_options_toplevel;
-- end read only
-- begin read only
-- id:2.2/02/
--
-- This section can be used to add elaboration code for the global state.
--
begin
-- end read only
null;
-- begin read only
-- end read only
end Tk.TopLevel.Toplevel_Create_Options_Test_Data
.Toplevel_Create_Options_Tests;
| 33.419087 | 101 | 0.689471 |
2e00f66ef1af9b12e990c5ee57479d14e6da92dc | 5,650 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2401k.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2401k.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/ce/ce2401k.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CE2401K.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT DATA CAN BE OVERWRITTEN IN THE DIRECT FILE AND
-- THE CORRECT VALUES CAN LATER BE READ.
-- APPLICABILITY CRITERIA:
-- THIS TEST IS ONLY APPLICABLE TO IMPLEMENTATIONS WHICH SUPPORT
-- CREATION OF INOUT_FILE MODE AND OPENING OF OUT_FILE MODE FOR
-- DIRECT FILES.
-- HISTORY:
-- DWC 08/12/87 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
WITH DIRECT_IO;
PROCEDURE CE2401K IS
END_SUBTEST: EXCEPTION;
BEGIN
TEST ("CE2401K" , "CHECK THAT DATA CAN BE OVERWRITTEN IN " &
"THE DIRECT FILE AND THE CORRECT VALUES " &
"CAN LATER BE READ.");
DECLARE
PACKAGE DIR_IO IS NEW DIRECT_IO (INTEGER);
USE DIR_IO;
FILE : FILE_TYPE;
BEGIN
BEGIN
CREATE (FILE, INOUT_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR | NAME_ERROR =>
NOT_APPLICABLE ("CREATE WITH INOUT_FILE MODE " &
"NOT SUPPORTED");
RAISE END_SUBTEST;
WHEN OTHERS =>
FAILED ("UNEXPECTED ERROR RAISED ON " &
"CREATE");
RAISE END_SUBTEST;
END;
DECLARE
OUT_ITEM1 : INTEGER := 10;
OUT_ITEM2 : INTEGER := 21;
IN_ITEM : INTEGER;
ONE : POSITIVE_COUNT := 1;
TWO : POSITIVE_COUNT := 2;
BEGIN
BEGIN
WRITE (FILE, OUT_ITEM1, ONE);
WRITE (FILE, OUT_ITEM2, TWO);
WRITE (FILE, OUT_ITEM2, ONE);
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED ON WRITE " &
"IN INOUT_FILE MODE");
RAISE END_SUBTEST;
END;
BEGIN
READ (FILE, IN_ITEM, ONE);
IF OUT_ITEM2 /= IN_ITEM THEN
FAILED ("INCORRECT INTEGER VALUE READ - 1");
RAISE END_SUBTEST;
END IF;
END;
BEGIN
READ (FILE, IN_ITEM, TWO);
IF OUT_ITEM2 /= IN_ITEM THEN
FAILED ("INCORRECT INTEGER VALUE READ - 2");
RAISE END_SUBTEST;
END IF;
END;
CLOSE (FILE);
BEGIN
OPEN (FILE, OUT_FILE, LEGAL_FILE_NAME);
EXCEPTION
WHEN USE_ERROR =>
RAISE END_SUBTEST;
END;
BEGIN
WRITE (FILE, OUT_ITEM1, ONE);
WRITE (FILE, OUT_ITEM2, TWO);
WRITE (FILE, OUT_ITEM1, TWO);
EXCEPTION
WHEN OTHERS =>
FAILED ("EXCEPTION RAISED ON WRITE " &
"IN OUT_FILE MODE");
RAISE END_SUBTEST;
END;
BEGIN
RESET (FILE, IN_FILE);
EXCEPTION
WHEN USE_ERROR =>
RAISE END_SUBTEST;
END;
BEGIN
READ (FILE, IN_ITEM, ONE);
IF OUT_ITEM1 /= IN_ITEM THEN
FAILED ("INCORRECT INTEGER VALUE READ - 3");
RAISE END_SUBTEST;
END IF;
EXCEPTION
WHEN USE_ERROR =>
FAILED ("READ IN IN_FILE MODE - 1");
END;
BEGIN
READ (FILE, IN_ITEM, TWO);
IF OUT_ITEM1 /= IN_ITEM THEN
FAILED ("INCORRECT INTEGER VALUE READ - 4");
RAISE END_SUBTEST;
END IF;
EXCEPTION
WHEN USE_ERROR =>
FAILED ("READ IN IN_FILE MODE - 2");
END;
END;
BEGIN
DELETE (FILE);
EXCEPTION
WHEN USE_ERROR =>
NULL;
END;
EXCEPTION
WHEN END_SUBTEST =>
NULL;
END;
RESULT;
END CE2401K;
| 34.242424 | 79 | 0.473805 |
138c5433ddfca361afbf1691418f4b7f5efe08e9 | 14,975 | ads | Ada | sources/wasm/opengl-programs.ads | godunko/adagl | 5b62d3bac6aa4e11084b4b19171dadbf805e95d6 | [
"BSD-3-Clause"
] | 6 | 2018-01-18T16:57:21.000Z | 2020-01-19T07:40:12.000Z | sources/wasm/opengl-programs.ads | godunko/adagl | 5b62d3bac6aa4e11084b4b19171dadbf805e95d6 | [
"BSD-3-Clause"
] | null | null | null | sources/wasm/opengl-programs.ads | godunko/adagl | 5b62d3bac6aa4e11084b4b19171dadbf805e95d6 | [
"BSD-3-Clause"
] | 1 | 2018-01-20T16:12:26.000Z | 2018-01-20T16:12:26.000Z | ------------------------------------------------------------------------------
-- --
-- Ada binding for OpenGL/WebGL --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2016-2020, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with Web.Strings;
private with Web.GL.Programs;
package OpenGL.Programs is
pragma Preelaborate;
type OpenGL_Program is tagged limited private;
type OpenGL_Program_Access is access all OpenGL_Program'Class;
function Add_Shader_From_Source_Code
(Self : in out OpenGL_Program'Class;
Shader_Type : OpenGL.Shader_Type;
Source : Web.Strings.Web_String) return Boolean;
-- Compiles source as a shader of the specified type and adds it to this
-- shader program. Returns True if compilation was successful, False
-- otherwise. The compilation errors and warnings will be made available
-- via Log.
procedure Add_Shader_From_Source_Code
(Self : in out OpenGL_Program'Class;
Shader_Type : OpenGL.Shader_Type;
Source : Web.Strings.Web_String);
-- Compiles source as a shader of the specified type and adds it to this
-- shader program. Raise Program_Error if compilation was not successful.
-- The compilation errors and warnings will be made available via Log.
function Attribute_Location
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String) return OpenGL.Attribute_Location;
-- Returns the location of the attribute Name within this shader program's
-- parameter list. Returns -1 if name is not a valid attribute for this
-- shader program.
function Bind (Self : in out OpenGL_Program'Class) return Boolean;
-- Binds this shader program to the active OpenGL_Context and makes it the
-- current shader program. Any previously bound shader program is released.
-- This is equivalent to calling glUseProgram().
procedure Bind (Self : in out OpenGL_Program'Class);
-- Binds this shader program to the active OpenGL_Context and makes it the
-- current shader program. Any previously bound shader program is released.
-- This is equivalent to calling glUseProgram().
function Create (Self : in out OpenGL_Program'Class) return Boolean;
-- Requests the shader program's id to be created immediately. Returns true
-- if successful; false otherwise.
procedure Disable_Attribute_Array
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location);
-- Disables the vertex array at Location in this shader program that was
-- enabled by a previous call to Enable_Attribute_Array.
procedure Disable_Attribute_Array
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String);
-- Disables the vertex array called name in this shader program that was
-- enabled by a previous call to Enable_Attribute_Array.
procedure Enable_Attribute_Array
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location);
-- Enables the vertex array at Location in this shader program so that the
-- value set by Set_Attribute_Array on Location will be used by the shader
-- program.
procedure Enable_Attribute_Array
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String);
-- Enables the vertex array called Name in this shader program so that the
-- value set by Set_Attribute_Array on Name will be used by the shader
-- program.
function Is_Linked (Self : OpenGL_Program'Class) return Boolean;
-- Returns true if this shader program has been linked; false otherwise.
not overriding function Link (Self : in out OpenGL_Program) return Boolean;
-- Links together the shaders that were added to this program with
-- Add_Shader. Returns True if the link was successful or False otherwise.
-- If the link failed, the error messages can be retrieved with Log.
function Log (Self : OpenGL_Program'Class) return Web.Strings.Web_String;
-- Returns the errors and warnings that occurred during the last Link or
-- Add_Shader_From_Source_Code with explicitly specified source code.
procedure Release (Self : OpenGL_Program'Class);
-- Releases the active shader program from the current OpenGL_Context. This
-- is equivalent to calling glUseProgram(0).
procedure Set_Attribute_Buffer
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Data_Type : OpenGL.GLenum;
Tuple_Size : Positive;
Offset : System.Storage_Elements.Storage_Count := 0;
Stride : System.Storage_Elements.Storage_Count := 0;
Normalized : Boolean := True);
-- Sets an array of vertex values on the attribute at Location in this
-- shader program, starting at a specific Offset in the currently bound
-- vertex buffer. The Stride indicates the number of bytes between
-- vertices. A default Stride value of zero indicates that the vertices are
-- densely packed in the value array.
--
-- The Data_Type indicates the type of elements in the vertex value array,
-- usually GL_FLOAT, GL_UNSIGNED_BYTE, etc. The Tuple_Size indicates the
-- number of components per vertex: 1, 2, 3, or 4.
--
-- The array will become active when Enable_Attribute_Array is called on
-- the Location. Otherwise the value specified with Set_Attribute_Value for
-- Location will be used.
procedure Set_Attribute_Buffer
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Data_Type : OpenGL.GLenum;
Tuple_Size : Positive;
Offset : System.Storage_Elements.Storage_Count := 0;
Stride : System.Storage_Elements.Storage_Count := 0;
Normalized : Boolean := True);
-- Sets an array of vertex values on the attribute called Name in this
-- shader program, starting at a specific Offset in the currently bound
-- vertex buffer. The Stride indicates the number of bytes between
-- vertices. A default stride value of zero indicates that the vertices are
-- densely packed in the value array.
--
-- The Data_Type indicates the type of elements in the vertex value array,
-- usually GL_FLOAT, GL_UNSIGNED_BYTE, etc. The Tuple_Size indicates the
-- number of components per vertex: 1, 2, 3, or 4.
--
-- The array will become active when Enable_Attribute_Array is called on
-- the Name. Otherwise the value specified with Set_Attribute_Value for
-- Name will be used.
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Vector_2);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Vector_3);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Vector_4);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Matrix_2x2);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Matrix_3x3);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Attribute_Location;
Value : OpenGL.GLfloat_Matrix_4x4);
-- Sets the attribute at Location in the current context to Value.
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Vector_2);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Vector_3);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Vector_4);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Matrix_2x2);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Matrix_3x3);
procedure Set_Attribute_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLfloat_Matrix_4x4);
-- Sets the attribute called Name in the current context to Value.
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.GLint);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Vector_2);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Vector_3);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Vector_4);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Matrix_2x2);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Matrix_3x3);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Location : OpenGL.Uniform_Location;
Value : OpenGL.Glfloat_Matrix_4x4);
-- Sets the uniform variable at Location in the current context to Value.
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.GLint);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Vector_2);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Vector_3);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Vector_4);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Matrix_2x2);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Matrix_3x3);
procedure Set_Uniform_Value
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String;
Value : OpenGL.Glfloat_Matrix_4x4);
-- Sets the uniform variable called Name in the current context to Value.
function Uniform_Location
(Self : in out OpenGL_Program'Class;
Name : Web.Strings.Web_String) return OpenGL.Uniform_Location;
-- Returns the location of the uniform variable Name within this shader
-- program's parameter list. Returns No_Uniform_Location if Name is not a
-- valid uniform variable for this shader program.
private
type OpenGL_Program is tagged limited record
Program : Web.GL.Programs.WebGL_Program;
Context : Web.GL.Rendering_Contexts.WebGL_Rendering_Context;
Log : Web.Strings.Web_String;
end record;
end OpenGL.Programs;
| 46.362229 | 79 | 0.65182 |
0408d319e452f68fd915b93999a78a30417318da | 7,603 | adb | Ada | examples/shared/draw/src/draw.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 192 | 2016-06-01T18:32:04.000Z | 2022-03-26T22:52:31.000Z | examples/shared/draw/src/draw.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 239 | 2016-05-26T20:02:01.000Z | 2022-03-31T09:46:56.000Z | examples/shared/draw/src/draw.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 142 | 2016-06-05T08:12:20.000Z | 2022-03-24T17:37:17.000Z | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- A very simple draw application.
-- Use your finger to draw pixels.
with Last_Chance_Handler; pragma Unreferenced (Last_Chance_Handler);
-- The "last chance handler" is the user-defined routine that is called when
-- an exception is propagated. We need it in the executable, therefore it
-- must be somewhere in the closure of the context clauses.
with STM32.Board; use STM32.Board;
with HAL.Bitmap; use HAL.Bitmap;
with HAL.Touch_Panel; use HAL.Touch_Panel;
with STM32.User_Button; use STM32;
with BMP_Fonts;
with LCD_Std_Out;
procedure Draw
is
BG : constant Bitmap_Color := (Alpha => 255, others => 64);
procedure Clear;
-----------
-- Clear --
-----------
procedure Clear is
begin
Display.Hidden_Buffer (1).Set_Source (BG);
Display.Hidden_Buffer (1).Fill;
LCD_Std_Out.Clear_Screen;
LCD_Std_Out.Put_Line ("Touch the screen to draw or");
LCD_Std_Out.Put_Line ("press the blue button for");
LCD_Std_Out.Put_Line ("a demo of drawing primitives.");
Display.Update_Layer (1, Copy_Back => True);
end Clear;
Last_X : Integer := -1;
Last_Y : Integer := -1;
type Mode is (Drawing_Mode, Bitmap_Showcase_Mode);
Current_Mode : Mode := Drawing_Mode;
begin
-- Initialize LCD
Display.Initialize;
Display.Initialize_Layer (1, ARGB_8888);
-- Initialize touch panel
Touch_Panel.Initialize;
-- Initialize button
User_Button.Initialize;
LCD_Std_Out.Set_Font (BMP_Fonts.Font8x8);
LCD_Std_Out.Current_Background_Color := BG;
-- Clear LCD (set background)
Clear;
-- The application: set pixel where the finger is (so that you
-- cannot see what you are drawing).
loop
if User_Button.Has_Been_Pressed then
case Current_Mode is
when Drawing_Mode =>
Current_Mode := Bitmap_Showcase_Mode;
when Bitmap_Showcase_Mode =>
Clear;
Current_Mode := Drawing_Mode;
end case;
end if;
if Current_Mode = Drawing_Mode then
Display.Hidden_Buffer (1).Set_Source (HAL.Bitmap.Green);
declare
State : constant TP_State := Touch_Panel.Get_All_Touch_Points;
begin
if State'Length = 0 then
Last_X := -1;
Last_Y := -1;
elsif State'Length = 1 then
-- Lines can be drawn between two consecutive points only when
-- one touch point is active: the order of the touch data is not
-- necessarily preserved by the hardware.
if Last_X > 0 then
Draw_Line
(Display.Hidden_Buffer (1).all,
Start => (Last_X, Last_Y),
Stop => (State (State'First).X, State (State'First).Y),
Thickness => State (State'First).Weight / 2,
Fast => False);
end if;
Last_X := State (State'First).X;
Last_Y := State (State'First).Y;
else
Last_X := -1;
Last_Y := -1;
end if;
for Id in State'Range loop
Fill_Circle
(Display.Hidden_Buffer (1).all,
Center => (State (Id).X, State (Id).Y),
Radius => State (Id).Weight / 4);
end loop;
if State'Length > 0 then
Display.Update_Layer (1, Copy_Back => True);
end if;
end;
else
-- Show some of the supported drawing primitives
Display.Hidden_Buffer (1).Set_Source (Black);
Display.Hidden_Buffer (1).Fill;
Display.Hidden_Buffer (1).Set_Source (Green);
Display.Hidden_Buffer (1).Fill_Rounded_Rect
(((10, 10), 100, 100), 20);
Display.Hidden_Buffer (1).Set_Source (HAL.Bitmap.Red);
Display.Hidden_Buffer (1).Draw_Rounded_Rect
(((10, 10), 100, 100), 20, Thickness => 4);
Display.Hidden_Buffer (1).Set_Source (HAL.Bitmap.Yellow);
Display.Hidden_Buffer (1).Fill_Circle ((60, 60), 20);
Display.Hidden_Buffer (1).Set_Source (HAL.Bitmap.Blue);
Display.Hidden_Buffer (1).Draw_Circle ((60, 60), 20);
Display.Hidden_Buffer (1).Set_Source (HAL.Bitmap.Violet);
Display.Hidden_Buffer (1).Cubic_Bezier (P1 => (10, 10),
P2 => (60, 10),
P3 => (60, 60),
P4 => (100, 100),
N => 200,
Thickness => 5);
Copy_Rect (Src_Buffer => Display.Hidden_Buffer (1).all,
Src_Pt => (0, 0),
Dst_Buffer => Display.Hidden_Buffer (1).all,
Dst_Pt => (100, 100),
Width => 100,
Height => 100,
Synchronous => True);
Display.Update_Layer (1, Copy_Back => False);
end if;
end loop;
end Draw;
| 39.598958 | 81 | 0.524924 |
13569f10e4325721eaf4e9b021da5b101e5d8d18 | 3,390 | adb | Ada | arch/ARM/STM32/driver_demos/demo_L3GD20_fifo_int/src/output_utils.adb | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 192 | 2016-06-01T18:32:04.000Z | 2022-03-26T22:52:31.000Z | arch/ARM/STM32/driver_demos/demo_L3GD20_fifo_int/src/output_utils.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 239 | 2016-05-26T20:02:01.000Z | 2022-03-31T09:46:56.000Z | arch/ARM/STM32/driver_demos/demo_L3GD20_fifo_int/src/output_utils.adb | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 142 | 2016-06-05T08:12:20.000Z | 2022-03-24T17:37:17.000Z | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with LCD_Std_Out;
package body Output_Utils is
-----------
-- Print --
-----------
procedure Print (X, Y : Natural; Msg : String) renames LCD_Std_Out.Put;
--------------------------
-- Print_Static_Content --
--------------------------
procedure Print_Static_Content (Stable : Angle_Rates) is
begin
-- print the constant offsets computed when the device is motionless
Print (0, Line1_Stable, "Stable X:" & Stable.X'Img);
Print (0, Line2_Stable, "Stable Y:" & Stable.Y'Img);
Print (0, Line3_Stable, "Stable Z:" & Stable.Z'Img);
-- print the static labels for the values after the offset is removed
Print (0, Line1_Adjusted, "Adjusted X:");
Print (0, Line2_Adjusted, "Adjusted Y:");
Print (0, Line3_Adjusted, "Adjusted Z:");
-- print the static labels for the final values
Print (0, Line1_Final, "X:");
Print (0, Line2_Final, "Y:");
Print (0, Line3_Final, "Z:");
end Print_Static_Content;
end Output_Utils;
| 52.153846 | 78 | 0.529204 |
2e557243d7ad34a90afa4f3ca0c24a0086feae32 | 9,051 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-pack50.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-pack50.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/s-pack50.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 0 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2020, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_50 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_50;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
-- The following declarations are for the case where the address
-- passed to GetU_50 or SetU_50 is not guaranteed to be aligned.
-- These routines are used when the packed array is itself a
-- component of a packed record, and therefore may not be aligned.
type ClusterU is new Cluster;
for ClusterU'Alignment use 1;
type ClusterU_Ref is access ClusterU;
type Rev_ClusterU is new ClusterU
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_ClusterU_Ref is access Rev_ClusterU;
------------
-- Get_50 --
------------
function Get_50
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_50
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_50;
-------------
-- GetU_50 --
-------------
function GetU_50
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_50
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end GetU_50;
------------
-- Set_50 --
------------
procedure Set_50
(Arr : System.Address;
N : Natural;
E : Bits_50;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_50;
-------------
-- SetU_50 --
-------------
procedure SetU_50
(Arr : System.Address;
N : Natural;
E : Bits_50;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end SetU_50;
end System.Pack_50;
| 36.059761 | 78 | 0.467352 |
2f510ca680d8366928c20c15def9bd01674d0288 | 4,329 | ads | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-vallli.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-vallli.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-vallli.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . V A L _ L L I --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains routines for scanning signed Long_Long_Integer
-- values for use in Text_IO.Integer_IO, and the Value attribute.
package System.Val_LLI is
pragma Pure;
function Scan_Long_Long_Integer
(Str : String;
Ptr : not null access Integer;
Max : Integer) return Long_Long_Integer;
-- This function scans the string starting at Str (Ptr.all) for a valid
-- integer according to the syntax described in (RM 3.5(43)). The substring
-- scanned extends no further than Str (Max). There are three cases for the
-- return:
--
-- If a valid integer is found after scanning past any initial spaces, then
-- Ptr.all is updated past the last character of the integer (but trailing
-- spaces are not scanned out).
--
-- If no valid integer is found, then Ptr.all points either to an initial
-- non-digit character, or to Max + 1 if the field is all spaces and the
-- exception Constraint_Error is raised.
--
-- If a syntactically valid integer is scanned, but the value is out of
-- range, or, in the based case, the base value is out of range or there
-- is an out of range digit, then Ptr.all points past the integer, and
-- Constraint_Error is raised.
--
-- Note: these rules correspond to the requirements for leaving the pointer
-- positioned in Text_Io.Get
--
-- Note: if Str is null, i.e. if Max is less than Ptr, then this is a
-- special case of an all-blank string, and Ptr is unchanged, and hence
-- is greater than Max as required in this case.
function Value_Long_Long_Integer (Str : String) return Long_Long_Integer;
-- Used in computing X'Value (Str) where X is a signed integer type whose
-- base range exceeds the base range of Integer. Str is the string argument
-- of the attribute. Constraint_Error is raised if the string is malformed,
-- or if the value is out of range.
end System.Val_LLI;
| 58.5 | 79 | 0.516517 |
1a555bb2799ae6efec284904d0905d1b4a8ae8d5 | 1,479 | ads | Ada | tier-1/xcb/source/thin/xcb-xcb_render_picture_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/xcb/source/thin/xcb-xcb_render_picture_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/xcb/source/thin/xcb-xcb_render_picture_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_render_picture_iterator_t is
-- Item
--
type Item is record
data : access xcb.xcb_render_picture_t;
the_rem : aliased Interfaces.C.int;
index : aliased Interfaces.C.int;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_render_picture_iterator_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_picture_iterator_t.Item,
Element_Array => xcb.xcb_render_picture_iterator_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_render_picture_iterator_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_picture_iterator_t.Pointer,
Element_Array => xcb.xcb_render_picture_iterator_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_render_picture_iterator_t;
| 26.890909 | 76 | 0.665314 |
2e646a2042258e3950948648dbfab03c322c5ea4 | 20,251 | adb | Ada | gcc-gcc-7_3_0-release/gcc/ada/s-interr-sigaction.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/ada/s-interr-sigaction.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/ada/s-interr-sigaction.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . I N T E R R U P T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2014, Free Software Foundation, Inc. --
-- --
-- GNARL 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is the NT version of this package
with Ada.Task_Identification;
with Ada.Unchecked_Conversion;
with Interfaces.C;
with System.Storage_Elements;
with System.Task_Primitives.Operations;
with System.Tasking.Utilities;
with System.Tasking.Rendezvous;
with System.Tasking.Initialization;
with System.Interrupt_Management;
with System.Parameters;
package body System.Interrupts is
use Parameters;
use Tasking;
use System.OS_Interface;
use Interfaces.C;
package STPO renames System.Task_Primitives.Operations;
package IMNG renames System.Interrupt_Management;
subtype int is Interfaces.C.int;
function To_System is new Ada.Unchecked_Conversion
(Ada.Task_Identification.Task_Id, Task_Id);
type Handler_Kind is (Unknown, Task_Entry, Protected_Procedure);
type Handler_Desc is record
Kind : Handler_Kind := Unknown;
T : Task_Id;
E : Task_Entry_Index;
H : Parameterless_Handler;
Static : Boolean := False;
end record;
task type Server_Task (Interrupt : Interrupt_ID) is
pragma Interrupt_Priority (System.Interrupt_Priority'Last);
end Server_Task;
type Server_Task_Access is access Server_Task;
Handlers : array (Interrupt_ID) of Task_Id;
Descriptors : array (Interrupt_ID) of Handler_Desc;
Interrupt_Count : array (Interrupt_ID) of Integer := (others => 0);
pragma Volatile_Components (Interrupt_Count);
procedure Attach_Handler
(New_Handler : Parameterless_Handler;
Interrupt : Interrupt_ID;
Static : Boolean;
Restoration : Boolean);
-- This internal procedure is needed to finalize protected objects that
-- contain interrupt handlers.
procedure Signal_Handler (Sig : Interrupt_ID);
pragma Convention (C, Signal_Handler);
-- This procedure is used to handle all the signals
-- Type and Head, Tail of the list containing Registered Interrupt
-- Handlers. These definitions are used to register the handlers
-- specified by the pragma Interrupt_Handler.
--------------------------
-- Handler Registration --
--------------------------
type Registered_Handler;
type R_Link is access all Registered_Handler;
type Registered_Handler is record
H : System.Address := System.Null_Address;
Next : R_Link := null;
end record;
Registered_Handlers : R_Link := null;
function Is_Registered (Handler : Parameterless_Handler) return Boolean;
-- See if the Handler has been "pragma"ed using Interrupt_Handler.
-- Always consider a null handler as registered.
type Handler_Ptr is access procedure (Sig : Interrupt_ID);
pragma Convention (C, Handler_Ptr);
function TISR is new Ada.Unchecked_Conversion (Handler_Ptr, isr_address);
--------------------
-- Signal_Handler --
--------------------
procedure Signal_Handler (Sig : Interrupt_ID) is
Handler : Task_Id renames Handlers (Sig);
begin
if Intr_Attach_Reset and then
intr_attach (int (Sig), TISR (Signal_Handler'Access)) = FUNC_ERR
then
raise Program_Error;
end if;
if Handler /= null then
Interrupt_Count (Sig) := Interrupt_Count (Sig) + 1;
STPO.Wakeup (Handler, Interrupt_Server_Idle_Sleep);
end if;
end Signal_Handler;
-----------------
-- Is_Reserved --
-----------------
function Is_Reserved (Interrupt : Interrupt_ID) return Boolean is
begin
return IMNG.Reserve (IMNG.Interrupt_ID (Interrupt));
end Is_Reserved;
-----------------------
-- Is_Entry_Attached --
-----------------------
function Is_Entry_Attached (Interrupt : Interrupt_ID) return Boolean is
begin
if Is_Reserved (Interrupt) then
raise Program_Error with
"interrupt" & Interrupt_ID'Image (Interrupt) & " is reserved";
end if;
return Descriptors (Interrupt).T /= Null_Task;
end Is_Entry_Attached;
-------------------------
-- Is_Handler_Attached --
-------------------------
function Is_Handler_Attached (Interrupt : Interrupt_ID) return Boolean is
begin
if Is_Reserved (Interrupt) then
raise Program_Error with
"interrupt" & Interrupt_ID'Image (Interrupt) & " is reserved";
else
return Descriptors (Interrupt).Kind /= Unknown;
end if;
end Is_Handler_Attached;
----------------
-- Is_Ignored --
----------------
function Is_Ignored (Interrupt : Interrupt_ID) return Boolean is
begin
raise Program_Error;
return False;
end Is_Ignored;
------------------
-- Unblocked_By --
------------------
function Unblocked_By (Interrupt : Interrupt_ID) return Task_Id is
begin
raise Program_Error;
return Null_Task;
end Unblocked_By;
----------------------
-- Ignore_Interrupt --
----------------------
procedure Ignore_Interrupt (Interrupt : Interrupt_ID) is
begin
raise Program_Error;
end Ignore_Interrupt;
------------------------
-- Unignore_Interrupt --
------------------------
procedure Unignore_Interrupt (Interrupt : Interrupt_ID) is
begin
raise Program_Error;
end Unignore_Interrupt;
-------------------------------------
-- Has_Interrupt_Or_Attach_Handler --
-------------------------------------
function Has_Interrupt_Or_Attach_Handler
(Object : access Dynamic_Interrupt_Protection) return Boolean
is
pragma Unreferenced (Object);
begin
return True;
end Has_Interrupt_Or_Attach_Handler;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Static_Interrupt_Protection) is
begin
-- ??? loop to be executed only when we're not doing library level
-- finalization, since in this case all interrupt tasks are gone.
for N in reverse Object.Previous_Handlers'Range loop
Attach_Handler
(New_Handler => Object.Previous_Handlers (N).Handler,
Interrupt => Object.Previous_Handlers (N).Interrupt,
Static => Object.Previous_Handlers (N).Static,
Restoration => True);
end loop;
Tasking.Protected_Objects.Entries.Finalize
(Tasking.Protected_Objects.Entries.Protection_Entries (Object));
end Finalize;
-------------------------------------
-- Has_Interrupt_Or_Attach_Handler --
-------------------------------------
function Has_Interrupt_Or_Attach_Handler
(Object : access Static_Interrupt_Protection) return Boolean
is
pragma Unreferenced (Object);
begin
return True;
end Has_Interrupt_Or_Attach_Handler;
----------------------
-- Install_Handlers --
----------------------
procedure Install_Handlers
(Object : access Static_Interrupt_Protection;
New_Handlers : New_Handler_Array)
is
begin
for N in New_Handlers'Range loop
-- We need a lock around this ???
Object.Previous_Handlers (N).Interrupt := New_Handlers (N).Interrupt;
Object.Previous_Handlers (N).Static := Descriptors
(New_Handlers (N).Interrupt).Static;
-- We call Exchange_Handler and not directly Interrupt_Manager.
-- Exchange_Handler so we get the Is_Reserved check.
Exchange_Handler
(Old_Handler => Object.Previous_Handlers (N).Handler,
New_Handler => New_Handlers (N).Handler,
Interrupt => New_Handlers (N).Interrupt,
Static => True);
end loop;
end Install_Handlers;
---------------------------------
-- Install_Restricted_Handlers --
---------------------------------
procedure Install_Restricted_Handlers
(Prio : Any_Priority;
Handlers : New_Handler_Array)
is
pragma Unreferenced (Prio);
begin
for N in Handlers'Range loop
Attach_Handler (Handlers (N).Handler, Handlers (N).Interrupt, True);
end loop;
end Install_Restricted_Handlers;
---------------------
-- Current_Handler --
---------------------
function Current_Handler
(Interrupt : Interrupt_ID) return Parameterless_Handler
is
begin
if Is_Reserved (Interrupt) then
raise Program_Error;
end if;
if Descriptors (Interrupt).Kind = Protected_Procedure then
return Descriptors (Interrupt).H;
else
return null;
end if;
end Current_Handler;
--------------------
-- Attach_Handler --
--------------------
procedure Attach_Handler
(New_Handler : Parameterless_Handler;
Interrupt : Interrupt_ID;
Static : Boolean := False)
is
begin
Attach_Handler (New_Handler, Interrupt, Static, False);
end Attach_Handler;
procedure Attach_Handler
(New_Handler : Parameterless_Handler;
Interrupt : Interrupt_ID;
Static : Boolean;
Restoration : Boolean)
is
New_Task : Server_Task_Access;
begin
if Is_Reserved (Interrupt) then
raise Program_Error;
end if;
if not Restoration and then not Static
-- Tries to overwrite a static Interrupt Handler with dynamic handle
and then
(Descriptors (Interrupt).Static
-- New handler not specified as an Interrupt Handler by a pragma
or else not Is_Registered (New_Handler))
then
raise Program_Error with
"trying to overwrite a static interrupt handler with a " &
"dynamic handler";
end if;
if Handlers (Interrupt) = null then
New_Task := new Server_Task (Interrupt);
Handlers (Interrupt) := To_System (New_Task.all'Identity);
end if;
if intr_attach (int (Interrupt),
TISR (Signal_Handler'Access)) = FUNC_ERR
then
raise Program_Error;
end if;
if New_Handler = null then
-- The null handler means we are detaching the handler
Descriptors (Interrupt) :=
(Kind => Unknown, T => null, E => 0, H => null, Static => False);
else
Descriptors (Interrupt).Kind := Protected_Procedure;
Descriptors (Interrupt).H := New_Handler;
Descriptors (Interrupt).Static := Static;
end if;
end Attach_Handler;
----------------------
-- Exchange_Handler --
----------------------
procedure Exchange_Handler
(Old_Handler : out Parameterless_Handler;
New_Handler : Parameterless_Handler;
Interrupt : Interrupt_ID;
Static : Boolean := False)
is
begin
if Is_Reserved (Interrupt) then
raise Program_Error;
end if;
if Descriptors (Interrupt).Kind = Task_Entry then
-- In case we have an Interrupt Entry already installed, raise a
-- program error (propagate it to the caller).
raise Program_Error with "an interrupt is already installed";
else
Old_Handler := Current_Handler (Interrupt);
Attach_Handler (New_Handler, Interrupt, Static);
end if;
end Exchange_Handler;
--------------------
-- Detach_Handler --
--------------------
procedure Detach_Handler
(Interrupt : Interrupt_ID;
Static : Boolean := False)
is
begin
if Is_Reserved (Interrupt) then
raise Program_Error;
end if;
if Descriptors (Interrupt).Kind = Task_Entry then
raise Program_Error with "trying to detach an interrupt entry";
end if;
if not Static and then Descriptors (Interrupt).Static then
raise Program_Error with
"trying to detach a static interrupt handler";
end if;
Descriptors (Interrupt) :=
(Kind => Unknown, T => null, E => 0, H => null, Static => False);
if intr_attach (int (Interrupt), null) = FUNC_ERR then
raise Program_Error;
end if;
end Detach_Handler;
---------------
-- Reference --
---------------
function Reference (Interrupt : Interrupt_ID) return System.Address is
Signal : constant System.Address :=
System.Storage_Elements.To_Address
(System.Storage_Elements.Integer_Address (Interrupt));
begin
if Is_Reserved (Interrupt) then
-- Only usable Interrupts can be used for binding it to an Entry
raise Program_Error;
end if;
return Signal;
end Reference;
--------------------------------
-- Register_Interrupt_Handler --
--------------------------------
procedure Register_Interrupt_Handler (Handler_Addr : System.Address) is
begin
Registered_Handlers :=
new Registered_Handler'(H => Handler_Addr, Next => Registered_Handlers);
end Register_Interrupt_Handler;
-------------------
-- Is_Registered --
-------------------
-- See if the Handler has been "pragma"ed using Interrupt_Handler.
-- Always consider a null handler as registered.
function Is_Registered (Handler : Parameterless_Handler) return Boolean is
Ptr : R_Link := Registered_Handlers;
type Fat_Ptr is record
Object_Addr : System.Address;
Handler_Addr : System.Address;
end record;
function To_Fat_Ptr is new Ada.Unchecked_Conversion
(Parameterless_Handler, Fat_Ptr);
Fat : Fat_Ptr;
begin
if Handler = null then
return True;
end if;
Fat := To_Fat_Ptr (Handler);
while Ptr /= null loop
if Ptr.H = Fat.Handler_Addr then
return True;
end if;
Ptr := Ptr.Next;
end loop;
return False;
end Is_Registered;
-----------------------------
-- Bind_Interrupt_To_Entry --
-----------------------------
procedure Bind_Interrupt_To_Entry
(T : Task_Id;
E : Task_Entry_Index;
Int_Ref : System.Address)
is
Interrupt : constant Interrupt_ID :=
Interrupt_ID (Storage_Elements.To_Integer (Int_Ref));
New_Task : Server_Task_Access;
begin
if Is_Reserved (Interrupt) then
raise Program_Error;
end if;
if Descriptors (Interrupt).Kind /= Unknown then
raise Program_Error with
"a binding for this interrupt is already present";
end if;
if Handlers (Interrupt) = null then
New_Task := new Server_Task (Interrupt);
Handlers (Interrupt) := To_System (New_Task.all'Identity);
end if;
if intr_attach (int (Interrupt),
TISR (Signal_Handler'Access)) = FUNC_ERR
then
raise Program_Error;
end if;
Descriptors (Interrupt).Kind := Task_Entry;
Descriptors (Interrupt).T := T;
Descriptors (Interrupt).E := E;
-- Indicate the attachment of Interrupt Entry in ATCB. This is needed so
-- that when an Interrupt Entry task terminates the binding can be
-- cleaned up. The call to unbinding must be make by the task before it
-- terminates.
T.Interrupt_Entry := True;
end Bind_Interrupt_To_Entry;
------------------------------
-- Detach_Interrupt_Entries --
------------------------------
procedure Detach_Interrupt_Entries (T : Task_Id) is
begin
for J in Interrupt_ID loop
if not Is_Reserved (J) then
if Descriptors (J).Kind = Task_Entry
and then Descriptors (J).T = T
then
Descriptors (J).Kind := Unknown;
if intr_attach (int (J), null) = FUNC_ERR then
raise Program_Error;
end if;
end if;
end if;
end loop;
-- Indicate in ATCB that no Interrupt Entries are attached
T.Interrupt_Entry := True;
end Detach_Interrupt_Entries;
---------------------
-- Block_Interrupt --
---------------------
procedure Block_Interrupt (Interrupt : Interrupt_ID) is
begin
raise Program_Error;
end Block_Interrupt;
-----------------------
-- Unblock_Interrupt --
-----------------------
procedure Unblock_Interrupt (Interrupt : Interrupt_ID) is
begin
raise Program_Error;
end Unblock_Interrupt;
----------------
-- Is_Blocked --
----------------
function Is_Blocked (Interrupt : Interrupt_ID) return Boolean is
begin
raise Program_Error;
return False;
end Is_Blocked;
task body Server_Task is
Ignore : constant Boolean := Utilities.Make_Independent;
Desc : Handler_Desc renames Descriptors (Interrupt);
Self_Id : constant Task_Id := STPO.Self;
Temp : Parameterless_Handler;
begin
loop
while Interrupt_Count (Interrupt) > 0 loop
Interrupt_Count (Interrupt) := Interrupt_Count (Interrupt) - 1;
begin
case Desc.Kind is
when Unknown =>
null;
when Task_Entry =>
Rendezvous.Call_Simple (Desc.T, Desc.E, Null_Address);
when Protected_Procedure =>
Temp := Desc.H;
Temp.all;
end case;
exception
when others => null;
end;
end loop;
Initialization.Defer_Abort (Self_Id);
if Single_Lock then
STPO.Lock_RTS;
end if;
STPO.Write_Lock (Self_Id);
Self_Id.Common.State := Interrupt_Server_Idle_Sleep;
STPO.Sleep (Self_Id, Interrupt_Server_Idle_Sleep);
Self_Id.Common.State := Runnable;
STPO.Unlock (Self_Id);
if Single_Lock then
STPO.Unlock_RTS;
end if;
Initialization.Undefer_Abort (Self_Id);
-- Undefer abort here to allow a window for this task to be aborted
-- at the time of system shutdown.
end loop;
end Server_Task;
end System.Interrupts;
| 30.270553 | 79 | 0.572317 |
1a94cd3b375f2041ecd00c177ff35f31cee82f81 | 9,051 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack56.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack56.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack56.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 5 6 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_56 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_56;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
-- The following declarations are for the case where the address
-- passed to GetU_56 or SetU_56 is not guaranteed to be aligned.
-- These routines are used when the packed array is itself a
-- component of a packed record, and therefore may not be aligned.
type ClusterU is new Cluster;
for ClusterU'Alignment use 1;
type ClusterU_Ref is access ClusterU;
type Rev_ClusterU is new ClusterU
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_ClusterU_Ref is access Rev_ClusterU;
------------
-- Get_56 --
------------
function Get_56
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_56
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_56;
-------------
-- GetU_56 --
-------------
function GetU_56
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_56
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end GetU_56;
------------
-- Set_56 --
------------
procedure Set_56
(Arr : System.Address;
N : Natural;
E : Bits_56;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_56;
-------------
-- SetU_56 --
-------------
procedure SetU_56
(Arr : System.Address;
N : Natural;
E : Bits_56;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : ClusterU_Ref with Address => A'Address, Import;
RC : Rev_ClusterU_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end SetU_56;
end System.Pack_56;
| 36.059761 | 78 | 0.467352 |
04336421d7b5dd74261d9481fce55d451a0c306f | 3,397 | ads | Ada | source/web/tools/a2js/properties.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/web/tools/a2js/properties.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/web/tools/a2js/properties.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2015, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package Properties is
pragma Pure;
end Properties;
| 67.94 | 78 | 0.388578 |
04e2a49b0604cf4d05d621a98bfc64c31738b09c | 47 | ada | Ada | Task/String-interpolation--included-/Ada/string-interpolation--included--2.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:38.000Z | 2018-11-09T22:08:38.000Z | Task/String-interpolation--included-/Ada/string-interpolation--included--2.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | null | null | null | Task/String-interpolation--included-/Ada/string-interpolation--included--2.ada | mullikine/RosettaCodeData | 4f0027c6ce83daa36118ee8b67915a13cd23ab67 | [
"Info-ZIP"
] | 1 | 2018-11-09T22:08:40.000Z | 2018-11-09T22:08:40.000Z | Put_Line ("Mary had a " & New_Str & " lamb.");
| 23.5 | 46 | 0.574468 |
4b2bd5a409efd92b222ea8fbee3076939d71ca33 | 8,680 | ads | Ada | bb-runtimes/src/system/system-xi-sparc.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/system/system-xi-sparc.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | bb-runtimes/src/system/system-xi-sparc.ads | JCGobbi/Nucleo-STM32F334R8 | 2a0b1b4b2664c92773703ac5e95dcb71979d051c | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M --
-- --
-- S p e c --
-- (Sparc/32 ELF Version) --
-- --
-- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the bare board version of this package for SPARC targets
pragma Restrictions (No_Exception_Propagation);
-- Only local exception handling is supported in this profile
pragma Restrictions (No_Exception_Registration);
-- Disable exception name registration. This capability is not used because
-- it is only required by exception stream attributes which are not supported
-- in this run time.
pragma Restrictions (No_Implicit_Dynamic_Code);
-- Pointers to nested subprograms are not allowed in this run time, in order
-- to prevent the compiler from building "trampolines".
pragma Restrictions (No_Finalization);
-- Controlled types are not supported in this run time
pragma Restrictions (No_Tasking);
-- Tasking is not supported in this run time
pragma Discard_Names;
-- Disable explicitly the generation of names associated with entities in
-- order to reduce the amount of storage used. These names are not used anyway
-- (attributes such as 'Image and 'Value are not supported in this run time).
package System is
pragma Pure;
-- Note that we take advantage of the implementation permission to make
-- this unit Pure instead of Preelaborable; see RM 13.7.1(15). In Ada
-- 2005, this is Pure in any case (AI-362).
pragma No_Elaboration_Code_All;
-- Allow the use of that restriction in units that WITH this unit
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
-- System-Dependent Named Numbers
Min_Int : constant := -2 ** (Standard'Max_Integer_Size - 1);
Max_Int : constant := 2 ** (Standard'Max_Integer_Size - 1) - 1;
Max_Binary_Modulus : constant := 2 ** Standard'Max_Integer_Size;
Max_Nonbinary_Modulus : constant := 2 ** Integer'Size - 1;
Max_Base_Digits : constant := Long_Long_Float'Digits;
Max_Digits : constant := Long_Long_Float'Digits;
Max_Mantissa : constant := Standard'Max_Integer_Size - 1;
Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
Tick : constant := 0.0;
-- Storage-related Declarations
type Address is private;
pragma Preelaborable_Initialization (Address);
Null_Address : constant Address;
Storage_Unit : constant := 8;
Word_Size : constant := 32;
Memory_Size : constant := 2 ** 32;
-- Address comparison
function "<" (Left, Right : Address) return Boolean;
function "<=" (Left, Right : Address) return Boolean;
function ">" (Left, Right : Address) return Boolean;
function ">=" (Left, Right : Address) return Boolean;
function "=" (Left, Right : Address) return Boolean;
pragma Import (Intrinsic, "<");
pragma Import (Intrinsic, "<=");
pragma Import (Intrinsic, ">");
pragma Import (Intrinsic, ">=");
pragma Import (Intrinsic, "=");
-- Other System-Dependent Declarations
type Bit_Order is (High_Order_First, Low_Order_First);
Default_Bit_Order : constant Bit_Order := High_Order_First;
pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
-- Priority-related Declarations (RM D.1)
-- 241 - 255 correspond to hardware interrupt levels 1 .. 15
-- 255 is the priority value that block all interrupts
-- 240 is the maximum value of priority that is not high enough to
-- require the blocking of one or more interrupts.
Max_Priority : constant Positive := 240;
Max_Interrupt_Priority : constant Positive := 255;
subtype Any_Priority is Integer range 0 .. 255;
subtype Priority is Any_Priority range 0 .. 240;
subtype Interrupt_Priority is Any_Priority range 241 .. 255;
Default_Priority : constant Priority := 120;
-- By default, the priority assigned is the one in the middle of the
-- Priority range.
private
type Address is mod Memory_Size;
Null_Address : constant Address := 0;
--------------------------------------
-- System Implementation Parameters --
--------------------------------------
-- These parameters provide information about the target that is used
-- by the compiler. They are in the private part of System, where they
-- can be accessed using the special circuitry in the Targparm unit
-- whose source should be consulted for more detailed descriptions
-- of the individual switch values.
Atomic_Sync_Default : constant Boolean := False;
Backend_Divide_Checks : constant Boolean := False;
Backend_Overflow_Checks : constant Boolean := True;
Command_Line_Args : constant Boolean := False;
Configurable_Run_Time : constant Boolean := True;
Denorm : constant Boolean := True;
Duration_32_Bits : constant Boolean := True;
Exit_Status_Supported : constant Boolean := False;
Fractional_Fixed_Ops : constant Boolean := False;
Frontend_Layout : constant Boolean := False;
Machine_Overflows : constant Boolean := False;
Machine_Rounds : constant Boolean := True;
Preallocated_Stacks : constant Boolean := False;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
Stack_Check_Probes : constant Boolean := False;
Stack_Check_Limits : constant Boolean := False;
Support_Aggregates : constant Boolean := True;
Support_Composite_Assign : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts : constant Boolean := True;
Always_Compatible_Rep : constant Boolean := True;
Suppress_Standard_Library : constant Boolean := True;
Use_Ada_Main_Program_Name : constant Boolean := False;
Frontend_Exceptions : constant Boolean := False;
ZCX_By_Default : constant Boolean := True;
end System;
| 47.955801 | 79 | 0.58318 |
047bbcbdd3f0dc7f3dec117abeb833f199776030 | 782 | adb | Ada | tests/tests/utils/basic_mem_alloc/main.adb | JeremyGrosser/usb_embedded | 8597a505dd1fd8b28a2e87f069034213ca8a2607 | [
"BSD-3-Clause"
] | null | null | null | tests/tests/utils/basic_mem_alloc/main.adb | JeremyGrosser/usb_embedded | 8597a505dd1fd8b28a2e87f069034213ca8a2607 | [
"BSD-3-Clause"
] | null | null | null | tests/tests/utils/basic_mem_alloc/main.adb | JeremyGrosser/usb_embedded | 8597a505dd1fd8b28a2e87f069034213ca8a2607 | [
"BSD-3-Clause"
] | null | null | null | with Ada.Text_IO; use Ada.Text_IO;
with USB.Utils; use USB.Utils;
with System.Storage_Elements; use System.Storage_Elements;
with HAL; use HAL;
procedure Main is
Alloc : USB.Utils.Basic_RAM_Allocator (256);
procedure Test (Alignment : UInt8; Len : UInt11) is
Addr : constant Integer_Address :=
To_Integer (Allocate (Alloc, Alignment, Len));
begin
if Addr = 0 then
Put ("Allocation failed");
elsif (Addr mod Integer_Address (Alignment)) /= 0 then
Put ("Bad alignment");
else
Put ("OK");
end if;
Put_Line (" - Align:" & Alignment'Img & " Len:" & Len'Img);
end Test;
begin
Test (1, 1);
Test (2, 1);
Test (4, 1);
Test (8, 1);
Test (16, 1);
Test (32, 1);
Test (4, 512);
end Main;
| 22.342857 | 65 | 0.598465 |
4b3e34e4f5870c73df2d4d37e01bbc5b4aec613c | 1,719 | ads | Ada | lined-searching.ads | jrcarter/Lined | 95060f035c80ad2563ebb40c9ff603e59b88f7fb | [
"BSD-3-Clause"
] | null | null | null | lined-searching.ads | jrcarter/Lined | 95060f035c80ad2563ebb40c9ff603e59b88f7fb | [
"BSD-3-Clause"
] | null | null | null | lined-searching.ads | jrcarter/Lined | 95060f035c80ad2563ebb40c9ff603e59b88f7fb | [
"BSD-3-Clause"
] | null | null | null | with Lined.Buffer;
with PragmARC.Matching.Character_Regular_Expression;
package Lined.Searching with SPARK_Mode, Abstract_State => State is --, Initializes => State is
function Terminator (Pattern : String; Delimiter : Character; Classes : Boolean := True) return Positive;
-- Returns the index in Pattern of the first occurence of Delimiter that is not preceded by an escape
-- (PragmARC.Matching.Character_Regular_Expression.Escape_Item) or, if Classes, in a class ('[', ']')
-- Classes of False is useful for finding the terminator of a replacement string
-- Raises Invalid_Input if Pattern does not contain such an occurence of Delimiter
procedure Process (Pattern : in String)
with
Global => (Output => State),
Post => Pattern = Current;
-- Processes Pattern for future searches and stores Pattern for calls to Search
-- Makes Current return Pattern
-- Raises Invalid_Input if Pattern is not a valid pattern; Current will return "" in this case
function Current return String With Global => (Input => State);
-- Returns the pattern most recently processed by Process
-- Returns "" if Process raised Invalid_Input
-- Initially returns ""
function Search (Current : Natural; Forward : Boolean) return Positive With Global => (Input => (Buffer.State, State) );
-- Returns the number of the next (if Forward) or previous (if not Forward) line matching Searching.Current
-- Raises Invalid_Input if no line matches
function Search (Line : String) return PragmARC.Matching.Character_Regular_Expression.Result With Global => (Input => State);
-- Returns PragmARC.Character_Regular_Expression_Matcher.Location (Current, Line)
end Lined.Searching;
| 55.451613 | 128 | 0.742292 |
13ad0f9dad4d0385870057010b16b1834ddc9c42 | 5,195 | ads | Ada | source/amf/uml/amf-umldi-uml_compartments-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 24 | 2016-11-29T06:59:41.000Z | 2021-08-30T11:55:16.000Z | source/amf/uml/amf-umldi-uml_compartments-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 2 | 2019-01-16T05:15:20.000Z | 2019-02-03T10:03:32.000Z | source/amf/uml/amf-umldi-uml_compartments-collections.ads | svn2github/matreshka | 9d222b3ad9da508855fb1f5adbe5e8a4fad4c530 | [
"BSD-3-Clause"
] | 4 | 2017-07-18T07:11:05.000Z | 2020-06-21T03:02:25.000Z | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UMLDI.UML_Compartments.Collections is
pragma Preelaborate;
package UMLDI_UML_Compartment_Collections is
new AMF.Generic_Collections
(UMLDI_UML_Compartment,
UMLDI_UML_Compartment_Access);
type Set_Of_UMLDI_UML_Compartment is
new UMLDI_UML_Compartment_Collections.Set with null record;
Empty_Set_Of_UMLDI_UML_Compartment : constant Set_Of_UMLDI_UML_Compartment;
type Ordered_Set_Of_UMLDI_UML_Compartment is
new UMLDI_UML_Compartment_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UMLDI_UML_Compartment : constant Ordered_Set_Of_UMLDI_UML_Compartment;
type Bag_Of_UMLDI_UML_Compartment is
new UMLDI_UML_Compartment_Collections.Bag with null record;
Empty_Bag_Of_UMLDI_UML_Compartment : constant Bag_Of_UMLDI_UML_Compartment;
type Sequence_Of_UMLDI_UML_Compartment is
new UMLDI_UML_Compartment_Collections.Sequence with null record;
Empty_Sequence_Of_UMLDI_UML_Compartment : constant Sequence_Of_UMLDI_UML_Compartment;
private
Empty_Set_Of_UMLDI_UML_Compartment : constant Set_Of_UMLDI_UML_Compartment
:= (UMLDI_UML_Compartment_Collections.Set with null record);
Empty_Ordered_Set_Of_UMLDI_UML_Compartment : constant Ordered_Set_Of_UMLDI_UML_Compartment
:= (UMLDI_UML_Compartment_Collections.Ordered_Set with null record);
Empty_Bag_Of_UMLDI_UML_Compartment : constant Bag_Of_UMLDI_UML_Compartment
:= (UMLDI_UML_Compartment_Collections.Bag with null record);
Empty_Sequence_Of_UMLDI_UML_Compartment : constant Sequence_Of_UMLDI_UML_Compartment
:= (UMLDI_UML_Compartment_Collections.Sequence with null record);
end AMF.UMLDI.UML_Compartments.Collections;
| 56.467391 | 94 | 0.53436 |
135247214ede0e6cfcdcdb42524ecb9a92759dbd | 1,882 | adb | Ada | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/arrayidx/p.adb | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 31 | 2018-08-01T21:25:24.000Z | 2022-02-14T07:52:34.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/arrayidx/p.adb | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 40 | 2018-12-03T19:48:52.000Z | 2021-03-10T06:34:26.000Z | src/gdb/gdb-7.11/gdb/testsuite/gdb.ada/arrayidx/p.adb | alrooney/unum-sdk | bbccb10b0cd3500feccbbef22e27ea111c3d18eb | [
"Apache-2.0"
] | 20 | 2018-11-16T21:19:22.000Z | 2021-10-18T23:08:24.000Z | -- Copyright 2005-2016 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT 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
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
procedure P is
type Index is (One, Two, Three);
type Table is array (Integer range 1 .. 3) of Integer;
type ETable is array (Index) of Integer;
type RTable is array (Index range Two .. Three) of Integer;
type UTable is array (Positive range <>) of Integer;
type PTable is array (Index) of Boolean;
pragma Pack (PTable);
function Get_UTable (I : Integer) return UTable is
begin
return Utable'(1 => I, 2 => 2, 3 => 3);
end Get_UTable;
One_Two_Three : Table := (1, 2, 3);
E_One_Two_Three : ETable := (1, 2, 3);
R_Two_Three : RTable := (2, 3);
U_One_Two_Three : UTable := Get_UTable (1);
P_One_Two_Three : PTable := (False, True, True);
Few_Reps : UTable := (1, 2, 3, 3, 3, 3, 3, 4, 5);
Many_Reps : UTable := (1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5);
Empty : array (1 .. 0) of Integer := (others => 0);
begin
One_Two_Three (1) := 4; -- START
E_One_Two_Three (One) := 4;
R_Two_Three (Two) := 4;
U_One_Two_Three (U_One_Two_Three'First) := 4;
P_One_Two_Three (One) := True;
Few_Reps (Few_Reps'First) := 2;
Many_Reps (Many_Reps'First) := 2;
Empty := (others => 1);
end P;
| 34.218182 | 74 | 0.653029 |
04f8e6a62247e7d537a6cd32b16b2004ce6349ae | 2,091 | adb | Ada | src/common/septum.adb | jquorning/septum | 6c9ccb6ed58429a144f44db0f3e2e72028655890 | [
"Apache-2.0"
] | 236 | 2021-05-31T00:08:00.000Z | 2022-03-31T20:11:31.000Z | src/common/septum.adb | jquorning/septum | 6c9ccb6ed58429a144f44db0f3e2e72028655890 | [
"Apache-2.0"
] | 34 | 2021-05-25T02:02:46.000Z | 2022-02-01T11:58:09.000Z | src/common/septum.adb | jquorning/septum | 6c9ccb6ed58429a144f44db0f3e2e72028655890 | [
"Apache-2.0"
] | 2 | 2022-01-31T22:47:20.000Z | 2022-03-27T21:43:35.000Z | -------------------------------------------------------------------------------
-- Copyright 2021, The Septum Developers (see AUTHORS file)
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- http://www.apache.org/licenses/LICENSE-2.0
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-------------------------------------------------------------------------------
with Ada.Command_Line;
with Ada.Exceptions;
with Ada.Text_IO;
with GNAT.Traceback.Symbolic;
with SP.Config;
with SP.Interactive;
procedure Septum is
use Ada.Text_IO;
begin
-- Look for a single "--version" flag
if Ada.Command_Line.Argument_Count = 1
and then Ada.Command_Line.Argument (1) = "--version"
then
Put_Line (SP.Version);
return;
end if;
-- Create a local configuration file in the current directory.
if Ada.Command_Line.Argument_Count = 1
and then Ada.Command_Line.Argument (1) = "init"
then
SP.Config.Create_Local_Config;
return;
end if;
-- Don't recognize any other arguments.
if Ada.Command_Line.Argument_Count /= 0 then
Put_Line ("Unrecognized command line arguments.");
New_Line;
Put_Line ("Usage: septum --version print program version");
Put_Line (" septum init creates config directory with empty config");
Put_Line (" septum run interactive search mode");
return;
end if;
SP.Interactive.Main;
exception
when Err : others =>
Put_Line (Ada.Exceptions.Exception_Information (Err));
Put_Line ("Exception traceback: " & GNAT.Traceback.Symbolic.Symbolic_Traceback (Err));
end Septum;
| 34.278689 | 95 | 0.626973 |
ad1a9cffc03d0f907948029ea352f38d58dc1906 | 3,422 | ads | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-ctrl_c.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-ctrl_c.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/g-ctrl_c.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . C T R L _ C --
-- --
-- S p e c --
-- --
-- Copyright (C) 2002-2019, AdaCore --
-- --
-- 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package may be used to intercept the interruption of a running
-- program by the operator typing Control-C, without having to use an Ada
-- interrupt handler protected object.
-- This package is currently implemented under Windows and Unix platforms
-- Note concerning Unix systems:
-- The behavior of this package when using tasking depends on the interaction
-- between sigaction() and the thread library.
package GNAT.Ctrl_C is
type Handler_Type is access procedure;
-- Any parameterless library level procedure can be used as a handler.
-- Handler_Type should not propagate exceptions.
procedure Install_Handler (Handler : Handler_Type);
-- Set up Handler to be called if the operator hits Ctrl-C, instead of the
-- standard Control-C handler.
procedure Uninstall_Handler;
-- Reinstall the standard Control-C handler.
-- If Install_Handler has never been called, this procedure has no effect.
private
pragma Import (C, Uninstall_Handler, "__gnat_uninstall_int_handler");
end GNAT.Ctrl_C;
| 57.033333 | 78 | 0.47896 |
ad7650e4594067fda1887fb6005897497ed7f8c9 | 2,608 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5013a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5013a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5013a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CD5013A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT AN ADDRESS CLAUSE CAN BE GIVEN IN THE VISIBLE PART OF
-- A PACKAGE SPECIFICATION FOR A VARIABLE OF AN ENUMERATION TYPE,
-- WHERE THE VARIABLE IS DECLARED IN THE VISIBLE PART OF THE
-- SPECIFICATION.
-- HISTORY:
-- BCB 09/16/87 CREATED ORIGINAL TEST.
-- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'.
WITH REPORT; USE REPORT;
WITH SPPRT13; USE SPPRT13;
WITH SYSTEM; USE SYSTEM;
PROCEDURE CD5013A IS
TYPE ENUM_TYPE IS (ONE,TWO,THREE,FOUR,FIVE,SIX);
PACKAGE PACK IS
CHECK_TYPE : ENUM_TYPE;
FOR CHECK_TYPE USE AT VARIABLE_ADDRESS;
END PACK;
USE PACK;
BEGIN
TEST ("CD5013A", "AN ADDRESS CLAUSE CAN BE GIVEN IN " &
"THE VISIBLE PART OF A PACKAGE SPECIFICATION " &
"FOR A VARIABLE OF AN ENUMERATION TYPE, WHERE " &
"THE VARIABLE IS DECLARED IN THE VISIBLE PART " &
"OF THE SPECIFICATION");
CHECK_TYPE := ONE;
IF EQUAL(3,3) THEN
CHECK_TYPE := THREE;
END IF;
IF CHECK_TYPE /= THREE THEN
FAILED ("INCORRECT VALUE FOR ENUMERATION VARIABLE");
END IF;
IF CHECK_TYPE'ADDRESS /= VARIABLE_ADDRESS THEN
FAILED ("INCORRECT ADDRESS FOR ENUMERATION VARIABLE");
END IF;
RESULT;
END CD5013A;
| 35.726027 | 79 | 0.644555 |
ad5d7ea5dab8f0b82d6257031ec6dc18c0ee0ae2 | 2,057 | ads | Ada | src/sdl-events-files.ads | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | 1 | 2021-10-30T14:41:56.000Z | 2021-10-30T14:41:56.000Z | src/sdl-events-files.ads | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | null | null | null | src/sdl-events-files.ads | Fabien-Chouteau/sdlada | f08d72e3f5dcec228d68fb5b6681ea831f81ef47 | [
"Zlib"
] | null | null | null | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2020, Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Events.Files
--------------------------------------------------------------------------------------------------------------------
with Interfaces.C.Strings;
with System;
package SDL.Events.Files is
-- Drag and drop events.
Drop_File : constant Event_Types := 16#0000_1000#;
type Drop_Events is
record
Event_Type : Event_Types; -- Will be set to Drop_File.
Time_Stamp : Time_Stamps;
File_Name : Interfaces.C.Strings.chars_ptr; -- User *must* call Free on this.
end record with
Convention => C;
private
for Drop_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
File_Name at 2 * SDL.Word range 0 .. System.Word_Size - 1; -- This will depend on platform.
end record;
end SDL.Events.Files;
| 41.979592 | 116 | 0.55858 |
22ba7a0dcba2b39efca5cd744bf5e746b83aa7bc | 1,596 | ads | Ada | src/sdl-inputs-joysticks-game_controllers-makers.ads | alire-project/sdlada | 9593807925f5f6651d81514c7f2d163ab3156dc1 | [
"Zlib"
] | null | null | null | src/sdl-inputs-joysticks-game_controllers-makers.ads | alire-project/sdlada | 9593807925f5f6651d81514c7f2d163ab3156dc1 | [
"Zlib"
] | null | null | null | src/sdl-inputs-joysticks-game_controllers-makers.ads | alire-project/sdlada | 9593807925f5f6651d81514c7f2d163ab3156dc1 | [
"Zlib"
] | null | null | null | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2013-2018 Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Inputs.Joysticks.Game_Controllers.Makers
--------------------------------------------------------------------------------------------------------------------
package SDL.Inputs.Joysticks.Game_Controllers.Makers is
function Create (Device : in Devices) return Game_Controller;
procedure Create (Device : in Devices; Actual_Controller : out Game_Controller);
end SDL.Inputs.Joysticks.Game_Controllers.Makers;
| 55.034483 | 116 | 0.580827 |
583017ff1328a33a4bfed67fa5aecd4cf24d9bf8 | 55 | ads | Ada | test/node/test_colored_nodes.ads | skill-lang/skillAdaTestSuite | 279ea0c0cd489c2e39d7532a3b68c564497101e2 | [
"BSD-3-Clause"
] | 1 | 2019-02-09T22:04:10.000Z | 2019-02-09T22:04:10.000Z | test/node/test_colored_nodes.ads | skill-lang/skillAdaTestSuite | 279ea0c0cd489c2e39d7532a3b68c564497101e2 | [
"BSD-3-Clause"
] | null | null | null | test/node/test_colored_nodes.ads | skill-lang/skillAdaTestSuite | 279ea0c0cd489c2e39d7532a3b68c564497101e2 | [
"BSD-3-Clause"
] | null | null | null | package Test_Colored_Nodes is
end Test_Colored_Nodes;
| 13.75 | 29 | 0.872727 |
ad3b4d341e7d7e34143607073041cf068b93c448 | 6,239 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-ticoau.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-ticoau.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-ticoau.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . C O M P L E X _ A U X --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Ada.Text_IO.Generic_Aux; use Ada.Text_IO.Generic_Aux;
with Ada.Text_IO.Float_Aux;
with System.Img_Real; use System.Img_Real;
package body Ada.Text_IO.Complex_Aux is
package Aux renames Ada.Text_IO.Float_Aux;
---------
-- Get --
---------
procedure Get
(File : File_Type;
ItemR : out Long_Long_Float;
ItemI : out Long_Long_Float;
Width : Field)
is
Buf : String (1 .. Field'Last);
Stop : Integer := 0;
Ptr : aliased Integer;
Paren : Boolean := False;
begin
-- General note for following code, exceptions from the calls to
-- Get for components of the complex value are propagated.
if Width /= 0 then
Load_Width (File, Width, Buf, Stop);
Gets (Buf (1 .. Stop), ItemR, ItemI, Ptr);
for J in Ptr + 1 .. Stop loop
if not Is_Blank (Buf (J)) then
raise Data_Error;
end if;
end loop;
-- Case of width = 0
else
Load_Skip (File);
Ptr := 0;
Load (File, Buf, Ptr, '(', Paren);
Aux.Get (File, ItemR, 0);
Load_Skip (File);
Load (File, Buf, Ptr, ',');
Aux.Get (File, ItemI, 0);
if Paren then
Load_Skip (File);
Load (File, Buf, Ptr, ')', Paren);
if not Paren then
raise Data_Error;
end if;
end if;
end if;
end Get;
----------
-- Gets --
----------
procedure Gets
(From : String;
ItemR : out Long_Long_Float;
ItemI : out Long_Long_Float;
Last : out Positive)
is
Paren : Boolean;
Pos : Integer;
begin
String_Skip (From, Pos);
if From (Pos) = '(' then
Pos := Pos + 1;
Paren := True;
else
Paren := False;
end if;
Aux.Gets (From (Pos .. From'Last), ItemR, Pos);
String_Skip (From (Pos + 1 .. From'Last), Pos);
if From (Pos) = ',' then
Pos := Pos + 1;
end if;
Aux.Gets (From (Pos .. From'Last), ItemI, Pos);
if Paren then
String_Skip (From (Pos + 1 .. From'Last), Pos);
if From (Pos) /= ')' then
raise Data_Error;
end if;
end if;
Last := Pos;
end Gets;
---------
-- Put --
---------
procedure Put
(File : File_Type;
ItemR : Long_Long_Float;
ItemI : Long_Long_Float;
Fore : Field;
Aft : Field;
Exp : Field)
is
begin
Put (File, '(');
Aux.Put (File, ItemR, Fore, Aft, Exp);
Put (File, ',');
Aux.Put (File, ItemI, Fore, Aft, Exp);
Put (File, ')');
end Put;
----------
-- Puts --
----------
procedure Puts
(To : out String;
ItemR : Long_Long_Float;
ItemI : Long_Long_Float;
Aft : Field;
Exp : Field)
is
I_String : String (1 .. 3 * Field'Last);
R_String : String (1 .. 3 * Field'Last);
Iptr : Natural;
Rptr : Natural;
begin
-- Both parts are initially converted with a Fore of 0
Rptr := 0;
Set_Image_Real (ItemR, R_String, Rptr, 0, Aft, Exp);
Iptr := 0;
Set_Image_Real (ItemI, I_String, Iptr, 0, Aft, Exp);
-- Check room for both parts plus parens plus comma (RM G.1.3(34))
if Rptr + Iptr + 3 > To'Length then
raise Layout_Error;
end if;
-- If there is room, layout result according to (RM G.1.3(31-33))
To (To'First) := '(';
To (To'First + 1 .. To'First + Rptr) := R_String (1 .. Rptr);
To (To'First + Rptr + 1) := ',';
To (To'Last) := ')';
To (To'Last - Iptr .. To'Last - 1) := I_String (1 .. Iptr);
for J in To'First + Rptr + 2 .. To'Last - Iptr - 1 loop
To (J) := ' ';
end loop;
end Puts;
end Ada.Text_IO.Complex_Aux;
| 30.73399 | 78 | 0.44911 |
4b4d4b969dd8775d40d06162305bba4f93da4b2a | 710 | ads | Ada | attic/asis/find_entities/adam-assist-query-find_entities-actuals_for_traversing.ads | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | 3 | 2017-04-29T14:25:22.000Z | 2017-09-29T10:15:28.000Z | attic/asis/find_entities/adam-assist-query-find_entities-actuals_for_traversing.ads | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | null | null | null | attic/asis/find_entities/adam-assist-query-find_entities-actuals_for_traversing.ads | charlie5/aIDE | fab406dbcd9b72a4cb215ffebb05166c788d6365 | [
"MIT"
] | null | null | null | with
Asis;
-- AdaM.Source;
package AdaM.Assist.Query.find_Entities.Actuals_for_traversing
is
type Traversal_State is
record
-- parent_Stack : AdaM.Source.Entities;
ignore_Starter : asis.Element := asis.Nil_Element;
end record;
Initial_Traversal_State : constant Traversal_State := (others => <>);
procedure Pre_Op
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Traversal_State);
procedure Post_Op
(Element : Asis.Element;
Control : in out Asis.Traverse_Control;
State : in out Traversal_State);
end AdaM.Assist.Query.find_Entities.Actuals_for_traversing;
| 25.357143 | 72 | 0.660563 |
040352418308a4ef20d9cfaeb1b32807f8e419f6 | 16,778 | adb | Ada | gcc-gcc-7_3_0-release/gcc/ada/comperr.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/ada/comperr.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/ada/comperr.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- C O M P E R R --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2016, 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 3, 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 COPYING3. If not, go to --
-- http://www.gnu.org/licenses for a complete copy of the license. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by AdaCore. --
-- --
------------------------------------------------------------------------------
-- This package contains routines called when a fatal internal compiler error
-- is detected. Calls to these routines cause termination of the current
-- compilation with appropriate error output.
with Atree; use Atree;
with Debug; use Debug;
with Errout; use Errout;
with Gnatvsn; use Gnatvsn;
with Lib; use Lib;
with Namet; use Namet;
with Opt; use Opt;
with Osint; use Osint;
with Output; use Output;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
with Sprint; use Sprint;
with Sdefault; use Sdefault;
with Treepr; use Treepr;
with Types; use Types;
with Ada.Exceptions; use Ada.Exceptions;
with System.OS_Lib; use System.OS_Lib;
with System.Soft_Links; use System.Soft_Links;
package body Comperr is
----------------
-- Local Data --
----------------
Abort_In_Progress : Boolean := False;
-- Used to prevent runaway recursion if something segfaults
-- while processing a previous abort.
-----------------------
-- Local Subprograms --
-----------------------
procedure Repeat_Char (Char : Character; Col : Nat; After : Character);
-- Output Char until current column is at or past Col, and then output
-- the character given by After (if column is already past Col on entry,
-- then the effect is simply to output the After character).
--------------------
-- Compiler_Abort --
--------------------
procedure Compiler_Abort
(X : String;
Fallback_Loc : String := "";
From_GCC : Boolean := False)
is
-- The procedures below output a "bug box" with information about
-- the cause of the compiler abort and about the preferred method
-- of reporting bugs. The default is a bug box appropriate for
-- the FSF version of GNAT, but there are specializations for
-- the GNATPRO and Public releases by AdaCore.
XF : constant Positive := X'First;
-- Start index, usually 1, but we won't assume this
procedure End_Line;
-- Add blanks up to column 76, and then a final vertical bar
--------------
-- End_Line --
--------------
procedure End_Line is
begin
Repeat_Char (' ', 76, '|');
Write_Eol;
end End_Line;
Is_GPL_Version : constant Boolean := Gnatvsn.Build_Type = GPL;
Is_FSF_Version : constant Boolean := Gnatvsn.Build_Type = FSF;
-- Start of processing for Compiler_Abort
begin
Cancel_Special_Output;
-- Prevent recursion through Compiler_Abort, e.g. via SIGSEGV
if Abort_In_Progress then
Exit_Program (E_Abort);
end if;
Abort_In_Progress := True;
-- Generate a "standard" error message instead of a bug box in case
-- of CodePeer rather than generating a bug box, friendlier.
-- Note that the call to Error_Msg_N below sets Serious_Errors_Detected
-- to 1, so we use the regular mechanism below in order to display a
-- "compilation abandoned" message and exit, so we still know we have
-- this case (and -gnatdk can still be used to get the bug box).
if CodePeer_Mode
and then Serious_Errors_Detected = 0
and then not Debug_Flag_K
and then Sloc (Current_Error_Node) > No_Location
then
Error_Msg_N ("cannot generate 'S'C'I'L", Current_Error_Node);
end if;
-- If we are in CodePeer mode, we must also delete SCIL files
if CodePeer_Mode then
Delete_SCIL_Files;
end if;
-- If any errors have already occurred, then we guess that the abort
-- may well be caused by previous errors, and we don't make too much
-- fuss about it, since we want to let programmer fix the errors first.
-- Debug flag K disables this behavior (useful for debugging)
if Serious_Errors_Detected /= 0 and then not Debug_Flag_K then
Errout.Finalize (Last_Call => True);
Errout.Output_Messages;
Set_Standard_Error;
Write_Str ("compilation abandoned due to previous error");
Write_Eol;
Set_Standard_Output;
Source_Dump;
Tree_Dump;
Exit_Program (E_Errors);
-- Otherwise give message with details of the abort
else
Set_Standard_Error;
-- Generate header for bug box
Write_Char ('+');
Repeat_Char ('=', 29, 'G');
Write_Str ("NAT BUG DETECTED");
Repeat_Char ('=', 76, '+');
Write_Eol;
-- Output GNAT version identification
Write_Str ("| ");
Write_Str (Gnat_Version_String);
Write_Str (" (");
-- Output target name, deleting junk final reverse slash
if Target_Name.all (Target_Name.all'Last) = '\'
or else Target_Name.all (Target_Name.all'Last) = '/'
then
Write_Str (Target_Name.all (1 .. Target_Name.all'Last - 1));
else
Write_Str (Target_Name.all);
end if;
-- Output identification of error
Write_Str (") ");
if X'Length + Column > 76 then
if From_GCC then
Write_Str ("GCC error:");
end if;
End_Line;
Write_Str ("| ");
end if;
if X'Length > 70 then
declare
Last_Blank : Integer := 70;
begin
for P in 39 .. 68 loop
if X (XF + P) = ' ' then
Last_Blank := P;
end if;
end loop;
Write_Str (X (XF .. XF - 1 + Last_Blank));
End_Line;
Write_Str ("| ");
Write_Str (X (XF + Last_Blank .. X'Last));
end;
else
Write_Str (X);
end if;
if not From_GCC then
-- For exception case, get exception message from the TSD. Note
-- that it would be neater and cleaner to pass the exception
-- message (obtained from Exception_Message) as a parameter to
-- Compiler_Abort, but we can't do this quite yet since it would
-- cause bootstrap path problems for 3.10 to 3.11.
Write_Char (' ');
Write_Str (Exception_Message (Get_Current_Excep.all.all));
end if;
End_Line;
-- Output source location information
if Sloc (Current_Error_Node) <= No_Location then
if Fallback_Loc'Length > 0 then
Write_Str ("| Error detected around ");
Write_Str (Fallback_Loc);
else
Write_Str ("| No source file position information available");
end if;
End_Line;
else
Write_Str ("| Error detected at ");
Write_Location (Sloc (Current_Error_Node));
End_Line;
end if;
-- There are two cases now. If the file gnat_bug.box exists,
-- we use the contents of this file at this point.
declare
Lo : Source_Ptr;
Hi : Source_Ptr;
Src : Source_Buffer_Ptr;
begin
Namet.Unlock;
Name_Buffer (1 .. 12) := "gnat_bug.box";
Name_Len := 12;
Read_Source_File (Name_Enter, 0, Hi, Src);
-- If we get a Src file, we use it
if Src /= null then
Lo := 0;
Outer : while Lo < Hi loop
Write_Str ("| ");
Inner : loop
exit Inner when Src (Lo) = ASCII.CR
or else Src (Lo) = ASCII.LF;
Write_Char (Src (Lo));
Lo := Lo + 1;
end loop Inner;
End_Line;
while Lo <= Hi
and then (Src (Lo) = ASCII.CR
or else Src (Lo) = ASCII.LF)
loop
Lo := Lo + 1;
end loop;
end loop Outer;
-- Otherwise we use the standard fixed text
else
if Is_FSF_Version then
Write_Str
("| Please submit a bug report; see" &
" https://gcc.gnu.org/bugs/ .");
End_Line;
elsif Is_GPL_Version then
Write_Str
("| Please submit a bug report by email " &
"to [email protected].");
End_Line;
Write_Str
("| GAP members can alternatively use GNAT Tracker:");
End_Line;
Write_Str
("| http://www.adacore.com/ " &
"section 'send a report'.");
End_Line;
Write_Str
("| See gnatinfo.txt for full info on procedure " &
"for submitting bugs.");
End_Line;
else
Write_Str
("| Please submit a bug report using GNAT Tracker:");
End_Line;
Write_Str
("| http://www.adacore.com/gnattracker/ " &
"section 'send a report'.");
End_Line;
Write_Str
("| alternatively submit a bug report by email " &
"to [email protected],");
End_Line;
Write_Str
("| including your customer number #nnn " &
"in the subject line.");
End_Line;
end if;
Write_Str
("| Use a subject line meaningful to you" &
" and us to track the bug.");
End_Line;
Write_Str
("| Include the entire contents of this bug " &
"box in the report.");
End_Line;
Write_Str
("| Include the exact command that you entered.");
End_Line;
Write_Str
("| Also include sources listed below.");
End_Line;
if not Is_FSF_Version then
Write_Str
("| Use plain ASCII or MIME attachment(s).");
End_Line;
end if;
end if;
end;
-- Complete output of bug box
Write_Char ('+');
Repeat_Char ('=', 76, '+');
Write_Eol;
if Debug_Flag_3 then
Write_Eol;
Write_Eol;
Print_Tree_Node (Current_Error_Node);
Write_Eol;
end if;
Write_Eol;
Write_Line ("Please include these source files with error report");
Write_Line ("Note that list may not be accurate in some cases, ");
Write_Line ("so please double check that the problem can still ");
Write_Line ("be reproduced with the set of files listed.");
Write_Line ("Consider also -gnatd.n switch (see debug.adb).");
Write_Eol;
begin
Dump_Source_File_Names;
-- If we blow up trying to print the list of file names, just output
-- informative msg and continue.
exception
when others =>
Write_Str ("list may be incomplete");
end;
Write_Eol;
Set_Standard_Output;
Tree_Dump;
Source_Dump;
raise Unrecoverable_Error;
end if;
end Compiler_Abort;
-----------------------
-- Delete_SCIL_Files --
-----------------------
procedure Delete_SCIL_Files is
Main : Node_Id;
Unit_Name : Node_Id;
Success : Boolean;
pragma Unreferenced (Success);
procedure Decode_Name_Buffer;
-- Replace "__" by "." in Name_Buffer, and adjust Name_Len accordingly
------------------------
-- Decode_Name_Buffer --
------------------------
procedure Decode_Name_Buffer is
J : Natural;
K : Natural;
begin
J := 1;
K := 0;
while J <= Name_Len loop
K := K + 1;
if J < Name_Len
and then Name_Buffer (J) = '_'
and then Name_Buffer (J + 1) = '_'
then
Name_Buffer (K) := '.';
J := J + 1;
else
Name_Buffer (K) := Name_Buffer (J);
end if;
J := J + 1;
end loop;
Name_Len := K;
end Decode_Name_Buffer;
-- Start of processing for Delete_SCIL_Files
begin
-- If parsing was not successful, no Main_Unit is available, so return
-- immediately.
if Main_Source_File = No_Source_File then
return;
end if;
-- Retrieve unit name, and remove old versions of SCIL/<unit>.scil and
-- SCIL/<unit>__body.scil, ditto for .scilx files.
Main := Unit (Cunit (Main_Unit));
case Nkind (Main) is
when N_Package_Declaration
| N_Subprogram_Body
| N_Subprogram_Declaration
=>
Unit_Name := Defining_Unit_Name (Specification (Main));
when N_Package_Body =>
Unit_Name := Corresponding_Spec (Main);
when N_Package_Renaming_Declaration =>
Unit_Name := Defining_Unit_Name (Main);
-- No SCIL file generated for generic package declarations
when N_Generic_Package_Declaration =>
return;
-- Should never happen, but can be ignored in production
when others =>
pragma Assert (False);
return;
end case;
case Nkind (Unit_Name) is
when N_Defining_Identifier =>
Get_Name_String (Chars (Unit_Name));
when N_Defining_Program_Unit_Name =>
Get_Name_String (Chars (Defining_Identifier (Unit_Name)));
Decode_Name_Buffer;
-- Should never happen, but can be ignored in production
when others =>
pragma Assert (False);
return;
end case;
Delete_File
("SCIL/" & Name_Buffer (1 .. Name_Len) & ".scil", Success);
Delete_File
("SCIL/" & Name_Buffer (1 .. Name_Len) & ".scilx", Success);
Delete_File
("SCIL/" & Name_Buffer (1 .. Name_Len) & "__body.scil", Success);
Delete_File
("SCIL/" & Name_Buffer (1 .. Name_Len) & "__body.scilx", Success);
end Delete_SCIL_Files;
-----------------
-- Repeat_Char --
-----------------
procedure Repeat_Char (Char : Character; Col : Nat; After : Character) is
begin
while Column < Col loop
Write_Char (Char);
end loop;
Write_Char (After);
end Repeat_Char;
end Comperr;
| 31.478424 | 79 | 0.503934 |
586451b974ec9aed0a46a08ae658961ef0624c1d | 7,654 | adb | Ada | llvm-gcc-4.2-2.9/gcc/ada/a-envvar.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/a-envvar.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/a-envvar.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . E N V I R O N M E N T _ V A R I A B L E S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2005, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System;
with Interfaces.C.Strings;
with Ada.Unchecked_Deallocation;
package body Ada.Environment_Variables is
-----------
-- Clear --
-----------
procedure Clear (Name : String) is
procedure Clear_Env_Var (Name : System.Address);
pragma Import (C, Clear_Env_Var, "__gnat_unsetenv");
F_Name : String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Clear_Env_Var (F_Name'Address);
end Clear;
-----------
-- Clear --
-----------
procedure Clear is
procedure Clear_Env;
pragma Import (C, Clear_Env, "__gnat_clearenv");
begin
Clear_Env;
end Clear;
------------
-- Exists --
------------
function Exists (Name : String) return Boolean is
use System;
procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address);
pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv");
Env_Value_Ptr : aliased Address;
Env_Value_Length : aliased Integer;
F_Name : aliased String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Get_Env_Value_Ptr
(F_Name'Address, Env_Value_Length'Address, Env_Value_Ptr'Address);
if Env_Value_Ptr = System.Null_Address then
return False;
end if;
return True;
end Exists;
-------------
-- Iterate --
-------------
procedure Iterate
(Process : not null access procedure (Name, Value : String))
is
use Interfaces.C.Strings;
type C_String_Array is array (Natural) of aliased chars_ptr;
type C_String_Array_Access is access C_String_Array;
function Get_Env return C_String_Array_Access;
pragma Import (C, Get_Env, "__gnat_environ");
type String_Access is access all String;
procedure Free is new Ada.Unchecked_Deallocation (String, String_Access);
Env_Length : Natural := 0;
Env : constant C_String_Array_Access := Get_Env;
begin
-- If the environment is null return directly
if Env = null then
return;
end if;
-- First get the number of environment variables
loop
exit when Env (Env_Length) = Null_Ptr;
Env_Length := Env_Length + 1;
end loop;
declare
Env_Copy : array (1 .. Env_Length) of String_Access;
begin
-- Copy the environment
for Iterator in 1 .. Env_Length loop
Env_Copy (Iterator) := new String'(Value (Env (Iterator - 1)));
end loop;
-- Iterate on the environment copy
for Iterator in 1 .. Env_Length loop
declare
Current_Var : constant String := Env_Copy (Iterator).all;
Value_Index : Natural := Env_Copy (Iterator)'First;
begin
loop
exit when Current_Var (Value_Index) = '=';
Value_Index := Value_Index + 1;
end loop;
Process
(Current_Var (Current_Var'First .. Value_Index - 1),
Current_Var (Value_Index + 1 .. Current_Var'Last));
end;
end loop;
-- Free the copy of the environment
for Iterator in 1 .. Env_Length loop
Free (Env_Copy (Iterator));
end loop;
end;
end Iterate;
---------
-- Set --
---------
procedure Set (Name : String; Value : String) is
F_Name : String (1 .. Name'Length + 1);
F_Value : String (1 .. Value'Length + 1);
procedure Set_Env_Value (Name, Value : System.Address);
pragma Import (C, Set_Env_Value, "__gnat_setenv");
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
F_Value (1 .. Value'Length) := Value;
F_Value (F_Value'Last) := ASCII.NUL;
Set_Env_Value (F_Name'Address, F_Value'Address);
end Set;
-----------
-- Value --
-----------
function Value (Name : String) return String is
use System;
procedure Get_Env_Value_Ptr (Name, Length, Ptr : Address);
pragma Import (C, Get_Env_Value_Ptr, "__gnat_getenv");
procedure Strncpy (Astring_Addr, Cstring : Address; N : Integer);
pragma Import (C, Strncpy, "strncpy");
Env_Value_Ptr : aliased Address;
Env_Value_Length : aliased Integer;
F_Name : aliased String (1 .. Name'Length + 1);
begin
F_Name (1 .. Name'Length) := Name;
F_Name (F_Name'Last) := ASCII.NUL;
Get_Env_Value_Ptr
(F_Name'Address, Env_Value_Length'Address, Env_Value_Ptr'Address);
if Env_Value_Ptr = System.Null_Address then
raise Constraint_Error;
end if;
if Env_Value_Length > 0 then
declare
Result : aliased String (1 .. Env_Value_Length);
begin
Strncpy (Result'Address, Env_Value_Ptr, Env_Value_Length);
return Result;
end;
else
return "";
end if;
end Value;
end Ada.Environment_Variables;
| 33.423581 | 79 | 0.522864 |
040e85c3d944eab2e850b6dcc307308a8f64c69c | 383 | ads | Ada | src/lang/stemmer-russian.ads | stcarrez/ada-stemmer | 08f540a33d471a9823d8f1a88ce2a2c4d40faaec | [
"Apache-2.0"
] | 3 | 2020-05-11T21:21:17.000Z | 2020-05-17T02:16:08.000Z | src/lang/stemmer-russian.ads | stcarrez/ada-stemmer | 08f540a33d471a9823d8f1a88ce2a2c4d40faaec | [
"Apache-2.0"
] | null | null | null | src/lang/stemmer-russian.ads | stcarrez/ada-stemmer | 08f540a33d471a9823d8f1a88ce2a2c4d40faaec | [
"Apache-2.0"
] | null | null | null | -- Generated by Snowball 2.2.0 - https://snowballstem.org/
package Stemmer.Russian with SPARK_Mode is
type Context_Type is new Stemmer.Context_Type with private;
procedure Stem (Z : in out Context_Type; Result : out Boolean);
private
type Context_Type is new Stemmer.Context_Type with record
I_P2 : Integer;
I_PV : Integer;
end record;
end Stemmer.Russian;
| 31.916667 | 66 | 0.736292 |
adc8a0b5510eef4f55a8dd4338b65f717cdd5f69 | 7,494 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64005d0.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64005d0.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c6/c64005d0.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- C64005D0M.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- CHECK THAT NESTED SUBPROGRAMS CAN BE CALLED RECURSIVELY AND THAT
-- NON-LOCAL VARIABLES AND FORMAL PARAMETERS ARE PROPERLY ACCESSED FROM
-- WITHIN RECURSIVE INVOCATIONS. THIS TEST CHECKS THAT EVERY DISPLAY OR
-- STATIC CHAIN LEVEL CAN BE ACCESSED.
-- THIS TEST USES 3 LEVELS OF NESTED RECURSIVE PROCEDURES (SEPARATELY
-- COMPILED AS SUBUNITS).
-- SEPARATE FILES ARE:
-- C64005D0M THE MAIN PROCEDURE.
-- C64005DA A RECURSIVE PROCEDURE SUBUNIT OF C64005D0M.
-- C64005DB A RECURSIVE PROCEDURE SUBUNIT OF C64005DA.
-- C64005DC A RECURSIVE PROCEDURE SUBUNIT OF C64005DB.
-- JRK 7/30/84
WITH REPORT; USE REPORT;
PROCEDURE C64005D0M IS
SUBTYPE LEVEL IS CHARACTER RANGE 'A' .. 'C';
SUBTYPE CALL IS CHARACTER RANGE '1' .. '3';
MAX_LEV : CONSTANT := LEVEL'POS (LEVEL'LAST) -
LEVEL'POS (LEVEL'FIRST) + 1;
T_LEN : CONSTANT := 2 * (1 + 3 * (MAX_LEV +
MAX_LEV*(MAX_LEV+1)/2*2)) + 1;
G_LEN : CONSTANT := 2 + 4 * MAX_LEV;
TYPE TRACE IS
RECORD
E : NATURAL := 0;
S : STRING (1 .. T_LEN);
END RECORD;
V : CHARACTER := IDENT_CHAR ('<');
L : CHARACTER := IDENT_CHAR ('>');
T : TRACE;
G : STRING (1 .. G_LEN);
PROCEDURE C64005DA (L : LEVEL; C : CALL; T : IN OUT TRACE) IS
SEPARATE;
BEGIN
TEST ("C64005D", "CHECK THAT NON-LOCAL VARIABLES AND FORMAL " &
"PARAMETERS AT ALL LEVELS OF NESTED " &
"RECURSIVE PROCEDURES ARE ACCESSIBLE (FOR " &
"3 LEVELS OF SEPARATELY COMPILED SUBUNITS)");
-- APPEND V TO T.
T.S (T.E+1) := V;
T.E := T.E + 1;
C64005DA (IDENT_CHAR(LEVEL'FIRST), IDENT_CHAR('1'), T);
-- APPEND L TO T.
T.S (T.E+1) := L;
T.E := T.E + 1;
COMMENT ("FINAL CALL TRACE LENGTH IS: " & INTEGER'IMAGE(T.E));
COMMENT ("FINAL CALL TRACE IS: " & T.S(1..T.E));
COMMENT ("GLOBAL SNAPSHOT IS: " & G);
-- CHECK THAT T AND G ARE CORRECT BY COMPUTING THEM ITERATIVELY.
DECLARE
SUBTYPE LC_LEVEL IS CHARACTER RANGE ASCII.LC_A ..
CHARACTER'VAL (CHARACTER'POS(ASCII.LC_A) + MAX_LEV - 1);
CT : TRACE;
CG : STRING (1 .. G_LEN);
BEGIN
COMMENT ("CORRECT FINAL CALL TRACE LENGTH IS: " &
INTEGER'IMAGE(T_LEN));
IF T.E /= IDENT_INT (T_LEN) THEN
FAILED ("WRONG FINAL CALL TRACE LENGTH");
ELSE CT.S (CT.E+1) := '<';
CT.E := CT.E + 1;
FOR I IN LC_LEVEL LOOP
CT.S (CT.E+1) := '<';
CT.E := CT.E + 1;
FOR J IN LC_LEVEL'FIRST .. I LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '1';
CT.E := CT.E + 2;
END LOOP;
END LOOP;
FOR I IN LC_LEVEL LOOP
CT.S (CT.E+1) := '<';
CT.E := CT.E + 1;
FOR J IN LC_LEVEL'FIRST .. LC_LEVEL'PRED(I) LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '3';
CT.E := CT.E + 2;
END LOOP;
CT.S (CT.E+1) := I;
CT.S (CT.E+2) := '2';
CT.E := CT.E + 2;
CT.S (CT.E+1) := '<';
CT.E := CT.E + 1;
FOR J IN LC_LEVEL'FIRST .. I LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '3';
CT.E := CT.E + 2;
END LOOP;
END LOOP;
CT.S (CT.E+1) := '=';
CT.E := CT.E + 1;
FOR I IN REVERSE LEVEL LOOP
FOR J IN REVERSE LEVEL'FIRST .. I LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '3';
CT.E := CT.E + 2;
END LOOP;
CT.S (CT.E+1) := '>';
CT.E := CT.E + 1;
CT.S (CT.E+1) := I;
CT.S (CT.E+2) := '2';
CT.E := CT.E + 2;
FOR J IN REVERSE LEVEL'FIRST .. LEVEL'PRED(I) LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '3';
CT.E := CT.E + 2;
END LOOP;
CT.S (CT.E+1) := '>';
CT.E := CT.E + 1;
END LOOP;
FOR I IN REVERSE LEVEL LOOP
FOR J IN REVERSE LEVEL'FIRST .. I LOOP
CT.S (CT.E+1) := J;
CT.S (CT.E+2) := '1';
CT.E := CT.E + 2;
END LOOP;
CT.S (CT.E+1) := '>';
CT.E := CT.E + 1;
END LOOP;
CT.S (CT.E+1) := '>';
CT.E := CT.E + 1;
IF CT.E /= IDENT_INT (T_LEN) THEN
FAILED ("WRONG ITERATIVE TRACE LENGTH");
ELSE COMMENT ("CORRECT FINAL CALL TRACE IS: " & CT.S);
IF T.S /= CT.S THEN
FAILED ("WRONG FINAL CALL TRACE");
END IF;
END IF;
END IF;
DECLARE
E : NATURAL := 0;
BEGIN
CG (1..2) := "<>";
E := E + 2;
FOR I IN LEVEL LOOP
CG (E+1) := LC_LEVEL'VAL (LEVEL'POS(I) -
LEVEL'POS(LEVEL'FIRST) +
LC_LEVEL'POS
(LC_LEVEL'FIRST));
CG (E+2) := '3';
CG (E+3) := I;
CG (E+4) := '3';
E := E + 4;
END LOOP;
COMMENT ("CORRECT GLOBAL SNAPSHOT IS: " & CG);
IF G /= CG THEN
FAILED ("WRONG GLOBAL SNAPSHOT");
END IF;
END;
END;
RESULT;
END C64005D0M;
| 34.063636 | 79 | 0.438884 |
2e88cd8561a5e3472137cc5037d4c1cd92db3279 | 18,699 | adb | Ada | 3-mid/impact/source/3d/collision/shapes/impact-d3-collision-quantized_bvh-optimized.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 20 | 2015-11-04T09:23:59.000Z | 2022-01-14T10:21:42.000Z | 3-mid/impact/source/3d/collision/shapes/impact-d3-collision-quantized_bvh-optimized.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 2 | 2015-11-04T17:05:56.000Z | 2015-12-08T03:16:13.000Z | 3-mid/impact/source/3d/collision/shapes/impact-d3-collision-quantized_bvh-optimized.adb | charlie5/lace | e9b7dc751d500ff3f559617a6fc3089ace9dc134 | [
"0BSD"
] | 1 | 2015-12-07T12:53:52.000Z | 2015-12-07T12:53:52.000Z |
package body impact.d3.collision.quantized_Bvh.optimized
is
procedure dummy is begin null; end dummy;
end impact.d3.collision.quantized_Bvh.optimized;
--
-- #include "impact.d3.collision.quantized_Bvh.optimized.h"
-- #include "impact.d3.striding_Mesh.h"
-- #include "LinearMath/btAabbUtil2.h"
-- #include "LinearMath/btIDebugDraw.h"
--
--
-- impact.d3.collision.quantized_Bvh.optimized::impact.d3.collision.quantized_Bvh.optimized()
-- {
-- }
--
-- impact.d3.collision.quantized_Bvh.optimized::~impact.d3.collision.quantized_Bvh.optimized()
-- {
-- }
--
--
-- void impact.d3.collision.quantized_Bvh.optimized::build(impact.d3.striding_Mesh* triangles, bool useQuantizedAabbCompression, const impact.d3.Vector& bvhAabbMin, const impact.d3.Vector& bvhAabbMax)
-- {
-- m_useQuantization = useQuantizedAabbCompression;
--
--
-- // NodeArray triangleNodes;
--
-- struct NodeTriangleCallback : public btInternalTriangleIndexCallback
-- {
--
-- NodeArray& m_triangleNodes;
--
-- NodeTriangleCallback& operator=(NodeTriangleCallback& other)
-- {
-- m_triangleNodes = other.m_triangleNodes;
-- return *this;
-- }
--
-- NodeTriangleCallback(NodeArray& triangleNodes)
-- :m_triangleNodes(triangleNodes)
-- {
-- }
--
-- virtual void internalProcessTriangleIndex(impact.d3.Vector* triangle,int partId,int triangleIndex)
-- {
-- impact.d3.collision.quantized_Bvh.optimizedNode node;
-- impact.d3.Vector aabbMin,aabbMax;
-- aabbMin.setValue(impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT));
-- aabbMax.setValue(impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT));
-- aabbMin.setMin(triangle[0]);
-- aabbMax.setMax(triangle[0]);
-- aabbMin.setMin(triangle[1]);
-- aabbMax.setMax(triangle[1]);
-- aabbMin.setMin(triangle[2]);
-- aabbMax.setMax(triangle[2]);
--
-- //with quantization?
-- node.m_aabbMinOrg = aabbMin;
-- node.m_aabbMaxOrg = aabbMax;
--
-- node.m_escapeIndex = -1;
--
-- //for child nodes
-- node.m_subPart = partId;
-- node.m_triangleIndex = triangleIndex;
-- m_triangleNodes.push_back(node);
-- }
-- };
-- struct QuantizedNodeTriangleCallback : public btInternalTriangleIndexCallback
-- {
-- QuantizedNodeArray& m_triangleNodes;
-- const impact.d3.collision.quantized_Bvh* m_optimizedTree; // for quantization
--
-- QuantizedNodeTriangleCallback& operator=(QuantizedNodeTriangleCallback& other)
-- {
-- m_triangleNodes = other.m_triangleNodes;
-- m_optimizedTree = other.m_optimizedTree;
-- return *this;
-- }
--
-- QuantizedNodeTriangleCallback(QuantizedNodeArray& triangleNodes,const impact.d3.collision.quantized_Bvh* tree)
-- :m_triangleNodes(triangleNodes),m_optimizedTree(tree)
-- {
-- }
--
-- virtual void internalProcessTriangleIndex(impact.d3.Vector* triangle,int partId,int triangleIndex)
-- {
-- // The partId and triangle index must fit in the same (positive) integer
-- btAssert(partId < (1<<MAX_NUM_PARTS_IN_BITS));
-- btAssert(triangleIndex < (1<<(31-MAX_NUM_PARTS_IN_BITS)));
-- //negative indices are reserved for escapeIndex
-- btAssert(triangleIndex>=0);
--
-- impact.d3.collision.quantized_BvhNode node;
-- impact.d3.Vector aabbMin,aabbMax;
-- aabbMin.setValue(impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT));
-- aabbMax.setValue(impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT));
-- aabbMin.setMin(triangle[0]);
-- aabbMax.setMax(triangle[0]);
-- aabbMin.setMin(triangle[1]);
-- aabbMax.setMax(triangle[1]);
-- aabbMin.setMin(triangle[2]);
-- aabbMax.setMax(triangle[2]);
--
-- //PCK: add these checks for zero dimensions of aabb
-- const impact.d3.Scalar MIN_AABB_DIMENSION = impact.d3.Scalar(0.002);
-- const impact.d3.Scalar MIN_AABB_HALF_DIMENSION = impact.d3.Scalar(0.001);
-- if (aabbMax.x() - aabbMin.x() < MIN_AABB_DIMENSION)
-- {
-- aabbMax.setX(aabbMax.x() + MIN_AABB_HALF_DIMENSION);
-- aabbMin.setX(aabbMin.x() - MIN_AABB_HALF_DIMENSION);
-- }
-- if (aabbMax.y() - aabbMin.y() < MIN_AABB_DIMENSION)
-- {
-- aabbMax.setY(aabbMax.y() + MIN_AABB_HALF_DIMENSION);
-- aabbMin.setY(aabbMin.y() - MIN_AABB_HALF_DIMENSION);
-- }
-- if (aabbMax.z() - aabbMin.z() < MIN_AABB_DIMENSION)
-- {
-- aabbMax.setZ(aabbMax.z() + MIN_AABB_HALF_DIMENSION);
-- aabbMin.setZ(aabbMin.z() - MIN_AABB_HALF_DIMENSION);
-- }
--
-- m_optimizedTree->quantize(&node.m_quantizedAabbMin[0],aabbMin,0);
-- m_optimizedTree->quantize(&node.m_quantizedAabbMax[0],aabbMax,1);
--
-- node.m_escapeIndexOrTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | triangleIndex;
--
-- m_triangleNodes.push_back(node);
-- }
-- };
--
--
--
-- int numLeafNodes = 0;
--
--
-- if (m_useQuantization)
-- {
--
-- //initialize quantization values
-- setQuantizationValues(bvhAabbMin,bvhAabbMax);
--
-- QuantizedNodeTriangleCallback callback(m_quantizedLeafNodes,this);
--
--
-- triangles->InternalProcessAllTriangles(&callback,m_bvhAabbMin,m_bvhAabbMax);
--
-- //now we have an array of leafnodes in m_leafNodes
-- numLeafNodes = m_quantizedLeafNodes.size();
--
--
-- m_quantizedContiguousNodes.resize(2*numLeafNodes);
--
--
-- } else
-- {
-- NodeTriangleCallback callback(m_leafNodes);
--
-- impact.d3.Vector aabbMin(impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT));
-- impact.d3.Vector aabbMax(impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT));
--
-- triangles->InternalProcessAllTriangles(&callback,aabbMin,aabbMax);
--
-- //now we have an array of leafnodes in m_leafNodes
-- numLeafNodes = m_leafNodes.size();
--
-- m_contiguousNodes.resize(2*numLeafNodes);
-- }
--
-- m_curNodeIndex = 0;
--
-- buildTree(0,numLeafNodes);
--
-- ///if the entire tree is small then subtree size, we need to create a header info for the tree
-- if(m_useQuantization && !m_SubtreeHeaders.size())
-- {
-- btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand();
-- subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[0]);
-- subtree.m_rootNodeIndex = 0;
-- subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex();
-- }
--
-- //PCK: update the copy of the size
-- m_subtreeHeaderCount = m_SubtreeHeaders.size();
--
-- //PCK: clear m_quantizedLeafNodes and m_leafNodes, they are temporary
-- m_quantizedLeafNodes.clear();
-- m_leafNodes.clear();
-- }
--
--
--
--
-- void impact.d3.collision.quantized_Bvh.optimized::refit(impact.d3.striding_Mesh* meshInterface,const impact.d3.Vector& aabbMin,const impact.d3.Vector& aabbMax)
-- {
-- if (m_useQuantization)
-- {
--
-- setQuantizationValues(aabbMin,aabbMax);
--
-- updateBvhNodes(meshInterface,0,m_curNodeIndex,0);
--
-- ///now update all subtree headers
--
-- int i;
-- for (i=0;i<m_SubtreeHeaders.size();i++)
-- {
-- btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i];
-- subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]);
-- }
--
-- } else
-- {
--
-- }
-- }
--
--
--
--
-- void impact.d3.collision.quantized_Bvh.optimized::refitPartial(impact.d3.striding_Mesh* meshInterface,const impact.d3.Vector& aabbMin,const impact.d3.Vector& aabbMax)
-- {
-- //incrementally initialize quantization values
-- btAssert(m_useQuantization);
--
-- btAssert(aabbMin.getX() > m_bvhAabbMin.getX());
-- btAssert(aabbMin.getY() > m_bvhAabbMin.getY());
-- btAssert(aabbMin.getZ() > m_bvhAabbMin.getZ());
--
-- btAssert(aabbMax.getX() < m_bvhAabbMax.getX());
-- btAssert(aabbMax.getY() < m_bvhAabbMax.getY());
-- btAssert(aabbMax.getZ() < m_bvhAabbMax.getZ());
--
-- ///we should update all quantization values, using updateBvhNodes(meshInterface);
-- ///but we only update chunks that overlap the given aabb
--
-- unsigned short quantizedQueryAabbMin[3];
-- unsigned short quantizedQueryAabbMax[3];
--
-- quantize(&quantizedQueryAabbMin[0],aabbMin,0);
-- quantize(&quantizedQueryAabbMax[0],aabbMax,1);
--
-- int i;
-- for (i=0;i<this->m_SubtreeHeaders.size();i++)
-- {
-- btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i];
--
-- //PCK: unsigned instead of bool
-- unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax);
-- if (overlap != 0)
-- {
-- updateBvhNodes(meshInterface,subtree.m_rootNodeIndex,subtree.m_rootNodeIndex+subtree.m_subtreeSize,i);
--
-- subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]);
-- }
-- }
--
-- }
--
-- void impact.d3.collision.quantized_Bvh.optimized::updateBvhNodes(impact.d3.striding_Mesh* meshInterface,int firstNode,int endNode,int index)
-- {
-- (void)index;
--
-- btAssert(m_useQuantization);
--
-- int curNodeSubPart=-1;
--
-- //get access info to trianglemesh data
-- const unsigned char *vertexbase = 0;
-- int numverts = 0;
-- PHY_ScalarType type = PHY_INTEGER;
-- int stride = 0;
-- const unsigned char *indexbase = 0;
-- int indexstride = 0;
-- int numfaces = 0;
-- PHY_ScalarType indicestype = PHY_INTEGER;
--
-- impact.d3.Vector triangleVerts[3];
-- impact.d3.Vector aabbMin,aabbMax;
-- const impact.d3.Vector& meshScaling = meshInterface->getScaling();
--
-- int i;
-- for (i=endNode-1;i>=firstNode;i--)
-- {
--
--
-- impact.d3.collision.quantized_BvhNode& curNode = m_quantizedContiguousNodes[i];
-- if (curNode.isLeafNode())
-- {
-- //recalc aabb from triangle data
-- int nodeSubPart = curNode.getPartId();
-- int nodeTriangleIndex = curNode.getTriangleIndex();
-- if (nodeSubPart != curNodeSubPart)
-- {
-- if (curNodeSubPart >= 0)
-- meshInterface->unLockReadOnlyVertexBase(curNodeSubPart);
-- meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,nodeSubPart);
--
-- curNodeSubPart = nodeSubPart;
-- btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT);
-- }
-- //triangles->getLockedReadOnlyVertexIndexBase(vertexBase,numVerts,
--
-- unsigned int* gfxbase = (unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
--
--
-- for (int j=2;j>=0;j--)
-- {
--
-- int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j];
-- if (type == PHY_FLOAT)
-- {
-- float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
-- triangleVerts[j] = impact.d3.Vector(
-- graphicsbase[0]*meshScaling.getX(),
-- graphicsbase[1]*meshScaling.getY(),
-- graphicsbase[2]*meshScaling.getZ());
-- }
-- else
-- {
-- double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
-- triangleVerts[j] = impact.d3.Vector( impact.d3.Scalar(graphicsbase[0]*meshScaling.getX()), impact.d3.Scalar(graphicsbase[1]*meshScaling.getY()), impact.d3.Scalar(graphicsbase[2]*meshScaling.getZ()));
-- }
-- }
--
--
--
-- aabbMin.setValue(impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT),impact.d3.Scalar(BT_LARGE_FLOAT));
-- aabbMax.setValue(impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT),impact.d3.Scalar(-BT_LARGE_FLOAT));
-- aabbMin.setMin(triangleVerts[0]);
-- aabbMax.setMax(triangleVerts[0]);
-- aabbMin.setMin(triangleVerts[1]);
-- aabbMax.setMax(triangleVerts[1]);
-- aabbMin.setMin(triangleVerts[2]);
-- aabbMax.setMax(triangleVerts[2]);
--
-- quantize(&curNode.m_quantizedAabbMin[0],aabbMin,0);
-- quantize(&curNode.m_quantizedAabbMax[0],aabbMax,1);
--
-- } else
-- {
-- //combine aabb from both children
--
-- impact.d3.collision.quantized_BvhNode* leftChildNode = &m_quantizedContiguousNodes[i+1];
--
-- impact.d3.collision.quantized_BvhNode* rightChildNode = leftChildNode->isLeafNode() ? &m_quantizedContiguousNodes[i+2] :
-- &m_quantizedContiguousNodes[i+1+leftChildNode->getEscapeIndex()];
--
--
-- {
-- for (int i=0;i<3;i++)
-- {
-- curNode.m_quantizedAabbMin[i] = leftChildNode->m_quantizedAabbMin[i];
-- if (curNode.m_quantizedAabbMin[i]>rightChildNode->m_quantizedAabbMin[i])
-- curNode.m_quantizedAabbMin[i]=rightChildNode->m_quantizedAabbMin[i];
--
-- curNode.m_quantizedAabbMax[i] = leftChildNode->m_quantizedAabbMax[i];
-- if (curNode.m_quantizedAabbMax[i] < rightChildNode->m_quantizedAabbMax[i])
-- curNode.m_quantizedAabbMax[i] = rightChildNode->m_quantizedAabbMax[i];
-- }
-- }
-- }
--
-- }
--
-- if (curNodeSubPart >= 0)
-- meshInterface->unLockReadOnlyVertexBase(curNodeSubPart);
--
--
-- }
--
-- ///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
-- impact.d3.collision.quantized_Bvh.optimized* impact.d3.collision.quantized_Bvh.optimized::deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian)
-- {
-- impact.d3.collision.quantized_Bvh* bvh = impact.d3.collision.quantized_Bvh::deSerializeInPlace(i_alignedDataBuffer,i_dataBufferSize,i_swapEndian);
--
-- //we don't add additional data so just do a static upcast
-- return static_cast<impact.d3.collision.quantized_Bvh.optimized*>(bvh);
-- }
| 47.701531 | 251 | 0.504305 |
2e4aabdcae82bc84a98f9de93042767b8c77f5a0 | 409 | ads | Ada | specs/ada/common/tkmrpc-response-ike-cc_check_ca-convert.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/common/tkmrpc-response-ike-cc_check_ca-convert.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | specs/ada/common/tkmrpc-response-ike-cc_check_ca-convert.ads | DrenfongWong/tkm-rpc | 075d22871cf81d497aac656c7f03a513278b641c | [
"BSD-3-Clause"
] | null | null | null | with Ada.Unchecked_Conversion;
package Tkmrpc.Response.Ike.Cc_Check_Ca.Convert is
function To_Response is new Ada.Unchecked_Conversion (
Source => Cc_Check_Ca.Response_Type,
Target => Response.Data_Type);
function From_Response is new Ada.Unchecked_Conversion (
Source => Response.Data_Type,
Target => Cc_Check_Ca.Response_Type);
end Tkmrpc.Response.Ike.Cc_Check_Ca.Convert;
| 29.214286 | 59 | 0.760391 |
adef23cbf3287c1e0eaa463d21c2e74da53e4e19 | 2,606 | ads | Ada | tools/scitools/conf/understand/ada/ada05/s-pack03.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada05/s-pack03.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada05/s-pack03.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 0 3 --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2005, 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. --
-- --
--
--
--
--
--
--
--
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- Handing of packed arrays with Component_Size = 3
package System.Pack_03 is
pragma Preelaborate;
Bits : constant := 3;
type Bits_03 is mod 2 ** Bits;
for Bits_03'Size use Bits;
function Get_03 (Arr : System.Address; N : Natural) return Bits_03;
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is extracted and returned.
procedure Set_03 (Arr : System.Address; N : Natural; E : Bits_03);
-- Arr is the address of the packed array, N is the zero-based
-- subscript. This element is set to the given value.
end System.Pack_03;
| 49.169811 | 78 | 0.438987 |
04a7c1a3e3a3e04ee3fb2701440d00d3d12e767e | 2,759 | ada | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5003a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5003a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5003a.ada | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- CD5003A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT A 'WITH' CLAUSE NAMING 'SYSTEM' NEED NOT BE GIVEN FOR
-- A PACKAGE BODY CONTAINING AN ADDRESS CLAUSE AS LONG AS A 'WITH'
-- CLAUSE IS GIVEN FOR THE SPECIFICATION.
-- HISTORY:
-- RJW 10/13/88 CREATED ORIGINAL TEST.
-- BCB 04/18/89 CHANGED EXTENSION TO '.ADA'. REMOVED APPLICABILITY
-- CRITERIA AND N/A ERROR MESSAGES.
-- PWN 11/30/94 ADDED A PROCEDURE TO KEEP PACKAGE BODIES LEGAL.
WITH SYSTEM;
PACKAGE CD5003A_PKG2 IS
PROCEDURE REQUIRE_BODY;
END CD5003A_PKG2;
WITH SPPRT13;
WITH REPORT; USE REPORT;
PRAGMA ELABORATE (SPPRT13);
PRAGMA ELABORATE (REPORT);
PACKAGE BODY CD5003A_PKG2 IS
TEST_VAR : INTEGER;
FOR TEST_VAR USE AT SPPRT13.VARIABLE_ADDRESS;
USE SYSTEM;
PROCEDURE REQUIRE_BODY IS
BEGIN
NULL;
END;
BEGIN
TEST ("CD5003A", "CHECK THAT A 'WITH' CLAUSE NAMING 'SYSTEM' " &
"NEED NOT BE GIVEN FOR A PACKAGE BODY " &
"CONTAINING AN ADDRESS CLAUSE AS LONG AS A " &
"'WITH' CLAUSE IS GIVEN FOR THE SPECIFICATION");
TEST_VAR := IDENT_INT (3);
IF TEST_VAR /= 3 THEN
FAILED ("INCORRECT VALUE FOR TEST_VAR");
END IF;
IF TEST_VAR'ADDRESS /= SPPRT13.VARIABLE_ADDRESS THEN
FAILED ("INCORRECT ADDRESS FOR TEST_VAR");
END IF;
END CD5003A_PKG2;
WITH REPORT; USE REPORT;
WITH CD5003A_PKG2; USE CD5003A_PKG2;
WITH SPPRT13;
PROCEDURE CD5003A IS
BEGIN
RESULT;
END CD5003A;
| 34.4875 | 79 | 0.662559 |
4b1784be2b073a67b255b826aceea342de027c5a | 993 | adb | Ada | problems/019/a019.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | problems/019/a019.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | problems/019/a019.adb | melwyncarlo/ProjectEuler | c4d30ed528ae6de82232f3d2044d608c6e8f1c37 | [
"MIT"
] | null | null | null | with Ada.Integer_Text_IO;
-- Copyright 2021 Melwyn Francis Carlo
procedure A019 is
use Ada.Integer_Text_IO;
-- The first element is a dummy element.
Month_Constant : constant array (Integer range 1 .. 13) of Integer :=
(0, 1, -1, 0, 0, 1, 1, 2, 3, 3, 4, 4, 5);
N : Integer := 0;
Day_Val : Integer;
begin
for I in 1901 .. 2000 loop
for J in 1 .. 12 loop
Day_Val := (((I - 1) * 365)
+ Integer (Float'Floor (Float (I - 1) / 400.0))
+ Integer (Float'Floor (Float (I - 1) / 4.0))
- Integer (Float'Floor (Float (I - 1) / 100.0))
+ ((J - 1) * 30)
+ Month_Constant (J)
+ 1);
if (I mod 4) = 0 and J > 2 then
Day_Val := Day_Val + 1;
end if;
Day_Val := Day_Val mod 7;
if Day_Val = 0 then
N := N + 1;
end if;
end loop;
end loop;
Put (N, Width => 0);
end A019;
| 20.6875 | 72 | 0.467271 |
0408741b44f10d7e7be09be90fd115f05f45cbee | 95,004 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cobove.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cobove.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cobove.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . B O U N D E D _ V E C T O R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2020, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Containers.Generic_Array_Sort;
with System; use type System.Address;
with System.Put_Images;
package body Ada.Containers.Bounded_Vectors is
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------
-- Local Subprograms --
-----------------------
function To_Array_Index (Index : Index_Type'Base) return Count_Type'Base;
---------
-- "&" --
---------
function "&" (Left, Right : Vector) return Vector is
LN : constant Count_Type := Length (Left);
RN : constant Count_Type := Length (Right);
N : Count_Type'Base; -- length of result
J : Count_Type'Base; -- for computing intermediate index values
Last : Index_Type'Base; -- Last index of result
begin
-- We decide that the capacity of the result is the sum of the lengths
-- of the vector parameters. We could decide to make it larger, but we
-- have no basis for knowing how much larger, so we just allocate the
-- minimum amount of storage.
-- Here we handle the easy cases first, when one of the vector
-- parameters is empty. (We say "easy" because there's nothing to
-- compute, that can potentially overflow.)
if LN = 0 then
if RN = 0 then
return Empty_Vector;
end if;
return Vector'(Capacity => RN,
Elements => Right.Elements (1 .. RN),
Last => Right.Last,
others => <>);
end if;
if RN = 0 then
return Vector'(Capacity => LN,
Elements => Left.Elements (1 .. LN),
Last => Left.Last,
others => <>);
end if;
-- Neither of the vector parameters is empty, so must compute the length
-- of the result vector and its last index. (This is the harder case,
-- because our computations must avoid overflow.)
-- There are two constraints we need to satisfy. The first constraint is
-- that a container cannot have more than Count_Type'Last elements, so
-- we must check the sum of the combined lengths. Note that we cannot
-- simply add the lengths, because of the possibility of overflow.
if Checks and then LN > Count_Type'Last - RN then
raise Constraint_Error with "new length is out of range";
end if;
-- It is now safe to compute the length of the new vector, without fear
-- of overflow.
N := LN + RN;
-- The second constraint is that the new Last index value cannot
-- exceed Index_Type'Last. We use the wider of Index_Type'Base and
-- Count_Type'Base as the type for intermediate values.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
-- We perform a two-part test. First we determine whether the
-- computed Last value lies in the base range of the type, and then
-- determine whether it lies in the range of the index (sub)type.
-- Last must satisfy this relation:
-- First + Length - 1 <= Last
-- We regroup terms:
-- First - 1 <= Last - Length
-- Which can rewrite as:
-- No_Index <= Last - Length
if Checks and then
Index_Type'Base'Last - Index_Type'Base (N) < No_Index
then
raise Constraint_Error with "new length is out of range";
end if;
-- We now know that the computed value of Last is within the base
-- range of the type, so it is safe to compute its value:
Last := No_Index + Index_Type'Base (N);
-- Finally we test whether the value is within the range of the
-- generic actual index subtype:
if Checks and then Last > Index_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
elsif Index_Type'First <= 0 then
-- Here we can compute Last directly, in the normal way. We know that
-- No_Index is less than 0, so there is no danger of overflow when
-- adding the (positive) value of length.
J := Count_Type'Base (No_Index) + N; -- Last
if Checks and then J > Count_Type'Base (Index_Type'Last) then
raise Constraint_Error with "new length is out of range";
end if;
-- We know that the computed value (having type Count_Type) of Last
-- is within the range of the generic actual index subtype, so it is
-- safe to convert to Index_Type:
Last := Index_Type'Base (J);
else
-- Here Index_Type'First (and Index_Type'Last) is positive, so we
-- must test the length indirectly (by working backwards from the
-- largest possible value of Last), in order to prevent overflow.
J := Count_Type'Base (Index_Type'Last) - N; -- No_Index
if Checks and then J < Count_Type'Base (No_Index) then
raise Constraint_Error with "new length is out of range";
end if;
-- We have determined that the result length would not create a Last
-- index value outside of the range of Index_Type, so we can now
-- safely compute its value.
Last := Index_Type'Base (Count_Type'Base (No_Index) + N);
end if;
declare
LE : Elements_Array renames Left.Elements (1 .. LN);
RE : Elements_Array renames Right.Elements (1 .. RN);
begin
return Vector'(Capacity => N,
Elements => LE & RE,
Last => Last,
others => <>);
end;
end "&";
function "&" (Left : Vector; Right : Element_Type) return Vector is
LN : constant Count_Type := Length (Left);
begin
-- We decide that the capacity of the result is the sum of the lengths
-- of the parameters. We could decide to make it larger, but we have no
-- basis for knowing how much larger, so we just allocate the minimum
-- amount of storage.
-- We must compute the length of the result vector and its last index,
-- but in such a way that overflow is avoided. We must satisfy two
-- constraints: the new length cannot exceed Count_Type'Last, and the
-- new Last index cannot exceed Index_Type'Last.
if Checks and then LN = Count_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
if Checks and then Left.Last >= Index_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
return Vector'(Capacity => LN + 1,
Elements => Left.Elements (1 .. LN) & Right,
Last => Left.Last + 1,
others => <>);
end "&";
function "&" (Left : Element_Type; Right : Vector) return Vector is
RN : constant Count_Type := Length (Right);
begin
-- We decide that the capacity of the result is the sum of the lengths
-- of the parameters. We could decide to make it larger, but we have no
-- basis for knowing how much larger, so we just allocate the minimum
-- amount of storage.
-- We compute the length of the result vector and its last index, but in
-- such a way that overflow is avoided. We must satisfy two constraints:
-- the new length cannot exceed Count_Type'Last, and the new Last index
-- cannot exceed Index_Type'Last.
if Checks and then RN = Count_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
if Checks and then Right.Last >= Index_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
return Vector'(Capacity => 1 + RN,
Elements => Left & Right.Elements (1 .. RN),
Last => Right.Last + 1,
others => <>);
end "&";
function "&" (Left, Right : Element_Type) return Vector is
begin
-- We decide that the capacity of the result is the sum of the lengths
-- of the parameters. We could decide to make it larger, but we have no
-- basis for knowing how much larger, so we just allocate the minimum
-- amount of storage.
-- We must compute the length of the result vector and its last index,
-- but in such a way that overflow is avoided. We must satisfy two
-- constraints: the new length cannot exceed Count_Type'Last (here, we
-- know that that condition is satisfied), and the new Last index cannot
-- exceed Index_Type'Last.
if Checks and then Index_Type'First >= Index_Type'Last then
raise Constraint_Error with "new length is out of range";
end if;
return Vector'(Capacity => 2,
Elements => (Left, Right),
Last => Index_Type'First + 1,
others => <>);
end "&";
---------
-- "=" --
---------
overriding function "=" (Left, Right : Vector) return Boolean is
begin
if Left.Last /= Right.Last then
return False;
end if;
if Left.Length = 0 then
return True;
end if;
declare
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
Lock_Left : With_Lock (Left.TC'Unrestricted_Access);
Lock_Right : With_Lock (Right.TC'Unrestricted_Access);
begin
for J in Count_Type range 1 .. Left.Length loop
if Left.Elements (J) /= Right.Elements (J) then
return False;
end if;
end loop;
end;
return True;
end "=";
------------
-- Assign --
------------
procedure Assign (Target : in out Vector; Source : Vector) is
begin
if Target'Address = Source'Address then
return;
end if;
if Checks and then Target.Capacity < Source.Length then
raise Capacity_Error -- ???
with "Target capacity is less than Source length";
end if;
Target.Clear;
Target.Elements (1 .. Source.Length) :=
Source.Elements (1 .. Source.Length);
Target.Last := Source.Last;
end Assign;
------------
-- Append --
------------
procedure Append (Container : in out Vector; New_Item : Vector) is
begin
if New_Item.Is_Empty then
return;
end if;
if Checks and then Container.Last >= Index_Type'Last then
raise Constraint_Error with "vector is already at its maximum length";
end if;
Container.Insert (Container.Last + 1, New_Item);
end Append;
procedure Append
(Container : in out Vector;
New_Item : Element_Type;
Count : Count_Type := 1)
is
begin
if Count = 0 then
return;
end if;
if Checks and then Container.Last >= Index_Type'Last then
raise Constraint_Error with "vector is already at its maximum length";
end if;
Container.Insert (Container.Last + 1, New_Item, Count);
end Append;
----------------
-- Append_One --
----------------
procedure Append_One (Container : in out Vector;
New_Item : Element_Type)
is
begin
Insert (Container, Last_Index (Container) + 1, New_Item, 1);
end Append_One;
--------------
-- Capacity --
--------------
function Capacity (Container : Vector) return Count_Type is
begin
return Container.Elements'Length;
end Capacity;
-----------
-- Clear --
-----------
procedure Clear (Container : in out Vector) is
begin
TC_Check (Container.TC);
Container.Last := No_Index;
end Clear;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Vector;
Position : Cursor) return Constant_Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Checks and then Position.Index > Position.Container.Last then
raise Constraint_Error with "Position cursor is out of range";
end if;
declare
A : Elements_Array renames Container.Elements;
J : constant Count_Type := To_Array_Index (Position.Index);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => A (J)'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Constant_Reference;
function Constant_Reference
(Container : aliased Vector;
Index : Index_Type) return Constant_Reference_Type
is
begin
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
declare
A : Elements_Array renames Container.Elements;
J : constant Count_Type := To_Array_Index (Index);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => A (J)'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Constant_Reference;
--------------
-- Contains --
--------------
function Contains
(Container : Vector;
Item : Element_Type) return Boolean
is
begin
return Find_Index (Container, Item) /= No_Index;
end Contains;
----------
-- Copy --
----------
function Copy
(Source : Vector;
Capacity : Count_Type := 0) return Vector
is
C : constant Count_Type :=
(if Capacity = 0 then Source.Length
else Capacity);
begin
if Checks and then C < Source.Length then
raise Capacity_Error with "Capacity too small";
end if;
return Target : Vector (C) do
Target.Elements (1 .. Source.Length) :=
Source.Elements (1 .. Source.Length);
Target.Last := Source.Last;
end return;
end Copy;
------------
-- Delete --
------------
procedure Delete
(Container : in out Vector;
Index : Extended_Index;
Count : Count_Type := 1)
is
Old_Last : constant Index_Type'Base := Container.Last;
Old_Len : constant Count_Type := Container.Length;
New_Last : Index_Type'Base;
Count2 : Count_Type'Base; -- count of items from Index to Old_Last
Off : Count_Type'Base; -- Index expressed as offset from IT'First
begin
TC_Check (Container.TC);
-- Delete removes items from the vector, the number of which is the
-- minimum of the specified Count and the items (if any) that exist from
-- Index to Container.Last. There are no constraints on the specified
-- value of Count (it can be larger than what's available at this
-- position in the vector, for example), but there are constraints on
-- the allowed values of the Index.
-- As a precondition on the generic actual Index_Type, the base type
-- must include Index_Type'Pred (Index_Type'First); this is the value
-- that Container.Last assumes when the vector is empty. However, we do
-- not allow that as the value for Index when specifying which items
-- should be deleted, so we must manually check. (That the user is
-- allowed to specify the value at all here is a consequence of the
-- declaration of the Extended_Index subtype, which includes the values
-- in the base range that immediately precede and immediately follow the
-- values in the Index_Type.)
if Checks and then Index < Index_Type'First then
raise Constraint_Error with "Index is out of range (too small)";
end if;
-- We do allow a value greater than Container.Last to be specified as
-- the Index, but only if it's immediately greater. This allows the
-- corner case of deleting no items from the back end of the vector to
-- be treated as a no-op. (It is assumed that specifying an index value
-- greater than Last + 1 indicates some deeper flaw in the caller's
-- algorithm, so that case is treated as a proper error.)
if Index > Old_Last then
if Checks and then Index > Old_Last + 1 then
raise Constraint_Error with "Index is out of range (too large)";
end if;
return;
end if;
-- Here and elsewhere we treat deleting 0 items from the container as a
-- no-op, even when the container is busy, so we simply return.
if Count = 0 then
return;
end if;
-- The tampering bits exist to prevent an item from being deleted (or
-- otherwise harmfully manipulated) while it is being visited. Query,
-- Update, and Iterate increment the busy count on entry, and decrement
-- the count on exit. Delete checks the count to determine whether it is
-- being called while the associated callback procedure is executing.
-- We first calculate what's available for deletion starting at
-- Index. Here and elsewhere we use the wider of Index_Type'Base and
-- Count_Type'Base as the type for intermediate values. (See function
-- Length for more information.)
if Count_Type'Base'Last >= Index_Type'Pos (Index_Type'Base'Last) then
Count2 := Count_Type'Base (Old_Last) - Count_Type'Base (Index) + 1;
else
Count2 := Count_Type'Base (Old_Last - Index + 1);
end if;
-- If more elements are requested (Count) for deletion than are
-- available (Count2) for deletion beginning at Index, then everything
-- from Index is deleted. There are no elements to slide down, and so
-- all we need to do is set the value of Container.Last.
if Count >= Count2 then
Container.Last := Index - 1;
return;
end if;
-- There are some elements aren't being deleted (the requested count was
-- less than the available count), so we must slide them down to
-- Index. We first calculate the index values of the respective array
-- slices, using the wider of Index_Type'Base and Count_Type'Base as the
-- type for intermediate calculations.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
Off := Count_Type'Base (Index - Index_Type'First);
New_Last := Old_Last - Index_Type'Base (Count);
else
Off := Count_Type'Base (Index) - Count_Type'Base (Index_Type'First);
New_Last := Index_Type'Base (Count_Type'Base (Old_Last) - Count);
end if;
-- The array index values for each slice have already been determined,
-- so we just slide down to Index the elements that weren't deleted.
declare
EA : Elements_Array renames Container.Elements;
Idx : constant Count_Type := EA'First + Off;
begin
EA (Idx .. Old_Len - Count) := EA (Idx + Count .. Old_Len);
Container.Last := New_Last;
end;
end Delete;
procedure Delete
(Container : in out Vector;
Position : in out Cursor;
Count : Count_Type := 1)
is
pragma Warnings (Off, Position);
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Checks and then Position.Index > Container.Last then
raise Program_Error with "Position index is out of range";
end if;
Delete (Container, Position.Index, Count);
Position := No_Element;
end Delete;
------------------
-- Delete_First --
------------------
procedure Delete_First
(Container : in out Vector;
Count : Count_Type := 1)
is
begin
if Count = 0 then
return;
elsif Count >= Length (Container) then
Clear (Container);
return;
else
Delete (Container, Index_Type'First, Count);
end if;
end Delete_First;
-----------------
-- Delete_Last --
-----------------
procedure Delete_Last
(Container : in out Vector;
Count : Count_Type := 1)
is
begin
-- The tampering bits exist to prevent an item from being deleted (or
-- otherwise harmfully manipulated) while it is being visited. Query,
-- Update, and Iterate increment the busy count on entry, and decrement
-- the count on exit. Delete_Last checks the count to determine whether
-- it is being called while the associated callback procedure is
-- executing.
TC_Check (Container.TC);
if Count = 0 then
return;
end if;
-- There is no restriction on how large Count can be when deleting
-- items. If it is equal or greater than the current length, then this
-- is equivalent to clearing the vector. (In particular, there's no need
-- for us to actually calculate the new value for Last.)
-- If the requested count is less than the current length, then we must
-- calculate the new value for Last. For the type we use the widest of
-- Index_Type'Base and Count_Type'Base for the intermediate values of
-- our calculation. (See the comments in Length for more information.)
if Count >= Container.Length then
Container.Last := No_Index;
elsif Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
Container.Last := Container.Last - Index_Type'Base (Count);
else
Container.Last :=
Index_Type'Base (Count_Type'Base (Container.Last) - Count);
end if;
end Delete_Last;
-------------
-- Element --
-------------
function Element
(Container : Vector;
Index : Index_Type) return Element_Type
is
begin
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
else
return Container.Elements (To_Array_Index (Index));
end if;
end Element;
function Element (Position : Cursor) return Element_Type is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
else
return Position.Container.Element (Position.Index);
end if;
end Element;
-----------
-- Empty --
-----------
function Empty (Capacity : Count_Type := 10) return Vector is
begin
return Result : Vector (Capacity) do
Reserve_Capacity (Result, Capacity);
end return;
end Empty;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Iterator) is
begin
Unbusy (Object.Container.TC);
end Finalize;
----------
-- Find --
----------
function Find
(Container : Vector;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
is
begin
if Position.Container /= null then
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Checks and then Position.Index > Container.Last then
raise Program_Error with "Position index is out of range";
end if;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock : With_Lock (Container.TC'Unrestricted_Access);
begin
for J in Position.Index .. Container.Last loop
if Container.Elements (To_Array_Index (J)) = Item then
return Cursor'(Container'Unrestricted_Access, J);
end if;
end loop;
return No_Element;
end;
end Find;
----------------
-- Find_Index --
----------------
function Find_Index
(Container : Vector;
Item : Element_Type;
Index : Index_Type := Index_Type'First) return Extended_Index
is
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
Lock : With_Lock (Container.TC'Unrestricted_Access);
begin
for Indx in Index .. Container.Last loop
if Container.Elements (To_Array_Index (Indx)) = Item then
return Indx;
end if;
end loop;
return No_Index;
end Find_Index;
-----------
-- First --
-----------
function First (Container : Vector) return Cursor is
begin
if Is_Empty (Container) then
return No_Element;
else
return (Container'Unrestricted_Access, Index_Type'First);
end if;
end First;
function First (Object : Iterator) return Cursor is
begin
-- The value of the iterator object's Index component influences the
-- behavior of the First (and Last) selector function.
-- When the Index component is No_Index, this means the iterator
-- object was constructed without a start expression, in which case the
-- (forward) iteration starts from the (logical) beginning of the entire
-- sequence of items (corresponding to Container.First, for a forward
-- iterator).
-- Otherwise, this is iteration over a partial sequence of items.
-- When the Index component isn't No_Index, the iterator object was
-- constructed with a start expression, that specifies the position
-- from which the (forward) partial iteration begins.
if Object.Index = No_Index then
return First (Object.Container.all);
else
return Cursor'(Object.Container, Object.Index);
end if;
end First;
-------------------
-- First_Element --
-------------------
function First_Element (Container : Vector) return Element_Type is
begin
if Checks and then Container.Last = No_Index then
raise Constraint_Error with "Container is empty";
end if;
return Container.Elements (To_Array_Index (Index_Type'First));
end First_Element;
-----------------
-- First_Index --
-----------------
function First_Index (Container : Vector) return Index_Type is
pragma Unreferenced (Container);
begin
return Index_Type'First;
end First_Index;
-----------------
-- New_Vector --
-----------------
function New_Vector (First, Last : Index_Type) return Vector
is
begin
return (To_Vector (Count_Type (Last - First + 1)));
end New_Vector;
---------------------
-- Generic_Sorting --
---------------------
package body Generic_Sorting is
---------------
-- Is_Sorted --
---------------
function Is_Sorted (Container : Vector) return Boolean is
begin
if Container.Last <= Index_Type'First then
return True;
end if;
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock : With_Lock (Container.TC'Unrestricted_Access);
EA : Elements_Array renames Container.Elements;
begin
for J in 1 .. Container.Length - 1 loop
if EA (J + 1) < EA (J) then
return False;
end if;
end loop;
return True;
end;
end Is_Sorted;
-----------
-- Merge --
-----------
procedure Merge (Target, Source : in out Vector) is
I, J : Count_Type;
begin
-- The semantics of Merge changed slightly per AI05-0021. It was
-- originally the case that if Target and Source denoted the same
-- container object, then the GNAT implementation of Merge did
-- nothing. However, it was argued that RM05 did not precisely
-- specify the semantics for this corner case. The decision of the
-- ARG was that if Target and Source denote the same non-empty
-- container object, then Program_Error is raised.
if Source.Is_Empty then
return;
end if;
TC_Check (Source.TC);
if Checks and then Target'Address = Source'Address then
raise Program_Error with
"Target and Source denote same non-empty container";
end if;
if Target.Is_Empty then
Move (Target => Target, Source => Source);
return;
end if;
I := Target.Length;
Target.Set_Length (I + Source.Length);
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
TA : Elements_Array renames Target.Elements;
SA : Elements_Array renames Source.Elements;
Lock_Target : With_Lock (Target.TC'Unchecked_Access);
Lock_Source : With_Lock (Source.TC'Unchecked_Access);
begin
J := Target.Length;
while not Source.Is_Empty loop
pragma Assert (Source.Length <= 1
or else not (SA (Source.Length) < SA (Source.Length - 1)));
if I = 0 then
TA (1 .. J) := SA (1 .. Source.Length);
Source.Last := No_Index;
exit;
end if;
pragma Assert (I <= 1
or else not (TA (I) < TA (I - 1)));
if SA (Source.Length) < TA (I) then
TA (J) := TA (I);
I := I - 1;
else
TA (J) := SA (Source.Length);
Source.Last := Source.Last - 1;
end if;
J := J - 1;
end loop;
end;
end Merge;
----------
-- Sort --
----------
procedure Sort (Container : in out Vector) is
procedure Sort is
new Generic_Array_Sort
(Index_Type => Count_Type,
Element_Type => Element_Type,
Array_Type => Elements_Array,
"<" => "<");
begin
if Container.Last <= Index_Type'First then
return;
end if;
-- The exception behavior for the vector container must match that
-- for the list container, so we check for cursor tampering here
-- (which will catch more things) instead of for element tampering
-- (which will catch fewer things). It's true that the elements of
-- this vector container could be safely moved around while (say) an
-- iteration is taking place (iteration only increments the busy
-- counter), and so technically all we would need here is a test for
-- element tampering (indicated by the lock counter), that's simply
-- an artifact of our array-based implementation. Logically Sort
-- requires a check for cursor tampering.
TC_Check (Container.TC);
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock : With_Lock (Container.TC'Unchecked_Access);
begin
Sort (Container.Elements (1 .. Container.Length));
end;
end Sort;
end Generic_Sorting;
------------------------
-- Get_Element_Access --
------------------------
function Get_Element_Access
(Position : Cursor) return not null Element_Access is
begin
return Position.Container.Elements
(To_Array_Index (Position.Index))'Access;
end Get_Element_Access;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
if Position.Container = null then
return False;
end if;
return Position.Index <= Position.Container.Last;
end Has_Element;
------------
-- Insert --
------------
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
New_Item : Element_Type;
Count : Count_Type := 1)
is
EA : Elements_Array renames Container.Elements;
Old_Length : constant Count_Type := Container.Length;
Max_Length : Count_Type'Base; -- determined from range of Index_Type
New_Length : Count_Type'Base; -- sum of current length and Count
Index : Index_Type'Base; -- scratch for intermediate values
J : Count_Type'Base; -- scratch
begin
-- The tampering bits exist to prevent an item from being harmfully
-- manipulated while it is being visited. Query, Update, and Iterate
-- increment the busy count on entry, and decrement the count on
-- exit. Insert checks the count to determine whether it is being called
-- while the associated callback procedure is executing.
TC_Check (Container.TC);
-- As a precondition on the generic actual Index_Type, the base type
-- must include Index_Type'Pred (Index_Type'First); this is the value
-- that Container.Last assumes when the vector is empty. However, we do
-- not allow that as the value for Index when specifying where the new
-- items should be inserted, so we must manually check. (That the user
-- is allowed to specify the value at all here is a consequence of the
-- declaration of the Extended_Index subtype, which includes the values
-- in the base range that immediately precede and immediately follow the
-- values in the Index_Type.)
if Checks and then Before < Index_Type'First then
raise Constraint_Error with
"Before index is out of range (too small)";
end if;
-- We do allow a value greater than Container.Last to be specified as
-- the Index, but only if it's immediately greater. This allows for the
-- case of appending items to the back end of the vector. (It is assumed
-- that specifying an index value greater than Last + 1 indicates some
-- deeper flaw in the caller's algorithm, so that case is treated as a
-- proper error.)
if Checks and then Before > Container.Last
and then Before > Container.Last + 1
then
raise Constraint_Error with
"Before index is out of range (too large)";
end if;
-- We treat inserting 0 items into the container as a no-op, even when
-- the container is busy, so we simply return.
if Count = 0 then
return;
end if;
-- There are two constraints we need to satisfy. The first constraint is
-- that a container cannot have more than Count_Type'Last elements, so
-- we must check the sum of the current length and the insertion
-- count. Note that we cannot simply add these values, because of the
-- possibility of overflow.
if Checks and then Old_Length > Count_Type'Last - Count then
raise Constraint_Error with "Count is out of range";
end if;
-- It is now safe compute the length of the new vector, without fear of
-- overflow.
New_Length := Old_Length + Count;
-- The second constraint is that the new Last index value cannot exceed
-- Index_Type'Last. In each branch below, we calculate the maximum
-- length (computed from the range of values in Index_Type), and then
-- compare the new length to the maximum length. If the new length is
-- acceptable, then we compute the new last index from that.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
-- We have to handle the case when there might be more values in the
-- range of Index_Type than in the range of Count_Type.
if Index_Type'First <= 0 then
-- We know that No_Index (the same as Index_Type'First - 1) is
-- less than 0, so it is safe to compute the following sum without
-- fear of overflow.
Index := No_Index + Index_Type'Base (Count_Type'Last);
if Index <= Index_Type'Last then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the
-- maximum number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than in Count_Type,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length := Count_Type'Base (Index_Type'Last - No_Index);
end if;
else
-- No_Index is equal or greater than 0, so we can safely compute
-- the difference without fear of overflow (which we would have to
-- worry about if No_Index were less than 0, but that case is
-- handled above).
if Index_Type'Last - No_Index >=
Count_Type'Pos (Count_Type'Last)
then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the
-- maximum number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than in Count_Type,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length := Count_Type'Base (Index_Type'Last - No_Index);
end if;
end if;
elsif Index_Type'First <= 0 then
-- We know that No_Index (the same as Index_Type'First - 1) is less
-- than 0, so it is safe to compute the following sum without fear of
-- overflow.
J := Count_Type'Base (No_Index) + Count_Type'Last;
if J <= Count_Type'Base (Index_Type'Last) then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the maximum
-- number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than Count_Type does,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length :=
Count_Type'Base (Index_Type'Last) - Count_Type'Base (No_Index);
end if;
else
-- No_Index is equal or greater than 0, so we can safely compute the
-- difference without fear of overflow (which we would have to worry
-- about if No_Index were less than 0, but that case is handled
-- above).
Max_Length :=
Count_Type'Base (Index_Type'Last) - Count_Type'Base (No_Index);
end if;
-- We have just computed the maximum length (number of items). We must
-- now compare the requested length to the maximum length, as we do not
-- allow a vector expand beyond the maximum (because that would create
-- an internal array with a last index value greater than
-- Index_Type'Last, with no way to index those elements).
if Checks and then New_Length > Max_Length then
raise Constraint_Error with "Count is out of range";
end if;
if Checks and then New_Length > Container.Capacity then
raise Capacity_Error with "New length is larger than capacity";
end if;
J := To_Array_Index (Before);
if Before > Container.Last then
-- The new items are being appended to the vector, so no
-- sliding of existing elements is required.
EA (J .. New_Length) := (others => New_Item);
else
-- The new items are being inserted before some existing
-- elements, so we must slide the existing elements up to their
-- new home.
EA (J + Count .. New_Length) := EA (J .. Old_Length);
EA (J .. J + Count - 1) := (others => New_Item);
end if;
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
Container.Last := No_Index + Index_Type'Base (New_Length);
else
Container.Last :=
Index_Type'Base (Count_Type'Base (No_Index) + New_Length);
end if;
end Insert;
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
New_Item : Vector)
is
N : constant Count_Type := Length (New_Item);
B : Count_Type; -- index Before converted to Count_Type
begin
-- Use Insert_Space to create the "hole" (the destination slice) into
-- which we copy the source items.
Insert_Space (Container, Before, Count => N);
if N = 0 then
-- There's nothing else to do here (vetting of parameters was
-- performed already in Insert_Space), so we simply return.
return;
end if;
B := To_Array_Index (Before);
if Container'Address /= New_Item'Address then
-- This is the simple case. New_Item denotes an object different
-- from Container, so there's nothing special we need to do to copy
-- the source items to their destination, because all of the source
-- items are contiguous.
Container.Elements (B .. B + N - 1) := New_Item.Elements (1 .. N);
return;
end if;
-- We refer to array index value Before + N - 1 as J. This is the last
-- index value of the destination slice.
-- New_Item denotes the same object as Container, so an insertion has
-- potentially split the source items. The destination is always the
-- range [Before, J], but the source is [Index_Type'First, Before) and
-- (J, Container.Last]. We perform the copy in two steps, using each of
-- the two slices of the source items.
declare
subtype Src_Index_Subtype is Count_Type'Base range 1 .. B - 1;
Src : Elements_Array renames Container.Elements (Src_Index_Subtype);
begin
-- We first copy the source items that precede the space we
-- inserted. (If Before equals Index_Type'First, then this first
-- source slice will be empty, which is harmless.)
Container.Elements (B .. B + Src'Length - 1) := Src;
end;
declare
subtype Src_Index_Subtype is Count_Type'Base range
B + N .. Container.Length;
Src : Elements_Array renames Container.Elements (Src_Index_Subtype);
begin
-- We next copy the source items that follow the space we inserted.
Container.Elements (B + N - Src'Length .. B + N - 1) := Src;
end;
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Vector)
is
Index : Index_Type'Base;
begin
if Checks and then Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Is_Empty (New_Item) then
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Checks and then Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Vector;
Position : out Cursor)
is
Index : Index_Type'Base;
begin
if Checks and then Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Is_Empty (New_Item) then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Checks and then Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Element_Type;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Checks and then Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Checks and then Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item, Count);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
New_Item : Element_Type;
Position : out Cursor;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Checks and then Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Checks and then Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert (Container, Index, New_Item, Count);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Extended_Index;
Count : Count_Type := 1)
is
New_Item : Element_Type; -- Default-initialized value
pragma Warnings (Off, New_Item);
begin
Insert (Container, Before, New_Item, Count);
end Insert;
procedure Insert
(Container : in out Vector;
Before : Cursor;
Position : out Cursor;
Count : Count_Type := 1)
is
New_Item : Element_Type; -- Default-initialized value
pragma Warnings (Off, New_Item);
begin
Insert (Container, Before, New_Item, Position, Count);
end Insert;
------------------
-- Insert_Space --
------------------
procedure Insert_Space
(Container : in out Vector;
Before : Extended_Index;
Count : Count_Type := 1)
is
EA : Elements_Array renames Container.Elements;
Old_Length : constant Count_Type := Container.Length;
Max_Length : Count_Type'Base; -- determined from range of Index_Type
New_Length : Count_Type'Base; -- sum of current length and Count
Index : Index_Type'Base; -- scratch for intermediate values
J : Count_Type'Base; -- scratch
begin
-- The tampering bits exist to prevent an item from being harmfully
-- manipulated while it is being visited. Query, Update, and Iterate
-- increment the busy count on entry, and decrement the count on
-- exit. Insert checks the count to determine whether it is being called
-- while the associated callback procedure is executing.
TC_Check (Container.TC);
-- As a precondition on the generic actual Index_Type, the base type
-- must include Index_Type'Pred (Index_Type'First); this is the value
-- that Container.Last assumes when the vector is empty. However, we do
-- not allow that as the value for Index when specifying where the new
-- items should be inserted, so we must manually check. (That the user
-- is allowed to specify the value at all here is a consequence of the
-- declaration of the Extended_Index subtype, which includes the values
-- in the base range that immediately precede and immediately follow the
-- values in the Index_Type.)
if Checks and then Before < Index_Type'First then
raise Constraint_Error with
"Before index is out of range (too small)";
end if;
-- We do allow a value greater than Container.Last to be specified as
-- the Index, but only if it's immediately greater. This allows for the
-- case of appending items to the back end of the vector. (It is assumed
-- that specifying an index value greater than Last + 1 indicates some
-- deeper flaw in the caller's algorithm, so that case is treated as a
-- proper error.)
if Checks and then Before > Container.Last
and then Before > Container.Last + 1
then
raise Constraint_Error with
"Before index is out of range (too large)";
end if;
-- We treat inserting 0 items into the container as a no-op, even when
-- the container is busy, so we simply return.
if Count = 0 then
return;
end if;
-- There are two constraints we need to satisfy. The first constraint is
-- that a container cannot have more than Count_Type'Last elements, so
-- we must check the sum of the current length and the insertion count.
-- Note that we cannot simply add these values, because of the
-- possibility of overflow.
if Checks and then Old_Length > Count_Type'Last - Count then
raise Constraint_Error with "Count is out of range";
end if;
-- It is now safe compute the length of the new vector, without fear of
-- overflow.
New_Length := Old_Length + Count;
-- The second constraint is that the new Last index value cannot exceed
-- Index_Type'Last. In each branch below, we calculate the maximum
-- length (computed from the range of values in Index_Type), and then
-- compare the new length to the maximum length. If the new length is
-- acceptable, then we compute the new last index from that.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
-- We have to handle the case when there might be more values in the
-- range of Index_Type than in the range of Count_Type.
if Index_Type'First <= 0 then
-- We know that No_Index (the same as Index_Type'First - 1) is
-- less than 0, so it is safe to compute the following sum without
-- fear of overflow.
Index := No_Index + Index_Type'Base (Count_Type'Last);
if Index <= Index_Type'Last then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the
-- maximum number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than in Count_Type,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length := Count_Type'Base (Index_Type'Last - No_Index);
end if;
else
-- No_Index is equal or greater than 0, so we can safely compute
-- the difference without fear of overflow (which we would have to
-- worry about if No_Index were less than 0, but that case is
-- handled above).
if Index_Type'Last - No_Index >=
Count_Type'Pos (Count_Type'Last)
then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the
-- maximum number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than in Count_Type,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length := Count_Type'Base (Index_Type'Last - No_Index);
end if;
end if;
elsif Index_Type'First <= 0 then
-- We know that No_Index (the same as Index_Type'First - 1) is less
-- than 0, so it is safe to compute the following sum without fear of
-- overflow.
J := Count_Type'Base (No_Index) + Count_Type'Last;
if J <= Count_Type'Base (Index_Type'Last) then
-- We have determined that range of Index_Type has at least as
-- many values as in Count_Type, so Count_Type'Last is the maximum
-- number of items that are allowed.
Max_Length := Count_Type'Last;
else
-- The range of Index_Type has fewer values than Count_Type does,
-- so the maximum number of items is computed from the range of
-- the Index_Type.
Max_Length :=
Count_Type'Base (Index_Type'Last) - Count_Type'Base (No_Index);
end if;
else
-- No_Index is equal or greater than 0, so we can safely compute the
-- difference without fear of overflow (which we would have to worry
-- about if No_Index were less than 0, but that case is handled
-- above).
Max_Length :=
Count_Type'Base (Index_Type'Last) - Count_Type'Base (No_Index);
end if;
-- We have just computed the maximum length (number of items). We must
-- now compare the requested length to the maximum length, as we do not
-- allow a vector expand beyond the maximum (because that would create
-- an internal array with a last index value greater than
-- Index_Type'Last, with no way to index those elements).
if Checks and then New_Length > Max_Length then
raise Constraint_Error with "Count is out of range";
end if;
-- An internal array has already been allocated, so we need to check
-- whether there is enough unused storage for the new items.
if Checks and then New_Length > Container.Capacity then
raise Capacity_Error with "New length is larger than capacity";
end if;
-- In this case, we're inserting space into a vector that has already
-- allocated an internal array, and the existing array has enough
-- unused storage for the new items.
if Before <= Container.Last then
-- The space is being inserted before some existing elements,
-- so we must slide the existing elements up to their new home.
J := To_Array_Index (Before);
EA (J + Count .. New_Length) := EA (J .. Old_Length);
end if;
-- New_Last is the last index value of the items in the container after
-- insertion. Use the wider of Index_Type'Base and Count_Type'Base to
-- compute its value from the New_Length.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
Container.Last := No_Index + Index_Type'Base (New_Length);
else
Container.Last :=
Index_Type'Base (Count_Type'Base (No_Index) + New_Length);
end if;
end Insert_Space;
procedure Insert_Space
(Container : in out Vector;
Before : Cursor;
Position : out Cursor;
Count : Count_Type := 1)
is
Index : Index_Type'Base;
begin
if Checks and then Before.Container /= null
and then Before.Container /= Container'Unchecked_Access
then
raise Program_Error with "Before cursor denotes wrong container";
end if;
if Count = 0 then
if Before.Container = null
or else Before.Index > Container.Last
then
Position := No_Element;
else
Position := (Container'Unchecked_Access, Before.Index);
end if;
return;
end if;
if Before.Container = null
or else Before.Index > Container.Last
then
if Checks and then Container.Last = Index_Type'Last then
raise Constraint_Error with
"vector is already at its maximum length";
end if;
Index := Container.Last + 1;
else
Index := Before.Index;
end if;
Insert_Space (Container, Index, Count => Count);
Position := Cursor'(Container'Unchecked_Access, Index);
end Insert_Space;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Vector) return Boolean is
begin
return Container.Last < Index_Type'First;
end Is_Empty;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Vector;
Process : not null access procedure (Position : Cursor))
is
Busy : With_Busy (Container.TC'Unrestricted_Access);
begin
for Indx in Index_Type'First .. Container.Last loop
Process (Cursor'(Container'Unrestricted_Access, Indx));
end loop;
end Iterate;
function Iterate
(Container : Vector)
return Vector_Iterator_Interfaces.Reversible_Iterator'Class
is
V : constant Vector_Access := Container'Unrestricted_Access;
begin
-- The value of its Index component influences the behavior of the First
-- and Last selector functions of the iterator object. When the Index
-- component is No_Index (as is the case here), this means the iterator
-- object was constructed without a start expression. This is a complete
-- iterator, meaning that the iteration starts from the (logical)
-- beginning of the sequence of items.
-- Note: For a forward iterator, Container.First is the beginning, and
-- for a reverse iterator, Container.Last is the beginning.
return It : constant Iterator :=
(Limited_Controlled with
Container => V,
Index => No_Index)
do
Busy (Container.TC'Unrestricted_Access.all);
end return;
end Iterate;
function Iterate
(Container : Vector;
Start : Cursor)
return Vector_Iterator_Interfaces.Reversible_Iterator'Class
is
V : constant Vector_Access := Container'Unrestricted_Access;
begin
-- It was formerly the case that when Start = No_Element, the partial
-- iterator was defined to behave the same as for a complete iterator,
-- and iterate over the entire sequence of items. However, those
-- semantics were unintuitive and arguably error-prone (it is too easy
-- to accidentally create an endless loop), and so they were changed,
-- per the ARG meeting in Denver on 2011/11. However, there was no
-- consensus about what positive meaning this corner case should have,
-- and so it was decided to simply raise an exception. This does imply,
-- however, that it is not possible to use a partial iterator to specify
-- an empty sequence of items.
if Checks and then Start.Container = null then
raise Constraint_Error with
"Start position for iterator equals No_Element";
end if;
if Checks and then Start.Container /= V then
raise Program_Error with
"Start cursor of Iterate designates wrong vector";
end if;
if Checks and then Start.Index > V.Last then
raise Constraint_Error with
"Start position for iterator equals No_Element";
end if;
-- The value of its Index component influences the behavior of the First
-- and Last selector functions of the iterator object. When the Index
-- component is not No_Index (as is the case here), it means that this
-- is a partial iteration, over a subset of the complete sequence of
-- items. The iterator object was constructed with a start expression,
-- indicating the position from which the iteration begins. Note that
-- the start position has the same value irrespective of whether this is
-- a forward or reverse iteration.
return It : constant Iterator :=
(Limited_Controlled with
Container => V,
Index => Start.Index)
do
Busy (Container.TC'Unrestricted_Access.all);
end return;
end Iterate;
----------
-- Last --
----------
function Last (Container : Vector) return Cursor is
begin
if Is_Empty (Container) then
return No_Element;
else
return (Container'Unrestricted_Access, Container.Last);
end if;
end Last;
function Last (Object : Iterator) return Cursor is
begin
-- The value of the iterator object's Index component influences the
-- behavior of the Last (and First) selector function.
-- When the Index component is No_Index, this means the iterator object
-- was constructed without a start expression, in which case the
-- (reverse) iteration starts from the (logical) beginning of the entire
-- sequence (corresponding to Container.Last, for a reverse iterator).
-- Otherwise, this is iteration over a partial sequence of items. When
-- the Index component is not No_Index, the iterator object was
-- constructed with a start expression, that specifies the position from
-- which the (reverse) partial iteration begins.
if Object.Index = No_Index then
return Last (Object.Container.all);
else
return Cursor'(Object.Container, Object.Index);
end if;
end Last;
------------------
-- Last_Element --
------------------
function Last_Element (Container : Vector) return Element_Type is
begin
if Checks and then Container.Last = No_Index then
raise Constraint_Error with "Container is empty";
end if;
return Container.Elements (Container.Length);
end Last_Element;
----------------
-- Last_Index --
----------------
function Last_Index (Container : Vector) return Extended_Index is
begin
return Container.Last;
end Last_Index;
------------
-- Length --
------------
function Length (Container : Vector) return Count_Type is
L : constant Index_Type'Base := Container.Last;
F : constant Index_Type := Index_Type'First;
begin
-- The base range of the index type (Index_Type'Base) might not include
-- all values for length (Count_Type). Contrariwise, the index type
-- might include values outside the range of length. Hence we use
-- whatever type is wider for intermediate values when calculating
-- length. Note that no matter what the index type is, the maximum
-- length to which a vector is allowed to grow is always the minimum
-- of Count_Type'Last and (IT'Last - IT'First + 1).
-- For example, an Index_Type with range -127 .. 127 is only guaranteed
-- to have a base range of -128 .. 127, but the corresponding vector
-- would have lengths in the range 0 .. 255. In this case we would need
-- to use Count_Type'Base for intermediate values.
-- Another case would be the index range -2**63 + 1 .. -2**63 + 10. The
-- vector would have a maximum length of 10, but the index values lie
-- outside the range of Count_Type (which is only 32 bits). In this
-- case we would need to use Index_Type'Base for intermediate values.
if Count_Type'Base'Last >= Index_Type'Pos (Index_Type'Base'Last) then
return Count_Type'Base (L) - Count_Type'Base (F) + 1;
else
return Count_Type (L - F + 1);
end if;
end Length;
----------
-- Move --
----------
procedure Move
(Target : in out Vector;
Source : in out Vector)
is
begin
if Target'Address = Source'Address then
return;
end if;
TC_Check (Target.TC);
TC_Check (Source.TC);
if Checks and then Target.Capacity < Source.Length then
raise Capacity_Error -- ???
with "Target capacity is less than Source length";
end if;
-- Clear Target now, in case element assignment fails
Target.Last := No_Index;
Target.Elements (1 .. Source.Length) :=
Source.Elements (1 .. Source.Length);
Target.Last := Source.Last;
Source.Last := No_Index;
end Move;
----------
-- Next --
----------
function Next (Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
elsif Position.Index < Position.Container.Last then
return (Position.Container, Position.Index + 1);
else
return No_Element;
end if;
end Next;
function Next (Object : Iterator; Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Checks and then Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Next designates wrong vector";
end if;
return Next (Position);
end Next;
procedure Next (Position : in out Cursor) is
begin
if Position.Container = null then
return;
elsif Position.Index < Position.Container.Last then
Position.Index := Position.Index + 1;
else
Position := No_Element;
end if;
end Next;
-------------
-- Prepend --
-------------
procedure Prepend (Container : in out Vector; New_Item : Vector) is
begin
Insert (Container, Index_Type'First, New_Item);
end Prepend;
procedure Prepend
(Container : in out Vector;
New_Item : Element_Type;
Count : Count_Type := 1)
is
begin
Insert (Container,
Index_Type'First,
New_Item,
Count);
end Prepend;
--------------
-- Previous --
--------------
procedure Previous (Position : in out Cursor) is
begin
if Position.Container = null then
return;
elsif Position.Index > Index_Type'First then
Position.Index := Position.Index - 1;
else
Position := No_Element;
end if;
end Previous;
function Previous (Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
elsif Position.Index > Index_Type'First then
return (Position.Container, Position.Index - 1);
else
return No_Element;
end if;
end Previous;
function Previous (Object : Iterator; Position : Cursor) return Cursor is
begin
if Position.Container = null then
return No_Element;
end if;
if Checks and then Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Previous designates wrong vector";
end if;
return Previous (Position);
end Previous;
----------------------
-- Pseudo_Reference --
----------------------
function Pseudo_Reference
(Container : aliased Vector'Class) return Reference_Control_Type
is
TC : constant Tamper_Counts_Access := Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
Busy (TC.all);
end return;
end Pseudo_Reference;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Container : Vector;
Index : Index_Type;
Process : not null access procedure (Element : Element_Type))
is
Lock : With_Lock (Container.TC'Unrestricted_Access);
V : Vector renames Container'Unrestricted_Access.all;
begin
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
Process (V.Elements (To_Array_Index (Index)));
end Query_Element;
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type))
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
Query_Element (Position.Container.all, Position.Index, Process);
end Query_Element;
---------------
-- Put_Image --
---------------
procedure Put_Image
(S : in out Ada.Strings.Text_Output.Sink'Class; V : Vector)
is
First_Time : Boolean := True;
use System.Put_Images;
begin
Array_Before (S);
for X of V loop
if First_Time then
First_Time := False;
else
Simple_Array_Between (S);
end if;
Element_Type'Put_Image (S, X);
end loop;
Array_After (S);
end Put_Image;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Vector)
is
Length : Count_Type'Base;
Last : Index_Type'Base := No_Index;
begin
Clear (Container);
Count_Type'Base'Read (Stream, Length);
Reserve_Capacity (Container, Capacity => Length);
for Idx in Count_Type range 1 .. Length loop
Last := Last + 1;
Element_Type'Read (Stream, Container.Elements (Idx));
Container.Last := Last;
end loop;
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Position : out Cursor)
is
begin
raise Program_Error with "attempt to stream vector cursor";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
---------------
-- Reference --
---------------
function Reference
(Container : aliased in out Vector;
Position : Cursor) return Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Checks and then Position.Index > Position.Container.Last then
raise Constraint_Error with "Position cursor is out of range";
end if;
declare
A : Elements_Array renames Container.Elements;
J : constant Count_Type := To_Array_Index (Position.Index);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Type :=
(Element => A (J)'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Reference;
function Reference
(Container : aliased in out Vector;
Index : Index_Type) return Reference_Type
is
begin
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
declare
A : Elements_Array renames Container.Elements;
J : constant Count_Type := To_Array_Index (Index);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Type :=
(Element => A (J)'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Reference;
---------------------
-- Replace_Element --
---------------------
procedure Replace_Element
(Container : in out Vector;
Index : Index_Type;
New_Item : Element_Type)
is
begin
TE_Check (Container.TC);
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
Container.Elements (To_Array_Index (Index)) := New_Item;
end Replace_Element;
procedure Replace_Element
(Container : in out Vector;
Position : Cursor;
New_Item : Element_Type)
is
begin
TE_Check (Container.TC);
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
if Checks and then Position.Index > Container.Last then
raise Constraint_Error with "Position cursor is out of range";
end if;
Container.Elements (To_Array_Index (Position.Index)) := New_Item;
end Replace_Element;
----------------------
-- Reserve_Capacity --
----------------------
procedure Reserve_Capacity
(Container : in out Vector;
Capacity : Count_Type)
is
begin
if Checks and then Capacity > Container.Capacity then
raise Capacity_Error with "Capacity is out of range";
end if;
end Reserve_Capacity;
----------------------
-- Reverse_Elements --
----------------------
procedure Reverse_Elements (Container : in out Vector) is
E : Elements_Array renames Container.Elements;
Idx : Count_Type;
Jdx : Count_Type;
begin
if Container.Length <= 1 then
return;
end if;
-- The exception behavior for the vector container must match that for
-- the list container, so we check for cursor tampering here (which will
-- catch more things) instead of for element tampering (which will catch
-- fewer things). It's true that the elements of this vector container
-- could be safely moved around while (say) an iteration is taking place
-- (iteration only increments the busy counter), and so technically
-- all we would need here is a test for element tampering (indicated
-- by the lock counter), that's simply an artifact of our array-based
-- implementation. Logically Reverse_Elements requires a check for
-- cursor tampering.
TC_Check (Container.TC);
Idx := 1;
Jdx := Container.Length;
while Idx < Jdx loop
declare
EI : constant Element_Type := E (Idx);
begin
E (Idx) := E (Jdx);
E (Jdx) := EI;
end;
Idx := Idx + 1;
Jdx := Jdx - 1;
end loop;
end Reverse_Elements;
------------------
-- Reverse_Find --
------------------
function Reverse_Find
(Container : Vector;
Item : Element_Type;
Position : Cursor := No_Element) return Cursor
is
Last : Index_Type'Base;
begin
if Checks and then Position.Container /= null
and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
Last :=
(if Position.Container = null or else Position.Index > Container.Last
then Container.Last
else Position.Index);
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
Lock : With_Lock (Container.TC'Unrestricted_Access);
begin
for Indx in reverse Index_Type'First .. Last loop
if Container.Elements (To_Array_Index (Indx)) = Item then
return Cursor'(Container'Unrestricted_Access, Indx);
end if;
end loop;
return No_Element;
end;
end Reverse_Find;
------------------------
-- Reverse_Find_Index --
------------------------
function Reverse_Find_Index
(Container : Vector;
Item : Element_Type;
Index : Index_Type := Index_Type'Last) return Extended_Index
is
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
Lock : With_Lock (Container.TC'Unrestricted_Access);
Last : constant Index_Type'Base :=
Index_Type'Min (Container.Last, Index);
begin
for Indx in reverse Index_Type'First .. Last loop
if Container.Elements (To_Array_Index (Indx)) = Item then
return Indx;
end if;
end loop;
return No_Index;
end Reverse_Find_Index;
---------------------
-- Reverse_Iterate --
---------------------
procedure Reverse_Iterate
(Container : Vector;
Process : not null access procedure (Position : Cursor))
is
Busy : With_Busy (Container.TC'Unrestricted_Access);
begin
for Indx in reverse Index_Type'First .. Container.Last loop
Process (Cursor'(Container'Unrestricted_Access, Indx));
end loop;
end Reverse_Iterate;
----------------
-- Set_Length --
----------------
procedure Set_Length (Container : in out Vector; Length : Count_Type) is
Count : constant Count_Type'Base := Container.Length - Length;
begin
-- Set_Length allows the user to set the length explicitly, instead of
-- implicitly as a side-effect of deletion or insertion. If the
-- requested length is less than the current length, this is equivalent
-- to deleting items from the back end of the vector. If the requested
-- length is greater than the current length, then this is equivalent to
-- inserting "space" (nonce items) at the end.
if Count >= 0 then
Container.Delete_Last (Count);
elsif Checks and then Container.Last >= Index_Type'Last then
raise Constraint_Error with "vector is already at its maximum length";
else
Container.Insert_Space (Container.Last + 1, -Count);
end if;
end Set_Length;
----------
-- Swap --
----------
procedure Swap (Container : in out Vector; I, J : Index_Type) is
E : Elements_Array renames Container.Elements;
begin
TE_Check (Container.TC);
if Checks and then I > Container.Last then
raise Constraint_Error with "I index is out of range";
end if;
if Checks and then J > Container.Last then
raise Constraint_Error with "J index is out of range";
end if;
if I = J then
return;
end if;
declare
EI_Copy : constant Element_Type := E (To_Array_Index (I));
begin
E (To_Array_Index (I)) := E (To_Array_Index (J));
E (To_Array_Index (J)) := EI_Copy;
end;
end Swap;
procedure Swap (Container : in out Vector; I, J : Cursor) is
begin
if Checks and then I.Container = null then
raise Constraint_Error with "I cursor has no element";
end if;
if Checks and then J.Container = null then
raise Constraint_Error with "J cursor has no element";
end if;
if Checks and then I.Container /= Container'Unrestricted_Access then
raise Program_Error with "I cursor denotes wrong container";
end if;
if Checks and then J.Container /= Container'Unrestricted_Access then
raise Program_Error with "J cursor denotes wrong container";
end if;
Swap (Container, I.Index, J.Index);
end Swap;
--------------------
-- To_Array_Index --
--------------------
function To_Array_Index (Index : Index_Type'Base) return Count_Type'Base is
Offset : Count_Type'Base;
begin
-- We know that
-- Index >= Index_Type'First
-- hence we also know that
-- Index - Index_Type'First >= 0
-- The issue is that even though 0 is guaranteed to be a value in
-- the type Index_Type'Base, there's no guarantee that the difference
-- is a value in that type. To prevent overflow we use the wider
-- of Count_Type'Base and Index_Type'Base to perform intermediate
-- calculations.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
Offset := Count_Type'Base (Index - Index_Type'First);
else
Offset := Count_Type'Base (Index) -
Count_Type'Base (Index_Type'First);
end if;
-- The array index subtype for all container element arrays
-- always starts with 1.
return 1 + Offset;
end To_Array_Index;
---------------
-- To_Cursor --
---------------
function To_Cursor
(Container : Vector;
Index : Extended_Index) return Cursor
is
begin
if Index not in Index_Type'First .. Container.Last then
return No_Element;
end if;
return Cursor'(Container'Unrestricted_Access, Index);
end To_Cursor;
--------------
-- To_Index --
--------------
function To_Index (Position : Cursor) return Extended_Index is
begin
if Position.Container = null then
return No_Index;
end if;
if Position.Index <= Position.Container.Last then
return Position.Index;
end if;
return No_Index;
end To_Index;
---------------
-- To_Vector --
---------------
function To_Vector (Length : Count_Type) return Vector is
Index : Count_Type'Base;
Last : Index_Type'Base;
begin
if Length = 0 then
return Empty_Vector;
end if;
-- We create a vector object with a capacity that matches the specified
-- Length, but we do not allow the vector capacity (the length of the
-- internal array) to exceed the number of values in Index_Type'Range
-- (otherwise, there would be no way to refer to those components via an
-- index). We must therefore check whether the specified Length would
-- create a Last index value greater than Index_Type'Last.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
-- We perform a two-part test. First we determine whether the
-- computed Last value lies in the base range of the type, and then
-- determine whether it lies in the range of the index (sub)type.
-- Last must satisfy this relation:
-- First + Length - 1 <= Last
-- We regroup terms:
-- First - 1 <= Last - Length
-- Which can rewrite as:
-- No_Index <= Last - Length
if Checks and then
Index_Type'Base'Last - Index_Type'Base (Length) < No_Index
then
raise Constraint_Error with "Length is out of range";
end if;
-- We now know that the computed value of Last is within the base
-- range of the type, so it is safe to compute its value:
Last := No_Index + Index_Type'Base (Length);
-- Finally we test whether the value is within the range of the
-- generic actual index subtype:
if Checks and then Last > Index_Type'Last then
raise Constraint_Error with "Length is out of range";
end if;
elsif Index_Type'First <= 0 then
-- Here we can compute Last directly, in the normal way. We know that
-- No_Index is less than 0, so there is no danger of overflow when
-- adding the (positive) value of Length.
Index := Count_Type'Base (No_Index) + Length; -- Last
if Checks and then Index > Count_Type'Base (Index_Type'Last) then
raise Constraint_Error with "Length is out of range";
end if;
-- We know that the computed value (having type Count_Type) of Last
-- is within the range of the generic actual index subtype, so it is
-- safe to convert to Index_Type:
Last := Index_Type'Base (Index);
else
-- Here Index_Type'First (and Index_Type'Last) is positive, so we
-- must test the length indirectly (by working backwards from the
-- largest possible value of Last), in order to prevent overflow.
Index := Count_Type'Base (Index_Type'Last) - Length; -- No_Index
if Checks and then Index < Count_Type'Base (No_Index) then
raise Constraint_Error with "Length is out of range";
end if;
-- We have determined that the value of Length would not create a
-- Last index value outside of the range of Index_Type, so we can now
-- safely compute its value.
Last := Index_Type'Base (Count_Type'Base (No_Index) + Length);
end if;
return V : Vector (Capacity => Length) do
V.Last := Last;
end return;
end To_Vector;
function To_Vector
(New_Item : Element_Type;
Length : Count_Type) return Vector
is
Index : Count_Type'Base;
Last : Index_Type'Base;
begin
if Length = 0 then
return Empty_Vector;
end if;
-- We create a vector object with a capacity that matches the specified
-- Length, but we do not allow the vector capacity (the length of the
-- internal array) to exceed the number of values in Index_Type'Range
-- (otherwise, there would be no way to refer to those components via an
-- index). We must therefore check whether the specified Length would
-- create a Last index value greater than Index_Type'Last.
if Index_Type'Base'Last >= Count_Type'Pos (Count_Type'Last) then
-- We perform a two-part test. First we determine whether the
-- computed Last value lies in the base range of the type, and then
-- determine whether it lies in the range of the index (sub)type.
-- Last must satisfy this relation:
-- First + Length - 1 <= Last
-- We regroup terms:
-- First - 1 <= Last - Length
-- Which can rewrite as:
-- No_Index <= Last - Length
if Checks and then
Index_Type'Base'Last - Index_Type'Base (Length) < No_Index
then
raise Constraint_Error with "Length is out of range";
end if;
-- We now know that the computed value of Last is within the base
-- range of the type, so it is safe to compute its value:
Last := No_Index + Index_Type'Base (Length);
-- Finally we test whether the value is within the range of the
-- generic actual index subtype:
if Checks and then Last > Index_Type'Last then
raise Constraint_Error with "Length is out of range";
end if;
elsif Index_Type'First <= 0 then
-- Here we can compute Last directly, in the normal way. We know that
-- No_Index is less than 0, so there is no danger of overflow when
-- adding the (positive) value of Length.
Index := Count_Type'Base (No_Index) + Length; -- same value as V.Last
if Checks and then Index > Count_Type'Base (Index_Type'Last) then
raise Constraint_Error with "Length is out of range";
end if;
-- We know that the computed value (having type Count_Type) of Last
-- is within the range of the generic actual index subtype, so it is
-- safe to convert to Index_Type:
Last := Index_Type'Base (Index);
else
-- Here Index_Type'First (and Index_Type'Last) is positive, so we
-- must test the length indirectly (by working backwards from the
-- largest possible value of Last), in order to prevent overflow.
Index := Count_Type'Base (Index_Type'Last) - Length; -- No_Index
if Checks and then Index < Count_Type'Base (No_Index) then
raise Constraint_Error with "Length is out of range";
end if;
-- We have determined that the value of Length would not create a
-- Last index value outside of the range of Index_Type, so we can now
-- safely compute its value.
Last := Index_Type'Base (Count_Type'Base (No_Index) + Length);
end if;
return V : Vector (Capacity => Length) do
V.Elements := (others => New_Item);
V.Last := Last;
end return;
end To_Vector;
--------------------
-- Update_Element --
--------------------
procedure Update_Element
(Container : in out Vector;
Index : Index_Type;
Process : not null access procedure (Element : in out Element_Type))
is
Lock : With_Lock (Container.TC'Unchecked_Access);
begin
if Checks and then Index > Container.Last then
raise Constraint_Error with "Index is out of range";
end if;
Process (Container.Elements (To_Array_Index (Index)));
end Update_Element;
procedure Update_Element
(Container : in out Vector;
Position : Cursor;
Process : not null access procedure (Element : in out Element_Type))
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor denotes wrong container";
end if;
Update_Element (Container, Position.Index, Process);
end Update_Element;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Vector)
is
N : Count_Type;
begin
N := Container.Length;
Count_Type'Base'Write (Stream, N);
for J in 1 .. N loop
Element_Type'Write (Stream, Container.Elements (J));
end loop;
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Position : Cursor)
is
begin
raise Program_Error with "attempt to stream vector cursor";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
end Ada.Containers.Bounded_Vectors;
| 33.299685 | 79 | 0.602596 |
adc07cc84da6f39ca0b863d48ae0d1534163bf6e | 13,841 | adb | Ada | source/s-format.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 33 | 2015-04-04T09:19:36.000Z | 2021-11-10T05:33:34.000Z | source/s-format.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 8 | 2017-11-14T13:05:07.000Z | 2018-08-09T15:28:49.000Z | source/s-format.adb | ytomino/drake | 4e4bdcd8b8e23a11a29b31d3a8861fdf60090ea2 | [
"MIT"
] | 9 | 2015-02-03T17:09:53.000Z | 2021-11-12T01:16:05.000Z | with System.Storage_Elements;
package body System.Formatting is
pragma Suppress (All_Checks);
use type Long_Long_Integer_Types.Word_Unsigned;
use type Long_Long_Integer_Types.Long_Long_Unsigned;
subtype Word_Unsigned is Long_Long_Integer_Types.Word_Unsigned;
subtype Long_Long_Unsigned is Long_Long_Integer_Types.Long_Long_Unsigned;
procedure memset (
b : Address;
c : Integer;
n : Storage_Elements.Storage_Count)
with Import,
Convention => Intrinsic, External_Name => "__builtin_memset";
function add_overflow (
a, b : Word_Unsigned;
res : not null access Word_Unsigned)
return Boolean
with Import,
Convention => Intrinsic,
External_Name =>
(if Standard'Word_Size = Integer'Size then
"__builtin_uadd_overflow"
elsif Standard'Word_Size = Long_Integer'Size then
"__builtin_uaddl_overflow"
else "__builtin_uaddll_overflow");
function add_overflow (
a, b : Long_Long_Unsigned;
res : not null access Long_Long_Unsigned)
return Boolean
with Import,
Convention => Intrinsic,
External_Name => "__builtin_uaddll_overflow";
function mul_overflow (
a, b : Word_Unsigned;
res : not null access Word_Unsigned)
return Boolean
with Import,
Convention => Intrinsic,
External_Name =>
(if Standard'Word_Size = Integer'Size then
"__builtin_umul_overflow"
elsif Standard'Word_Size = Long_Integer'Size then
"__builtin_umull_overflow"
else "__builtin_umulll_overflow");
function mul_overflow (
a, b : Long_Long_Unsigned;
res : not null access Long_Long_Unsigned)
return Boolean
with Import,
Convention => Intrinsic,
External_Name => "__builtin_umulll_overflow";
function Width_Digits (Value : Word_Unsigned; Base : Number_Base)
return Positive;
function Width_Digits (Value : Word_Unsigned; Base : Number_Base)
return Positive
is
P : aliased Word_Unsigned := Word_Unsigned (Base);
Result : Positive := 1;
begin
while P <= Value loop
Result := Result + 1;
exit when mul_overflow (P, Word_Unsigned (Base), P'Access);
end loop;
return Result;
end Width_Digits;
function Width_Digits (Value : Long_Long_Unsigned; Base : Number_Base)
return Positive;
function Width_Digits (Value : Long_Long_Unsigned; Base : Number_Base)
return Positive is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
declare
P : aliased Long_Long_Unsigned := Long_Long_Unsigned (Base);
Result : Positive := 1;
begin
while P <= Value loop
Result := Result + 1;
exit when mul_overflow (P, Long_Long_Unsigned (Base), P'Access);
end loop;
return Result;
end;
else
-- optimized for 64bit
return Width_Digits (Word_Unsigned (Value), Base);
end if;
end Width_Digits;
procedure Fill_Digits (
Value : Word_Unsigned;
Item : out String;
Base : Number_Base;
Set : Type_Set);
procedure Fill_Digits (
Value : Word_Unsigned;
Item : out String;
Base : Number_Base;
Set : Type_Set)
is
V : Word_Unsigned := Value;
begin
for I in reverse Item'Range loop
Image (Digit (V rem Word_Unsigned (Base)), Item (I), Set);
V := V / Word_Unsigned (Base);
end loop;
end Fill_Digits;
procedure Fill_Digits (
Value : Long_Long_Unsigned;
Item : out String;
Base : Number_Base;
Set : Type_Set);
procedure Fill_Digits (
Value : Long_Long_Unsigned;
Item : out String;
Base : Number_Base;
Set : Type_Set) is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
declare
V : Long_Long_Unsigned := Value;
I : Positive := Item'Last;
begin
while V > Long_Long_Unsigned (Word_Unsigned'Last) loop
Image (Digit (V rem Long_Long_Unsigned (Base)), Item (I), Set);
V := V / Long_Long_Unsigned (Base);
I := I - 1;
end loop;
Fill_Digits (Word_Unsigned (V), Item (Item'First .. I), Base, Set);
end;
else
-- optimized for 64bit
Fill_Digits (Word_Unsigned (Value), Item, Base, Set);
end if;
end Fill_Digits;
procedure Take_Digits (
Item : String;
Last : out Natural;
Result : out Word_Unsigned;
Base : Number_Base;
Skip_Underscore : Boolean;
Overflow : out Boolean);
procedure Take_Digits (
Item : String;
Last : out Natural;
Result : out Word_Unsigned;
Base : Number_Base;
Skip_Underscore : Boolean;
Overflow : out Boolean)
is
R : aliased Word_Unsigned := 0;
begin
Last := Item'First - 1;
Overflow := False;
while Last < Item'Last loop
declare
X : Digit;
Is_Invalid : Boolean;
Next : Positive := Last + 1;
begin
if Item (Next) = '_' then
exit when not Skip_Underscore
or else Next = Item'First
or else Next >= Item'Last;
Next := Next + 1;
end if;
Value (Item (Next), X, Is_Invalid);
exit when Is_Invalid or else X >= Base;
if mul_overflow (R, Word_Unsigned (Base), R'Access)
or else add_overflow (R, Word_Unsigned (X), R'Access)
then
Overflow := True;
exit;
end if;
Last := Next;
end;
end loop;
Result := R;
end Take_Digits;
procedure Take_Digits (
Item : String;
Last : out Natural;
Result : out Long_Long_Unsigned;
Base : Number_Base;
Skip_Underscore : Boolean;
Overflow : out Boolean);
procedure Take_Digits (
Item : String;
Last : out Natural;
Result : out Long_Long_Unsigned;
Base : Number_Base;
Skip_Underscore : Boolean;
Overflow : out Boolean) is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
declare
R : aliased Long_Long_Unsigned := 0;
begin
Take_Digits (
Item,
Last,
Word_Unsigned (R),
Base,
Skip_Underscore,
Overflow);
if Overflow then
Overflow := False;
while Last < Item'Last loop
declare
X : Digit;
Is_Invalid : Boolean;
Next : Positive := Last + 1;
begin
if Item (Next) = '_' then
exit when not Skip_Underscore
or else Next >= Item'Last;
Next := Next + 1;
end if;
Value (Item (Next), X, Is_Invalid);
exit when Is_Invalid or else X >= Base;
if mul_overflow (R, Long_Long_Unsigned (Base), R'Access)
or else add_overflow (
R,
Long_Long_Unsigned (X),
R'Access)
then
Overflow := True;
exit;
end if;
Last := Next;
end;
end loop;
end if;
Result := R;
end;
else
-- optimized for 64bit
Take_Digits (
Item,
Last,
Word_Unsigned (Result),
Base,
Skip_Underscore,
Overflow);
end if;
end Take_Digits;
-- implementation
function Digits_Width (
Value : Long_Long_Integer_Types.Word_Unsigned;
Base : Number_Base := 10)
return Positive is
begin
return Width_Digits (Value, Base);
end Digits_Width;
function Digits_Width (
Value : Long_Long_Integer_Types.Long_Long_Unsigned;
Base : Number_Base := 10)
return Positive is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
return Width_Digits (Value, Base);
else
-- optimized for 64bit
return Digits_Width (Word_Unsigned (Value), Base);
end if;
end Digits_Width;
procedure Image (
Value : Digit;
Item : out Character;
Set : Type_Set := Upper_Case) is
begin
case Value is
when 0 .. 9 =>
Item := Character'Val (Character'Pos ('0') + Value);
when 10 .. 15 =>
Item := Character'Val (
Character'Pos ('a')
- 10
- (Character'Pos ('a') - Character'Pos ('A'))
* Type_Set'Pos (Set)
+ Value);
end case;
end Image;
procedure Image (
Value : Long_Long_Integer_Types.Word_Unsigned;
Item : out String;
Last : out Natural;
Base : Number_Base := 10;
Set : Type_Set := Upper_Case;
Width : Positive := 1;
Fill : Character := '0';
Error : out Boolean)
is
W : constant Positive := Formatting.Digits_Width (Value, Base);
Padding_Length : constant Natural := Integer'Max (0, Width - W);
Length : constant Natural := Padding_Length + W;
begin
Error := Item'First + Length - 1 > Item'Last;
if Error then
Last := Item'First - 1;
else
Last := Item'First + Length - 1;
Fill_Padding (
Item (Item'First .. Item'First + Padding_Length - 1),
Fill);
Fill_Digits (
Value,
Item (Item'First + Padding_Length .. Last),
Base,
Set);
end if;
end Image;
procedure Image (
Value : Long_Long_Integer_Types.Long_Long_Unsigned;
Item : out String;
Last : out Natural;
Base : Number_Base := 10;
Set : Type_Set := Upper_Case;
Width : Positive := 1;
Fill : Character := '0';
Error : out Boolean) is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
declare
W : constant Positive := Formatting.Digits_Width (Value, Base);
Padding_Length : constant Natural := Integer'Max (0, Width - W);
Length : constant Natural := Padding_Length + W;
begin
Error := Item'First + Length - 1 > Item'Last;
if Error then
Last := Item'First - 1;
else
Last := Item'First + Length - 1;
Fill_Padding (
Item (Item'First .. Item'First + Padding_Length - 1),
Fill);
Fill_Digits (
Value,
Item (Item'First + Padding_Length .. Last),
Base,
Set);
end if;
end;
else
-- optimized for 64bit
Image (
Word_Unsigned (Value),
Item,
Last,
Base,
Set,
Width,
Fill,
Error);
end if;
end Image;
procedure Value (
Item : Character;
Result : out Digit;
Error : out Boolean) is
begin
case Item is
when '0' .. '9' =>
Result := Character'Pos (Item) - Character'Pos ('0');
Error := False;
when 'A' .. 'F' =>
Result := Character'Pos (Item) - (Character'Pos ('A') - 10);
Error := False;
when 'a' .. 'f' =>
Result := Character'Pos (Item) - (Character'Pos ('a') - 10);
Error := False;
when others =>
Error := True;
end case;
end Value;
procedure Value (
Item : String;
Last : out Natural;
Result : out Long_Long_Integer_Types.Word_Unsigned;
Base : Number_Base := 10;
Skip_Underscore : Boolean := False;
Error : out Boolean)
is
Overflow : Boolean;
begin
Take_Digits (Item, Last, Result, Base, Skip_Underscore, Overflow);
if Overflow then
Result := 0;
Last := Item'First - 1;
Error := True;
else
Error := Last < Item'First;
end if;
end Value;
procedure Value (
Item : String;
Last : out Natural;
Result : out Long_Long_Integer_Types.Long_Long_Unsigned;
Base : Number_Base := 10;
Skip_Underscore : Boolean := False;
Error : out Boolean) is
begin
if Standard'Word_Size < Long_Long_Unsigned'Size then
-- optimized for 32bit
declare
Overflow : Boolean;
begin
Take_Digits (Item, Last, Result, Base, Skip_Underscore, Overflow);
if Overflow then
Result := 0;
Last := Item'First - 1;
Error := True;
else
Error := Last < Item'First;
end if;
end;
else
-- optimized for 64bit
Value (
Item,
Last,
Word_Unsigned (Result),
Base,
Skip_Underscore,
Error);
end if;
end Value;
procedure Fill_Padding (Item : out String; Pad : Character) is
begin
memset (Item'Address, Character'Pos (Pad), Item'Length);
end Fill_Padding;
end System.Formatting;
| 30.220524 | 79 | 0.532115 |
2ee91633b9904847abccd0e2ef49071335c4a347 | 956 | adb | Ada | tests/stream2.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 76 | 2020-02-24T20:30:15.000Z | 2022-02-16T15:10:56.000Z | tests/stream2.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 10 | 2020-04-15T10:02:49.000Z | 2022-02-24T20:10:46.000Z | tests/stream2.adb | yannickmoy/SPARKNaCl | c27fa811bf38b3706c1dc242f30e82967ad8f1c6 | [
"BSD-2-Clause"
] | 4 | 2020-03-10T15:19:45.000Z | 2022-02-17T09:46:20.000Z | with SPARKNaCl; use SPARKNaCl;
with SPARKNaCl.Core; use SPARKNaCl.Core;
with SPARKNaCl.Debug; use SPARKNaCl.Debug;
with SPARKNaCl.Stream; use SPARKNaCl.Stream;
with SPARKNaCl.Hashing; use SPARKNaCl.Hashing;
procedure Stream2
is
SecondKey : constant Salsa20_Key :=
Construct ((16#dc#, 16#90#, 16#8d#, 16#da#,
16#0b#, 16#93#, 16#44#, 16#a9#,
16#53#, 16#62#, 16#9b#, 16#73#,
16#38#, 16#20#, 16#77#, 16#88#,
16#80#, 16#f3#, 16#ce#, 16#b4#,
16#21#, 16#bb#, 16#61#, 16#b9#,
16#1c#, 16#bd#, 16#4c#, 16#3e#,
16#66#, 16#25#, 16#6c#, 16#e4#));
NonceSuffix : constant Salsa20_Nonce :=
(16#82#, 16#19#, 16#e0#, 16#03#, 16#6b#, 16#7a#, 16#0b#, 16#37#);
Output : Byte_Seq (0 .. 4_194_303);
H : Bytes_64;
begin
Salsa20 (Output, NonceSuffix, SecondKey);
Hash (H, Output);
DH ("H is", H);
end Stream2;
| 34.142857 | 70 | 0.537657 |
1350812262e47fba4e65bae3680d16e2f793e576 | 767 | adb | Ada | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/exec_changed/first.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/exec_changed/first.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | Read Only/gdb-6.8/gdb/testsuite/gdb.ada/exec_changed/first.adb | samyvic/OS-Project | 1622bc1641876584964effd91d65ef02e92728e1 | [
"Apache-2.0"
] | null | null | null | -- Copyright 2005, 2007, 2008 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT 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
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
procedure First is
begin
null;
end First;
| 38.35 | 73 | 0.736636 |
4b599cdd266827048381398c536779a12b0e7a38 | 3,024 | adb | Ada | Ada/src/Problem_36.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/src/Problem_36.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/src/Problem_36.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | with Ada.Text_IO;
with Ada.Integer_Text_IO;
package body Problem_36 is
package IO renames Ada.Text_IO;
package I_IO renames Ada.Integer_Text_IO;
function Is_Palindrome(s : String) return Boolean is
left : Integer := s'First;
right : Integer := s'Last;
begin
while left <= right loop
if s(left) /= s(right) then
return False;
end if;
left := Integer'Succ(left);
right := Integer'Pred(right);
end loop;
return True;
end Is_Palindrome;
function Decimal(num : Integer) return String is
function Dec_Mag(num : Integer) return Integer is
begin
if num >= 1_000_000 then
return 7;
elsif num >= 100_000 then
return 6;
elsif num >= 10_000 then
return 5;
elsif num >= 1_000 then
return 4;
elsif num >= 100 then
return 3;
elsif num >= 10 then
return 2;
else
return 1;
end if;
end Dec_Mag;
s : String (1 .. Dec_Mag(num));
n : Integer := Num;
begin
for index in reverse s'Range loop
s(index) := Character'Val(Character'Pos('0') + (n mod 10));
n := n / 10;
end loop;
return s;
end Decimal;
function Binary(num: Integer) return String is
function Bin_Mag(num : Integer) return Integer is
begin
if num >= 2**17 then
return 17;
elsif num >= 2**16 then
return 16;
elsif num >= 2**15 then
return 15;
elsif num >= 2**14 then
return 14;
elsif num >= 2**13 then
return 13;
elsif num >= 2**12 then
return 12;
elsif num >= 2**11 then
return 11;
elsif num >= 2**10 then
return 10;
elsif num >= 2**9 then
return 9;
elsif num >= 2**8 then
return 8;
elsif num >= 2**7 then
return 7;
elsif num >= 2**6 then
return 6;
elsif num >= 2**5 then
return 5;
elsif num >= 2**4 then
return 4;
elsif num >= 2**3 then
return 3;
elsif num >= 2**2 then
return 2;
elsif num >= 2**1 then
return 1;
else
return 0;
end if;
end Bin_Mag;
s : String(1 .. Bin_Mag(num) + 1);
n : Integer := num;
begin
for index in reverse s'Range loop
s(index) := Character'Val(Character'Pos('0') + (n mod 2));
n := n / 2;
end loop;
return s;
end Binary;
procedure Solve is
num : Integer := 1;
sum : Integer := 0;
begin
while num < 1_000_000 loop
if Is_Palindrome(Decimal(num)) and Is_Palindrome(Binary(num)) then
sum := sum + num;
end if;
num := num + 2;
end loop;
I_IO.Put(sum);
IO.New_Line;
end Solve;
end Problem_36;
| 27.243243 | 75 | 0.494709 |
5970f450bbff0600069a9608c8128ec431afc7d5 | 5,458 | ads | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-rbtgso.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-rbtgso.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/a-rbtgso.ads | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.CONTAINERS.RED_BLACK_TREES.GENERIC_SET_OPERATIONS --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
-- Tree_Type is used to implement ordered containers. This package declares
-- set-based tree operations.
with Ada.Containers.Red_Black_Trees.Generic_Operations;
generic
with package Tree_Operations is new Generic_Operations (<>);
use Tree_Operations.Tree_Types, Tree_Operations.Tree_Types.Implementation;
with procedure Insert_With_Hint
(Dst_Tree : in out Tree_Type;
Dst_Hint : Node_Access;
Src_Node : Node_Access;
Dst_Node : out Node_Access);
with function Copy_Tree (Source_Root : Node_Access)
return Node_Access;
with procedure Delete_Tree (X : in out Node_Access);
with function Is_Less (Left, Right : Node_Access) return Boolean;
with procedure Free (X : in out Node_Access);
package Ada.Containers.Red_Black_Trees.Generic_Set_Operations is
pragma Pure;
procedure Union (Target : in out Tree_Type; Source : Tree_Type);
-- Attempts to insert each element of Source in Target. If Target is
-- busy then Program_Error is raised. We say "attempts" here because
-- if these are unique-element sets, then the insertion should fail
-- (not insert a new item) when the insertion item from Source is
-- equivalent to an item already in Target. If these are multisets
-- then of course the attempt should always succeed.
function Union (Left, Right : Tree_Type) return Tree_Type;
-- Makes a copy of Left, and attempts to insert each element of
-- Right into the copy, then returns the copy.
procedure Intersection (Target : in out Tree_Type; Source : Tree_Type);
-- Removes elements from Target that are not equivalent to items in
-- Source. If Target is busy then Program_Error is raised.
function Intersection (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising all the items in Left equivalent to items in
-- Right.
procedure Difference (Target : in out Tree_Type; Source : Tree_Type);
-- Removes elements from Target that are equivalent to items in Source. If
-- Target is busy then Program_Error is raised.
function Difference (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising all the items in Left not equivalent to items
-- in Right.
procedure Symmetric_Difference
(Target : in out Tree_Type;
Source : Tree_Type);
-- Removes from Target elements that are equivalent to items in Source, and
-- inserts into Target items from Source not equivalent elements in
-- Target. If Target is busy then Program_Error is raised.
function Symmetric_Difference (Left, Right : Tree_Type) return Tree_Type;
-- Returns a set comprising the union of the elements in Left not
-- equivalent to items in Right, and the elements in Right not equivalent
-- to items in Left.
function Is_Subset (Subset : Tree_Type; Of_Set : Tree_Type) return Boolean;
-- Returns False if Subset contains at least one element not equivalent to
-- any item in Of_Set; returns True otherwise.
function Overlap (Left, Right : Tree_Type) return Boolean;
-- Returns True if at least one element of Left is equivalent to an item in
-- Right; returns False otherwise.
end Ada.Containers.Red_Black_Trees.Generic_Set_Operations;
| 51.009346 | 79 | 0.58886 |
1aed55434a2dfe5d343896353706332e7a9f99a2 | 941 | ads | Ada | src/apsepp-calendar.ads | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | src/apsepp-calendar.ads | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | src/apsepp-calendar.ads | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | -- Copyright (C) 2019 Thierry Rascle <[email protected]>
-- MIT license. Please refer to the LICENSE file.
with Ada.Calendar; use Ada.Calendar;
with Ada.Calendar.Time_Zones; use Ada.Calendar.Time_Zones;
package Apsepp.Calendar is
Time_First : constant Time := Time_Of (Year => Year_Number'First,
Month => Month_Number'First,
Day => Day_Number'First,
Seconds => Day_Duration'First);
function Unknown_Time_zone return Boolean;
function Default_Time_Offset return Time_Offset
is (if Unknown_Time_zone then
0
else
UTC_Time_Offset);
function To_ISO_8601
(Date : Time;
Time_Zone : Time_Offset := Default_Time_Offset;
Include_Time_Fraction : Boolean := False) return String;
end Apsepp.Calendar;
| 33.607143 | 73 | 0.581296 |
ad5aa8abae411d1d6cc4a042764cff5d5c3f0aa2 | 6,246 | adb | Ada | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack25.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack25.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | support/MinGW/lib/gcc/mingw32/9.2.0/adainclude/s-pack25.adb | orb-zhuchen/Orb | 6da2404b949ac28bde786e08bf4debe4a27cd3a0 | [
"CNRI-Python-GPL-Compatible",
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . P A C K _ 2 5 --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2019, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with System.Storage_Elements;
with System.Unsigned_Types;
package body System.Pack_25 is
subtype Bit_Order is System.Bit_Order;
Reverse_Bit_Order : constant Bit_Order :=
Bit_Order'Val (1 - Bit_Order'Pos (System.Default_Bit_Order));
subtype Ofs is System.Storage_Elements.Storage_Offset;
subtype Uns is System.Unsigned_Types.Unsigned;
subtype N07 is System.Unsigned_Types.Unsigned range 0 .. 7;
use type System.Storage_Elements.Storage_Offset;
use type System.Unsigned_Types.Unsigned;
type Cluster is record
E0, E1, E2, E3, E4, E5, E6, E7 : Bits_25;
end record;
for Cluster use record
E0 at 0 range 0 * Bits .. 0 * Bits + Bits - 1;
E1 at 0 range 1 * Bits .. 1 * Bits + Bits - 1;
E2 at 0 range 2 * Bits .. 2 * Bits + Bits - 1;
E3 at 0 range 3 * Bits .. 3 * Bits + Bits - 1;
E4 at 0 range 4 * Bits .. 4 * Bits + Bits - 1;
E5 at 0 range 5 * Bits .. 5 * Bits + Bits - 1;
E6 at 0 range 6 * Bits .. 6 * Bits + Bits - 1;
E7 at 0 range 7 * Bits .. 7 * Bits + Bits - 1;
end record;
for Cluster'Size use Bits * 8;
for Cluster'Alignment use Integer'Min (Standard'Maximum_Alignment,
1 +
1 * Boolean'Pos (Bits mod 2 = 0) +
2 * Boolean'Pos (Bits mod 4 = 0));
-- Use maximum possible alignment, given the bit field size, since this
-- will result in the most efficient code possible for the field.
type Cluster_Ref is access Cluster;
type Rev_Cluster is new Cluster
with Bit_Order => Reverse_Bit_Order,
Scalar_Storage_Order => Reverse_Bit_Order;
type Rev_Cluster_Ref is access Rev_Cluster;
------------
-- Get_25 --
------------
function Get_25
(Arr : System.Address;
N : Natural;
Rev_SSO : Boolean) return Bits_25
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => return RC.E0;
when 1 => return RC.E1;
when 2 => return RC.E2;
when 3 => return RC.E3;
when 4 => return RC.E4;
when 5 => return RC.E5;
when 6 => return RC.E6;
when 7 => return RC.E7;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => return C.E0;
when 1 => return C.E1;
when 2 => return C.E2;
when 3 => return C.E3;
when 4 => return C.E4;
when 5 => return C.E5;
when 6 => return C.E6;
when 7 => return C.E7;
end case;
end if;
end Get_25;
------------
-- Set_25 --
------------
procedure Set_25
(Arr : System.Address;
N : Natural;
E : Bits_25;
Rev_SSO : Boolean)
is
A : constant System.Address := Arr + Bits * Ofs (Uns (N) / 8);
C : Cluster_Ref with Address => A'Address, Import;
RC : Rev_Cluster_Ref with Address => A'Address, Import;
begin
if Rev_SSO then
case N07 (Uns (N) mod 8) is
when 0 => RC.E0 := E;
when 1 => RC.E1 := E;
when 2 => RC.E2 := E;
when 3 => RC.E3 := E;
when 4 => RC.E4 := E;
when 5 => RC.E5 := E;
when 6 => RC.E6 := E;
when 7 => RC.E7 := E;
end case;
else
case N07 (Uns (N) mod 8) is
when 0 => C.E0 := E;
when 1 => C.E1 := E;
when 2 => C.E2 := E;
when 3 => C.E3 := E;
when 4 => C.E4 := E;
when 5 => C.E5 := E;
when 6 => C.E6 := E;
when 7 => C.E7 := E;
end case;
end if;
end Set_25;
end System.Pack_25;
| 39.531646 | 78 | 0.460775 |
4b70f707bf9ceca890d0d80b95d319b51ae54320 | 1,004 | adb | Ada | source/tabula-calendar-time_io.adb | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | 1 | 2016-12-19T13:25:14.000Z | 2016-12-19T13:25:14.000Z | source/tabula-calendar-time_io.adb | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | null | null | null | source/tabula-calendar-time_io.adb | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | null | null | null | -- The Village of Vampire by YT, このソースコードはNYSLです
with Ada.Calendar.Formatting;
package body Tabula.Calendar.Time_IO is
function Image (Date : Ada.Calendar.Time) return String is
begin
return Ada.Calendar.Formatting.Image (Date, Time_Zone => Time_Offset);
end Image;
function Value (Image : String) return Ada.Calendar.Time is
begin
return Ada.Calendar.Formatting.Value (Image, Time_Zone => Time_Offset);
end Value;
package Time_IO is
new Serialization.IO_Custom (
Ada.Calendar.Time,
Image,
Value,
Triming => False);
procedure IO (
Serializer : not null access Serialization.Serializer;
Name : in String;
Value : in out Ada.Calendar.Time)
renames Time_IO.IO;
package Duration_IO is
new Serialization.IO_Custom (
Duration,
Duration'Image,
Duration'Value,
Triming => True);
procedure IO (
Serializer : not null access Serialization.Serializer;
Name : in String;
Value : in out Duration)
renames Duration_IO.IO;
end Tabula.Calendar.Time_IO;
| 25.1 | 73 | 0.73506 |
3d0cf9a8ca258fd2d17aa04b1af2b34ec286aacd | 1,997 | adb | Ada | src/_test/fixtures/apsepp_shared_instance_test_fixture.adb | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | src/_test/fixtures/apsepp_shared_instance_test_fixture.adb | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | src/_test/fixtures/apsepp_shared_instance_test_fixture.adb | thierr26/ada-apsepp | 6eb87079ea57707db4ee1e2215fa170af66b1913 | [
"MIT"
] | null | null | null | -- Copyright (C) 2019 Thierry Rascle <[email protected]>
-- MIT license. Please refer to the LICENSE file.
package body Apsepp_Shared_Instance_Test_Fixture is
----------------------------------------------------------------------------
Lock_Count_Var : Natural := 0;
Unlock_Count_Var : Natural := 0;
CB_Calls_Count_Var : Natural := 0;
----------------------------------------------------------------------------
procedure Increment_Lock_Count is
begin
Lock_Count_Var := Lock_Count_Var + 1;
end Increment_Lock_Count;
----------------------------------------------------------------------------
procedure Increment_Unlock_Count is
begin
Unlock_Count_Var := Unlock_Count_Var + 1;
end Increment_Unlock_Count;
----------------------------------------------------------------------------
procedure CB is
begin
CB_Calls_Count_Var := CB_Calls_Count_Var + 1;
end CB;
----------------------------------------------------------------------------
not overriding
procedure Reset (Obj : Shared_Instance_Test_Fixture) is
pragma Unreferenced (Obj);
begin
Lock_Count_Var := 0;
Unlock_Count_Var := 0;
CB_Calls_Count_Var := 0;
end Reset;
----------------------------------------------------------------------------
not overriding
function Lock_Count (Obj : Shared_Instance_Test_Fixture) return Natural
is (Lock_Count_Var);
----------------------------------------------------------------------------
not overriding
function Unlock_Count (Obj : Shared_Instance_Test_Fixture) return Natural
is (Unlock_Count_Var);
----------------------------------------------------------------------------
not overriding
function CB_Calls_Count (Obj : Shared_Instance_Test_Fixture) return Natural
is (CB_Calls_Count_Var);
----------------------------------------------------------------------------
end Apsepp_Shared_Instance_Test_Fixture;
| 25.602564 | 79 | 0.455684 |
58e5c3e99775f5de418a5b3fb4cee9ffeb0fb33d | 3,867 | ads | Ada | tools/scitools/conf/understand/ada/ada12/a-wtmoio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | 1 | 2020-01-20T21:26:46.000Z | 2020-01-20T21:26:46.000Z | tools/scitools/conf/understand/ada/ada12/a-wtmoio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | tools/scitools/conf/understand/ada/ada12/a-wtmoio.ads | brucegua/moocos | 575c161cfa35e220f10d042e2e5ca18773691695 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . W I D E _ T E X T _ I O . M O D U L A R _ I O --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2009, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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 3, 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. --
-- --
-- --
-- --
-- --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- In Ada 95, the package Ada.Wide_Text_IO.Modular_IO is a subpackage of
-- Wide_Text_IO. In GNAT we make it a child package to avoid loading the
-- necessary code if Modular_IO is not instantiated. See the routine
-- Rtsfind.Text_IO_Kludge for a description of how we patch up the
-- difference in semantics so that it is invisible to the Ada programmer.
private generic
type Num is mod <>;
package Ada.Wide_Text_IO.Modular_IO is
Default_Width : Field := Num'Width;
Default_Base : Number_Base := 10;
procedure Get
(File : File_Type;
Item : out Num;
Width : Field := 0);
procedure Get
(Item : out Num;
Width : Field := 0);
procedure Put
(File : File_Type;
Item : Num;
Width : Field := Default_Width;
Base : Number_Base := Default_Base);
procedure Put
(Item : Num;
Width : Field := Default_Width;
Base : Number_Base := Default_Base);
procedure Get
(From : Wide_String;
Item : out Num;
Last : out Positive);
procedure Put
(To : out Wide_String;
Item : Num;
Base : Number_Base := Default_Base);
end Ada.Wide_Text_IO.Modular_IO;
| 47.740741 | 78 | 0.427205 |
41e6b673448960b469ce9a9ad308c904e675ead2 | 3,820 | ads | Ada | llvm-gcc-4.2-2.9/gcc/ada/a-tiflau.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | llvm-gcc-4.2-2.9/gcc/ada/a-tiflau.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | llvm-gcc-4.2-2.9/gcc/ada/a-tiflau.ads | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . T E X T _ I O . F L O A T _ A U X --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the routines for Ada.Text_IO.Float_IO that are
-- shared among separate instantiations of this package. The routines in
-- this package are identical semantically to those in Float_IO itself,
-- except that generic parameter Num has been replaced by Long_Long_Float,
-- and the default parameters have been removed because they are supplied
-- explicitly by the calls from within the generic template. This package
-- is also used by Ada.Text_IO.Fixed_IO, and Ada.Text_IO.Decimal_IO.
private package Ada.Text_IO.Float_Aux is
procedure Load_Real
(File : File_Type;
Buf : out String;
Ptr : in out Natural);
-- This is an auxiliary routine that is used to load a possibly signed
-- real literal value from the input file into Buf, starting at Ptr + 1.
procedure Get
(File : File_Type;
Item : out Long_Long_Float;
Width : Field);
procedure Put
(File : File_Type;
Item : Long_Long_Float;
Fore : Field;
Aft : Field;
Exp : Field);
procedure Gets
(From : String;
Item : out Long_Long_Float;
Last : out Positive);
procedure Puts
(To : out String;
Item : Long_Long_Float;
Aft : Field;
Exp : Field);
end Ada.Text_IO.Float_Aux;
| 50.933333 | 78 | 0.500785 |
22fd0a17be655d8eb3aa8f677912bb009c6a50ea | 9,809 | adb | Ada | tools-src/gnu/gcc/gcc/ada/g-calend.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 80 | 2015-01-02T10:14:04.000Z | 2021-06-07T06:29:49.000Z | tools-src/gnu/gcc/gcc/ada/g-calend.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 9 | 2015-05-14T11:03:12.000Z | 2018-01-04T07:12:58.000Z | tools-src/gnu/gcc/gcc/ada/g-calend.adb | modern-tomato/tomato | 96f09fab4929c6ddde5c9113f1b2476ad37133c4 | [
"FSFAP"
] | 69 | 2015-01-02T10:45:56.000Z | 2021-09-06T07:52:13.000Z | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . C A L E N D A R --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 1999-2001 Ada Core Technologies, 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, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
package body GNAT.Calendar is
use Ada.Calendar;
use Interfaces;
-----------------
-- Day_In_Year --
-----------------
function Day_In_Year (Date : Time) return Day_In_Year_Number is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Dsecs : Day_Duration;
begin
Split (Date, Year, Month, Day, Dsecs);
return Julian_Day (Year, Month, Day) - Julian_Day (Year, 1, 1) + 1;
end Day_In_Year;
-----------------
-- Day_Of_Week --
-----------------
function Day_Of_Week (Date : Time) return Day_Name is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Dsecs : Day_Duration;
begin
Split (Date, Year, Month, Day, Dsecs);
return Day_Name'Val ((Julian_Day (Year, Month, Day)) mod 7);
end Day_Of_Week;
----------
-- Hour --
----------
function Hour (Date : Time) return Hour_Number is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
begin
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
return Hour;
end Hour;
----------------
-- Julian_Day --
----------------
-- Julian_Day is used to by Day_Of_Week and Day_In_Year. Note
-- that this implementation is not expensive.
function Julian_Day
(Year : Year_Number;
Month : Month_Number;
Day : Day_Number)
return Integer
is
Internal_Year : Integer;
Internal_Month : Integer;
Internal_Day : Integer;
Julian_Date : Integer;
C : Integer;
Ya : Integer;
begin
Internal_Year := Integer (Year);
Internal_Month := Integer (Month);
Internal_Day := Integer (Day);
if Internal_Month > 2 then
Internal_Month := Internal_Month - 3;
else
Internal_Month := Internal_Month + 9;
Internal_Year := Internal_Year - 1;
end if;
C := Internal_Year / 100;
Ya := Internal_Year - (100 * C);
Julian_Date := (146_097 * C) / 4 +
(1_461 * Ya) / 4 +
(153 * Internal_Month + 2) / 5 +
Internal_Day + 1_721_119;
return Julian_Date;
end Julian_Day;
------------
-- Minute --
------------
function Minute (Date : Time) return Minute_Number is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
begin
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
return Minute;
end Minute;
------------
-- Second --
------------
function Second (Date : Time) return Second_Number is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
begin
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
return Second;
end Second;
-----------
-- Split --
-----------
procedure Split
(Date : Time;
Year : out Year_Number;
Month : out Month_Number;
Day : out Day_Number;
Hour : out Hour_Number;
Minute : out Minute_Number;
Second : out Second_Number;
Sub_Second : out Second_Duration)
is
Dsecs : Day_Duration;
Secs : Natural;
begin
Split (Date, Year, Month, Day, Dsecs);
if Dsecs = 0.0 then
Secs := 0;
else
Secs := Natural (Dsecs - 0.5);
end if;
Sub_Second := Second_Duration (Dsecs - Day_Duration (Secs));
Hour := Hour_Number (Secs / 3600);
Secs := Secs mod 3600;
Minute := Minute_Number (Secs / 60);
Second := Second_Number (Secs mod 60);
end Split;
----------------
-- Sub_Second --
----------------
function Sub_Second (Date : Time) return Second_Duration is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
begin
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
return Sub_Second;
end Sub_Second;
-------------
-- Time_Of --
-------------
function Time_Of
(Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration := 0.0)
return Time
is
Dsecs : constant Day_Duration :=
Day_Duration (Hour * 3600 + Minute * 60 + Second) +
Sub_Second;
begin
return Time_Of (Year, Month, Day, Dsecs);
end Time_Of;
-----------------
-- To_Duration --
-----------------
function To_Duration (T : access timeval) return Duration is
procedure timeval_to_duration
(T : access timeval;
sec : access C.long;
usec : access C.long);
pragma Import (C, timeval_to_duration, "__gnat_timeval_to_duration");
Micro : constant := 10**6;
sec : aliased C.long;
usec : aliased C.long;
begin
timeval_to_duration (T, sec'Access, usec'Access);
return Duration (sec) + Duration (usec) / Micro;
end To_Duration;
----------------
-- To_Timeval --
----------------
function To_Timeval (D : Duration) return timeval is
procedure duration_to_timeval (Sec, Usec : C.long; T : access timeval);
pragma Import (C, duration_to_timeval, "__gnat_duration_to_timeval");
Micro : constant := 10**6;
Result : aliased timeval;
sec : C.long;
usec : C.long;
begin
if D = 0.0 then
sec := 0;
usec := 0;
else
sec := C.long (D - 0.5);
usec := C.long ((D - Duration (sec)) * Micro - 0.5);
end if;
duration_to_timeval (sec, usec, Result'Access);
return Result;
end To_Timeval;
------------------
-- Week_In_Year --
------------------
function Week_In_Year
(Date : Ada.Calendar.Time)
return Week_In_Year_Number
is
Year : Year_Number;
Month : Month_Number;
Day : Day_Number;
Hour : Hour_Number;
Minute : Minute_Number;
Second : Second_Number;
Sub_Second : Second_Duration;
Offset : Natural;
begin
Split (Date, Year, Month, Day, Hour, Minute, Second, Sub_Second);
-- Day offset number for the first week of the year.
Offset := Julian_Day (Year, 1, 1) mod 7;
return 1 + ((Day_In_Year (Date) - 1) + Offset) / 7;
end Week_In_Year;
end GNAT.Calendar;
| 30.653125 | 78 | 0.494036 |
290acdc89cf63b01ea44d00c0b92709699bd6ebd | 2,293 | ads | Ada | source/tabula-casts.ads | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | 1 | 2016-12-19T13:25:14.000Z | 2016-12-19T13:25:14.000Z | source/tabula-casts.ads | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | null | null | null | source/tabula-casts.ads | ytomino/vampire | 2ff6c93af53e55c89cab70fedb63accba83bcd92 | [
"OpenSSL",
"Unlicense"
] | null | null | null | -- The Village of Vampire by YT, このソースコードはNYSLです
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
package Tabula.Casts is
type Group is record
Name : aliased Ada.Strings.Unbounded.Unbounded_String;
By : aliased Ada.Strings.Unbounded.Unbounded_String;
Width : Integer;
Height : Integer;
Group : Integer;
end record;
Empty_Group : constant Group := (
Name => Ada.Strings.Unbounded.Null_Unbounded_String,
By => Ada.Strings.Unbounded.Null_Unbounded_String,
Width => 0,
Height => 0,
Group => 0);
package Groups is new Ada.Containers.Vectors (Natural, Group);
function Find (Container : Groups.Vector; Group : Integer)
return Groups.Cursor;
type Neutralable_Sex is (Neutral, Male, Female);
subtype Person_Sex is Neutralable_Sex range Male .. Female;
type Person is tagged record
Name : aliased Ada.Strings.Unbounded.Unbounded_String;
Work : aliased Ada.Strings.Unbounded.Unbounded_String;
Image : aliased Ada.Strings.Unbounded.Unbounded_String;
Sex : Person_Sex;
Group : Integer;
end record;
function Is_Empty (Item : Person) return Boolean;
Empty_Person : constant Person := (
Name => Ada.Strings.Unbounded.Null_Unbounded_String,
Work => Ada.Strings.Unbounded.Null_Unbounded_String,
Image => Ada.Strings.Unbounded.Null_Unbounded_String,
Sex => Male,
Group => 0);
package People is new Ada.Containers.Vectors (Natural, Person);
type Work is record
Name : aliased Ada.Strings.Unbounded.Unbounded_String;
Sex : Neutralable_Sex;
Nominated : Boolean;
end record;
function Is_Empty (Item : Work) return Boolean;
Empty_Work : constant Work := (
Name => Ada.Strings.Unbounded.Null_Unbounded_String,
Sex => Neutral,
Nominated => False);
package Works is new Ada.Containers.Vectors (Natural, Work);
function Find (Works : Casts.Works.Vector; Name : String)
return Casts.Works.Cursor;
type Cast_Collection is
-- limited -- see tabula-casts-load.adb
record
Groups : aliased Casts.Groups.Vector;
People : aliased Casts.People.Vector;
Works : aliased Casts.Works.Vector;
end record;
procedure Exclude_Person (
Cast : in out Cast_Collection;
Name : in String;
Group : in Integer);
procedure Exclude_Work (
Cast : in out Cast_Collection;
Name : in String);
end Tabula.Casts;
| 27.626506 | 64 | 0.735717 |
1378c4013eb0db9ede95de453b49fc38de00ae09 | 846 | adb | Ada | gdb-7.3/gdb/testsuite/gdb.ada/ptype_field/pck.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | 1 | 2016-04-09T02:58:13.000Z | 2016-04-09T02:58:13.000Z | gdb-7.3/gdb/testsuite/gdb.ada/ptype_field/pck.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | gdb-7.3/gdb/testsuite/gdb.ada/ptype_field/pck.adb | vidkidz/crossbridge | ba0bf94aee0ce6cf7eb5be882382e52bc57ba396 | [
"MIT"
] | null | null | null | -- Copyright 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT 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
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
package body Pck is
procedure Do_Nothing (C : in out Circle) is
begin
null;
end Do_Nothing;
end Pck;
| 35.25 | 73 | 0.724586 |
0490cfba595b19d9acbd0c64207bcf310151bd39 | 5,472 | adb | Ada | orka/src/gl/implementation/gl-debug.adb | onox/orka | 9edf99559a16ffa96dfdb208322f4d18efbcbac6 | [
"Apache-2.0"
] | 52 | 2016-07-30T23:00:28.000Z | 2022-02-05T11:54:55.000Z | orka/src/gl/implementation/gl-debug.adb | onox/orka | 9edf99559a16ffa96dfdb208322f4d18efbcbac6 | [
"Apache-2.0"
] | 79 | 2016-08-01T18:36:48.000Z | 2022-02-27T12:14:20.000Z | orka/src/gl/implementation/gl-debug.adb | onox/orka | 9edf99559a16ffa96dfdb208322f4d18efbcbac6 | [
"Apache-2.0"
] | 4 | 2018-04-28T22:36:26.000Z | 2020-11-14T23:00:29.000Z | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2017 onox <[email protected]>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with System;
with Interfaces.C.Strings;
with Ada.Unchecked_Deallocation;
with GL.API;
with GL.Enums.Getter;
package body GL.Debug is
Any : constant Low_Level.Enum := 16#1100#;
Current_Callback : Callback_Reference := null;
procedure Debug_Callback
(From : Source;
Kind : Message_Type;
ID : GL.Types.UInt;
Level : Severity;
Length : GL.Types.Size;
C_Message : C.Strings.chars_ptr;
User_Data : System.Address)
with Convention => StdCall;
procedure Debug_Callback
(From : Source;
Kind : Message_Type;
ID : GL.Types.UInt;
Level : Severity;
Length : GL.Types.Size;
C_Message : C.Strings.chars_ptr;
User_Data : System.Address)
is
Message : constant String := C.Strings.Value (C_Message, C.size_t (Length));
begin
if Current_Callback /= null then
Current_Callback (From, Kind, Level, ID, Message);
end if;
end Debug_Callback;
procedure Set_Message_Callback (Callback : not null Callback_Reference) is
begin
API.Debug_Message_Callback.Ref (Debug_Callback'Address, System.Null_Address);
Current_Callback := Callback;
end Set_Message_Callback;
procedure Disable_Message_Callback is
begin
API.Debug_Message_Callback.Ref (System.Null_Address, System.Null_Address);
Current_Callback := null;
end Disable_Message_Callback;
procedure Set (From : Source; Kind : Message_Type; Level : Severity;
Enabled : Boolean) is
Identifiers : Types.UInt_Array (1 .. 0);
begin
API.Debug_Message_Control.Ref
(From, Kind, Level, 0, Identifiers, Low_Level.Bool (Enabled));
end Set;
procedure Set (Level : Severity; Enabled : Boolean) is
Identifiers : Types.UInt_Array (1 .. 0);
begin
API.Debug_Message_Control_Level.Ref
(Any, Any, Level, 0, Identifiers, Low_Level.Bool (Enabled));
end Set;
procedure Set (From : Source; Kind : Message_Type; Identifiers : Types.UInt_Array;
Enabled : Boolean) is
begin
API.Debug_Message_Control_Any_Level.Ref
(From, Kind, Any, Types.Size (Identifiers'Length),
Identifiers, Low_Level.Bool (Enabled));
end Set;
procedure Insert_Message (From : Source; Kind : Message_Type; Level : Severity;
Identifier : UInt; Message : String) is
pragma Assert (From in Third_Party | Application);
begin
API.Debug_Message_Insert.Ref (From, Kind, Identifier, Level,
Types.Size (Message'Length), C.To_C (Message));
end Insert_Message;
function Push_Debug_Group (From : Source; Identifier : UInt; Message : String)
return Active_Group'Class is
pragma Assert (From in Third_Party | Application);
begin
API.Push_Debug_Group.Ref (From, Identifier,
Types.Size (Message'Length), C.To_C (Message));
return Active_Group'(Ada.Finalization.Limited_Controlled with Finalized => False);
end Push_Debug_Group;
overriding
procedure Finalize (Object : in out Active_Group) is
begin
if not Object.Finalized then
API.Pop_Debug_Group.Ref.all;
Object.Finalized := True;
end if;
end Finalize;
procedure Annotate (Object : GL.Objects.GL_Object'Class; Message : String) is
begin
API.Object_Label.Ref
(Object.Identifier, Object.Raw_Id, Types.Size (Message'Length), C.To_C (Message));
end Annotate;
function Get_Label (Object : GL.Objects.GL_Object'Class) return String is
procedure Free is new Ada.Unchecked_Deallocation
(Object => Types.Size, Name => GL.Low_Level.Size_Access);
C_Size : GL.Low_Level.Size_Access := new Types.Size'(0);
Label_Size : Types.Size := 0;
begin
API.Get_Object_Label_Length.Ref
(Object.Identifier, Object.Raw_Id, 0,
C_Size, Interfaces.C.Strings.Null_Ptr);
-- Deallocate before potentially raising an exception
Label_Size := C_Size.all;
Free (C_Size);
if Label_Size = 0 then
return "";
end if;
declare
Label : String (1 .. Integer (Label_Size));
begin
API.Get_Object_Label.Ref
(Object.Identifier, Object.Raw_Id, Label_Size, Label_Size, Label);
return Label;
end;
end Get_Label;
function Max_Message_Length return Size is
Result : Int := 0;
begin
API.Get_Integer.Ref (Enums.Getter.Max_Debug_Message_Length, Result);
return Result;
end Max_Message_Length;
package body Messages is
procedure Log (Level : Severity; Message : String) is
begin
GL.Debug.Insert_Message (From, Kind, Level, ID, Message);
end Log;
end Messages;
end GL.Debug;
| 32.571429 | 90 | 0.660636 |
2ea1f82b18c8d8e1e1031e42df16a6226452294a | 1,121 | ads | Ada | src/asf-contexts.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 12 | 2015-01-18T23:02:20.000Z | 2022-03-25T15:30:30.000Z | src/asf-contexts.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 3 | 2021-01-06T09:44:02.000Z | 2022-02-04T20:20:53.000Z | src/asf-contexts.ads | jquorning/ada-asf | ddc697c5dfa4e22c57c6958f4cff27e14d02ce98 | [
"Apache-2.0"
] | 4 | 2016-04-12T05:29:00.000Z | 2022-01-24T23:53:59.000Z | -----------------------------------------------------------------------
-- asf-contexts -- ASF Contexts
-- Copyright (C) 2009, 2010 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
-- The <b>ASF.Contexts</b> defines the context types that allows to access
-- and retrieve information from the request and response.
--
-- The <b>Faces_Context</b> is the main context seen by application.
--
package ASF.Contexts is
pragma Pure;
end ASF.Contexts;
| 38.655172 | 76 | 0.636039 |
415c40c552b4dfb0aa9f9e1fe0f51c2be400c489 | 29,299 | ads | Ada | src/util-locales.ads | Letractively/ada-util | e4c63b93635dc07c46e95f12ba02d18903b307b3 | [
"Apache-2.0"
] | null | null | null | src/util-locales.ads | Letractively/ada-util | e4c63b93635dc07c46e95f12ba02d18903b307b3 | [
"Apache-2.0"
] | null | null | null | src/util-locales.ads | Letractively/ada-util | e4c63b93635dc07c46e95f12ba02d18903b307b3 | [
"Apache-2.0"
] | null | null | null | -----------------------------------------------------------------------
-- Util.Locales -- Locale
-- Copyright (C) 2001, 2002, 2003, 2009, 2010, 2011, 2012, 2013 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Containers;
-- The <b>Locales</b> package defines the <b>Locale</b> type to represent
-- the language, country and variant.
--
-- The language is a valid <b>ISO language code</b>. This is a two-letter
-- lower case code defined by IS-639
-- See http://www.loc.gov/standards/iso639-2/englangn.html
--
-- The country is a valid <b>ISO country code</b>. These codes are
-- a two letter upper-case code defined by ISO-3166.
-- See http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
--
-- The variant part is a vendor or browser specific code.
--
-- The <b>Locales</b> package tries to follow the Java <b>Locale</b> class.
package Util.Locales is
pragma Preelaborate;
type Locale is private;
type Locale_Array is array (Positive range <>) of Locale;
-- List of locales.
Locales : constant Locale_Array;
-- Get the lowercase two-letter ISO-639 code.
function Get_Language (Loc : in Locale) return String;
-- Get the ISO 639-2 language code.
function Get_ISO3_Language (Loc : in Locale) return String;
-- Get the uppercase two-letter ISO-3166 code.
function Get_Country (Loc : in Locale) return String;
-- Get the ISO-3166-2 country code.
function Get_ISO3_Country (Loc : in Locale) return String;
-- Get the variant code
function Get_Variant (Loc : in Locale) return String;
-- Get the locale for the given language code
function Get_Locale (Language : in String) return Locale;
-- Get the locale for the given language and country code
function Get_Locale (Language : in String;
Country : in String) return Locale;
-- Get the locale for the given language, country and variant code
function Get_Locale (Language : in String;
Country : in String;
Variant : in String) return Locale;
-- Get the locale code in the form <i>language</i>_<i>country</i>_<i>variant</i>.
function To_String (Loc : in Locale) return String;
-- Compute the hash value of the locale.
function Hash (Loc : in Locale) return Ada.Containers.Hash_Type;
NULL_LOCALE : constant Locale;
-- French language
FRENCH : constant Locale;
-- English language
ENGLISH : constant Locale;
-- German language
GERMAN : constant Locale;
-- Italian language
ITALIAN : constant Locale;
FRANCE : constant Locale;
CANADA : constant Locale;
GERMANY : constant Locale;
ITALY : constant Locale;
US : constant Locale;
UK : constant Locale;
private
type Locale is access constant String;
ALBANIAN_STR : aliased constant String := "sq.sqi";
ALBANIAN_ALBANIA_STR : aliased constant String := "sq_AL.sqi.ALB";
ARABIC_STR : aliased constant String := "ar.ara";
ARABIC_ALGERIA_STR : aliased constant String := "ar_DZ.ara.DZA";
ARABIC_BAHRAIN_STR : aliased constant String := "ar_BH.ara.BHR";
ARABIC_EGYPT_STR : aliased constant String := "ar_EG.ara.EGY";
ARABIC_IRAQ_STR : aliased constant String := "ar_IQ.ara.IRQ";
ARABIC_JORDAN_STR : aliased constant String := "ar_JO.ara.JOR";
ARABIC_KUWAIT_STR : aliased constant String := "ar_KW.ara.KWT";
ARABIC_LEBANON_STR : aliased constant String := "ar_LB.ara.LBN";
ARABIC_LIBYA_STR : aliased constant String := "ar_LY.ara.LBY";
ARABIC_MOROCCO_STR : aliased constant String := "ar_MA.ara.MAR";
ARABIC_OMAN_STR : aliased constant String := "ar_OM.ara.OMN";
ARABIC_QATAR_STR : aliased constant String := "ar_QA.ara.QAT";
ARABIC_SAUDI_ARABIA_STR : aliased constant String := "ar_SA.ara.SAU";
ARABIC_SUDAN_STR : aliased constant String := "ar_SD.ara.SDN";
ARABIC_SYRIA_STR : aliased constant String := "ar_SY.ara.SYR";
ARABIC_TUNISIA_STR : aliased constant String := "ar_TN.ara.TUN";
ARABIC_UNITED_ARAB_EMIRATES_STR : aliased constant String := "ar_AE.ara.ARE";
ARABIC_YEMEN_STR : aliased constant String := "ar_YE.ara.YEM";
BELARUSIAN_STR : aliased constant String := "be.bel";
BELARUSIAN_BELARUS_STR : aliased constant String := "be_BY.bel.BLR";
BULGARIAN_STR : aliased constant String := "bg.bul";
BULGARIAN_BULGARIA_STR : aliased constant String := "bg_BG.bul.BGR";
CATALAN_STR : aliased constant String := "ca.cat";
CATALAN_SPAIN_STR : aliased constant String := "ca_ES.cat.ESP";
CHINESE_STR : aliased constant String := "zh.zho";
CHINESE_CHINA_STR : aliased constant String := "zh_CN.zho.CHN";
CHINESE_HONG_KONG_STR : aliased constant String := "zh_HK.zho.HKG";
CHINESE_SINGAPORE_STR : aliased constant String := "zh_SG.zho.SGP";
CHINESE_TAIWAN_STR : aliased constant String := "zh_TW.zho.TWN";
CROATIAN_STR : aliased constant String := "hr.hrv";
CROATIAN_CROATIA_STR : aliased constant String := "hr_HR.hrv.HRV";
CZECH_STR : aliased constant String := "cs.ces";
CZECH_CZECH_REPUBLIC_STR : aliased constant String := "cs_CZ.ces.CZE";
DANISH_STR : aliased constant String := "da.dan";
DANISH_DENMARK_STR : aliased constant String := "da_DK.dan.DNK";
DUTCH_STR : aliased constant String := "nl.nld";
DUTCH_BELGIUM_STR : aliased constant String := "nl_BE.nld.BEL";
DUTCH_NETHERLANDS_STR : aliased constant String := "nl_NL.nld.NLD";
ENGLISH_STR : aliased constant String := "en.eng";
ENGLISH_AUSTRALIA_STR : aliased constant String := "en_AU.eng.AUS";
ENGLISH_CANADA_STR : aliased constant String := "en_CA.eng.CAN";
ENGLISH_INDIA_STR : aliased constant String := "en_IN.eng.IND";
ENGLISH_IRELAND_STR : aliased constant String := "en_IE.eng.IRL";
ENGLISH_MALTA_STR : aliased constant String := "en_MT.eng.MLT";
ENGLISH_NEW_ZEALAND_STR : aliased constant String := "en_NZ.eng.NZL";
ENGLISH_PHILIPPINES_STR : aliased constant String := "en_PH.eng.PHL";
ENGLISH_SINGAPORE_STR : aliased constant String := "en_SG.eng.SGP";
ENGLISH_SOUTH_AFRICA_STR : aliased constant String := "en_ZA.eng.ZAF";
ENGLISH_UNITED_KINGDOM_STR : aliased constant String := "en_GB.eng.GBR";
ENGLISH_UNITED_STATES_STR : aliased constant String := "en_US.eng.USA";
ESTONIAN_STR : aliased constant String := "et.est";
ESTONIAN_ESTONIA_STR : aliased constant String := "et_EE.est.EST";
FINNISH_STR : aliased constant String := "fi.fin";
FINNISH_FINLAND_STR : aliased constant String := "fi_FI.fin.FIN";
FRENCH_STR : aliased constant String := "fr.fra";
FRENCH_BELGIUM_STR : aliased constant String := "fr_BE.fra.BEL";
FRENCH_CANADA_STR : aliased constant String := "fr_CA.fra.CAN";
FRENCH_FRANCE_STR : aliased constant String := "fr_FR.fra.FRA";
FRENCH_LUXEMBOURG_STR : aliased constant String := "fr_LU.fra.LUX";
FRENCH_SWITZERLAND_STR : aliased constant String := "fr_CH.fra.CHE";
GERMAN_STR : aliased constant String := "de.deu";
GERMAN_AUSTRIA_STR : aliased constant String := "de_AT.deu.AUT";
GERMAN_GERMANY_STR : aliased constant String := "de_DE.deu.DEU";
GERMAN_LUXEMBOURG_STR : aliased constant String := "de_LU.deu.LUX";
GERMAN_SWITZERLAND_STR : aliased constant String := "de_CH.deu.CHE";
GREEK_STR : aliased constant String := "el.ell";
GREEK_CYPRUS_STR : aliased constant String := "el_CY.ell.CYP";
GREEK_GREECE_STR : aliased constant String := "el_GR.ell.GRC";
HEBREW_STR : aliased constant String := "iw.heb";
HEBREW_ISRAEL_STR : aliased constant String := "iw_IL.heb.ISR";
HINDI_INDIA_STR : aliased constant String := "hi_IN.hin.IND";
HUNGARIAN_STR : aliased constant String := "hu.hun";
HUNGARIAN_HUNGARY_STR : aliased constant String := "hu_HU.hun.HUN";
ICELANDIC_STR : aliased constant String := "is.isl";
ICELANDIC_ICELAND_STR : aliased constant String := "is_IS.isl.ISL";
INDONESIAN_STR : aliased constant String := "in.ind";
INDONESIAN_INDONESIA_STR : aliased constant String := "in_ID.ind.IDN";
IRISH_STR : aliased constant String := "ga.gle";
IRISH_IRELAND_STR : aliased constant String := "ga_IE.gle.IRL";
ITALIAN_STR : aliased constant String := "it.ita";
ITALIAN_ITALY_STR : aliased constant String := "it_IT.ita.ITA";
ITALIAN_SWITZERLAND_STR : aliased constant String := "it_CH.ita.CHE";
JAPANESE_STR : aliased constant String := "ja.jpn";
JAPANESE_JAPAN_STR : aliased constant String := "ja_JP.jpn.JPN";
JAPANESE_JAPAN_JP_STR : aliased constant String := "ja_JP_JP.jpn_JP.JPN";
KOREAN_STR : aliased constant String := "ko.kor";
KOREAN_SOUTH_KOREA_STR : aliased constant String := "ko_KR.kor.KOR";
LATVIAN_STR : aliased constant String := "lv.lav";
LATVIAN_LATVIA_STR : aliased constant String := "lv_LV.lav.LVA";
LITHUANIAN_STR : aliased constant String := "lt.lit";
LITHUANIAN_LITHUANIA_STR : aliased constant String := "lt_LT.lit.LTU";
MACEDONIAN_STR : aliased constant String := "mk.mkd";
MACEDONIAN_MACEDONIA_STR : aliased constant String := "mk_MK.mkd.MKD";
MALAY_STR : aliased constant String := "ms.msa";
MALAY_MALAYSIA_STR : aliased constant String := "ms_MY.msa.MYS";
MALTESE_STR : aliased constant String := "mt.mlt";
MALTESE_MALTA_STR : aliased constant String := "mt_MT.mlt.MLT";
NORWEGIAN_STR : aliased constant String := "no.nor";
NORWEGIAN_NORWAY_STR : aliased constant String := "no_NO.nor.NOR";
NORWEGIAN_NORWAY_NYNORSK_STR : aliased constant String := "no_NO_NY.nor_NY.NOR";
POLISH_STR : aliased constant String := "pl.pol";
POLISH_POLAND_STR : aliased constant String := "pl_PL.pol.POL";
PORTUGUESE_STR : aliased constant String := "pt.por";
PORTUGUESE_BRAZIL_STR : aliased constant String := "pt_BR.por.BRA";
PORTUGUESE_PORTUGAL_STR : aliased constant String := "pt_PT.por.PRT";
ROMANIAN_STR : aliased constant String := "ro.ron";
ROMANIAN_ROMANIA_STR : aliased constant String := "ro_RO.ron.ROU";
RUSSIAN_STR : aliased constant String := "ru.rus";
RUSSIAN_RUSSIA_STR : aliased constant String := "ru_RU.rus.RUS";
SERBIAN_STR : aliased constant String := "sr.srp";
SERBIAN_BOSNIA_AND_HERZEGOVINA_STR : aliased constant String := "sr_BA.srp.BIH";
SERBIAN_MONTENEGRO_STR : aliased constant String := "sr_ME.srp.MNE";
SERBIAN_SERBIA_STR : aliased constant String := "sr_RS.srp.SRB";
SERBIAN_SERBIA_AND_MONTENEGRO_STR : aliased constant String := "sr_CS.srp.SCG";
SLOVAK_STR : aliased constant String := "sk.slk";
SLOVAK_SLOVAKIA_STR : aliased constant String := "sk_SK.slk.SVK";
SLOVENIAN_STR : aliased constant String := "sl.slv";
SLOVENIAN_SLOVENIA_STR : aliased constant String := "sl_SI.slv.SVN";
SPANISH_STR : aliased constant String := "es.spa";
SPANISH_ARGENTINA_STR : aliased constant String := "es_AR.spa.ARG";
SPANISH_BOLIVIA_STR : aliased constant String := "es_BO.spa.BOL";
SPANISH_CHILE_STR : aliased constant String := "es_CL.spa.CHL";
SPANISH_COLOMBIA_STR : aliased constant String := "es_CO.spa.COL";
SPANISH_COSTA_RICA_STR : aliased constant String := "es_CR.spa.CRI";
SPANISH_DOMINICAN_REPUBLIC_STR : aliased constant String := "es_DO.spa.DOM";
SPANISH_ECUADOR_STR : aliased constant String := "es_EC.spa.ECU";
SPANISH_EL_SALVADOR_STR : aliased constant String := "es_SV.spa.SLV";
SPANISH_GUATEMALA_STR : aliased constant String := "es_GT.spa.GTM";
SPANISH_HONDURAS_STR : aliased constant String := "es_HN.spa.HND";
SPANISH_MEXICO_STR : aliased constant String := "es_MX.spa.MEX";
SPANISH_NICARAGUA_STR : aliased constant String := "es_NI.spa.NIC";
SPANISH_PANAMA_STR : aliased constant String := "es_PA.spa.PAN";
SPANISH_PARAGUAY_STR : aliased constant String := "es_PY.spa.PRY";
SPANISH_PERU_STR : aliased constant String := "es_PE.spa.PER";
SPANISH_PUERTO_RICO_STR : aliased constant String := "es_PR.spa.PRI";
SPANISH_SPAIN_STR : aliased constant String := "es_ES.spa.ESP";
SPANISH_UNITED_STATES_STR : aliased constant String := "es_US.spa.USA";
SPANISH_URUGUAY_STR : aliased constant String := "es_UY.spa.URY";
SPANISH_VENEZUELA_STR : aliased constant String := "es_VE.spa.VEN";
SWEDISH_STR : aliased constant String := "sv.swe";
SWEDISH_SWEDEN_STR : aliased constant String := "sv_SE.swe.SWE";
THAI_STR : aliased constant String := "th.tha";
THAI_THAILAND_STR : aliased constant String := "th_TH.tha.THA";
THAI_THAILAND_TH_STR : aliased constant String := "th_TH_TH.tha_TH.THA";
TURKISH_STR : aliased constant String := "tr.tur";
TURKISH_TURKEY_STR : aliased constant String := "tr_TR.tur.TUR";
UKRAINIAN_STR : aliased constant String := "uk.ukr";
UKRAINIAN_UKRAINE_STR : aliased constant String := "uk_UA.ukr.UKR";
VIETNAMESE_STR : aliased constant String := "vi.vie";
VIETNAMESE_VIETNAM_STR : aliased constant String := "vi_VN.vie.VNM";
-- The locales must be sorted on the locale string.
Locales : constant Locale_Array (1 .. 152) := (
ARABIC_STR'Access,
ARABIC_UNITED_ARAB_EMIRATES_STR'Access,
ARABIC_BAHRAIN_STR'Access,
ARABIC_ALGERIA_STR'Access,
ARABIC_EGYPT_STR'Access,
ARABIC_IRAQ_STR'Access,
ARABIC_JORDAN_STR'Access,
ARABIC_KUWAIT_STR'Access,
ARABIC_LEBANON_STR'Access,
ARABIC_LIBYA_STR'Access,
ARABIC_MOROCCO_STR'Access,
ARABIC_OMAN_STR'Access,
ARABIC_QATAR_STR'Access,
ARABIC_SAUDI_ARABIA_STR'Access,
ARABIC_SUDAN_STR'Access,
ARABIC_SYRIA_STR'Access,
ARABIC_TUNISIA_STR'Access,
ARABIC_YEMEN_STR'Access,
BELARUSIAN_STR'Access,
BELARUSIAN_BELARUS_STR'Access,
BULGARIAN_STR'Access,
BULGARIAN_BULGARIA_STR'Access,
CATALAN_STR'Access,
CATALAN_SPAIN_STR'Access,
CZECH_STR'Access,
CZECH_CZECH_REPUBLIC_STR'Access,
DANISH_STR'Access,
DANISH_DENMARK_STR'Access,
GERMAN_STR'Access,
GERMAN_AUSTRIA_STR'Access,
GERMAN_SWITZERLAND_STR'Access,
GERMAN_GERMANY_STR'Access,
GERMAN_LUXEMBOURG_STR'Access,
GREEK_STR'Access,
GREEK_CYPRUS_STR'Access,
GREEK_GREECE_STR'Access,
ENGLISH_STR'Access,
ENGLISH_AUSTRALIA_STR'Access,
ENGLISH_CANADA_STR'Access,
ENGLISH_UNITED_KINGDOM_STR'Access,
ENGLISH_IRELAND_STR'Access,
ENGLISH_INDIA_STR'Access,
ENGLISH_MALTA_STR'Access,
ENGLISH_NEW_ZEALAND_STR'Access,
ENGLISH_PHILIPPINES_STR'Access,
ENGLISH_SINGAPORE_STR'Access,
ENGLISH_UNITED_STATES_STR'Access,
ENGLISH_SOUTH_AFRICA_STR'Access,
SPANISH_STR'Access,
SPANISH_ARGENTINA_STR'Access,
SPANISH_BOLIVIA_STR'Access,
SPANISH_CHILE_STR'Access,
SPANISH_COLOMBIA_STR'Access,
SPANISH_COSTA_RICA_STR'Access,
SPANISH_DOMINICAN_REPUBLIC_STR'Access,
SPANISH_ECUADOR_STR'Access,
SPANISH_SPAIN_STR'Access,
SPANISH_GUATEMALA_STR'Access,
SPANISH_HONDURAS_STR'Access,
SPANISH_MEXICO_STR'Access,
SPANISH_NICARAGUA_STR'Access,
SPANISH_PANAMA_STR'Access,
SPANISH_PERU_STR'Access,
SPANISH_PUERTO_RICO_STR'Access,
SPANISH_PARAGUAY_STR'Access,
SPANISH_EL_SALVADOR_STR'Access,
SPANISH_UNITED_STATES_STR'Access,
SPANISH_URUGUAY_STR'Access,
SPANISH_VENEZUELA_STR'Access,
ESTONIAN_STR'Access,
ESTONIAN_ESTONIA_STR'Access,
FINNISH_STR'Access,
FINNISH_FINLAND_STR'Access,
FRENCH_STR'Access,
FRENCH_BELGIUM_STR'Access,
FRENCH_CANADA_STR'Access,
FRENCH_SWITZERLAND_STR'Access,
FRENCH_FRANCE_STR'Access,
FRENCH_LUXEMBOURG_STR'Access,
IRISH_STR'Access,
IRISH_IRELAND_STR'Access,
HINDI_INDIA_STR'Access,
CROATIAN_STR'Access,
CROATIAN_CROATIA_STR'Access,
HUNGARIAN_STR'Access,
HUNGARIAN_HUNGARY_STR'Access,
INDONESIAN_STR'Access,
INDONESIAN_INDONESIA_STR'Access,
ICELANDIC_STR'Access,
ICELANDIC_ICELAND_STR'Access,
ITALIAN_STR'Access,
ITALIAN_SWITZERLAND_STR'Access,
ITALIAN_ITALY_STR'Access,
HEBREW_STR'Access,
HEBREW_ISRAEL_STR'Access,
JAPANESE_STR'Access,
JAPANESE_JAPAN_STR'Access,
JAPANESE_JAPAN_JP_STR'Access,
KOREAN_STR'Access,
KOREAN_SOUTH_KOREA_STR'Access,
LITHUANIAN_STR'Access,
LITHUANIAN_LITHUANIA_STR'Access,
LATVIAN_STR'Access,
LATVIAN_LATVIA_STR'Access,
MACEDONIAN_STR'Access,
MACEDONIAN_MACEDONIA_STR'Access,
MALAY_STR'Access,
MALAY_MALAYSIA_STR'Access,
MALTESE_STR'Access,
MALTESE_MALTA_STR'Access,
DUTCH_STR'Access,
DUTCH_BELGIUM_STR'Access,
DUTCH_NETHERLANDS_STR'Access,
NORWEGIAN_STR'Access,
NORWEGIAN_NORWAY_STR'Access,
NORWEGIAN_NORWAY_NYNORSK_STR'Access,
POLISH_STR'Access,
POLISH_POLAND_STR'Access,
PORTUGUESE_STR'Access,
PORTUGUESE_BRAZIL_STR'Access,
PORTUGUESE_PORTUGAL_STR'Access,
ROMANIAN_STR'Access,
ROMANIAN_ROMANIA_STR'Access,
RUSSIAN_STR'Access,
RUSSIAN_RUSSIA_STR'Access,
SLOVAK_STR'Access,
SLOVAK_SLOVAKIA_STR'Access,
SLOVENIAN_STR'Access,
SLOVENIAN_SLOVENIA_STR'Access,
ALBANIAN_STR'Access,
ALBANIAN_ALBANIA_STR'Access,
SERBIAN_STR'Access,
SERBIAN_BOSNIA_AND_HERZEGOVINA_STR'Access,
SERBIAN_SERBIA_AND_MONTENEGRO_STR'Access,
SERBIAN_MONTENEGRO_STR'Access,
SERBIAN_SERBIA_STR'Access,
SWEDISH_STR'Access,
SWEDISH_SWEDEN_STR'Access,
THAI_STR'Access,
THAI_THAILAND_STR'Access,
THAI_THAILAND_TH_STR'Access,
TURKISH_STR'Access,
TURKISH_TURKEY_STR'Access,
UKRAINIAN_STR'Access,
UKRAINIAN_UKRAINE_STR'Access,
VIETNAMESE_STR'Access,
VIETNAMESE_VIETNAM_STR'Access,
CHINESE_STR'Access,
CHINESE_CHINA_STR'Access,
CHINESE_HONG_KONG_STR'Access,
CHINESE_SINGAPORE_STR'Access,
CHINESE_TAIWAN_STR'Access);
NULL_LOCALE : constant Locale := null;
FRENCH : constant Locale := FRENCH_STR'Access;
ITALIAN : constant Locale := ITALIAN_STR'Access;
GERMAN : constant Locale := GERMAN_STR'Access;
ENGLISH : constant Locale := ENGLISH_STR'Access;
FRANCE : constant Locale := FRENCH_FRANCE_STR'Access;
ITALY : constant Locale := ITALIAN_ITALY_STR'Access;
CANADA : constant Locale := ENGLISH_CANADA_STR'Access;
GERMANY : constant Locale := GERMAN_GERMANY_STR'Access;
US : constant Locale := ENGLISH_UNITED_STATES_STR'Access;
UK : constant Locale := ENGLISH_UNITED_KINGDOM_STR'Access;
end Util.Locales;
| 67.509217 | 95 | 0.467968 |
58eb0a2a52907f856474663bf9654f1d59c5ded7 | 129 | adb | Ada | Blob_Lib/assimp-5.2.3/assimp/contrib/zlib/contrib/ada/zlib-streams.adb | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/contrib/zlib/contrib/ada/zlib-streams.adb | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/contrib/zlib/contrib/ada/zlib-streams.adb | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:f45988e2bac76eb25a0dc981f46576e7432c35dde1790bbc2b650f0090b7fa72
size 5996
| 32.25 | 75 | 0.883721 |
13c881a6c409a3c6336a447bcd431feb44a29925 | 2,413 | ads | Ada | extern/game_support/stm32f4/src/memory_barriers.ads | AdaCore/training_material | 6651eb2c53f8c39649b8e0b3c757bc8ff963025a | [
"CC-BY-4.0"
] | 15 | 2020-10-07T08:56:45.000Z | 2022-02-08T23:13:22.000Z | extern/game_support/stm32f4/src/memory_barriers.ads | AdaCore/training_material | 6651eb2c53f8c39649b8e0b3c757bc8ff963025a | [
"CC-BY-4.0"
] | 20 | 2020-11-05T14:35:20.000Z | 2022-01-13T15:59:33.000Z | extern/game_support/stm32f4/src/memory_barriers.ads | AdaCore/training_material | 6651eb2c53f8c39649b8e0b3c757bc8ff963025a | [
"CC-BY-4.0"
] | 6 | 2020-10-08T15:57:06.000Z | 2021-08-31T12:03:08.000Z | ------------------------------------------------------------------------------
-- --
-- Hardware Abstraction Layer for STM32 Targets --
-- --
-- Copyright (C) 2014, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This file provides utility functions for the STM32F4 (ARM Cortex M4F)
-- microcontrollers from ST Microelectronics.
package Memory_Barriers is
procedure Data_Synchronization_Barrier with Inline;
-- Injects instruction "DSB Sy" i.e., a "full system" domain barrier
procedure DSB renames Data_Synchronization_Barrier;
end Memory_Barriers;
| 60.325 | 78 | 0.472855 |
4b8028f1240142036a762b96372c09cc87fd3358 | 11,411 | ads | Ada | tables.ads | jrcarter/Ada_GUI | 65a829c55dec91fd48a0b72f88d76137768bf4fb | [
"BSD-3-Clause"
] | 19 | 2018-03-18T18:07:14.000Z | 2022-03-30T03:10:12.000Z | tables.ads | jrcarter/Ada_GUI | 65a829c55dec91fd48a0b72f88d76137768bf4fb | [
"BSD-3-Clause"
] | 4 | 2021-08-23T12:52:06.000Z | 2022-03-31T10:48:43.000Z | tables.ads | jrcarter/Ada_GUI | 65a829c55dec91fd48a0b72f88d76137768bf4fb | [
"BSD-3-Clause"
] | null | null | null | -- --
-- package Tables Copyright (c) Dmitry A. Kazakov --
-- Interface Luebeck --
-- Spring, 2000 --
-- --
-- Last revision : 13:11 14 Sep 2019 --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public License as --
-- published by the Free Software Foundation; either version 2 of --
-- the License, or (at your option) any later version. This library --
-- is distributed in the hope that it will be useful, but WITHOUT --
-- 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 along with --
-- this library; if not, write to the Free Software Foundation, --
-- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. --
--____________________________________________________________________--
--
-- The package Tables provides tables searched using string keys. The
-- binary search is used for names of known length. It is also possible
-- to search a table for names of unknown length, i.e. to parse a string
-- using the table. In this case the search time is near to logarthmic,
-- but in worst case can be linear (when table contains tokens like "a",
-- "aa", "aaa" and so on). The package is generic. The instantiation
-- parameter is the type of the data tag associated with a table item.
-- The table is initially empty. It is automatically enlarged as new
-- items are added. Upon destruction the memory used by the the table is
-- reclaimed. Items in the table can be accessed either by their offsets
-- (in alphabethical order) or by names. Text parsing is also supported.
-- Table assignment makes a deep copy.
--
-- Design notes. Unfortunately the type Table needs to be a controlled
-- type. This makes instantiation possible at the library level only.
-- This is surely a design flaw (of controlled types).
--
with Ada.Finalization;
generic
type Tag is private;
package Tables is
type Table is new Ada.Finalization.Controlled with private;
--
-- Add -- Insert an item
--
-- Folder - To be modified
-- Name - Of the item
-- Data - The tag associated with the item
-- [ Offset ] - Of the item (output)
--
-- This procedure is used to add an item. It raises an exception if an
-- item with the same name is already in the table. The parameter Offset
-- when used, is set the offset of the newly added item. See also
-- Replace.
--
-- Exceptions :
--
-- Name_Error - An item with the name is already in the table
--
procedure Add
( Folder : in out Table;
Name : String;
Data : Tag
);
procedure Add
( Folder : in out Table;
Name : String;
Data : Tag;
Offset : out Positive
);
--
-- Adjust -- Assignment
--
-- Folder - The target
--
procedure Adjust (Folder : in out Table);
--
-- Delete -- Remove item
--
-- Folder - To be modified
-- Name - Of the item
--
-- This procedure is used to remove item from the table. Nothing happens
-- when there is no item with the given name.
--
procedure Delete (Folder : in out Table; Name : String);
--
-- Delete -- Remove item by its offset
--
-- Folder - The table
-- Offset - The offset of the item to be deleted
--
-- Exceptions :
--
-- End_Error - There is no such item
--
procedure Delete
( Folder : in out Table;
Offset : Positive
);
--
-- Erase -- Remove all items
--
-- Folder - To be modified
--
-- This procedure is used to remove all items from the table.
--
procedure Erase (Folder : in out Table);
--
-- Finalize -- Destructor
--
-- Folder - To be destroyed
--
procedure Finalize (Folder : in out Table);
--
-- Find -- Search table for an item
--
-- Folder - To be searched
-- Name - Of the item
--
-- Returns :
--
-- Tag of the found item
--
-- Exceptions :
--
-- End_Error - There is no such item
--
function Find (Folder : Table; Name : String) return Tag;
--
-- Get -- Parse
--
-- Source - The source string to be parsed
-- Pointer - The current string position
-- Folder - To be searched
-- Data - The tag associated with the found item
-- [ Got_It ] - True an item was matched
--
-- This procedure is used to parse the string specified by the parameter
-- Source using the table Folder. The procedure tries to find the item
-- with the longest name that matches the string Source starting from
-- the position defined by the parameter Pointer. On success Pointer is
-- advanced to the first position following the name of the found item.
-- I.e. Source (OldPointer..Pointer - 1) is the name of the found item.
-- Note that unlike Find that searches tables in logarithmic time, Get
-- could require linear time in some pathological cases.
--
-- Exceptions :
--
-- End_Error - There is no such item
-- Layout_Error - Pointer is not in Source'First..Source'Last+1
--
procedure Get
( Source : String;
Pointer : in out Integer;
Folder : Table;
Data : out Tag
);
procedure Get
( Source : String;
Pointer : in out Integer;
Folder : Table;
Data : out Tag;
Got_It : out Boolean
);
--
-- GetName -- Get item name
--
-- Folder - The table
-- Offset - Of the item
--
-- This function is used to get the name of a table item. All items in
-- the table are enumerated in alphabetical order. The first item has
-- the offset 1. See also GetSize.
--
-- Returns :
--
-- The name
--
-- Exceptions :
--
-- End_Error - There is no such item
--
function GetName (Folder : Table; Offset : Positive) return String;
--
-- GetSize -- Get the number of items in the table
--
-- Folder - The table
--
-- Returns :
--
-- The number of items
--
function GetSize (Folder : Table) return Natural;
--
-- GetTag -- Get item tag
--
-- Folder - The table
-- Offset - Of the item
--
-- This function is used to get the tag of a table item. All items in
-- the table are enumerated in alphabetical order. The first item has
-- the offset 1. See also GetSize.
--
-- Returns :
--
-- The tag
--
-- Exceptions :
--
-- End_Error - There is no such item
--
function GetTag (Folder : Table; Offset : Positive) return Tag;
--
-- IsIn -- Membership test
--
-- Folder - To be searched
-- Name - Of the item
--
-- Returns :
--
-- True if Folder contains an item for Name
--
function IsIn (Folder : Table; Name : String) return Boolean;
--
-- Locate -- Search table for an item
--
-- Folder - To be searched
-- Name - Of the item
--
-- Returns :
--
-- Offset to the item or else 0
--
function Locate (Folder : Table; Name : String) return Natural;
--
-- Locate -- Parse
--
-- Source - The source string to be parsed
-- Pointer - The current string position
-- Folder - To be searched
-- Offset - To the found item or else 0
--
-- This procedure is similar to Get, but returns the found item offset
-- instead.
--
-- Exceptions :
--
-- Layout_Error - Pointer is not in Source'First..Source'Last+1
--
procedure Locate
( Source : String;
Pointer : in out Integer;
Folder : Table;
Offset : out Natural
);
--
-- Replace -- Insert or replace an item
--
-- Folder - To be modified
-- Name - Of the item
-- Data - The tag associated with the item
-- [ Offset ] - Of the item (output)
--
-- This procedure is used to add an item. If the table already contains
-- an item with the same name it is replaced by the new one. The
-- parameter Offset, when present, is set to the offset of the item. See
-- also Add.
--
procedure Replace
( Folder : in out Table;
Name : String;
Data : Tag
);
procedure Replace
( Folder : in out Table;
Name : String;
Data : Tag;
Offset : out Positive
);
--
-- Replace -- Replace an item
--
-- Folder - To be modified
-- Offset - Of the item
-- Data - The tag associated with the item
--
-- This procedure is used to replace an item. The item is specified by
-- its offset 1..GetSize.
--
-- Exceptions :
--
-- End_Error - There is no such item
--
procedure Replace
( Folder : in out Table;
Offset : Positive;
Data : Tag
);
private
pragma Inline (Find);
pragma Inline (Get);
pragma Inline (GetSize);
pragma Inline (GetTag);
pragma Inline (IsIn);
pragma Inline (Replace);
type Token (Length : Natural) is record
Data : Tag;
Name : String (1..Length);
end record;
type TokenPtr is access Token;
type TokenList is array (Positive range <>) of TokenPtr;
type TokenListPtr is access TokenList;
type Table is new Ada.Finalization.Controlled with record
Size : Natural := 0;
List : TokenListPtr := null;
end record;
type Equality is (Less, Equal, Greater);
--
-- Insert -- Insert the item
--
-- Folder - The table
-- Place - The offset of the new item
-- Name - Its name
-- Data - Its tag
--
-- This procedure is used internally to insert a new item into the
-- table. No checks made!
--
procedure Insert
( Folder : in out Table;
Place : Positive;
Name : String;
Data : Tag
);
--
-- Search -- The table
--
-- Folder - The table to be searched
-- Name - To be searched for
--
-- Returns :
--
-- [+] The offset of the found item
-- [-] The offset where the item could be
--
function Search (Folder : Table; Name : String) return Integer;
end Tables;
| 31.435262 | 73 | 0.570765 |
3d36a16e0c5bc2bb27a78c2278d439fa3dc41321 | 1,421 | ads | Ada | tier-1/xcb/source/thin/xcb-xcb_glx_window_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 2 | 2015-11-12T11:16:20.000Z | 2021-08-24T22:32:04.000Z | tier-1/xcb/source/thin/xcb-xcb_glx_window_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | 1 | 2018-06-05T05:19:35.000Z | 2021-11-20T01:13:23.000Z | tier-1/xcb/source/thin/xcb-xcb_glx_window_iterator_t.ads | charlie5/cBound | 741be08197a61ad9c72553e3302f3b669902216d | [
"0BSD"
] | null | null | null | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces.C;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_window_iterator_t is
-- Item
--
type Item is record
data : access xcb.xcb_glx_window_t;
the_rem : aliased Interfaces.C.int;
index : aliased Interfaces.C.int;
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_glx_window_iterator_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_window_iterator_t.Item,
Element_Array => xcb.xcb_glx_window_iterator_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C.size_t range <>) of aliased xcb.xcb_glx_window_iterator_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_window_iterator_t.Pointer,
Element_Array => xcb.xcb_glx_window_iterator_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_window_iterator_t;
| 26.811321 | 78 | 0.667136 |
ad582a73eecf49ac494c9e8af79e766c70e31ebd | 23,709 | ads | Ada | arch/ARM/STM32/devices/stm32l4x6/stm32-device.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 2 | 2018-05-16T03:56:39.000Z | 2019-07-31T13:53:56.000Z | arch/ARM/STM32/devices/stm32l4x6/stm32-device.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | arch/ARM/STM32/devices/stm32l4x6/stm32-device.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2017, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of STMicroelectronics nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
-- --
-- This file is based on: --
-- --
-- @file stm32l43[5|7]xx.h --
-- @author MCD Application Team --
-- @version V1.1.0 --
-- @date 19-June-2014 --
-- @brief CMSIS STM32F407xx Device Peripheral Access Layer Header File. --
-- --
-- COPYRIGHT(c) 2014 STMicroelectronics --
------------------------------------------------------------------------------
-- This file provides declarations for devices on the STM32F40xxx MCUs
-- manufactured by ST Microelectronics. For example, an STM32F405.
with STM32_SVD; use STM32_SVD;
with STM32_SVD.SAI;
with STM32.GPIO; use STM32.GPIO;
with STM32.I2C; use STM32.I2C;
with STM32.SPI; use STM32.SPI;
with STM32.Timers; use STM32.Timers;
with STM32.DAC; use STM32.DAC;
with STM32.ADC; use STM32.ADC;
with STM32.DMA; use STM32.DMA;
with STM32.DFSDM; use STM32.DFSDM;
package STM32.Device is
pragma Elaborate_Body;
Unknown_Device : exception;
-- Raised by the routines below for a device passed as an actual parameter
-- when that device is not present on the given hardware instance.
procedure Enable_Clock (This : aliased in out GPIO_Port);
procedure Enable_Clock (Point : GPIO_Point);
procedure Enable_Clock (Points : GPIO_Points);
procedure Enable_Clock (This : in out Timer);
Timer_1 : aliased Timer with Import, Volatile, Address => TIM1_Base;
Timer_2 : aliased Timer with Import, Volatile, Address => TIM2_Base;
Timer_3 : aliased Timer with Import, Volatile, Address => TIM3_Base;
Timer_4 : aliased Timer with Import, Volatile, Address => TIM4_Base;
Timer_5 : aliased Timer with Import, Volatile, Address => TIM5_Base;
Timer_6 : aliased Timer with Import, Volatile, Address => TIM6_Base;
Timer_7 : aliased Timer with Import, Volatile, Address => TIM7_Base;
Timer_8 : aliased Timer with Import, Volatile, Address => TIM8_Base;
Timer_15 : aliased Timer with Import, Volatile, Address => TIM15_Base;
Timer_16 : aliased Timer with Import, Volatile, Address => TIM16_Base;
Timer_17 : aliased Timer with Import, Volatile, Address => TIM17_Base;
procedure Reset (This : aliased in out GPIO_Port)
with Inline;
procedure Reset (Point : GPIO_Point)
with Inline;
procedure Reset (Points : GPIO_Points)
with Inline;
procedure Reset (This : in out Timer);
-----------
-- Audio --
-----------
subtype SAI_Port is STM32_SVD.SAI.SAI_Peripheral;
SAI_1 : SAI_Port renames STM32_SVD.SAI.SAI1_Periph;
SAI_2 : SAI_Port renames STM32_SVD.SAI.SAI2_Periph;
procedure Enable_Clock (This : in out SAI_Port);
procedure Reset (This : in out SAI_Port);
function Get_Input_Clock (Periph : SAI_Port) return UInt32;
function GPIO_Port_Representation (Port : GPIO_Port) return UInt4
with Inline;
GPIO_A : aliased GPIO_Port with Import, Volatile, Address => GPIOA_Base;
GPIO_B : aliased GPIO_Port with Import, Volatile, Address => GPIOB_Base;
GPIO_C : aliased GPIO_Port with Import, Volatile, Address => GPIOC_Base;
GPIO_D : aliased GPIO_Port with Import, Volatile, Address => GPIOD_Base;
GPIO_E : aliased GPIO_Port with Import, Volatile, Address => GPIOE_Base;
GPIO_F : aliased GPIO_Port with Import, Volatile, Address => GPIOF_Base;
GPIO_G : aliased GPIO_Port with Import, Volatile, Address => GPIOG_Base;
GPIO_H : aliased GPIO_Port with Import, Volatile, Address => GPIOH_Base;
GPIO_I : aliased GPIO_Port with Import, Volatile, Address => GPIOI_Base;
PA0 : aliased GPIO_Point := (GPIO_A'Access, Pin_0);
PA1 : aliased GPIO_Point := (GPIO_A'Access, Pin_1);
PA2 : aliased GPIO_Point := (GPIO_A'Access, Pin_2);
PA3 : aliased GPIO_Point := (GPIO_A'Access, Pin_3);
PA4 : aliased GPIO_Point := (GPIO_A'Access, Pin_4);
PA5 : aliased GPIO_Point := (GPIO_A'Access, Pin_5);
PA6 : aliased GPIO_Point := (GPIO_A'Access, Pin_6);
PA7 : aliased GPIO_Point := (GPIO_A'Access, Pin_7);
PA8 : aliased GPIO_Point := (GPIO_A'Access, Pin_8);
PA9 : aliased GPIO_Point := (GPIO_A'Access, Pin_9);
PA10 : aliased GPIO_Point := (GPIO_A'Access, Pin_10);
PA11 : aliased GPIO_Point := (GPIO_A'Access, Pin_11);
PA12 : aliased GPIO_Point := (GPIO_A'Access, Pin_12);
PA13 : aliased GPIO_Point := (GPIO_A'Access, Pin_13);
PA14 : aliased GPIO_Point := (GPIO_A'Access, Pin_14);
PA15 : aliased GPIO_Point := (GPIO_A'Access, Pin_15);
PB0 : aliased GPIO_Point := (GPIO_B'Access, Pin_0);
PB1 : aliased GPIO_Point := (GPIO_B'Access, Pin_1);
PB2 : aliased GPIO_Point := (GPIO_B'Access, Pin_2);
PB3 : aliased GPIO_Point := (GPIO_B'Access, Pin_3);
PB4 : aliased GPIO_Point := (GPIO_B'Access, Pin_4);
PB5 : aliased GPIO_Point := (GPIO_B'Access, Pin_5);
PB6 : aliased GPIO_Point := (GPIO_B'Access, Pin_6);
PB7 : aliased GPIO_Point := (GPIO_B'Access, Pin_7);
PB8 : aliased GPIO_Point := (GPIO_B'Access, Pin_8);
PB9 : aliased GPIO_Point := (GPIO_B'Access, Pin_9);
PB10 : aliased GPIO_Point := (GPIO_B'Access, Pin_10);
PB11 : aliased GPIO_Point := (GPIO_B'Access, Pin_11);
PB12 : aliased GPIO_Point := (GPIO_B'Access, Pin_12);
PB13 : aliased GPIO_Point := (GPIO_B'Access, Pin_13);
PB14 : aliased GPIO_Point := (GPIO_B'Access, Pin_14);
PB15 : aliased GPIO_Point := (GPIO_B'Access, Pin_15);
PC0 : aliased GPIO_Point := (GPIO_C'Access, Pin_0);
PC1 : aliased GPIO_Point := (GPIO_C'Access, Pin_1);
PC2 : aliased GPIO_Point := (GPIO_C'Access, Pin_2);
PC3 : aliased GPIO_Point := (GPIO_C'Access, Pin_3);
PC4 : aliased GPIO_Point := (GPIO_C'Access, Pin_4);
PC5 : aliased GPIO_Point := (GPIO_C'Access, Pin_5);
PC6 : aliased GPIO_Point := (GPIO_C'Access, Pin_6);
PC7 : aliased GPIO_Point := (GPIO_C'Access, Pin_7);
PC8 : aliased GPIO_Point := (GPIO_C'Access, Pin_8);
PC9 : aliased GPIO_Point := (GPIO_C'Access, Pin_9);
PC10 : aliased GPIO_Point := (GPIO_C'Access, Pin_10);
PC11 : aliased GPIO_Point := (GPIO_C'Access, Pin_11);
PC12 : aliased GPIO_Point := (GPIO_C'Access, Pin_12);
PC13 : aliased GPIO_Point := (GPIO_C'Access, Pin_13);
PC14 : aliased GPIO_Point := (GPIO_C'Access, Pin_14);
PC15 : aliased GPIO_Point := (GPIO_C'Access, Pin_15);
PD0 : aliased GPIO_Point := (GPIO_D'Access, Pin_0);
PD1 : aliased GPIO_Point := (GPIO_D'Access, Pin_1);
PD2 : aliased GPIO_Point := (GPIO_D'Access, Pin_2);
PD3 : aliased GPIO_Point := (GPIO_D'Access, Pin_3);
PD4 : aliased GPIO_Point := (GPIO_D'Access, Pin_4);
PD5 : aliased GPIO_Point := (GPIO_D'Access, Pin_5);
PD6 : aliased GPIO_Point := (GPIO_D'Access, Pin_6);
PD7 : aliased GPIO_Point := (GPIO_D'Access, Pin_7);
PD8 : aliased GPIO_Point := (GPIO_D'Access, Pin_8);
PD9 : aliased GPIO_Point := (GPIO_D'Access, Pin_9);
PD10 : aliased GPIO_Point := (GPIO_D'Access, Pin_10);
PD11 : aliased GPIO_Point := (GPIO_D'Access, Pin_11);
PD12 : aliased GPIO_Point := (GPIO_D'Access, Pin_12);
PD13 : aliased GPIO_Point := (GPIO_D'Access, Pin_13);
PD14 : aliased GPIO_Point := (GPIO_D'Access, Pin_14);
PD15 : aliased GPIO_Point := (GPIO_D'Access, Pin_15);
PE0 : aliased GPIO_Point := (GPIO_E'Access, Pin_0);
PE1 : aliased GPIO_Point := (GPIO_E'Access, Pin_1);
PE2 : aliased GPIO_Point := (GPIO_E'Access, Pin_2);
PE3 : aliased GPIO_Point := (GPIO_E'Access, Pin_3);
PE4 : aliased GPIO_Point := (GPIO_E'Access, Pin_4);
PE5 : aliased GPIO_Point := (GPIO_E'Access, Pin_5);
PE6 : aliased GPIO_Point := (GPIO_E'Access, Pin_6);
PE7 : aliased GPIO_Point := (GPIO_E'Access, Pin_7);
PE8 : aliased GPIO_Point := (GPIO_E'Access, Pin_8);
PE9 : aliased GPIO_Point := (GPIO_E'Access, Pin_9);
PE10 : aliased GPIO_Point := (GPIO_E'Access, Pin_10);
PE11 : aliased GPIO_Point := (GPIO_E'Access, Pin_11);
PE12 : aliased GPIO_Point := (GPIO_E'Access, Pin_12);
PE13 : aliased GPIO_Point := (GPIO_E'Access, Pin_13);
PE14 : aliased GPIO_Point := (GPIO_E'Access, Pin_14);
PE15 : aliased GPIO_Point := (GPIO_E'Access, Pin_15);
PF0 : aliased GPIO_Point := (GPIO_F'Access, Pin_0);
PF1 : aliased GPIO_Point := (GPIO_F'Access, Pin_1);
PF2 : aliased GPIO_Point := (GPIO_F'Access, Pin_2);
PF3 : aliased GPIO_Point := (GPIO_F'Access, Pin_3);
PF4 : aliased GPIO_Point := (GPIO_F'Access, Pin_4);
PF5 : aliased GPIO_Point := (GPIO_F'Access, Pin_5);
PF6 : aliased GPIO_Point := (GPIO_F'Access, Pin_6);
PF7 : aliased GPIO_Point := (GPIO_F'Access, Pin_7);
PF8 : aliased GPIO_Point := (GPIO_F'Access, Pin_8);
PF9 : aliased GPIO_Point := (GPIO_F'Access, Pin_9);
PF10 : aliased GPIO_Point := (GPIO_F'Access, Pin_10);
PF11 : aliased GPIO_Point := (GPIO_F'Access, Pin_11);
PF12 : aliased GPIO_Point := (GPIO_F'Access, Pin_12);
PF13 : aliased GPIO_Point := (GPIO_F'Access, Pin_13);
PF14 : aliased GPIO_Point := (GPIO_F'Access, Pin_14);
PF15 : aliased GPIO_Point := (GPIO_F'Access, Pin_15);
PG0 : aliased GPIO_Point := (GPIO_G'Access, Pin_0);
PG1 : aliased GPIO_Point := (GPIO_G'Access, Pin_1);
PG2 : aliased GPIO_Point := (GPIO_G'Access, Pin_2);
PG3 : aliased GPIO_Point := (GPIO_G'Access, Pin_3);
PG4 : aliased GPIO_Point := (GPIO_G'Access, Pin_4);
PG5 : aliased GPIO_Point := (GPIO_G'Access, Pin_5);
PG6 : aliased GPIO_Point := (GPIO_G'Access, Pin_6);
PG7 : aliased GPIO_Point := (GPIO_G'Access, Pin_7);
PG8 : aliased GPIO_Point := (GPIO_G'Access, Pin_8);
PG9 : aliased GPIO_Point := (GPIO_G'Access, Pin_9);
PG10 : aliased GPIO_Point := (GPIO_G'Access, Pin_10);
PG11 : aliased GPIO_Point := (GPIO_G'Access, Pin_11);
PG12 : aliased GPIO_Point := (GPIO_G'Access, Pin_12);
PG13 : aliased GPIO_Point := (GPIO_G'Access, Pin_13);
PG14 : aliased GPIO_Point := (GPIO_G'Access, Pin_14);
PG15 : aliased GPIO_Point := (GPIO_G'Access, Pin_15);
PH0 : aliased GPIO_Point := (GPIO_H'Access, Pin_0);
PH1 : aliased GPIO_Point := (GPIO_H'Access, Pin_1);
PH2 : aliased GPIO_Point := (GPIO_H'Access, Pin_2);
PH3 : aliased GPIO_Point := (GPIO_H'Access, Pin_3);
PH4 : aliased GPIO_Point := (GPIO_H'Access, Pin_4);
PH5 : aliased GPIO_Point := (GPIO_H'Access, Pin_5);
PH6 : aliased GPIO_Point := (GPIO_H'Access, Pin_6);
PH7 : aliased GPIO_Point := (GPIO_H'Access, Pin_7);
PH8 : aliased GPIO_Point := (GPIO_H'Access, Pin_8);
PH9 : aliased GPIO_Point := (GPIO_H'Access, Pin_9);
PH10 : aliased GPIO_Point := (GPIO_H'Access, Pin_10);
PH11 : aliased GPIO_Point := (GPIO_H'Access, Pin_11);
PH12 : aliased GPIO_Point := (GPIO_H'Access, Pin_12);
PH13 : aliased GPIO_Point := (GPIO_H'Access, Pin_13);
PH14 : aliased GPIO_Point := (GPIO_H'Access, Pin_14);
PH15 : aliased GPIO_Point := (GPIO_H'Access, Pin_15);
PI0 : aliased GPIO_Point := (GPIO_I'Access, Pin_0);
PI1 : aliased GPIO_Point := (GPIO_I'Access, Pin_1);
PI2 : aliased GPIO_Point := (GPIO_I'Access, Pin_2);
PI3 : aliased GPIO_Point := (GPIO_I'Access, Pin_3);
PI4 : aliased GPIO_Point := (GPIO_I'Access, Pin_4);
PI5 : aliased GPIO_Point := (GPIO_I'Access, Pin_5);
PI6 : aliased GPIO_Point := (GPIO_I'Access, Pin_6);
PI7 : aliased GPIO_Point := (GPIO_I'Access, Pin_7);
PI8 : aliased GPIO_Point := (GPIO_I'Access, Pin_8);
PI9 : aliased GPIO_Point := (GPIO_I'Access, Pin_9);
PI10 : aliased GPIO_Point := (GPIO_I'Access, Pin_10);
PI11 : aliased GPIO_Point := (GPIO_I'Access, Pin_11);
PI12 : aliased GPIO_Point := (GPIO_I'Access, Pin_12);
PI13 : aliased GPIO_Point := (GPIO_I'Access, Pin_13);
PI14 : aliased GPIO_Point := (GPIO_I'Access, Pin_14);
PI15 : aliased GPIO_Point := (GPIO_I'Access, Pin_15);
GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function;
GPIO_AF_MCO_0 : constant GPIO_Alternate_Function;
GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function;
GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function;
GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function;
GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function;
GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function;
GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function;
GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function;
GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function;
GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function;
GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function;
GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function;
GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function;
GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function;
GPIO_AF_I2S2ext_5 : constant GPIO_Alternate_Function;
GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function;
GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function;
GPIO_AF_I2Sext_6 : constant GPIO_Alternate_Function;
GPIO_AF_I2S3ext_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART1_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART2_7 : constant GPIO_Alternate_Function;
GPIO_AF_USART3_7 : constant GPIO_Alternate_Function;
GPIO_AF_UART4_8 : constant GPIO_Alternate_Function;
GPIO_AF_UART5_8 : constant GPIO_Alternate_Function;
GPIO_AF_USART6_8 : constant GPIO_Alternate_Function;
GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function;
GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function;
GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function;
GPIO_AF_OTG_FS_10 : constant GPIO_Alternate_Function;
GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function;
GPIO_AF_ETH_11 : constant GPIO_Alternate_Function;
GPIO_AF_FMC_12 : constant GPIO_Alternate_Function;
GPIO_AF_OTG_FS_12 : constant GPIO_Alternate_Function;
GPIO_AF_SAI1_13 : constant GPIO_Alternate_Function;
GPIO_AF_SAI2_13 : constant GPIO_Alternate_Function;
GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_0 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_1 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_2 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_3 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_4 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_5 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_6 : constant GPIO_Alternate_Function;
GPIO_AF_DFSDM1_7 : constant GPIO_Alternate_Function;
-----------------------------
-- Reset and Clock Control --
-----------------------------
type RCC_System_Clocks is record
SYSCLK : UInt32;
HCLK : UInt32;
PCLK1 : UInt32;
PCLK2 : UInt32;
TIMCLK1 : UInt32;
TIMCLK2 : UInt32;
I2SCLK : UInt32;
end record;
function System_Clock_Frequencies return RCC_System_Clocks;
Internal_I2C_Port_1 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C1_Base;
Internal_I2C_Port_2 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C2_Base;
Internal_I2C_Port_3 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C3_Base;
Internal_I2C_Port_4 : aliased Internal_I2C_Port
with Import, Volatile, Address => I2C4_Base;
I2C_1 : aliased I2C_Port (Internal_I2C_Port_1'Access);
I2C_2 : aliased I2C_Port (Internal_I2C_Port_2'Access);
I2C_3 : aliased I2C_Port (Internal_I2C_Port_3'Access);
I2C_4 : aliased I2C_Port (Internal_I2C_Port_4'Access);
type I2C_Port_Id is (I2C_Id_1, I2C_Id_2, I2C_Id_3, I2C_Id_4);
function As_Port_Id (Port : I2C_Port) return I2C_Port_Id with Inline;
procedure Enable_Clock (This : I2C_Port);
procedure Enable_Clock (This : I2C_Port_Id);
procedure Reset (This : I2C_Port);
procedure Reset (This : I2C_Port_Id);
Internal_SPI_1 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI1_Base;
Internal_SPI_2 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI2_Base;
Internal_SPI_3 : aliased Internal_SPI_Port
with Import, Volatile, Address => SPI3_Base;
SPI_1 : aliased SPI_Port (Internal_SPI_1'Access);
SPI_2 : aliased SPI_Port (Internal_SPI_2'Access);
SPI_3 : aliased SPI_Port (Internal_SPI_3'Access);
procedure Enable_Clock (This : SPI_Port);
procedure Reset (This : in out SPI_Port);
ADC : aliased Analog_To_Digital_Converter with Import, Volatile, Address => ADC_Base;
procedure Enable_Clock (This : aliased in out Analog_To_Digital_Converter);
procedure Reset_All_ADC_Units;
DAC : aliased Digital_To_Analog_Converter with Import, Volatile, Address => DAC_Base;
DAC_Channel_1_IO : GPIO_Point renames PA4;
DAC_Channel_2_IO : GPIO_Point renames PA5;
procedure Enable_Clock (This : aliased in out Digital_To_Analog_Converter);
procedure Reset (This : aliased in out Digital_To_Analog_Converter);
---------
-- DMA --
---------
DMA_1 : aliased DMA_Controller with Import, Volatile, Address => DMA1_Base;
DMA_2 : aliased DMA_Controller with Import, Volatile, Address => DMA2_Base;
procedure Enable_Clock (This : aliased in out DMA_Controller);
procedure Reset (This : aliased in out DMA_Controller);
DFSDM1 : aliased DFSDM_Block with Import, Volatile, Address => DFSDM1_Base;
procedure Enable_Clock (This : aliased in out DFSDM_Block);
private
GPIO_AF_RTC_50Hz_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_MCO_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TAMPER_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_SWJ_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TRACE_0 : constant GPIO_Alternate_Function := 0;
GPIO_AF_TIM1_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_TIM2_1 : constant GPIO_Alternate_Function := 1;
GPIO_AF_TIM3_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM4_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM5_2 : constant GPIO_Alternate_Function := 2;
GPIO_AF_TIM8_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM9_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM10_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_TIM11_3 : constant GPIO_Alternate_Function := 3;
GPIO_AF_I2C1_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_I2C2_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_I2C3_4 : constant GPIO_Alternate_Function := 4;
GPIO_AF_SPI1_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI2_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_I2S2_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_I2S2ext_5 : constant GPIO_Alternate_Function := 5;
GPIO_AF_SPI3_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_I2S3_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_I2Sext_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_I2S3ext_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART1_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART2_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_USART3_7 : constant GPIO_Alternate_Function := 7;
GPIO_AF_UART4_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_UART5_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_USART6_8 : constant GPIO_Alternate_Function := 8;
GPIO_AF_CAN1_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_CAN2_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM12_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM13_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_TIM14_9 : constant GPIO_Alternate_Function := 9;
GPIO_AF_OTG_FS_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_OTG_HS_10 : constant GPIO_Alternate_Function := 10;
GPIO_AF_ETH_11 : constant GPIO_Alternate_Function := 11;
GPIO_AF_FMC_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_OTG_FS_12 : constant GPIO_Alternate_Function := 12;
GPIO_AF_SAI1_13 : constant GPIO_Alternate_Function := 13;
GPIO_AF_SAI2_13 : constant GPIO_Alternate_Function := 13;
GPIO_AF_EVENTOUT_15 : constant GPIO_Alternate_Function := 15;
GPIO_AF_DFSDM1_0 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_1 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_2 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_3 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_4 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_5 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_6 : constant GPIO_Alternate_Function := 6;
GPIO_AF_DFSDM1_7 : constant GPIO_Alternate_Function := 6;
end STM32.Device;
| 52.569845 | 88 | 0.674976 |
045c50cc819b5900d0b216e2fd017d77d714d5cb | 2,528 | ads | Ada | src/aco-utils-ds-generic_collection.ads | jonashaggstrom/ada-canopen | 8e0f32323a0f09b41e8b51ef7123738bbf29f194 | [
"Apache-2.0"
] | 6 | 2018-05-12T22:08:04.000Z | 2021-07-25T20:55:12.000Z | src/aco-utils-ds-generic_collection.ads | jonashaggstrom/ada-canopen | 8e0f32323a0f09b41e8b51ef7123738bbf29f194 | [
"Apache-2.0"
] | null | null | null | src/aco-utils-ds-generic_collection.ads | jonashaggstrom/ada-canopen | 8e0f32323a0f09b41e8b51ef7123738bbf29f194 | [
"Apache-2.0"
] | 2 | 2021-06-15T11:56:46.000Z | 2021-06-21T13:56:01.000Z | with Ada.Finalization;
generic
type Item_Type is private;
with function "=" (L : Item_Type; R : Item_Type) return Boolean is <>;
package ACO.Utils.DS.Generic_Collection is
pragma Preelaborate;
type Collection
(Max_Size : Positive)
is new Ada.Finalization.Controlled with private;
No_Index : constant Natural := 0;
function Is_Full (C : Collection) return Boolean
with Inline;
function Is_Empty (C : Collection) return Boolean
with Inline;
function Is_Valid_Index (C : Collection; Index : Positive) return Boolean
with Inline;
function Available (C : Collection) return Natural
with Inline;
function Length (C : Collection) return Natural
with Inline;
function First (C : Collection) return Item_Type
with Inline, Pre => not Is_Empty (C);
function Last (C : Collection) return Item_Type
with Inline, Pre => not Is_Empty (C);
procedure Clear
(C : in out Collection)
with Post => Is_Empty (C);
procedure Insert
(C : in out Collection;
Item : in Item_Type)
with Pre => not Is_Full (C);
procedure Insert
(C : in out Collection;
Item : in Item_Type;
Before : in Positive)
with Pre => not Is_Full (C);
procedure Append
(C : in out Collection;
Item : in Item_Type)
with Pre => not Is_Full (C);
procedure Append
(C : in out Collection;
Item : in Item_Type;
After : in Positive)
with Pre => not Is_Full (C);
procedure Remove
(C : in out Collection;
From : in Positive)
with Pre => Is_Valid_Index (C, From);
procedure Replace
(C : in out Collection;
Index : in Positive;
Item : in Item_Type)
with Inline, Pre => Is_Valid_Index (C, Index);
function Item_At (C : Collection; Index : Positive) return Item_Type
with Inline, Pre => Is_Valid_Index (C, Index);
function Location
(C : Collection;
Item : Item_Type;
Start : Positive := 1)
return Natural;
private
subtype Item_Index is Positive;
type Item_Array is array (Item_Index range <>) of Item_Type;
type Collection
(Max_Size : Positive)
is new Ada.Finalization.Controlled with record
Items : Item_Array (1 .. Max_Size);
Start : Item_Index := 1;
Size : Natural := 0;
end record;
procedure Initialize (C : in out Collection);
end ACO.Utils.DS.Generic_Collection;
| 25.535354 | 76 | 0.62144 |
4b3f470f292f0d980c3fa1e2065cb250714886f6 | 2,839 | adb | Ada | src/tests/shapematchingtests.adb | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | src/tests/shapematchingtests.adb | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | src/tests/shapematchingtests.adb | sebsgit/textproc | 2f12d6a030425e937ee0c6a67dcff6828fc1331f | [
"MIT"
] | null | null | null | with Ada.Containers;
with AUnit.Assertions; use AUnit.Assertions;
with Interfaces.C.Strings;
with ImageIO;
with PixelArray;
with ShapeDatabase;
with Morphology;
with ImageFilters;
with ImageRegions;
with ImageThresholds;
use Ada.Containers;
package body ShapeMatchingTests is
procedure Register_Tests (T: in out TestCase) is
use AUnit.Test_Cases.Registration;
begin
Register_Routine (T, testBasicShapes'Access, "basic shapes");
Register_Routine (T, testComplexImage'Access, "complex image");
end Register_Tests;
function Name(T: TestCase) return Test_String is
begin
return Format("Shape Matcher Tests");
end Name;
function testShape(db: ShapeDatabase.DB; path: String) return ShapeDatabase.MatchScore is
regions: ImageRegions.RegionVector.Vector;
image: constant PixelArray.ImagePlane := ShapeDatabase.Preprocess_And_Detect_Regions(ImageIO.load(path), regions);
begin
return db.match(image, regions.First_Element);
end testShape;
procedure testBasicShapes(T : in out Test_Cases.Test_Case'Class) is
db: ShapeDatabase.DB;
score: ShapeDatabase.MatchScore;
begin
db := ShapeDatabase.getDB;
score := testShape(db, "1.jpg");
Assert(score.cc = '1', "test 1");
end testBasicShapes;
procedure testComplexImage(T: in out Test_Cases.Test_Case'Class) is
db: ShapeDatabase.DB;
testImage: PixelArray.ImagePlane := ImageIO.load("test_complex.jpg");
regions: ImageRegions.RegionVector.Vector;
score: ShapeDatabase.MatchScore;
function matchAt(index: Integer) return ShapeDatabase.MatchScore is
begin
return db.match(image => testImage,
region => regions(index));
end matchAt;
begin
db := ShapeDatabase.getDB;
testImage.assign(ShapeDatabase.Preprocess_And_Detect_Regions(testImage, regions));
ImageRegions.sortRegions(regions);
Assert(regions.Length = 11, "count of detected regions");
score := matchAt(0);
Assert(score.cc = '1', "match0: 1");
score := matchAt(1);
Assert(score.cc = '2', "match1: 2");
score := matchAt(2);
Assert(score.cc = '1', "match2: 1");
score := matchAt(3);
Assert(score.cc = '0', "match3: 0");
score := matchAt(4);
Assert(score.cc = '2', "match4: 2");
score := matchAt(5);
Assert(score.cc = '1', "match5: 1");
score := matchAt(6);
Assert(score.cc = '8', "match6: 8");
score := matchAt(7);
Assert(score.cc = '8', "match7: 8"); --fix with histograms
score := matchAt(8);
Assert(score.cc = '9', "match8: 9");
score := matchAt(9);
Assert(score.cc = '1', "match9: 1");
score := matchAt(10);
Assert(score.cc = '4', "match10: 4");
end testComplexImage;
end ShapeMatchingTests;
| 32.632184 | 120 | 0.656921 |
4b6ce4ec6733a2dc9c2f44fa33fbd75bae8c771d | 1,790 | adb | Ada | Ada/src/Problem_41.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/src/Problem_41.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | Ada/src/Problem_41.adb | Tim-Tom/project-euler | 177e0043ee93409742ec596c4379251f681b4275 | [
"Unlicense"
] | null | null | null | with Ada.Text_IO;
with PrimeInstances;
package body Problem_41 is
package IO renames Ada.Text_IO;
package Positive_Primes renames PrimeInstances.Positive_Primes;
type Prime_Magnitude is new Positive range 1 .. 9;
procedure Solve is
gen : Positive_Primes.Prime_Generator := Positive_Primes.Make_Generator(Max_Prime => 7_654_321);
function Is_Pandigital_Prime(prime : Positive; magnitude : Prime_Magnitude) return Boolean is
type Used_Array is Array (1 .. magnitude) of Boolean;
used : Used_Array := (others => False);
all_used : constant Used_Array := (others => True);
quotient : Natural := Prime;
remainder : Natural range 0 .. 9;
begin
while quotient /= 0 loop
remainder := quotient mod 10;
quotient := quotient / 10;
if (remainder = 0 or remainder > Positive(magnitude)) or else used(Prime_Magnitude(remainder)) then
return False;
else
used(Prime_Magnitude(remainder)) := True;
end if;
exit when quotient = 0;
end loop;
return used = all_used;
end Is_Pandigital_Prime;
prime : Positive;
next_power_of_ten : Positive := 10;
magnitude : Prime_Magnitude := 1;
biggest : Positive := 1;
begin
loop
Positive_Primes.Next_Prime(gen, prime);
exit when prime = 1;
if prime >= next_power_of_ten then
next_power_of_ten := next_power_of_ten * 10;
magnitude := Prime_Magnitude'Succ(magnitude);
end if;
if Is_Pandigital_Prime(prime, magnitude) then
biggest := prime;
end if;
end loop;
IO.Put_Line(Positive'Image(biggest));
end Solve;
end Problem_41;
| 38.085106 | 111 | 0.62067 |
04b31d6adfeb1e3d598a6d14cf890a5a12a3667d | 2,219 | adb | Ada | src/spat-proof_attempt.adb | yannickmoy/spat | 9974849c8086f0b8297727d37a1707b417a8f1ed | [
"WTFPL"
] | null | null | null | src/spat-proof_attempt.adb | yannickmoy/spat | 9974849c8086f0b8297727d37a1707b417a8f1ed | [
"WTFPL"
] | null | null | null | src/spat-proof_attempt.adb | yannickmoy/spat | 9974849c8086f0b8297727d37a1707b417a8f1ed | [
"WTFPL"
] | null | null | null | ------------------------------------------------------------------------------
-- Copyright (C) 2020 by Heisenbug Ltd. ([email protected])
--
-- This work is free. You can redistribute it and/or modify it under the
-- terms of the Do What The Fuck You Want To Public License, Version 2,
-- as published by Sam Hocevar. See the LICENSE file for more details.
------------------------------------------------------------------------------
pragma License (Unrestricted);
package body SPAT.Proof_Attempt is
---------------------------------------------------------------------------
-- "<"
---------------------------------------------------------------------------
not overriding
function "<" (Left : in T;
Right : in T) return Boolean is
begin
-- Sort by time, result, and prover name.
if Left.Time /= Right.Time then
return Left.Time > Right.Time;
end if;
if Left.Result /= Right.Result then
return Left.Result < Right.Result;
end if;
return Left.Prover < Right.Prover;
end "<";
---------------------------------------------------------------------------
-- Create
---------------------------------------------------------------------------
function Create (Object : JSON_Value;
Prover : Subject_Name) return T
is
Time_Field : constant JSON_Value :=
Object.Get (Field => Field_Names.Time);
begin
return T'(Entity.T with
Prover => Prover,
Result => Object.Get (Field => Field_Names.Result),
Time =>
(case Time_Field.Kind is
when JSON_Float_Type =>
Duration (Time_Field.Get_Long_Float),
when JSON_Int_Type =>
Duration (Long_Long_Integer'(Time_Field.Get)),
when others =>
raise Program_Error
with
"Fatal: Impossible Kind """ &
Time_Field.Kind'Image & """ of JSON object!"));
end Create;
end SPAT.Proof_Attempt;
| 38.929825 | 78 | 0.414601 |
2edd991a259ba525e63450fbb70153d1f8cd2f46 | 3,171 | adb | Ada | src/fltk-widgets-buttons-enter.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | 1 | 2020-12-18T15:20:13.000Z | 2020-12-18T15:20:13.000Z | src/fltk-widgets-buttons-enter.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | null | null | null | src/fltk-widgets-buttons-enter.adb | micahwelf/FLTK-Ada | 83e0c58ea98e5ede2cbbb158b42eae44196c3ba7 | [
"Unlicense"
] | null | null | null |
with
Interfaces.C,
System;
use type
System.Address;
package body FLTK.Widgets.Buttons.Enter is
procedure return_button_set_draw_hook
(W, D : in System.Address);
pragma Import (C, return_button_set_draw_hook, "return_button_set_draw_hook");
pragma Inline (return_button_set_draw_hook);
procedure return_button_set_handle_hook
(W, H : in System.Address);
pragma Import (C, return_button_set_handle_hook, "return_button_set_handle_hook");
pragma Inline (return_button_set_handle_hook);
function new_fl_return_button
(X, Y, W, H : in Interfaces.C.int;
Text : in Interfaces.C.char_array)
return System.Address;
pragma Import (C, new_fl_return_button, "new_fl_return_button");
pragma Inline (new_fl_return_button);
procedure free_fl_return_button
(B : in System.Address);
pragma Import (C, free_fl_return_button, "free_fl_return_button");
pragma Inline (free_fl_return_button);
procedure fl_return_button_draw
(W : in System.Address);
pragma Import (C, fl_return_button_draw, "fl_return_button_draw");
pragma Inline (fl_return_button_draw);
function fl_return_button_handle
(W : in System.Address;
E : in Interfaces.C.int)
return Interfaces.C.int;
pragma Import (C, fl_return_button_handle, "fl_return_button_handle");
pragma Inline (fl_return_button_handle);
procedure Finalize
(This : in out Enter_Button) is
begin
if This.Void_Ptr /= System.Null_Address and then
This in Enter_Button'Class
then
free_fl_return_button (This.Void_Ptr);
This.Void_Ptr := System.Null_Address;
end if;
Finalize (Button (This));
end Finalize;
package body Forge is
function Create
(X, Y, W, H : in Integer;
Text : in String)
return Enter_Button is
begin
return This : Enter_Button do
This.Void_Ptr := new_fl_return_button
(Interfaces.C.int (X),
Interfaces.C.int (Y),
Interfaces.C.int (W),
Interfaces.C.int (H),
Interfaces.C.To_C (Text));
fl_widget_set_user_data
(This.Void_Ptr,
Widget_Convert.To_Address (This'Unchecked_Access));
return_button_set_draw_hook (This.Void_Ptr, Draw_Hook'Address);
return_button_set_handle_hook (This.Void_Ptr, Handle_Hook'Address);
end return;
end Create;
end Forge;
procedure Draw
(This : in out Enter_Button) is
begin
fl_return_button_draw (This.Void_Ptr);
end Draw;
function Handle
(This : in out Enter_Button;
Event : in Event_Kind)
return Event_Outcome is
begin
return Event_Outcome'Val
(fl_return_button_handle (This.Void_Ptr, Event_Kind'Pos (Event)));
end Handle;
end FLTK.Widgets.Buttons.Enter;
| 26.425 | 86 | 0.61211 |
137db768319b55b5306411ae6ad5d9b94c10b0f1 | 354 | adb | Ada | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt36.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 7 | 2020-05-02T17:34:05.000Z | 2021-10-17T10:15:18.000Z | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt36.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | null | null | null | gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt36.adb | best08618/asylo | 5a520a9f5c461ede0f32acc284017b737a43898c | [
"Apache-2.0"
] | 2 | 2020-07-27T00:22:36.000Z | 2021-04-01T09:41:02.000Z | -- { dg-do run }
-- { dg-options "-O2" }
with Opt35_Pkg; use Opt35_Pkg;
procedure Opt36 is
I : Integer := -1;
N : Natural := 0;
begin
loop
begin
I := I + 1;
I := I + F(0);
exception
when E => N := N + 1;
end;
exit when I = 1;
end loop;
if N /= 2 or I = 0 then
raise Program_Error;
end if;
end;
| 14.75 | 30 | 0.488701 |
4b0b5c63dc1e25fcffba8f4d2e0d7613c09c0c1f | 4,612 | ads | Ada | opengl/src/interface/gl-debug.ads | Cre8or/OpenGLAda | 91f12a2d4ca2aa7379dd8c83c80e4eca45fd0c06 | [
"MIT"
] | 79 | 2015-04-20T23:10:02.000Z | 2022-03-04T13:50:56.000Z | opengl/src/interface/gl-debug.ads | Cre8or/OpenGLAda | 91f12a2d4ca2aa7379dd8c83c80e4eca45fd0c06 | [
"MIT"
] | 126 | 2015-09-10T10:41:34.000Z | 2022-03-20T11:25:40.000Z | opengl/src/interface/gl-debug.ads | Cre8or/OpenGLAda | 91f12a2d4ca2aa7379dd8c83c80e4eca45fd0c06 | [
"MIT"
] | 20 | 2015-03-17T07:15:57.000Z | 2022-02-02T17:12:11.000Z | -- part of OpenGLAda, (c) 2021 Felix Krause
-- released under the terms of the MIT license, see the file "COPYING"
with Ada.Streams;
with GL.Types;
with GL.Low_Level;
package GL.Debug is
pragma Preelaborate;
use GL.Types;
type Message_Source_Restriction is
(Dont_Care, Api, Window_System, Shader_Compiler, Third_Party, Application,
Other);
for Message_Source_Restriction use (Dont_Care => 16#1100#,
Api => 16#8246#,
Window_System => 16#8247#,
Shader_Compiler => 16#8248#,
Third_Party => 16#8249#,
Application => 16#824A#,
Other => 16#824B#);
for Message_Source_Restriction'Size use Low_Level.Enum'Size;
subtype Message_Source is Message_Source_Restriction range Api .. Other;
type Message_Type_Restriction is
(Dont_Care, Error, Deprecated_Behavior, Undefined_Behavior, Portability,
Performance, Other, Marker, Push_Group, Pop_Group);
for Message_Type_Restriction use (Dont_Care => 16#1100#,
Error => 16#824C#,
Deprecated_Behavior => 16#824D#,
Undefined_Behavior => 16#824E#,
Portability => 16#824F#,
Performance => 16#8250#,
Other => 16#8251#,
Marker => 16#8268#,
Push_Group => 16#8269#,
Pop_Group => 16#826A#);
for Message_Type_Restriction'Size use Low_Level.Enum'Size;
subtype Message_Type is Message_Type_Restriction range Error .. Pop_Group;
type Message_Severity_Restriction is
(Dont_Care, Notification, High, Medium, Low);
for Message_Severity_Restriction use (Dont_Care => 16#1100#,
Notification => 16#826B#,
High => 16#9146#,
Medium => 16#9147#,
Low => 16#9148#);
for Message_Severity_Restriction'Size use Low_Level.Enum'Size;
subtype Message_Severity is Message_Severity_Restriction
range Notification .. Low;
type Message_Receiver is interface;
procedure Receive (Object : Message_Receiver;
Source : Message_Source;
M_Type : Message_Type;
ID : UInt;
Severity : Message_Severity;
Message : String) is abstract;
procedure Message_Callback (Receiver : access Message_Receiver'Class);
procedure Message_Insert (Source : Message_Source;
M_Type : Message_Type;
ID : UInt;
Severity : Message_Severity;
Message : String);
procedure Push_Group (Source : Message_Source;
ID : UInt;
Message : String);
procedure Pop_Group;
procedure Message_Control (Source : Message_Source_Restriction;
M_Type : Message_Type_Restriction;
Severity : Message_Severity_Restriction;
IDs : UInt_Array;
Enabled : Boolean);
function Next_Message
(Source : out Message_Source; M_Type : out Message_Type;
ID : out UInt; Severity : out Message_Severity)
return String;
function Logged_Messages return Int;
type Stream_Logger is new Message_Receiver with private;
procedure Set_Stream
(Object : in out Stream_Logger;
Stream : access Ada.Streams.Root_Stream_Type'Class);
overriding procedure Receive
(Object : Stream_Logger;
Source : Message_Source;
M_Type : Message_Type;
ID : UInt;
Severity : Message_Severity;
Message : String);
private
type Stream_Logger is new Message_Receiver with record
Stream : access Ada.Streams.Root_Stream_Type'Class := null;
Depth : Natural := 0;
end record;
end GL.Debug;
| 41.178571 | 79 | 0.508673 |
0b72368cbbaa409e76afde69537281b2688dbbf4 | 186 | adb | Ada | workshop/Workshop_Workbook/src/main.adb | TNO/Rejuvenation-Ada | 8113ec28da3923ccde40d76cbab70e0e614f4b75 | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:00:47.000Z | 2022-03-08T13:00:47.000Z | src/examples/Rejuvenation_Workshop/Rejuvenation_Workshop_Workbook/src/main.adb | selroc/Renaissance-Ada | 39230b34aced4a9d83831be346ca103136c53715 | [
"BSD-3-Clause"
] | null | null | null | src/examples/Rejuvenation_Workshop/Rejuvenation_Workshop_Workbook/src/main.adb | selroc/Renaissance-Ada | 39230b34aced4a9d83831be346ca103136c53715 | [
"BSD-3-Clause"
] | null | null | null | with Libadalang.Analysis; use Libadalang.Analysis;
with Libadalang.Common; use Libadalang.Common;
procedure Main is
begin
-- Insert code here.
null;
end Main;
| 18.6 | 58 | 0.682796 |
293d722d202f66ad8c294c02adee19f12fc1e62f | 52,785 | adb | Ada | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cbhase.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cbhase.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | Validation/pyFrame3DD-master/gcc-master/gcc/ada/libgnat/a-cbhase.adb | djamal2727/Main-Bearing-Analytical-Model | 2f00c2219c71be0175c6f4f8f1d4cca231d97096 | [
"Apache-2.0"
] | null | null | null | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . B O U N D E D _ H A S H E D _ S E T S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-2020, 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 3, 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. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- You should have received a copy of the GNU General Public License and --
-- a copy of the GCC Runtime Library Exception along with this program; --
-- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
-- <http://www.gnu.org/licenses/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Containers.Hash_Tables.Generic_Bounded_Operations;
pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Bounded_Operations);
with Ada.Containers.Hash_Tables.Generic_Bounded_Keys;
pragma Elaborate_All (Ada.Containers.Hash_Tables.Generic_Bounded_Keys);
with Ada.Containers.Helpers; use Ada.Containers.Helpers;
with Ada.Containers.Prime_Numbers; use Ada.Containers.Prime_Numbers;
with System; use type System.Address;
with System.Put_Images;
package body Ada.Containers.Bounded_Hashed_Sets with
SPARK_Mode => Off
is
use Ada.Finalization;
pragma Warnings (Off, "variable ""Busy*"" is not referenced");
pragma Warnings (Off, "variable ""Lock*"" is not referenced");
-- See comment in Ada.Containers.Helpers
-----------------------
-- Local Subprograms --
-----------------------
function Equivalent_Keys
(Key : Element_Type;
Node : Node_Type) return Boolean;
pragma Inline (Equivalent_Keys);
function Hash_Node (Node : Node_Type) return Hash_Type;
pragma Inline (Hash_Node);
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Node : out Count_Type;
Inserted : out Boolean);
function Is_In (HT : Set; Key : Node_Type) return Boolean;
pragma Inline (Is_In);
procedure Set_Element (Node : in out Node_Type; Item : Element_Type);
pragma Inline (Set_Element);
function Next (Node : Node_Type) return Count_Type;
pragma Inline (Next);
procedure Set_Next (Node : in out Node_Type; Next : Count_Type);
pragma Inline (Set_Next);
function Vet (Position : Cursor) return Boolean;
--------------------------
-- Local Instantiations --
--------------------------
package HT_Ops is new Hash_Tables.Generic_Bounded_Operations
(HT_Types => HT_Types,
Hash_Node => Hash_Node,
Next => Next,
Set_Next => Set_Next);
package Element_Keys is new Hash_Tables.Generic_Bounded_Keys
(HT_Types => HT_Types,
Next => Next,
Set_Next => Set_Next,
Key_Type => Element_Type,
Hash => Hash,
Equivalent_Keys => Equivalent_Keys);
procedure Replace_Element is
new Element_Keys.Generic_Replace_Element (Hash_Node, Set_Element);
---------
-- "=" --
---------
function "=" (Left, Right : Set) return Boolean is
function Find_Equal_Key
(R_HT : Hash_Table_Type'Class;
L_Node : Node_Type) return Boolean;
pragma Inline (Find_Equal_Key);
function Is_Equal is
new HT_Ops.Generic_Equal (Find_Equal_Key);
--------------------
-- Find_Equal_Key --
--------------------
function Find_Equal_Key
(R_HT : Hash_Table_Type'Class;
L_Node : Node_Type) return Boolean
is
R_Index : constant Hash_Type :=
Element_Keys.Index (R_HT, L_Node.Element);
R_Node : Count_Type := R_HT.Buckets (R_Index);
begin
loop
if R_Node = 0 then
return False;
end if;
if L_Node.Element = R_HT.Nodes (R_Node).Element then
return True;
end if;
R_Node := Next (R_HT.Nodes (R_Node));
end loop;
end Find_Equal_Key;
-- Start of processing for "="
begin
return Is_Equal (Left, Right);
end "=";
------------
-- Assign --
------------
procedure Assign (Target : in out Set; Source : Set) is
procedure Insert_Element (Source_Node : Count_Type);
procedure Insert_Elements is
new HT_Ops.Generic_Iteration (Insert_Element);
--------------------
-- Insert_Element --
--------------------
procedure Insert_Element (Source_Node : Count_Type) is
N : Node_Type renames Source.Nodes (Source_Node);
X : Count_Type;
B : Boolean;
begin
Insert (Target, N.Element, X, B);
pragma Assert (B);
end Insert_Element;
-- Start of processing for Assign
begin
if Target'Address = Source'Address then
return;
end if;
if Checks and then Target.Capacity < Source.Length then
raise Capacity_Error
with "Target capacity is less than Source length";
end if;
HT_Ops.Clear (Target);
Insert_Elements (Source);
end Assign;
--------------
-- Capacity --
--------------
function Capacity (Container : Set) return Count_Type is
begin
return Container.Capacity;
end Capacity;
-----------
-- Clear --
-----------
procedure Clear (Container : in out Set) is
begin
HT_Ops.Clear (Container);
end Clear;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Set;
Position : Cursor) return Constant_Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong container";
end if;
pragma Assert (Vet (Position), "bad cursor in Constant_Reference");
declare
N : Node_Type renames Container.Nodes (Position.Node);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => N.Element'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Constant_Reference;
--------------
-- Contains --
--------------
function Contains (Container : Set; Item : Element_Type) return Boolean is
begin
return Find (Container, Item) /= No_Element;
end Contains;
----------
-- Copy --
----------
function Copy
(Source : Set;
Capacity : Count_Type := 0;
Modulus : Hash_Type := 0) return Set
is
C : constant Count_Type :=
(if Capacity = 0 then Source.Length
else Capacity);
M : Hash_Type;
begin
if Checks and then C < Source.Length then
raise Capacity_Error with "Capacity too small";
end if;
if Modulus = 0 then
M := Default_Modulus (C);
else
M := Modulus;
end if;
return Target : Set (Capacity => C, Modulus => M) do
Assign (Target => Target, Source => Source);
end return;
end Copy;
---------------------
-- Default_Modulus --
---------------------
function Default_Modulus (Capacity : Count_Type) return Hash_Type is
begin
return To_Prime (Capacity);
end Default_Modulus;
------------
-- Delete --
------------
procedure Delete
(Container : in out Set;
Item : Element_Type)
is
X : Count_Type;
begin
Element_Keys.Delete_Key_Sans_Free (Container, Item, X);
if Checks and then X = 0 then
raise Constraint_Error with "attempt to delete element not in set";
end if;
HT_Ops.Free (Container, X);
end Delete;
procedure Delete
(Container : in out Set;
Position : in out Cursor)
is
begin
TC_Check (Container.TC);
if Checks and then Position.Node = 0 then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with "Position cursor designates wrong set";
end if;
pragma Assert (Vet (Position), "bad cursor in Delete");
HT_Ops.Delete_Node_Sans_Free (Container, Position.Node);
HT_Ops.Free (Container, Position.Node);
Position := No_Element;
end Delete;
----------------
-- Difference --
----------------
procedure Difference
(Target : in out Set;
Source : Set)
is
Tgt_Node, Src_Node : Count_Type;
Src : Set renames Source'Unrestricted_Access.all;
TN : Nodes_Type renames Target.Nodes;
SN : Nodes_Type renames Source.Nodes;
begin
if Target'Address = Source'Address then
HT_Ops.Clear (Target);
return;
end if;
if Source.Length = 0 then
return;
end if;
TC_Check (Target.TC);
if Source.Length < Target.Length then
Src_Node := HT_Ops.First (Source);
while Src_Node /= 0 loop
Tgt_Node := Element_Keys.Find (Target, SN (Src_Node).Element);
if Tgt_Node /= 0 then
HT_Ops.Delete_Node_Sans_Free (Target, Tgt_Node);
HT_Ops.Free (Target, Tgt_Node);
end if;
Src_Node := HT_Ops.Next (Src, Src_Node);
end loop;
else
Tgt_Node := HT_Ops.First (Target);
while Tgt_Node /= 0 loop
if Is_In (Source, TN (Tgt_Node)) then
declare
X : constant Count_Type := Tgt_Node;
begin
Tgt_Node := HT_Ops.Next (Target, Tgt_Node);
HT_Ops.Delete_Node_Sans_Free (Target, X);
HT_Ops.Free (Target, X);
end;
else
Tgt_Node := HT_Ops.Next (Target, Tgt_Node);
end if;
end loop;
end if;
end Difference;
function Difference (Left, Right : Set) return Set is
begin
if Left'Address = Right'Address then
return Empty_Set;
end if;
if Left.Length = 0 then
return Empty_Set;
end if;
if Right.Length = 0 then
return Left;
end if;
return Result : Set (Left.Length, To_Prime (Left.Length)) do
Iterate_Left : declare
procedure Process (L_Node : Count_Type);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (L_Node : Count_Type) is
N : Node_Type renames Left.Nodes (L_Node);
X : Count_Type;
B : Boolean;
begin
if not Is_In (Right, N) then
Insert (Result, N.Element, X, B); -- optimize this ???
pragma Assert (B);
pragma Assert (X > 0);
end if;
end Process;
-- Start of processing for Iterate_Left
begin
Iterate (Left);
end Iterate_Left;
end return;
end Difference;
-------------
-- Element --
-------------
function Element (Position : Cursor) return Element_Type is
begin
if Checks and then Position.Node = 0 then
raise Constraint_Error with "Position cursor equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in function Element");
declare
S : Set renames Position.Container.all;
N : Node_Type renames S.Nodes (Position.Node);
begin
return N.Element;
end;
end Element;
-----------
-- Empty --
-----------
function Empty (Capacity : Count_Type := 10) return Set is
begin
return Result : Set (Capacity, 0) do
Reserve_Capacity (Result, Capacity);
end return;
end Empty;
---------------------
-- Equivalent_Sets --
---------------------
function Equivalent_Sets (Left, Right : Set) return Boolean is
function Find_Equivalent_Key
(R_HT : Hash_Table_Type'Class;
L_Node : Node_Type) return Boolean;
pragma Inline (Find_Equivalent_Key);
function Is_Equivalent is
new HT_Ops.Generic_Equal (Find_Equivalent_Key);
-------------------------
-- Find_Equivalent_Key --
-------------------------
function Find_Equivalent_Key
(R_HT : Hash_Table_Type'Class;
L_Node : Node_Type) return Boolean
is
R_Index : constant Hash_Type :=
Element_Keys.Index (R_HT, L_Node.Element);
R_Node : Count_Type := R_HT.Buckets (R_Index);
RN : Nodes_Type renames R_HT.Nodes;
begin
loop
if R_Node = 0 then
return False;
end if;
if Equivalent_Elements (L_Node.Element, RN (R_Node).Element) then
return True;
end if;
R_Node := Next (R_HT.Nodes (R_Node));
end loop;
end Find_Equivalent_Key;
-- Start of processing for Equivalent_Sets
begin
return Is_Equivalent (Left, Right);
end Equivalent_Sets;
-------------------------
-- Equivalent_Elements --
-------------------------
function Equivalent_Elements (Left, Right : Cursor)
return Boolean is
begin
if Checks and then Left.Node = 0 then
raise Constraint_Error with
"Left cursor of Equivalent_Elements equals No_Element";
end if;
if Checks and then Right.Node = 0 then
raise Constraint_Error with
"Right cursor of Equivalent_Elements equals No_Element";
end if;
pragma Assert (Vet (Left), "bad Left cursor in Equivalent_Elements");
pragma Assert (Vet (Right), "bad Right cursor in Equivalent_Elements");
-- AI05-0022 requires that a container implementation detect element
-- tampering by a generic actual subprogram. However, the following case
-- falls outside the scope of that AI. Randy Brukardt explained on the
-- ARG list on 2013/02/07 that:
-- (Begin Quote):
-- But for an operation like "<" [the ordered set analog of
-- Equivalent_Elements], there is no need to "dereference" a cursor
-- after the call to the generic formal parameter function, so nothing
-- bad could happen if tampering is undetected. And the operation can
-- safely return a result without a problem even if an element is
-- deleted from the container.
-- (End Quote).
declare
LN : Node_Type renames Left.Container.Nodes (Left.Node);
RN : Node_Type renames Right.Container.Nodes (Right.Node);
begin
return Equivalent_Elements (LN.Element, RN.Element);
end;
end Equivalent_Elements;
function Equivalent_Elements
(Left : Cursor;
Right : Element_Type) return Boolean
is
begin
if Checks and then Left.Node = 0 then
raise Constraint_Error with
"Left cursor of Equivalent_Elements equals No_Element";
end if;
pragma Assert (Vet (Left), "Left cursor in Equivalent_Elements is bad");
declare
LN : Node_Type renames Left.Container.Nodes (Left.Node);
begin
return Equivalent_Elements (LN.Element, Right);
end;
end Equivalent_Elements;
function Equivalent_Elements
(Left : Element_Type;
Right : Cursor) return Boolean
is
begin
if Checks and then Right.Node = 0 then
raise Constraint_Error with
"Right cursor of Equivalent_Elements equals No_Element";
end if;
pragma Assert
(Vet (Right),
"Right cursor of Equivalent_Elements is bad");
declare
RN : Node_Type renames Right.Container.Nodes (Right.Node);
begin
return Equivalent_Elements (Left, RN.Element);
end;
end Equivalent_Elements;
---------------------
-- Equivalent_Keys --
---------------------
function Equivalent_Keys
(Key : Element_Type;
Node : Node_Type) return Boolean
is
begin
return Equivalent_Elements (Key, Node.Element);
end Equivalent_Keys;
-------------
-- Exclude --
-------------
procedure Exclude
(Container : in out Set;
Item : Element_Type)
is
X : Count_Type;
begin
Element_Keys.Delete_Key_Sans_Free (Container, Item, X);
HT_Ops.Free (Container, X);
end Exclude;
--------------
-- Finalize --
--------------
procedure Finalize (Object : in out Iterator) is
begin
if Object.Container /= null then
Unbusy (Object.Container.TC);
end if;
end Finalize;
----------
-- Find --
----------
function Find
(Container : Set;
Item : Element_Type) return Cursor
is
Node : constant Count_Type :=
Element_Keys.Find (Container'Unrestricted_Access.all, Item);
begin
return (if Node = 0 then No_Element
else Cursor'(Container'Unrestricted_Access, Node));
end Find;
-----------
-- First --
-----------
function First (Container : Set) return Cursor is
Node : constant Count_Type := HT_Ops.First (Container);
begin
return (if Node = 0 then No_Element
else Cursor'(Container'Unrestricted_Access, Node));
end First;
overriding function First (Object : Iterator) return Cursor is
begin
return Object.Container.First;
end First;
------------------------
-- Get_Element_Access --
------------------------
function Get_Element_Access
(Position : Cursor) return not null Element_Access is
begin
return Position.Container.Nodes (Position.Node).Element'Access;
end Get_Element_Access;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
pragma Assert (Vet (Position), "bad cursor in Has_Element");
return Position.Node /= 0;
end Has_Element;
---------------
-- Hash_Node --
---------------
function Hash_Node (Node : Node_Type) return Hash_Type is
begin
return Hash (Node.Element);
end Hash_Node;
-------------
-- Include --
-------------
procedure Include
(Container : in out Set;
New_Item : Element_Type)
is
Position : Cursor;
Inserted : Boolean;
begin
Insert (Container, New_Item, Position, Inserted);
if not Inserted then
TE_Check (Container.TC);
Container.Nodes (Position.Node).Element := New_Item;
end if;
end Include;
------------
-- Insert --
------------
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean)
is
begin
Insert (Container, New_Item, Position.Node, Inserted);
Position.Container := Container'Unchecked_Access;
end Insert;
procedure Insert
(Container : in out Set;
New_Item : Element_Type)
is
Position : Cursor;
pragma Unreferenced (Position);
Inserted : Boolean;
begin
Insert (Container, New_Item, Position, Inserted);
if Checks and then not Inserted then
raise Constraint_Error with
"attempt to insert element already in set";
end if;
end Insert;
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Node : out Count_Type;
Inserted : out Boolean)
is
procedure Allocate_Set_Element (Node : in out Node_Type);
pragma Inline (Allocate_Set_Element);
function New_Node return Count_Type;
pragma Inline (New_Node);
procedure Local_Insert is
new Element_Keys.Generic_Conditional_Insert (New_Node);
procedure Allocate is
new HT_Ops.Generic_Allocate (Allocate_Set_Element);
---------------------------
-- Allocate_Set_Element --
---------------------------
procedure Allocate_Set_Element (Node : in out Node_Type) is
begin
Node.Element := New_Item;
end Allocate_Set_Element;
--------------
-- New_Node --
--------------
function New_Node return Count_Type is
Result : Count_Type;
begin
Allocate (Container, Result);
return Result;
end New_Node;
-- Start of processing for Insert
begin
-- The buckets array length is specified by the user as a discriminant
-- of the container type, so it is possible for the buckets array to
-- have a length of zero. We must check for this case specifically, in
-- order to prevent divide-by-zero errors later, when we compute the
-- buckets array index value for an element, given its hash value.
if Checks and then Container.Buckets'Length = 0 then
raise Capacity_Error with "No capacity for insertion";
end if;
Local_Insert (Container, New_Item, Node, Inserted);
end Insert;
------------------
-- Intersection --
------------------
procedure Intersection
(Target : in out Set;
Source : Set)
is
Tgt_Node : Count_Type;
TN : Nodes_Type renames Target.Nodes;
begin
if Target'Address = Source'Address then
return;
end if;
if Source.Length = 0 then
HT_Ops.Clear (Target);
return;
end if;
TC_Check (Target.TC);
Tgt_Node := HT_Ops.First (Target);
while Tgt_Node /= 0 loop
if Is_In (Source, TN (Tgt_Node)) then
Tgt_Node := HT_Ops.Next (Target, Tgt_Node);
else
declare
X : constant Count_Type := Tgt_Node;
begin
Tgt_Node := HT_Ops.Next (Target, Tgt_Node);
HT_Ops.Delete_Node_Sans_Free (Target, X);
HT_Ops.Free (Target, X);
end;
end if;
end loop;
end Intersection;
function Intersection (Left, Right : Set) return Set is
C : Count_Type;
begin
if Left'Address = Right'Address then
return Left;
end if;
C := Count_Type'Min (Left.Length, Right.Length);
if C = 0 then
return Empty_Set;
end if;
return Result : Set (C, To_Prime (C)) do
Iterate_Left : declare
procedure Process (L_Node : Count_Type);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (L_Node : Count_Type) is
N : Node_Type renames Left.Nodes (L_Node);
X : Count_Type;
B : Boolean;
begin
if Is_In (Right, N) then
Insert (Result, N.Element, X, B); -- optimize ???
pragma Assert (B);
pragma Assert (X > 0);
end if;
end Process;
-- Start of processing for Iterate_Left
begin
Iterate (Left);
end Iterate_Left;
end return;
end Intersection;
--------------
-- Is_Empty --
--------------
function Is_Empty (Container : Set) return Boolean is
begin
return Container.Length = 0;
end Is_Empty;
-----------
-- Is_In --
-----------
function Is_In (HT : Set; Key : Node_Type) return Boolean is
begin
return Element_Keys.Find (HT'Unrestricted_Access.all, Key.Element) /= 0;
end Is_In;
---------------
-- Is_Subset --
---------------
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean is
Subset_Node : Count_Type;
SN : Nodes_Type renames Subset.Nodes;
begin
if Subset'Address = Of_Set'Address then
return True;
end if;
if Subset.Length > Of_Set.Length then
return False;
end if;
Subset_Node := HT_Ops.First (Subset);
while Subset_Node /= 0 loop
if not Is_In (Of_Set, SN (Subset_Node)) then
return False;
end if;
Subset_Node := HT_Ops.Next
(Subset'Unrestricted_Access.all, Subset_Node);
end loop;
return True;
end Is_Subset;
-------------
-- Iterate --
-------------
procedure Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor))
is
procedure Process_Node (Node : Count_Type);
pragma Inline (Process_Node);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process_Node);
------------------
-- Process_Node --
------------------
procedure Process_Node (Node : Count_Type) is
begin
Process (Cursor'(Container'Unrestricted_Access, Node));
end Process_Node;
Busy : With_Busy (Container.TC'Unrestricted_Access);
-- Start of processing for Iterate
begin
Iterate (Container);
end Iterate;
function Iterate (Container : Set)
return Set_Iterator_Interfaces.Forward_Iterator'Class
is
begin
Busy (Container.TC'Unrestricted_Access.all);
return It : constant Iterator :=
Iterator'(Limited_Controlled with
Container => Container'Unrestricted_Access);
end Iterate;
------------
-- Length --
------------
function Length (Container : Set) return Count_Type is
begin
return Container.Length;
end Length;
----------
-- Move --
----------
procedure Move (Target : in out Set; Source : in out Set) is
begin
if Target'Address = Source'Address then
return;
end if;
TC_Check (Source.TC);
Target.Assign (Source);
Source.Clear;
end Move;
----------
-- Next --
----------
function Next (Node : Node_Type) return Count_Type is
begin
return Node.Next;
end Next;
function Next (Position : Cursor) return Cursor is
begin
if Position.Node = 0 then
return No_Element;
end if;
pragma Assert (Vet (Position), "bad cursor in Next");
declare
HT : Set renames Position.Container.all;
Node : constant Count_Type := HT_Ops.Next (HT, Position.Node);
begin
if Node = 0 then
return No_Element;
end if;
return Cursor'(Position.Container, Node);
end;
end Next;
procedure Next (Position : in out Cursor) is
begin
Position := Next (Position);
end Next;
function Next
(Object : Iterator;
Position : Cursor) return Cursor
is
begin
if Position.Container = null then
return No_Element;
end if;
if Checks and then Position.Container /= Object.Container then
raise Program_Error with
"Position cursor of Next designates wrong set";
end if;
return Next (Position);
end Next;
-------------
-- Overlap --
-------------
function Overlap (Left, Right : Set) return Boolean is
Left_Node : Count_Type;
begin
if Right.Length = 0 then
return False;
end if;
if Left'Address = Right'Address then
return True;
end if;
Left_Node := HT_Ops.First (Left);
while Left_Node /= 0 loop
if Is_In (Right, Left.Nodes (Left_Node)) then
return True;
end if;
Left_Node := HT_Ops.Next (Left'Unrestricted_Access.all, Left_Node);
end loop;
return False;
end Overlap;
----------------------
-- Pseudo_Reference --
----------------------
function Pseudo_Reference
(Container : aliased Set'Class) return Reference_Control_Type
is
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Reference_Control_Type := (Controlled with TC) do
Busy (TC.all);
end return;
end Pseudo_Reference;
-------------------
-- Query_Element --
-------------------
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type))
is
begin
if Checks and then Position.Node = 0 then
raise Constraint_Error with
"Position cursor of Query_Element equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in Query_Element");
declare
S : Set renames Position.Container.all;
Lock : With_Lock (S.TC'Unrestricted_Access);
begin
Process (S.Nodes (Position.Node).Element);
end;
end Query_Element;
---------------
-- Put_Image --
---------------
procedure Put_Image
(S : in out Ada.Strings.Text_Output.Sink'Class; V : Set)
is
First_Time : Boolean := True;
use System.Put_Images;
begin
Array_Before (S);
for X of V loop
if First_Time then
First_Time := False;
else
Simple_Array_Between (S);
end if;
Element_Type'Put_Image (S, X);
end loop;
Array_After (S);
end Put_Image;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Set)
is
function Read_Node (Stream : not null access Root_Stream_Type'Class)
return Count_Type;
procedure Read_Nodes is
new HT_Ops.Generic_Read (Read_Node);
---------------
-- Read_Node --
---------------
function Read_Node (Stream : not null access Root_Stream_Type'Class)
return Count_Type
is
procedure Read_Element (Node : in out Node_Type);
pragma Inline (Read_Element);
procedure Allocate is
new HT_Ops.Generic_Allocate (Read_Element);
procedure Read_Element (Node : in out Node_Type) is
begin
Element_Type'Read (Stream, Node.Element);
end Read_Element;
Node : Count_Type;
-- Start of processing for Read_Node
begin
Allocate (Container, Node);
return Node;
end Read_Node;
-- Start of processing for Read
begin
Read_Nodes (Stream, Container);
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Read;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
-------------
-- Replace --
-------------
procedure Replace
(Container : in out Set;
New_Item : Element_Type)
is
Node : constant Count_Type := Element_Keys.Find (Container, New_Item);
begin
TE_Check (Container.TC);
if Checks and then Node = 0 then
raise Constraint_Error with
"attempt to replace element not in set";
end if;
Container.Nodes (Node).Element := New_Item;
end Replace;
procedure Replace_Element
(Container : in out Set;
Position : Cursor;
New_Item : Element_Type)
is
begin
if Checks and then Position.Node = 0 then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong set";
end if;
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
Replace_Element (Container, Position.Node, New_Item);
end Replace_Element;
----------------------
-- Reserve_Capacity --
----------------------
procedure Reserve_Capacity
(Container : in out Set;
Capacity : Count_Type)
is
begin
if Checks and then Capacity > Container.Capacity then
raise Capacity_Error with "requested capacity is too large";
end if;
end Reserve_Capacity;
------------------
-- Set_Element --
------------------
procedure Set_Element (Node : in out Node_Type; Item : Element_Type) is
begin
Node.Element := Item;
end Set_Element;
--------------
-- Set_Next --
--------------
procedure Set_Next (Node : in out Node_Type; Next : Count_Type) is
begin
Node.Next := Next;
end Set_Next;
--------------------------
-- Symmetric_Difference --
--------------------------
procedure Symmetric_Difference
(Target : in out Set;
Source : Set)
is
procedure Process (Source_Node : Count_Type);
pragma Inline (Process);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (Source_Node : Count_Type) is
N : Node_Type renames Source.Nodes (Source_Node);
X : Count_Type;
B : Boolean;
begin
if Is_In (Target, N) then
Delete (Target, N.Element);
else
Insert (Target, N.Element, X, B);
pragma Assert (B);
end if;
end Process;
-- Start of processing for Symmetric_Difference
begin
if Target'Address = Source'Address then
HT_Ops.Clear (Target);
return;
end if;
if Target.Length = 0 then
Assign (Target => Target, Source => Source);
return;
end if;
TC_Check (Target.TC);
Iterate (Source);
end Symmetric_Difference;
function Symmetric_Difference (Left, Right : Set) return Set is
C : Count_Type;
begin
if Left'Address = Right'Address then
return Empty_Set;
end if;
if Right.Length = 0 then
return Left;
end if;
if Left.Length = 0 then
return Right;
end if;
C := Left.Length + Right.Length;
return Result : Set (C, To_Prime (C)) do
Iterate_Left : declare
procedure Process (L_Node : Count_Type);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (L_Node : Count_Type) is
N : Node_Type renames Left.Nodes (L_Node);
X : Count_Type;
B : Boolean;
begin
if not Is_In (Right, N) then
Insert (Result, N.Element, X, B);
pragma Assert (B);
end if;
end Process;
-- Start of processing for Iterate_Left
begin
Iterate (Left);
end Iterate_Left;
Iterate_Right : declare
procedure Process (R_Node : Count_Type);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (R_Node : Count_Type) is
N : Node_Type renames Right.Nodes (R_Node);
X : Count_Type;
B : Boolean;
begin
if not Is_In (Left, N) then
Insert (Result, N.Element, X, B);
pragma Assert (B);
end if;
end Process;
-- Start of processing for Iterate_Right
begin
Iterate (Right);
end Iterate_Right;
end return;
end Symmetric_Difference;
------------
-- To_Set --
------------
function To_Set (New_Item : Element_Type) return Set is
X : Count_Type;
B : Boolean;
begin
return Result : Set (1, 1) do
Insert (Result, New_Item, X, B);
pragma Assert (B);
end return;
end To_Set;
-----------
-- Union --
-----------
procedure Union
(Target : in out Set;
Source : Set)
is
procedure Process (Src_Node : Count_Type);
procedure Iterate is
new HT_Ops.Generic_Iteration (Process);
-------------
-- Process --
-------------
procedure Process (Src_Node : Count_Type) is
N : Node_Type renames Source.Nodes (Src_Node);
X : Count_Type;
B : Boolean;
begin
Insert (Target, N.Element, X, B);
end Process;
-- Start of processing for Union
begin
if Target'Address = Source'Address then
return;
end if;
TC_Check (Target.TC);
-- ??? why is this code commented out ???
-- declare
-- N : constant Count_Type := Target.Length + Source.Length;
-- begin
-- if N > HT_Ops.Capacity (Target.HT) then
-- HT_Ops.Reserve_Capacity (Target.HT, N);
-- end if;
-- end;
Iterate (Source);
end Union;
function Union (Left, Right : Set) return Set is
C : Count_Type;
begin
if Left'Address = Right'Address then
return Left;
end if;
if Right.Length = 0 then
return Left;
end if;
if Left.Length = 0 then
return Right;
end if;
C := Left.Length + Right.Length;
return Result : Set (C, To_Prime (C)) do
Assign (Target => Result, Source => Left);
Union (Target => Result, Source => Right);
end return;
end Union;
---------
-- Vet --
---------
function Vet (Position : Cursor) return Boolean is
begin
if Position.Node = 0 then
return Position.Container = null;
end if;
if Position.Container = null then
return False;
end if;
declare
S : Set renames Position.Container.all;
N : Nodes_Type renames S.Nodes;
X : Count_Type;
begin
if S.Length = 0 then
return False;
end if;
if Position.Node > N'Last then
return False;
end if;
if N (Position.Node).Next = Position.Node then
return False;
end if;
X := S.Buckets (Element_Keys.Checked_Index
(S, N (Position.Node).Element));
for J in 1 .. S.Length loop
if X = Position.Node then
return True;
end if;
if X = 0 then
return False;
end if;
if X = N (X).Next then -- to prevent unnecessary looping
return False;
end if;
X := N (X).Next;
end loop;
return False;
end;
end Vet;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Set)
is
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Type);
pragma Inline (Write_Node);
procedure Write_Nodes is
new HT_Ops.Generic_Write (Write_Node);
----------------
-- Write_Node --
----------------
procedure Write_Node
(Stream : not null access Root_Stream_Type'Class;
Node : Node_Type)
is
begin
Element_Type'Write (Stream, Node.Element);
end Write_Node;
-- Start of processing for Write
begin
Write_Nodes (Stream, Container);
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor)
is
begin
raise Program_Error with "attempt to stream set cursor";
end Write;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
package body Generic_Keys is
-----------------------
-- Local Subprograms --
-----------------------
function Equivalent_Key_Node
(Key : Key_Type;
Node : Node_Type) return Boolean;
pragma Inline (Equivalent_Key_Node);
--------------------------
-- Local Instantiations --
--------------------------
package Key_Keys is
new Hash_Tables.Generic_Bounded_Keys
(HT_Types => HT_Types,
Next => Next,
Set_Next => Set_Next,
Key_Type => Key_Type,
Hash => Hash,
Equivalent_Keys => Equivalent_Key_Node);
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Container : aliased Set;
Key : Key_Type) return Constant_Reference_Type
is
Node : constant Count_Type :=
Key_Keys.Find (Container'Unrestricted_Access.all, Key);
begin
if Checks and then Node = 0 then
raise Constraint_Error with "key not in set";
end if;
declare
N : Node_Type renames Container.Nodes (Node);
TC : constant Tamper_Counts_Access :=
Container.TC'Unrestricted_Access;
begin
return R : constant Constant_Reference_Type :=
(Element => N.Element'Access,
Control => (Controlled with TC))
do
Busy (TC.all);
end return;
end;
end Constant_Reference;
--------------
-- Contains --
--------------
function Contains
(Container : Set;
Key : Key_Type) return Boolean
is
begin
return Find (Container, Key) /= No_Element;
end Contains;
------------
-- Delete --
------------
procedure Delete
(Container : in out Set;
Key : Key_Type)
is
X : Count_Type;
begin
Key_Keys.Delete_Key_Sans_Free (Container, Key, X);
if Checks and then X = 0 then
raise Constraint_Error with "attempt to delete key not in set";
end if;
HT_Ops.Free (Container, X);
end Delete;
-------------
-- Element --
-------------
function Element
(Container : Set;
Key : Key_Type) return Element_Type
is
Node : constant Count_Type :=
Key_Keys.Find (Container'Unrestricted_Access.all, Key);
begin
if Checks and then Node = 0 then
raise Constraint_Error with "key not in set";
end if;
return Container.Nodes (Node).Element;
end Element;
-------------------------
-- Equivalent_Key_Node --
-------------------------
function Equivalent_Key_Node
(Key : Key_Type;
Node : Node_Type) return Boolean
is
begin
return Equivalent_Keys (Key, Generic_Keys.Key (Node.Element));
end Equivalent_Key_Node;
-------------
-- Exclude --
-------------
procedure Exclude
(Container : in out Set;
Key : Key_Type)
is
X : Count_Type;
begin
Key_Keys.Delete_Key_Sans_Free (Container, Key, X);
HT_Ops.Free (Container, X);
end Exclude;
--------------
-- Finalize --
--------------
procedure Finalize (Control : in out Reference_Control_Type) is
begin
if Control.Container /= null then
Impl.Reference_Control_Type (Control).Finalize;
if Checks and then
Hash (Key (Element (Control.Old_Pos))) /= Control.Old_Hash
then
HT_Ops.Delete_Node_At_Index
(Control.Container.all, Control.Index, Control.Old_Pos.Node);
raise Program_Error with "key not preserved in reference";
end if;
Control.Container := null;
end if;
end Finalize;
----------
-- Find --
----------
function Find
(Container : Set;
Key : Key_Type) return Cursor
is
Node : constant Count_Type :=
Key_Keys.Find (Container'Unrestricted_Access.all, Key);
begin
return (if Node = 0 then No_Element
else Cursor'(Container'Unrestricted_Access, Node));
end Find;
---------
-- Key --
---------
function Key (Position : Cursor) return Key_Type is
begin
if Checks and then Position.Node = 0 then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
pragma Assert (Vet (Position), "bad cursor in function Key");
return Key (Position.Container.Nodes (Position.Node).Element);
end Key;
----------
-- Read --
----------
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Read;
------------------------------
-- Reference_Preserving_Key --
------------------------------
function Reference_Preserving_Key
(Container : aliased in out Set;
Position : Cursor) return Reference_Type
is
begin
if Checks and then Position.Container = null then
raise Constraint_Error with "Position cursor has no element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong container";
end if;
pragma Assert
(Vet (Position),
"bad cursor in function Reference_Preserving_Key");
declare
N : Node_Type renames Container.Nodes (Position.Node);
begin
return R : constant Reference_Type :=
(Element => N.Element'Unrestricted_Access,
Control =>
(Controlled with
Container.TC'Unrestricted_Access,
Container'Unrestricted_Access,
Index => Key_Keys.Index (Container, Key (Position)),
Old_Pos => Position,
Old_Hash => Hash (Key (Position))))
do
Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
function Reference_Preserving_Key
(Container : aliased in out Set;
Key : Key_Type) return Reference_Type
is
Node : constant Count_Type := Key_Keys.Find (Container, Key);
begin
if Checks and then Node = 0 then
raise Constraint_Error with "key not in set";
end if;
declare
P : constant Cursor := Find (Container, Key);
begin
return R : constant Reference_Type :=
(Element => Container.Nodes (Node).Element'Unrestricted_Access,
Control =>
(Controlled with
Container.TC'Unrestricted_Access,
Container'Unrestricted_Access,
Index => Key_Keys.Index (Container, Key),
Old_Pos => P,
Old_Hash => Hash (Key)))
do
Busy (Container.TC);
end return;
end;
end Reference_Preserving_Key;
-------------
-- Replace --
-------------
procedure Replace
(Container : in out Set;
Key : Key_Type;
New_Item : Element_Type)
is
Node : constant Count_Type := Key_Keys.Find (Container, Key);
begin
if Checks and then Node = 0 then
raise Constraint_Error with
"attempt to replace key not in set";
end if;
Replace_Element (Container, Node, New_Item);
end Replace;
-----------------------------------
-- Update_Element_Preserving_Key --
-----------------------------------
procedure Update_Element_Preserving_Key
(Container : in out Set;
Position : Cursor;
Process : not null access
procedure (Element : in out Element_Type))
is
Indx : Hash_Type;
N : Nodes_Type renames Container.Nodes;
begin
if Checks and then Position.Node = 0 then
raise Constraint_Error with
"Position cursor equals No_Element";
end if;
if Checks and then Position.Container /= Container'Unrestricted_Access
then
raise Program_Error with
"Position cursor designates wrong set";
end if;
-- ??? why is this code commented out ???
-- if HT.Buckets = null
-- or else HT.Buckets'Length = 0
-- or else HT.Length = 0
-- or else Position.Node.Next = Position.Node
-- then
-- raise Program_Error with
-- "Position cursor is bad (set is empty)";
-- end if;
pragma Assert
(Vet (Position),
"bad cursor in Update_Element_Preserving_Key");
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
declare
E : Element_Type renames N (Position.Node).Element;
K : constant Key_Type := Key (E);
Lock : With_Lock (Container.TC'Unrestricted_Access);
begin
-- Record bucket now, in case key is changed
Indx := HT_Ops.Index (Container.Buckets, N (Position.Node));
Process (E);
if Equivalent_Keys (K, Key (E)) then
return;
end if;
end;
-- Key was modified, so remove this node from set.
if Container.Buckets (Indx) = Position.Node then
Container.Buckets (Indx) := N (Position.Node).Next;
else
declare
Prev : Count_Type := Container.Buckets (Indx);
begin
while N (Prev).Next /= Position.Node loop
Prev := N (Prev).Next;
if Checks and then Prev = 0 then
raise Program_Error with
"Position cursor is bad (node not found)";
end if;
end loop;
N (Prev).Next := N (Position.Node).Next;
end;
end if;
Container.Length := Container.Length - 1;
HT_Ops.Free (Container, Position.Node);
raise Program_Error with "key was modified";
end Update_Element_Preserving_Key;
-----------
-- Write --
-----------
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type)
is
begin
raise Program_Error with "attempt to stream reference";
end Write;
end Generic_Keys;
end Ada.Containers.Bounded_Hashed_Sets;
| 26.59194 | 79 | 0.54237 |
1a2b7ef895d0f57858e00c96b1f6e001c7db93bc | 3,803 | ads | Ada | src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_fft_gstffts16_h.ads | persan/A-gst | 7a39693d105617adea52680424c862a1a08f7368 | [
"Apache-2.0"
] | 1 | 2018-01-18T00:51:00.000Z | 2018-01-18T00:51:00.000Z | src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_fft_gstffts16_h.ads | persan/A-gst | 7a39693d105617adea52680424c862a1a08f7368 | [
"Apache-2.0"
] | null | null | null | src/gen/gstreamer-gst_low_level-gstreamer_0_10_gst_fft_gstffts16_h.ads | persan/A-gst | 7a39693d105617adea52680424c862a1a08f7368 | [
"Apache-2.0"
] | null | null | null | pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
with glib;
with glib.Values;
with System;
with System;
with GLIB; -- with GStreamer.GST_Low_Level.glibconfig_h;
with GStreamer.GST_Low_Level.gstreamer_0_10_gst_fft_gstfft_h;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_fft_gstffts16_h is
-- GStreamer
-- * Copyright (C) <2007> Sebastian Dröge <[email protected]>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library General Public
-- * License as published by the Free Software Foundation; either
-- * version 2 of the License, or (at your option) any later version.
-- *
-- * This library is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library General Public
-- * License along with this library; if not, write to the
-- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-- * Boston, MA 02111-1307, USA.
--
type GstFFTS16;
type u_GstFFTS16_u_padding_array is array (0 .. 3) of System.Address;
--subtype GstFFTS16 is u_GstFFTS16; -- gst/fft/gstffts16.h:30
type GstFFTS16Complex;
--subtype GstFFTS16Complex is u_GstFFTS16Complex; -- gst/fft/gstffts16.h:31
-- FIXME 0.11: Move the struct definition to the sources,
-- * there's no reason to have it public.
--
--*
-- * GstFFTS16:
-- *
-- * Instance structure for #GstFFTS16.
-- *
--
-- <private>
type GstFFTS16 is record
cfg : System.Address; -- gst/fft/gstffts16.h:44
inverse : aliased GLIB.gboolean; -- gst/fft/gstffts16.h:45
len : aliased GLIB.gint; -- gst/fft/gstffts16.h:46
u_padding : u_GstFFTS16_u_padding_array; -- gst/fft/gstffts16.h:47
end record;
pragma Convention (C_Pass_By_Copy, GstFFTS16); -- gst/fft/gstffts16.h:42
-- Copy of kiss_fft_s16_cpx for documentation reasons,
-- * do NOT change!
--*
-- * GstFFTS16Complex:
-- * @r: Real part
-- * @i: Imaginary part
-- *
-- * Data type for complex numbers composed of
-- * signed 16 bit integers.
-- *
--
type GstFFTS16Complex is record
r : aliased GLIB.gint16; -- gst/fft/gstffts16.h:64
i : aliased GLIB.gint16; -- gst/fft/gstffts16.h:65
end record;
pragma Convention (C_Pass_By_Copy, GstFFTS16Complex); -- gst/fft/gstffts16.h:62
-- Functions
function gst_fft_s16_new (len : GLIB.gint; inverse : GLIB.gboolean) return access GstFFTS16; -- gst/fft/gstffts16.h:70
pragma Import (C, gst_fft_s16_new, "gst_fft_s16_new");
procedure gst_fft_s16_fft
(self : access GstFFTS16;
timedata : access GLIB.gint16;
freqdata : access GstFFTS16Complex); -- gst/fft/gstffts16.h:71
pragma Import (C, gst_fft_s16_fft, "gst_fft_s16_fft");
procedure gst_fft_s16_inverse_fft
(self : access GstFFTS16;
freqdata : access constant GstFFTS16Complex;
timedata : access GLIB.gint16); -- gst/fft/gstffts16.h:72
pragma Import (C, gst_fft_s16_inverse_fft, "gst_fft_s16_inverse_fft");
procedure gst_fft_s16_free (self : access GstFFTS16); -- gst/fft/gstffts16.h:73
pragma Import (C, gst_fft_s16_free, "gst_fft_s16_free");
procedure gst_fft_s16_window
(self : access GstFFTS16;
timedata : access GLIB.gint16;
window : GStreamer.GST_Low_Level.gstreamer_0_10_gst_fft_gstfft_h.GstFFTWindow); -- gst/fft/gstffts16.h:75
pragma Import (C, gst_fft_s16_window, "gst_fft_s16_window");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_fft_gstffts16_h;
| 35.877358 | 122 | 0.700237 |
138c600990866e83aa2b47e59b43f8858990c006 | 9,289 | ads | Ada | arch/ARM/STM32/svd/stm32f7x/stm32_svd-syscfg.ads | shakram02/Ada_Drivers_Library | a407ca7ddbc2d9756647016c2f8fd8ef24a239ff | [
"BSD-3-Clause"
] | 192 | 2016-06-01T18:32:04.000Z | 2022-03-26T22:52:31.000Z | arch/ARM/STM32/svd/stm32f7x/stm32_svd-syscfg.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 239 | 2016-05-26T20:02:01.000Z | 2022-03-31T09:46:56.000Z | arch/ARM/STM32/svd/stm32f7x/stm32_svd-syscfg.ads | morbos/Ada_Drivers_Library | a4ab26799be60997c38735f4056160c4af597ef7 | [
"BSD-3-Clause"
] | 142 | 2016-06-05T08:12:20.000Z | 2022-03-24T17:37:17.000Z | -- This spec has been automatically generated from STM32F7x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.SYSCFG is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype MEMRM_MEM_MODE_Field is HAL.UInt3;
subtype MEMRM_SWP_FMC_Field is HAL.UInt2;
-- memory remap register
type MEMRM_Register is record
-- Memory mapping selection
MEM_MODE : MEMRM_MEM_MODE_Field := 16#0#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Flash bank mode selection
FB_MODE : Boolean := False;
-- unspecified
Reserved_9_9 : HAL.Bit := 16#0#;
-- FMC memory mapping swap
SWP_FMC : MEMRM_SWP_FMC_Field := 16#0#;
-- unspecified
Reserved_12_31 : HAL.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MEMRM_Register use record
MEM_MODE at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
FB_MODE at 0 range 8 .. 8;
Reserved_9_9 at 0 range 9 .. 9;
SWP_FMC at 0 range 10 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
-- peripheral mode configuration register
type PMC_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- ADC1DC2
ADC1DC2 : Boolean := False;
-- ADC2DC2
ADC2DC2 : Boolean := False;
-- ADC3DC2
ADC3DC2 : Boolean := False;
-- unspecified
Reserved_19_22 : HAL.UInt4 := 16#0#;
-- Ethernet PHY interface selection
MII_RMII_SEL : Boolean := False;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PMC_Register use record
Reserved_0_15 at 0 range 0 .. 15;
ADC1DC2 at 0 range 16 .. 16;
ADC2DC2 at 0 range 17 .. 17;
ADC3DC2 at 0 range 18 .. 18;
Reserved_19_22 at 0 range 19 .. 22;
MII_RMII_SEL at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-- EXTICR1_EXTI array element
subtype EXTICR1_EXTI_Element is HAL.UInt4;
-- EXTICR1_EXTI array
type EXTICR1_EXTI_Field_Array is array (0 .. 3) of EXTICR1_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR1_EXTI
type EXTICR1_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR1_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR1_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 1
type EXTICR1_Register is record
-- EXTI x configuration (x = 0 to 3)
EXTI : EXTICR1_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR1_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR2_EXTI array element
subtype EXTICR2_EXTI_Element is HAL.UInt4;
-- EXTICR2_EXTI array
type EXTICR2_EXTI_Field_Array is array (4 .. 7) of EXTICR2_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR2_EXTI
type EXTICR2_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR2_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR2_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 2
type EXTICR2_Register is record
-- EXTI x configuration (x = 4 to 7)
EXTI : EXTICR2_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR2_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR3_EXTI array element
subtype EXTICR3_EXTI_Element is HAL.UInt4;
-- EXTICR3_EXTI array
type EXTICR3_EXTI_Field_Array is array (8 .. 11) of EXTICR3_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR3_EXTI
type EXTICR3_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR3_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR3_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 3
type EXTICR3_Register is record
-- EXTI x configuration (x = 8 to 11)
EXTI : EXTICR3_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR3_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- EXTICR4_EXTI array element
subtype EXTICR4_EXTI_Element is HAL.UInt4;
-- EXTICR4_EXTI array
type EXTICR4_EXTI_Field_Array is array (12 .. 15) of EXTICR4_EXTI_Element
with Component_Size => 4, Size => 16;
-- Type definition for EXTICR4_EXTI
type EXTICR4_EXTI_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- EXTI as a value
Val : HAL.UInt16;
when True =>
-- EXTI as an array
Arr : EXTICR4_EXTI_Field_Array;
end case;
end record
with Unchecked_Union, Size => 16;
for EXTICR4_EXTI_Field use record
Val at 0 range 0 .. 15;
Arr at 0 range 0 .. 15;
end record;
-- external interrupt configuration register 4
type EXTICR4_Register is record
-- EXTI x configuration (x = 12 to 15)
EXTI : EXTICR4_EXTI_Field :=
(As_Array => False, Val => 16#0#);
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for EXTICR4_Register use record
EXTI at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Compensation cell control register
type CMPCR_Register is record
-- Read-only. Compensation cell power-down
CMP_PD : Boolean;
-- unspecified
Reserved_1_7 : HAL.UInt7;
-- Read-only. READY
READY : Boolean;
-- unspecified
Reserved_9_31 : HAL.UInt23;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CMPCR_Register use record
CMP_PD at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
READY at 0 range 8 .. 8;
Reserved_9_31 at 0 range 9 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- System configuration controller
type SYSCFG_Peripheral is record
-- memory remap register
MEMRM : aliased MEMRM_Register;
-- peripheral mode configuration register
PMC : aliased PMC_Register;
-- external interrupt configuration register 1
EXTICR1 : aliased EXTICR1_Register;
-- external interrupt configuration register 2
EXTICR2 : aliased EXTICR2_Register;
-- external interrupt configuration register 3
EXTICR3 : aliased EXTICR3_Register;
-- external interrupt configuration register 4
EXTICR4 : aliased EXTICR4_Register;
-- Compensation cell control register
CMPCR : aliased CMPCR_Register;
end record
with Volatile;
for SYSCFG_Peripheral use record
MEMRM at 16#0# range 0 .. 31;
PMC at 16#4# range 0 .. 31;
EXTICR1 at 16#8# range 0 .. 31;
EXTICR2 at 16#C# range 0 .. 31;
EXTICR3 at 16#10# range 0 .. 31;
EXTICR4 at 16#14# range 0 .. 31;
CMPCR at 16#20# range 0 .. 31;
end record;
-- System configuration controller
SYSCFG_Periph : aliased SYSCFG_Peripheral
with Import, Address => System'To_Address (16#40013800#);
end STM32_SVD.SYSCFG;
| 30.159091 | 76 | 0.600818 |
137f8cb63d6ebabd7cc084154df937c4e1786ac2 | 21,501 | adb | Ada | tests/src/sha2_streams_tests.adb | AntonMeep/sha2 | 73c2cd73e440b1e36d1b5c8b741fcb0e3fc4046c | [
"0BSD"
] | null | null | null | tests/src/sha2_streams_tests.adb | AntonMeep/sha2 | 73c2cd73e440b1e36d1b5c8b741fcb0e3fc4046c | [
"0BSD"
] | null | null | null | tests/src/sha2_streams_tests.adb | AntonMeep/sha2 | 73c2cd73e440b1e36d1b5c8b741fcb0e3fc4046c | [
"0BSD"
] | null | null | null | pragma Ada_2012;
with AUnit.Assertions; use AUnit.Assertions;
with AUnit.Test_Caller;
with Ada.Streams; use Ada.Streams;
with SHA2;
package body SHA2_Streams_Tests is
package Caller is new AUnit.Test_Caller (Fixture);
Test_Suite : aliased AUnit.Test_Suites.Test_Suite;
function Suite return AUnit.Test_Suites.Access_Test_Suite is
Name : constant String := "[SHA2 - Ada.Streams] ";
begin
Test_Suite.Add_Test
(Caller.Create (Name & "SHA_224() - normal", SHA2_224_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_224() - one million 'a' characters",
SHA2_224_One_Million_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_224() - an extremely long 1GB string",
SHA2_224_Extremely_Long_Test'Access));
Test_Suite.Add_Test
(Caller.Create (Name & "SHA_256() - normal", SHA2_256_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_256() - one million 'a' characters",
SHA2_256_One_Million_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_256() - an extremely long 1GB string",
SHA2_256_Extremely_Long_Test'Access));
Test_Suite.Add_Test
(Caller.Create (Name & "SHA_384() - normal", SHA2_384_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_384() - one million 'a' characters",
SHA2_384_One_Million_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_384() - an extremely long 1GB string",
SHA2_384_Extremely_Long_Test'Access));
Test_Suite.Add_Test
(Caller.Create (Name & "SHA_512() - normal", SHA2_512_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512() - one million 'a' characters",
SHA2_512_One_Million_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512() - an extremely long 1GB string",
SHA2_512_Extremely_Long_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512_224() - normal", SHA2_512_224_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512_224() - one million 'a' characters",
SHA2_512_224_One_Million_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512_256() - normal", SHA2_512_256_Test'Access));
Test_Suite.Add_Test
(Caller.Create
(Name & "SHA_512_256() - one million 'a' characters",
SHA2_512_256_One_Million_Test'Access));
return Test_Suite'Access;
end Suite;
procedure SHA2_224_Test (Object : in out Fixture) is
use SHA2.SHA_224;
begin
Assert
(Hash ("abc") =
(16#23#, 16#09#, 16#7d#, 16#22#, 16#34#, 16#05#, 16#d8#, 16#22#,
16#86#, 16#42#, 16#a4#, 16#77#, 16#bd#, 16#a2#, 16#55#, 16#b3#,
16#2a#, 16#ad#, 16#bc#, 16#e4#, 16#bd#, 16#a0#, 16#b3#, 16#f7#,
16#e3#, 16#6c#, 16#9d#, 16#a7#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#d1#, 16#4a#, 16#02#, 16#8c#, 16#2a#, 16#3a#, 16#2b#, 16#c9#,
16#47#, 16#61#, 16#02#, 16#bb#, 16#28#, 16#82#, 16#34#, 16#c4#,
16#15#, 16#a2#, 16#b0#, 16#1f#, 16#82#, 16#8e#, 16#a6#, 16#2a#,
16#c5#, 16#b3#, 16#e4#, 16#2f#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#75#, 16#38#, 16#8b#, 16#16#, 16#51#, 16#27#, 16#76#, 16#cc#,
16#5d#, 16#ba#, 16#5d#, 16#a1#, 16#fd#, 16#89#, 16#01#, 16#50#,
16#b0#, 16#c6#, 16#45#, 16#5c#, 16#b4#, 16#f5#, 16#8b#, 16#19#,
16#52#, 16#52#, 16#25#, 16#25#),
"Hash(`abcdbcde...`) 448 bits of input");
Assert
(Hash
("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" &
"ijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu") =
(16#c9#, 16#7c#, 16#a9#, 16#a5#, 16#59#, 16#85#, 16#0c#, 16#e9#,
16#7a#, 16#04#, 16#a9#, 16#6d#, 16#ef#, 16#6d#, 16#99#, 16#a9#,
16#e0#, 16#e0#, 16#e2#, 16#ab#, 16#14#, 16#e6#, 16#b8#, 16#df#,
16#26#, 16#5f#, 16#c0#, 16#b3#),
"Hash(`abcdbcde...`) 896 bits of input");
end SHA2_224_Test;
procedure SHA2_224_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_224;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#20#, 16#79#, 16#46#, 16#55#, 16#98#, 16#0c#, 16#91#, 16#d8#,
16#bb#, 16#b4#, 16#c1#, 16#ea#, 16#97#, 16#61#, 16#8a#, 16#4b#,
16#f0#, 16#3f#, 16#42#, 16#58#, 16#19#, 16#48#, 16#b2#, 16#ee#,
16#4e#, 16#e7#, 16#ad#, 16#67#),
"check hashing result");
end SHA2_224_One_Million_Test;
procedure SHA2_224_Extremely_Long_Test (Object : in out Fixture) is
use SHA2.SHA_224;
Ctx : Context := Initialize;
begin
for I in 1 .. 16_777_216 loop
Update
(Ctx,
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno");
end loop;
Assert
(Finalize (Ctx) =
(16#b5#, 16#98#, 16#97#, 16#13#, 16#ca#, 16#4f#, 16#e4#, 16#7a#,
16#00#, 16#9f#, 16#86#, 16#21#, 16#98#, 16#0b#, 16#34#, 16#e6#,
16#d6#, 16#3e#, 16#d3#, 16#06#, 16#3b#, 16#2a#, 16#0a#, 16#2c#,
16#86#, 16#7d#, 16#8a#, 16#85#),
"check hashing result");
end SHA2_224_Extremely_Long_Test;
procedure SHA2_256_Test (Object : in out Fixture) is
use SHA2.SHA_256;
begin
Assert
(Hash ("abc") =
(16#ba#, 16#78#, 16#16#, 16#bf#, 16#8f#, 16#01#, 16#cf#, 16#ea#,
16#41#, 16#41#, 16#40#, 16#de#, 16#5d#, 16#ae#, 16#22#, 16#23#,
16#b0#, 16#03#, 16#61#, 16#a3#, 16#96#, 16#17#, 16#7a#, 16#9c#,
16#b4#, 16#10#, 16#ff#, 16#61#, 16#f2#, 16#00#, 16#15#, 16#ad#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#e3#, 16#b0#, 16#c4#, 16#42#, 16#98#, 16#fc#, 16#1c#, 16#14#,
16#9a#, 16#fb#, 16#f4#, 16#c8#, 16#99#, 16#6f#, 16#b9#, 16#24#,
16#27#, 16#ae#, 16#41#, 16#e4#, 16#64#, 16#9b#, 16#93#, 16#4c#,
16#a4#, 16#95#, 16#99#, 16#1b#, 16#78#, 16#52#, 16#b8#, 16#55#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#24#, 16#8d#, 16#6a#, 16#61#, 16#d2#, 16#06#, 16#38#, 16#b8#,
16#e5#, 16#c0#, 16#26#, 16#93#, 16#0c#, 16#3e#, 16#60#, 16#39#,
16#a3#, 16#3c#, 16#e4#, 16#59#, 16#64#, 16#ff#, 16#21#, 16#67#,
16#f6#, 16#ec#, 16#ed#, 16#d4#, 16#19#, 16#db#, 16#06#, 16#c1#),
"Hash(`abcdbcde...`) 448 bits of input");
Assert
(Hash
("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" &
"ijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu") =
(16#cf#, 16#5b#, 16#16#, 16#a7#, 16#78#, 16#af#, 16#83#, 16#80#,
16#03#, 16#6c#, 16#e5#, 16#9e#, 16#7b#, 16#04#, 16#92#, 16#37#,
16#0b#, 16#24#, 16#9b#, 16#11#, 16#e8#, 16#f0#, 16#7a#, 16#51#,
16#af#, 16#ac#, 16#45#, 16#03#, 16#7a#, 16#fe#, 16#e9#, 16#d1#),
"Hash(`abcdbcde...`) 896 bits of input");
end SHA2_256_Test;
procedure SHA2_256_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_256;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#cd#, 16#c7#, 16#6e#, 16#5c#, 16#99#, 16#14#, 16#fb#, 16#92#,
16#81#, 16#a1#, 16#c7#, 16#e2#, 16#84#, 16#d7#, 16#3e#, 16#67#,
16#f1#, 16#80#, 16#9a#, 16#48#, 16#a4#, 16#97#, 16#20#, 16#0e#,
16#04#, 16#6d#, 16#39#, 16#cc#, 16#c7#, 16#11#, 16#2c#, 16#d0#),
"check hashing result");
end SHA2_256_One_Million_Test;
procedure SHA2_256_Extremely_Long_Test (Object : in out Fixture) is
use SHA2.SHA_256;
Ctx : Context := Initialize;
begin
for I in 1 .. 16_777_216 loop
Update
(Ctx,
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno");
end loop;
Assert
(Finalize (Ctx) =
(16#50#, 16#e7#, 16#2a#, 16#0e#, 16#26#, 16#44#, 16#2f#, 16#e2#,
16#55#, 16#2d#, 16#c3#, 16#93#, 16#8a#, 16#c5#, 16#86#, 16#58#,
16#22#, 16#8c#, 16#0c#, 16#bf#, 16#b1#, 16#d2#, 16#ca#, 16#87#,
16#2a#, 16#e4#, 16#35#, 16#26#, 16#6f#, 16#cd#, 16#05#, 16#5e#),
"check hashing result");
end SHA2_256_Extremely_Long_Test;
procedure SHA2_384_Test (Object : in out Fixture) is
use SHA2.SHA_384;
begin
Assert
(Hash ("abc") =
(16#cb#, 16#00#, 16#75#, 16#3f#, 16#45#, 16#a3#, 16#5e#, 16#8b#,
16#b5#, 16#a0#, 16#3d#, 16#69#, 16#9a#, 16#c6#, 16#50#, 16#07#,
16#27#, 16#2c#, 16#32#, 16#ab#, 16#0e#, 16#de#, 16#d1#, 16#63#,
16#1a#, 16#8b#, 16#60#, 16#5a#, 16#43#, 16#ff#, 16#5b#, 16#ed#,
16#80#, 16#86#, 16#07#, 16#2b#, 16#a1#, 16#e7#, 16#cc#, 16#23#,
16#58#, 16#ba#, 16#ec#, 16#a1#, 16#34#, 16#c8#, 16#25#, 16#a7#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#38#, 16#b0#, 16#60#, 16#a7#, 16#51#, 16#ac#, 16#96#, 16#38#,
16#4c#, 16#d9#, 16#32#, 16#7e#, 16#b1#, 16#b1#, 16#e3#, 16#6a#,
16#21#, 16#fd#, 16#b7#, 16#11#, 16#14#, 16#be#, 16#07#, 16#43#,
16#4c#, 16#0c#, 16#c7#, 16#bf#, 16#63#, 16#f6#, 16#e1#, 16#da#,
16#27#, 16#4e#, 16#de#, 16#bf#, 16#e7#, 16#6f#, 16#65#, 16#fb#,
16#d5#, 16#1a#, 16#d2#, 16#f1#, 16#48#, 16#98#, 16#b9#, 16#5b#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#33#, 16#91#, 16#fd#, 16#dd#, 16#fc#, 16#8d#, 16#c7#, 16#39#,
16#37#, 16#07#, 16#a6#, 16#5b#, 16#1b#, 16#47#, 16#09#, 16#39#,
16#7c#, 16#f8#, 16#b1#, 16#d1#, 16#62#, 16#af#, 16#05#, 16#ab#,
16#fe#, 16#8f#, 16#45#, 16#0d#, 16#e5#, 16#f3#, 16#6b#, 16#c6#,
16#b0#, 16#45#, 16#5a#, 16#85#, 16#20#, 16#bc#, 16#4e#, 16#6f#,
16#5f#, 16#e9#, 16#5b#, 16#1f#, 16#e3#, 16#c8#, 16#45#, 16#2b#),
"Hash(`abcdbcde...`) 448 bits of input");
Assert
(Hash
("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" &
"ijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu") =
(16#09#, 16#33#, 16#0c#, 16#33#, 16#f7#, 16#11#, 16#47#, 16#e8#,
16#3d#, 16#19#, 16#2f#, 16#c7#, 16#82#, 16#cd#, 16#1b#, 16#47#,
16#53#, 16#11#, 16#1b#, 16#17#, 16#3b#, 16#3b#, 16#05#, 16#d2#,
16#2f#, 16#a0#, 16#80#, 16#86#, 16#e3#, 16#b0#, 16#f7#, 16#12#,
16#fc#, 16#c7#, 16#c7#, 16#1a#, 16#55#, 16#7e#, 16#2d#, 16#b9#,
16#66#, 16#c3#, 16#e9#, 16#fa#, 16#91#, 16#74#, 16#60#, 16#39#),
"Hash(`abcdbcde...`) 896 bits of input");
end SHA2_384_Test;
procedure SHA2_384_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_384;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#9d#, 16#0e#, 16#18#, 16#09#, 16#71#, 16#64#, 16#74#, 16#cb#,
16#08#, 16#6e#, 16#83#, 16#4e#, 16#31#, 16#0a#, 16#4a#, 16#1c#,
16#ed#, 16#14#, 16#9e#, 16#9c#, 16#00#, 16#f2#, 16#48#, 16#52#,
16#79#, 16#72#, 16#ce#, 16#c5#, 16#70#, 16#4c#, 16#2a#, 16#5b#,
16#07#, 16#b8#, 16#b3#, 16#dc#, 16#38#, 16#ec#, 16#c4#, 16#eb#,
16#ae#, 16#97#, 16#dd#, 16#d8#, 16#7f#, 16#3d#, 16#89#, 16#85#),
"check hashing result");
end SHA2_384_One_Million_Test;
procedure SHA2_384_Extremely_Long_Test (Object : in out Fixture) is
use SHA2.SHA_384;
Ctx : Context := Initialize;
begin
for I in 1 .. 16_777_216 loop
Update
(Ctx,
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno");
end loop;
Assert
(Finalize (Ctx) =
(16#54#, 16#41#, 16#23#, 16#5c#, 16#c0#, 16#23#, 16#53#, 16#41#,
16#ed#, 16#80#, 16#6a#, 16#64#, 16#fb#, 16#35#, 16#47#, 16#42#,
16#b5#, 16#e5#, 16#c0#, 16#2a#, 16#3c#, 16#5c#, 16#b7#, 16#1b#,
16#5f#, 16#63#, 16#fb#, 16#79#, 16#34#, 16#58#, 16#d8#, 16#fd#,
16#ae#, 16#59#, 16#9c#, 16#8c#, 16#d8#, 16#88#, 16#49#, 16#43#,
16#c0#, 16#4f#, 16#11#, 16#b3#, 16#1b#, 16#89#, 16#f0#, 16#23#),
"check hashing result");
end SHA2_384_Extremely_Long_Test;
procedure SHA2_512_Test (Object : in out Fixture) is
use SHA2.SHA_512;
begin
Assert
(Hash ("abc") =
(16#dd#, 16#af#, 16#35#, 16#a1#, 16#93#, 16#61#, 16#7a#, 16#ba#,
16#cc#, 16#41#, 16#73#, 16#49#, 16#ae#, 16#20#, 16#41#, 16#31#,
16#12#, 16#e6#, 16#fa#, 16#4e#, 16#89#, 16#a9#, 16#7e#, 16#a2#,
16#0a#, 16#9e#, 16#ee#, 16#e6#, 16#4b#, 16#55#, 16#d3#, 16#9a#,
16#21#, 16#92#, 16#99#, 16#2a#, 16#27#, 16#4f#, 16#c1#, 16#a8#,
16#36#, 16#ba#, 16#3c#, 16#23#, 16#a3#, 16#fe#, 16#eb#, 16#bd#,
16#45#, 16#4d#, 16#44#, 16#23#, 16#64#, 16#3c#, 16#e8#, 16#0e#,
16#2a#, 16#9a#, 16#c9#, 16#4f#, 16#a5#, 16#4c#, 16#a4#, 16#9f#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#cf#, 16#83#, 16#e1#, 16#35#, 16#7e#, 16#ef#, 16#b8#, 16#bd#,
16#f1#, 16#54#, 16#28#, 16#50#, 16#d6#, 16#6d#, 16#80#, 16#07#,
16#d6#, 16#20#, 16#e4#, 16#05#, 16#0b#, 16#57#, 16#15#, 16#dc#,
16#83#, 16#f4#, 16#a9#, 16#21#, 16#d3#, 16#6c#, 16#e9#, 16#ce#,
16#47#, 16#d0#, 16#d1#, 16#3c#, 16#5d#, 16#85#, 16#f2#, 16#b0#,
16#ff#, 16#83#, 16#18#, 16#d2#, 16#87#, 16#7e#, 16#ec#, 16#2f#,
16#63#, 16#b9#, 16#31#, 16#bd#, 16#47#, 16#41#, 16#7a#, 16#81#,
16#a5#, 16#38#, 16#32#, 16#7a#, 16#f9#, 16#27#, 16#da#, 16#3e#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#20#, 16#4a#, 16#8f#, 16#c6#, 16#dd#, 16#a8#, 16#2f#, 16#0a#,
16#0c#, 16#ed#, 16#7b#, 16#eb#, 16#8e#, 16#08#, 16#a4#, 16#16#,
16#57#, 16#c1#, 16#6e#, 16#f4#, 16#68#, 16#b2#, 16#28#, 16#a8#,
16#27#, 16#9b#, 16#e3#, 16#31#, 16#a7#, 16#03#, 16#c3#, 16#35#,
16#96#, 16#fd#, 16#15#, 16#c1#, 16#3b#, 16#1b#, 16#07#, 16#f9#,
16#aa#, 16#1d#, 16#3b#, 16#ea#, 16#57#, 16#78#, 16#9c#, 16#a0#,
16#31#, 16#ad#, 16#85#, 16#c7#, 16#a7#, 16#1d#, 16#d7#, 16#03#,
16#54#, 16#ec#, 16#63#, 16#12#, 16#38#, 16#ca#, 16#34#, 16#45#),
"Hash(`abcdbcde...`) 448 bits of input");
Assert
(Hash
("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno" &
"ijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu") =
(16#8e#, 16#95#, 16#9b#, 16#75#, 16#da#, 16#e3#, 16#13#, 16#da#,
16#8c#, 16#f4#, 16#f7#, 16#28#, 16#14#, 16#fc#, 16#14#, 16#3f#,
16#8f#, 16#77#, 16#79#, 16#c6#, 16#eb#, 16#9f#, 16#7f#, 16#a1#,
16#72#, 16#99#, 16#ae#, 16#ad#, 16#b6#, 16#88#, 16#90#, 16#18#,
16#50#, 16#1d#, 16#28#, 16#9e#, 16#49#, 16#00#, 16#f7#, 16#e4#,
16#33#, 16#1b#, 16#99#, 16#de#, 16#c4#, 16#b5#, 16#43#, 16#3a#,
16#c7#, 16#d3#, 16#29#, 16#ee#, 16#b6#, 16#dd#, 16#26#, 16#54#,
16#5e#, 16#96#, 16#e5#, 16#5b#, 16#87#, 16#4b#, 16#e9#, 16#09#),
"Hash(`abcdbcde...`) 896 bits of input");
end SHA2_512_Test;
procedure SHA2_512_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_512;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#e7#, 16#18#, 16#48#, 16#3d#, 16#0c#, 16#e7#, 16#69#, 16#64#,
16#4e#, 16#2e#, 16#42#, 16#c7#, 16#bc#, 16#15#, 16#b4#, 16#63#,
16#8e#, 16#1f#, 16#98#, 16#b1#, 16#3b#, 16#20#, 16#44#, 16#28#,
16#56#, 16#32#, 16#a8#, 16#03#, 16#af#, 16#a9#, 16#73#, 16#eb#,
16#de#, 16#0f#, 16#f2#, 16#44#, 16#87#, 16#7e#, 16#a6#, 16#0a#,
16#4c#, 16#b0#, 16#43#, 16#2c#, 16#e5#, 16#77#, 16#c3#, 16#1b#,
16#eb#, 16#00#, 16#9c#, 16#5c#, 16#2c#, 16#49#, 16#aa#, 16#2e#,
16#4e#, 16#ad#, 16#b2#, 16#17#, 16#ad#, 16#8c#, 16#c0#, 16#9b#),
"check hashing result");
end SHA2_512_One_Million_Test;
procedure SHA2_512_Extremely_Long_Test (Object : in out Fixture) is
use SHA2.SHA_512;
Ctx : Context := Initialize;
begin
for I in 1 .. 16_777_216 loop
Update
(Ctx,
"abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno");
end loop;
Assert
(Finalize (Ctx) =
(16#b4#, 16#7c#, 16#93#, 16#34#, 16#21#, 16#ea#, 16#2d#, 16#b1#,
16#49#, 16#ad#, 16#6e#, 16#10#, 16#fc#, 16#e6#, 16#c7#, 16#f9#,
16#3d#, 16#07#, 16#52#, 16#38#, 16#01#, 16#80#, 16#ff#, 16#d7#,
16#f4#, 16#62#, 16#9a#, 16#71#, 16#21#, 16#34#, 16#83#, 16#1d#,
16#77#, 16#be#, 16#60#, 16#91#, 16#b8#, 16#19#, 16#ed#, 16#35#,
16#2c#, 16#29#, 16#67#, 16#a2#, 16#e2#, 16#d4#, 16#fa#, 16#50#,
16#50#, 16#72#, 16#3c#, 16#96#, 16#30#, 16#69#, 16#1f#, 16#1a#,
16#05#, 16#a7#, 16#28#, 16#1d#, 16#be#, 16#6c#, 16#10#, 16#86#),
"check hashing result");
end SHA2_512_Extremely_Long_Test;
procedure SHA2_512_224_Test (Object : in out Fixture) is
use SHA2.SHA_512_224;
begin
Assert
(Hash ("abc") =
(16#46#, 16#34#, 16#27#, 16#0f#, 16#70#, 16#7b#, 16#6a#, 16#54#,
16#da#, 16#ae#, 16#75#, 16#30#, 16#46#, 16#08#, 16#42#, 16#e2#,
16#0e#, 16#37#, 16#ed#, 16#26#, 16#5c#, 16#ee#, 16#e9#, 16#a4#,
16#3e#, 16#89#, 16#24#, 16#aa#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#6e#, 16#d0#, 16#dd#, 16#02#, 16#80#, 16#6f#, 16#a8#, 16#9e#,
16#25#, 16#de#, 16#06#, 16#0c#, 16#19#, 16#d3#, 16#ac#, 16#86#,
16#ca#, 16#bb#, 16#87#, 16#d6#, 16#a0#, 16#dd#, 16#d0#, 16#5c#,
16#33#, 16#3b#, 16#84#, 16#f4#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#e5#, 16#30#, 16#2d#, 16#6d#, 16#54#, 16#bb#, 16#24#, 16#22#,
16#75#, 16#d1#, 16#e7#, 16#62#, 16#2d#, 16#68#, 16#df#, 16#6e#,
16#b0#, 16#2d#, 16#ed#, 16#d1#, 16#3f#, 16#56#, 16#4c#, 16#13#,
16#db#, 16#da#, 16#21#, 16#74#),
"Hash(`abcdbcde...`) 448 bits of input");
end SHA2_512_224_Test;
procedure SHA2_512_224_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_512_224;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#37#, 16#ab#, 16#33#, 16#1d#, 16#76#, 16#f0#, 16#d3#, 16#6d#,
16#e4#, 16#22#, 16#bd#, 16#0e#, 16#de#, 16#b2#, 16#2a#, 16#28#,
16#ac#, 16#cd#, 16#48#, 16#7b#, 16#7a#, 16#84#, 16#53#, 16#ae#,
16#96#, 16#5d#, 16#d2#, 16#87#),
"check hashing result");
end SHA2_512_224_One_Million_Test;
procedure SHA2_512_256_Test (Object : in out Fixture) is
use SHA2.SHA_512_256;
begin
Assert
(Hash ("abc") =
(16#53#, 16#04#, 16#8e#, 16#26#, 16#81#, 16#94#, 16#1e#, 16#f9#,
16#9b#, 16#2e#, 16#29#, 16#b7#, 16#6b#, 16#4c#, 16#7d#, 16#ab#,
16#e4#, 16#c2#, 16#d0#, 16#c6#, 16#34#, 16#fc#, 16#6d#, 16#46#,
16#e0#, 16#e2#, 16#f1#, 16#31#, 16#07#, 16#e7#, 16#af#, 16#23#),
"Hash(`abc`)");
Assert
(Hash ("") =
(16#c6#, 16#72#, 16#b8#, 16#d1#, 16#ef#, 16#56#, 16#ed#, 16#28#,
16#ab#, 16#87#, 16#c3#, 16#62#, 16#2c#, 16#51#, 16#14#, 16#06#,
16#9b#, 16#dd#, 16#3a#, 16#d7#, 16#b8#, 16#f9#, 16#73#, 16#74#,
16#98#, 16#d0#, 16#c0#, 16#1e#, 16#ce#, 16#f0#, 16#96#, 16#7a#),
"Hash(``) empty string input");
Assert
(Hash ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") =
(16#bd#, 16#e8#, 16#e1#, 16#f9#, 16#f1#, 16#9b#, 16#b9#, 16#fd#,
16#34#, 16#06#, 16#c9#, 16#0e#, 16#c6#, 16#bc#, 16#47#, 16#bd#,
16#36#, 16#d8#, 16#ad#, 16#a9#, 16#f1#, 16#18#, 16#80#, 16#db#,
16#c8#, 16#a2#, 16#2a#, 16#70#, 16#78#, 16#b6#, 16#a4#, 16#61#),
"Hash(`abcdbcde...`) 448 bits of input");
end SHA2_512_256_Test;
procedure SHA2_512_256_One_Million_Test (Object : in out Fixture) is
use SHA2.SHA_512_256;
Ctx : Context := Initialize;
begin
for I in 1 .. 1_000_000 loop
Update (Ctx, "a");
end loop;
Assert
(Finalize (Ctx) =
(16#9a#, 16#59#, 16#a0#, 16#52#, 16#93#, 16#01#, 16#87#, 16#a9#,
16#70#, 16#38#, 16#ca#, 16#e6#, 16#92#, 16#f3#, 16#07#, 16#08#,
16#aa#, 16#64#, 16#91#, 16#92#, 16#3e#, 16#f5#, 16#19#, 16#43#,
16#94#, 16#dc#, 16#68#, 16#d5#, 16#6c#, 16#74#, 16#fb#, 16#21#),
"check hashing result");
end SHA2_512_256_One_Million_Test;
end SHA2_Streams_Tests;
| 44.700624 | 80 | 0.511465 |
1385d6959764a41b03eef2b8aaf99d1d44df47f7 | 206,422 | adb | Ada | HLS/lab3/dct.prj/solution5/.autopilot/db/dct_1d.bind.adb | lfVelez/ISPR | 840f41c2053a48642a7b287feecfea79c6f389b3 | [
"MIT"
] | 1 | 2021-03-03T16:53:52.000Z | 2021-03-03T16:53:52.000Z | HLS/lab3/dct.prj/solution5/.autopilot/db/dct_1d.bind.adb | lfVelez/ISPR | 840f41c2053a48642a7b287feecfea79c6f389b3 | [
"MIT"
] | null | null | null | HLS/lab3/dct.prj/solution5/.autopilot/db/dct_1d.bind.adb | lfVelez/ISPR | 840f41c2053a48642a7b287feecfea79c6f389b3 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE boost_serialization>
<boost_serialization signature="serialization::archive" version="14">
<syndb class_id="0" tracking_level="0" version="0">
<userIPLatency>-1</userIPLatency>
<userIPName></userIPName>
<cdfg class_id="1" tracking_level="1" version="0" object_id="_0">
<name>dct_1d</name>
<ret_bitwidth>0</ret_bitwidth>
<ports class_id="2" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="3" tracking_level="1" version="0" object_id="_1">
<Value class_id="4" tracking_level="0" version="0">
<Obj class_id="5" tracking_level="0" version="0">
<type>1</type>
<id>1</id>
<name>src</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs class_id="7" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_2">
<Value>
<Obj>
<type>1</type>
<id>2</id>
<name>src1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_3">
<Value>
<Obj>
<type>1</type>
<id>3</id>
<name>src2</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_4">
<Value>
<Obj>
<type>1</type>
<id>4</id>
<name>src3</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_5">
<Value>
<Obj>
<type>1</type>
<id>5</id>
<name>src4</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_6">
<Value>
<Obj>
<type>1</type>
<id>6</id>
<name>src5</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_7">
<Value>
<Obj>
<type>1</type>
<id>7</id>
<name>src6</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_8">
<Value>
<Obj>
<type>1</type>
<id>8</id>
<name>src7</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>0</direction>
<if_type>1</if_type>
<array_size>8</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_9">
<Value>
<Obj>
<type>1</type>
<id>9</id>
<name>tmp_6</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_10">
<Value>
<Obj>
<type>1</type>
<id>10</id>
<name>dst</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>dst</originalName>
<rtlName></rtlName>
<coreName>RAM</coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<direction>1</direction>
<if_type>1</if_type>
<array_size>64</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
<item class_id_reference="3" object_id="_11">
<Value>
<Obj>
<type>1</type>
<id>11</id>
<name>tmp_61</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<direction>0</direction>
<if_type>0</if_type>
<array_size>0</array_size>
<bit_vecs>
<count>0</count>
<item_version>0</item_version>
</bit_vecs>
</item>
</ports>
<nodes class_id="8" tracking_level="0" version="0">
<count>83</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_61_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>113</item>
<item>114</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>tmp_6_read</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>115</item>
<item>116</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_12</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>7</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>118</item>
<item>119</item>
<item>121</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>tmp_20_cast</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>122</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>tmp_6_cast</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>src_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>124</item>
<item>126</item>
<item>127</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>src1_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>128</item>
<item>129</item>
<item>130</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>src2_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>131</item>
<item>132</item>
<item>133</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>src3_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>134</item>
<item>135</item>
<item>136</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>src4_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>137</item>
<item>138</item>
<item>139</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>src5_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>140</item>
<item>141</item>
<item>142</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>src6_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>143</item>
<item>144</item>
<item>145</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>src7_addr</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>146</item>
<item>147</item>
<item>148</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name></name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>13</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="11" tracking_level="0" version="0">
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second class_id="12" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="13" tracking_level="0" version="0">
<first class_id="14" tracking_level="0" version="0">
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>13</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>149</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>k</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>151</item>
<item>152</item>
<item>153</item>
<item>154</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>tmp</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>13</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>13</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>155</item>
<item>157</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>k_1</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>13</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>13</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>158</item>
<item>160</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name></name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>13</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>13</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>161</item>
<item>162</item>
<item>163</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>tmp_s</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>164</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>tmp_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>165</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>tmp_13</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>8</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>166</item>
<item>167</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>tmp_21_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>168</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>dst_addr</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>6</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>169</item>
<item>170</item>
<item>171</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name>dct_coeff_table_0_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>172</item>
<item>173</item>
<item>174</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name>dct_coeff_table_0_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>14</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>175</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>coeff_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>176</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>src_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>177</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name>tmp_171_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>178</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>tmp_4</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>179</item>
<item>180</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name>dct_coeff_table_1_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>181</item>
<item>182</item>
<item>183</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name>dct_coeff_table_1_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>184</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>coeff_1_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>185</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>src1_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>186</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name>tmp_17_1_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>187</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>tmp_18_1</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>188</item>
<item>189</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_47">
<Value>
<Obj>
<type>0</type>
<id>61</id>
<name>dct_coeff_table_2_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>190</item>
<item>191</item>
<item>192</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_48">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name>dct_coeff_table_2_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>193</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>coeff_2_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>194</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>src2_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>195</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>tmp_17_2_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>196</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>tmp_18_2</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>197</item>
<item>198</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_53">
<Value>
<Obj>
<type>0</type>
<id>67</id>
<name>dct_coeff_table_3_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>199</item>
<item>200</item>
<item>201</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_54">
<Value>
<Obj>
<type>0</type>
<id>68</id>
<name>dct_coeff_table_3_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>202</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>coeff_3_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>203</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>src3_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>204</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>tmp_17_3_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>205</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>tmp_18_3</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>206</item>
<item>207</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_59">
<Value>
<Obj>
<type>0</type>
<id>73</id>
<name>dct_coeff_table_4_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>208</item>
<item>209</item>
<item>210</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_60">
<Value>
<Obj>
<type>0</type>
<id>74</id>
<name>dct_coeff_table_4_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>211</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>coeff_4_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>212</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>src4_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>213</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>tmp_17_4_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>214</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>tmp_18_4</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>215</item>
<item>216</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_65">
<Value>
<Obj>
<type>0</type>
<id>79</id>
<name>dct_coeff_table_5_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>217</item>
<item>218</item>
<item>219</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_66">
<Value>
<Obj>
<type>0</type>
<id>80</id>
<name>dct_coeff_table_5_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>220</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>coeff_5_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>221</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>src5_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>222</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name>tmp_17_5_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>223</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>tmp_18_5</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>224</item>
<item>225</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_71">
<Value>
<Obj>
<type>0</type>
<id>85</id>
<name>dct_coeff_table_6_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>226</item>
<item>227</item>
<item>228</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_72">
<Value>
<Obj>
<type>0</type>
<id>86</id>
<name>dct_coeff_table_6_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>229</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>87</id>
<name>coeff_6_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>230</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>src6_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>231</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name>tmp_17_6_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>232</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>tmp_18_6</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>233</item>
<item>234</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_77">
<Value>
<Obj>
<type>0</type>
<id>91</id>
<name>dct_coeff_table_7_ad</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>235</item>
<item>236</item>
<item>237</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_78">
<Value>
<Obj>
<type>0</type>
<id>92</id>
<name>dct_coeff_table_7_lo</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>15</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>238</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>coeff_7_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>16</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>16</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>239</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name>src7_load</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>240</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>tmp_17_7_cast</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>241</item>
</oprand_edges>
<opcode>sext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>tmp_18_7</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>17</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>17</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>242</item>
<item>243</item>
</oprand_edges>
<opcode>mul</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name>tmp2</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>244</item>
<item>245</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>98</id>
<name>tmp3</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>246</item>
<item>247</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name>tmp1</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>248</item>
<item>249</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name>tmp5</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>250</item>
<item>251</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>101</id>
<name>tmp7</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>252</item>
<item>254</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name>tmp6</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>255</item>
<item>256</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>103</id>
<name>tmp4</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>257</item>
<item>258</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name>tmp_5</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>259</item>
<item>260</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>105</id>
<name>tmp_7</name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>16</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>262</item>
<item>263</item>
<item>265</item>
<item>267</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name></name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>19</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>19</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>268</item>
<item>269</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name></name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>13</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>13</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>270</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name></name>
<fileName>dct.c</fileName>
<fileDirectory>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</fileDirectory>
<lineNumber>21</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/home/lfvelez/Documentos/ISPR/HLS/labsource/labs/lab3</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.c</first>
<second>dct_1d</second>
</first>
<second>21</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>0</count>
<item_version>0</item_version>
</oprand_edges>
<opcode>ret</opcode>
<m_Display>0</m_Display>
</item>
</nodes>
<consts class_id="15" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_95">
<Value>
<Obj>
<type>2</type>
<id>120</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>3</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_96">
<Value>
<Obj>
<type>2</type>
<id>125</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_97">
<Value>
<Obj>
<type>2</type>
<id>150</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_98">
<Value>
<Obj>
<type>2</type>
<id>156</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>8</content>
</item>
<item class_id_reference="16" object_id="_99">
<Value>
<Obj>
<type>2</type>
<id>159</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>4</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_100">
<Value>
<Obj>
<type>2</type>
<id>253</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>29</bitwidth>
</Value>
<const_type>0</const_type>
<content>4096</content>
</item>
<item class_id_reference="16" object_id="_101">
<Value>
<Obj>
<type>2</type>
<id>264</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>13</content>
</item>
<item class_id_reference="16" object_id="_102">
<Value>
<Obj>
<type>2</type>
<id>266</id>
<name>empty</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<const_type>0</const_type>
<content>28</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_103">
<Obj>
<type>3</type>
<id>34</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>14</count>
<item_version>0</item_version>
<item>20</item>
<item>21</item>
<item>22</item>
<item>23</item>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
<item>29</item>
<item>30</item>
<item>31</item>
<item>32</item>
<item>33</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_104">
<Obj>
<type>3</type>
<id>39</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_105">
<Obj>
<type>3</type>
<id>109</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>64</count>
<item_version>0</item_version>
<item>44</item>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
<item>50</item>
<item>51</item>
<item>52</item>
<item>53</item>
<item>54</item>
<item>55</item>
<item>56</item>
<item>57</item>
<item>58</item>
<item>59</item>
<item>60</item>
<item>61</item>
<item>62</item>
<item>63</item>
<item>64</item>
<item>65</item>
<item>66</item>
<item>67</item>
<item>68</item>
<item>69</item>
<item>70</item>
<item>71</item>
<item>72</item>
<item>73</item>
<item>74</item>
<item>75</item>
<item>76</item>
<item>77</item>
<item>78</item>
<item>79</item>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
<item>84</item>
<item>85</item>
<item>86</item>
<item>87</item>
<item>88</item>
<item>89</item>
<item>90</item>
<item>91</item>
<item>92</item>
<item>93</item>
<item>94</item>
<item>95</item>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
<item>104</item>
<item>105</item>
<item>106</item>
<item>108</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_106">
<Obj>
<type>3</type>
<id>111</id>
<name></name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<node_objs>
<count>1</count>
<item_version>0</item_version>
<item>110</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>148</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_107">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>9</source_obj>
<sink_obj>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_109">
<id>119</id>
<edge_type>1</edge_type>
<source_obj>20</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_110">
<id>121</id>
<edge_type>1</edge_type>
<source_obj>120</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>122</id>
<edge_type>1</edge_type>
<source_obj>22</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>123</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>126</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>129</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>130</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>3</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>132</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>133</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>4</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>136</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>5</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>139</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>6</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>142</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>31</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>147</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>148</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>32</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>149</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>33</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>150</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>152</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>154</id>
<edge_type>2</edge_type>
<source_obj>109</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>156</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>159</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>162</id>
<edge_type>2</edge_type>
<source_obj>109</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>163</id>
<edge_type>2</edge_type>
<source_obj>111</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>23</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_152">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>168</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>169</id>
<edge_type>1</edge_type>
<source_obj>10</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>171</id>
<edge_type>1</edge_type>
<source_obj>47</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>173</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>174</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>49</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>50</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>177</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>51</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>180</id>
<edge_type>1</edge_type>
<source_obj>53</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>181</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>182</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>183</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>184</id>
<edge_type>1</edge_type>
<source_obj>55</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>185</id>
<edge_type>1</edge_type>
<source_obj>56</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>186</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>187</id>
<edge_type>1</edge_type>
<source_obj>58</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>188</id>
<edge_type>1</edge_type>
<source_obj>57</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>189</id>
<edge_type>1</edge_type>
<source_obj>59</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>190</id>
<edge_type>1</edge_type>
<source_obj>14</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_176">
<id>191</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_177">
<id>192</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>61</sink_obj>
</item>
<item class_id_reference="20" object_id="_178">
<id>193</id>
<edge_type>1</edge_type>
<source_obj>61</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_179">
<id>194</id>
<edge_type>1</edge_type>
<source_obj>62</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_180">
<id>195</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_181">
<id>196</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>65</sink_obj>
</item>
<item class_id_reference="20" object_id="_182">
<id>197</id>
<edge_type>1</edge_type>
<source_obj>63</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_183">
<id>198</id>
<edge_type>1</edge_type>
<source_obj>65</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_184">
<id>199</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_185">
<id>200</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_186">
<id>201</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_187">
<id>202</id>
<edge_type>1</edge_type>
<source_obj>67</source_obj>
<sink_obj>68</sink_obj>
</item>
<item class_id_reference="20" object_id="_188">
<id>203</id>
<edge_type>1</edge_type>
<source_obj>68</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_189">
<id>204</id>
<edge_type>1</edge_type>
<source_obj>28</source_obj>
<sink_obj>70</sink_obj>
</item>
<item class_id_reference="20" object_id="_190">
<id>205</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>71</sink_obj>
</item>
<item class_id_reference="20" object_id="_191">
<id>206</id>
<edge_type>1</edge_type>
<source_obj>69</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_192">
<id>207</id>
<edge_type>1</edge_type>
<source_obj>71</source_obj>
<sink_obj>72</sink_obj>
</item>
<item class_id_reference="20" object_id="_193">
<id>208</id>
<edge_type>1</edge_type>
<source_obj>16</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_194">
<id>209</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_195">
<id>210</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>73</sink_obj>
</item>
<item class_id_reference="20" object_id="_196">
<id>211</id>
<edge_type>1</edge_type>
<source_obj>73</source_obj>
<sink_obj>74</sink_obj>
</item>
<item class_id_reference="20" object_id="_197">
<id>212</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>75</sink_obj>
</item>
<item class_id_reference="20" object_id="_198">
<id>213</id>
<edge_type>1</edge_type>
<source_obj>29</source_obj>
<sink_obj>76</sink_obj>
</item>
<item class_id_reference="20" object_id="_199">
<id>214</id>
<edge_type>1</edge_type>
<source_obj>76</source_obj>
<sink_obj>77</sink_obj>
</item>
<item class_id_reference="20" object_id="_200">
<id>215</id>
<edge_type>1</edge_type>
<source_obj>75</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_201">
<id>216</id>
<edge_type>1</edge_type>
<source_obj>77</source_obj>
<sink_obj>78</sink_obj>
</item>
<item class_id_reference="20" object_id="_202">
<id>217</id>
<edge_type>1</edge_type>
<source_obj>17</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_203">
<id>218</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_204">
<id>219</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>79</sink_obj>
</item>
<item class_id_reference="20" object_id="_205">
<id>220</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>80</sink_obj>
</item>
<item class_id_reference="20" object_id="_206">
<id>221</id>
<edge_type>1</edge_type>
<source_obj>80</source_obj>
<sink_obj>81</sink_obj>
</item>
<item class_id_reference="20" object_id="_207">
<id>222</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>82</sink_obj>
</item>
<item class_id_reference="20" object_id="_208">
<id>223</id>
<edge_type>1</edge_type>
<source_obj>82</source_obj>
<sink_obj>83</sink_obj>
</item>
<item class_id_reference="20" object_id="_209">
<id>224</id>
<edge_type>1</edge_type>
<source_obj>81</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_210">
<id>225</id>
<edge_type>1</edge_type>
<source_obj>83</source_obj>
<sink_obj>84</sink_obj>
</item>
<item class_id_reference="20" object_id="_211">
<id>226</id>
<edge_type>1</edge_type>
<source_obj>18</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_212">
<id>227</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_213">
<id>228</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>85</sink_obj>
</item>
<item class_id_reference="20" object_id="_214">
<id>229</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>86</sink_obj>
</item>
<item class_id_reference="20" object_id="_215">
<id>230</id>
<edge_type>1</edge_type>
<source_obj>86</source_obj>
<sink_obj>87</sink_obj>
</item>
<item class_id_reference="20" object_id="_216">
<id>231</id>
<edge_type>1</edge_type>
<source_obj>31</source_obj>
<sink_obj>88</sink_obj>
</item>
<item class_id_reference="20" object_id="_217">
<id>232</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>89</sink_obj>
</item>
<item class_id_reference="20" object_id="_218">
<id>233</id>
<edge_type>1</edge_type>
<source_obj>87</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_219">
<id>234</id>
<edge_type>1</edge_type>
<source_obj>89</source_obj>
<sink_obj>90</sink_obj>
</item>
<item class_id_reference="20" object_id="_220">
<id>235</id>
<edge_type>1</edge_type>
<source_obj>19</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_221">
<id>236</id>
<edge_type>1</edge_type>
<source_obj>125</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_222">
<id>237</id>
<edge_type>1</edge_type>
<source_obj>44</source_obj>
<sink_obj>91</sink_obj>
</item>
<item class_id_reference="20" object_id="_223">
<id>238</id>
<edge_type>1</edge_type>
<source_obj>91</source_obj>
<sink_obj>92</sink_obj>
</item>
<item class_id_reference="20" object_id="_224">
<id>239</id>
<edge_type>1</edge_type>
<source_obj>92</source_obj>
<sink_obj>93</sink_obj>
</item>
<item class_id_reference="20" object_id="_225">
<id>240</id>
<edge_type>1</edge_type>
<source_obj>32</source_obj>
<sink_obj>94</sink_obj>
</item>
<item class_id_reference="20" object_id="_226">
<id>241</id>
<edge_type>1</edge_type>
<source_obj>94</source_obj>
<sink_obj>95</sink_obj>
</item>
<item class_id_reference="20" object_id="_227">
<id>242</id>
<edge_type>1</edge_type>
<source_obj>93</source_obj>
<sink_obj>96</sink_obj>
</item>
<item class_id_reference="20" object_id="_228">
<id>243</id>
<edge_type>1</edge_type>
<source_obj>95</source_obj>
<sink_obj>96</sink_obj>
</item>
<item class_id_reference="20" object_id="_229">
<id>244</id>
<edge_type>1</edge_type>
<source_obj>60</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_230">
<id>245</id>
<edge_type>1</edge_type>
<source_obj>54</source_obj>
<sink_obj>97</sink_obj>
</item>
<item class_id_reference="20" object_id="_231">
<id>246</id>
<edge_type>1</edge_type>
<source_obj>72</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_232">
<id>247</id>
<edge_type>1</edge_type>
<source_obj>66</source_obj>
<sink_obj>98</sink_obj>
</item>
<item class_id_reference="20" object_id="_233">
<id>248</id>
<edge_type>1</edge_type>
<source_obj>97</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_234">
<id>249</id>
<edge_type>1</edge_type>
<source_obj>98</source_obj>
<sink_obj>99</sink_obj>
</item>
<item class_id_reference="20" object_id="_235">
<id>250</id>
<edge_type>1</edge_type>
<source_obj>84</source_obj>
<sink_obj>100</sink_obj>
</item>
<item class_id_reference="20" object_id="_236">
<id>251</id>
<edge_type>1</edge_type>
<source_obj>78</source_obj>
<sink_obj>100</sink_obj>
</item>
<item class_id_reference="20" object_id="_237">
<id>252</id>
<edge_type>1</edge_type>
<source_obj>96</source_obj>
<sink_obj>101</sink_obj>
</item>
<item class_id_reference="20" object_id="_238">
<id>254</id>
<edge_type>1</edge_type>
<source_obj>253</source_obj>
<sink_obj>101</sink_obj>
</item>
<item class_id_reference="20" object_id="_239">
<id>255</id>
<edge_type>1</edge_type>
<source_obj>90</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_240">
<id>256</id>
<edge_type>1</edge_type>
<source_obj>101</source_obj>
<sink_obj>102</sink_obj>
</item>
<item class_id_reference="20" object_id="_241">
<id>257</id>
<edge_type>1</edge_type>
<source_obj>100</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_242">
<id>258</id>
<edge_type>1</edge_type>
<source_obj>102</source_obj>
<sink_obj>103</sink_obj>
</item>
<item class_id_reference="20" object_id="_243">
<id>259</id>
<edge_type>1</edge_type>
<source_obj>99</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_244">
<id>260</id>
<edge_type>1</edge_type>
<source_obj>103</source_obj>
<sink_obj>104</sink_obj>
</item>
<item class_id_reference="20" object_id="_245">
<id>263</id>
<edge_type>1</edge_type>
<source_obj>104</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_246">
<id>265</id>
<edge_type>1</edge_type>
<source_obj>264</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_247">
<id>267</id>
<edge_type>1</edge_type>
<source_obj>266</source_obj>
<sink_obj>105</sink_obj>
</item>
<item class_id_reference="20" object_id="_248">
<id>268</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_249">
<id>269</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>106</sink_obj>
</item>
<item class_id_reference="20" object_id="_250">
<id>270</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>108</sink_obj>
</item>
<item class_id_reference="20" object_id="_251">
<id>299</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_252">
<id>300</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>111</sink_obj>
</item>
<item class_id_reference="20" object_id="_253">
<id>301</id>
<edge_type>2</edge_type>
<source_obj>39</source_obj>
<sink_obj>109</sink_obj>
</item>
<item class_id_reference="20" object_id="_254">
<id>302</id>
<edge_type>2</edge_type>
<source_obj>109</source_obj>
<sink_obj>39</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_255">
<mId>1</mId>
<mTag>dct_1d</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>4</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>14</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_256">
<mId>2</mId>
<mTag>Entry</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>34</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_257">
<mId>3</mId>
<mTag>DCT_Outer_Loop</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>39</item>
<item>109</item>
</basic_blocks>
<mII>1</mII>
<mDepth>6</mDepth>
<mMinTripCount>8</mMinTripCount>
<mMaxTripCount>8</mMaxTripCount>
<mMinLatency>12</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_258">
<mId>4</mId>
<mTag>Return</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>1</count>
<item_version>0</item_version>
<item>111</item>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>-1</mMinTripCount>
<mMaxTripCount>-1</mMaxTripCount>
<mMinLatency>0</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
</cdfg_regions>
<fsm class_id="24" tracking_level="1" version="0" object_id="_259">
<states class_id="25" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="26" tracking_level="1" version="0" object_id="_260">
<id>1</id>
<operations class_id="27" tracking_level="0" version="0">
<count>14</count>
<item_version>0</item_version>
<item class_id="28" tracking_level="1" version="0" object_id="_261">
<id>20</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_262">
<id>21</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_263">
<id>22</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_264">
<id>23</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_265">
<id>24</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_266">
<id>25</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_267">
<id>26</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_268">
<id>27</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_269">
<id>28</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_270">
<id>29</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_271">
<id>30</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_272">
<id>31</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_273">
<id>32</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_274">
<id>33</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_275">
<id>2</id>
<operations>
<count>16</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_276">
<id>35</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_277">
<id>36</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_278">
<id>37</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_279">
<id>38</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_280">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_281">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_282">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_283">
<id>55</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_284">
<id>56</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_285">
<id>58</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_286">
<id>67</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_287">
<id>68</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_288">
<id>70</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_289">
<id>79</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_290">
<id>80</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_291">
<id>82</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_292">
<id>3</id>
<operations>
<count>21</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_293">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_294">
<id>50</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_295">
<id>52</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_296">
<id>56</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_297">
<id>58</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_298">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_299">
<id>62</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_300">
<id>64</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_301">
<id>68</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_302">
<id>70</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_303">
<id>73</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_304">
<id>74</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_305">
<id>76</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_306">
<id>80</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_307">
<id>82</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_308">
<id>85</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_309">
<id>86</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_310">
<id>88</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_311">
<id>91</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_312">
<id>92</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_313">
<id>94</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_314">
<id>4</id>
<operations>
<count>19</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_315">
<id>50</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_316">
<id>52</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_317">
<id>57</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_318">
<id>59</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_319">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_320">
<id>62</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_321">
<id>64</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_322">
<id>69</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_323">
<id>71</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_324">
<id>72</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_325">
<id>74</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_326">
<id>76</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_327">
<id>81</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_328">
<id>83</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_329">
<id>84</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_330">
<id>86</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_331">
<id>88</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_332">
<id>92</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_333">
<id>94</id>
<stage>1</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_334">
<id>5</id>
<operations>
<count>21</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_335">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_336">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_337">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_338">
<id>63</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_339">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_340">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_341">
<id>75</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_342">
<id>77</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_343">
<id>78</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_344">
<id>87</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_345">
<id>89</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_346">
<id>90</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_347">
<id>93</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_348">
<id>95</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_349">
<id>96</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_350">
<id>97</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_351">
<id>98</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_352">
<id>99</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_353">
<id>100</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_354">
<id>101</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_355">
<id>102</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_356">
<id>6</id>
<operations>
<count>3</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_357">
<id>103</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_358">
<id>104</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_359">
<id>105</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_360">
<id>7</id>
<operations>
<count>9</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_361">
<id>40</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_362">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_363">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_364">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_365">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_366">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_367">
<id>106</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_368">
<id>107</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_369">
<id>108</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_370">
<id>8</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_371">
<id>110</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>8</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_372">
<inState>1</inState>
<outState>2</outState>
<condition class_id="31" tracking_level="0" version="0">
<id>12</id>
<sop class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_373">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>24</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_374">
<inState>4</inState>
<outState>5</outState>
<condition>
<id>25</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_375">
<inState>5</inState>
<outState>6</outState>
<condition>
<id>26</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_376">
<inState>6</inState>
<outState>7</outState>
<condition>
<id>27</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_377">
<inState>7</inState>
<outState>2</outState>
<condition>
<id>28</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>0</count>
<item_version>0</item_version>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_378">
<inState>2</inState>
<outState>8</outState>
<condition>
<id>23</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item class_id="34" tracking_level="0" version="0">
<first class_id="35" tracking_level="0" version="0">
<first>36</first>
<second>0</second>
</first>
<second>0</second>
</item>
</item>
</sop>
</condition>
</item>
<item class_id_reference="30" object_id="_379">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>29</id>
<sop>
<count>1</count>
<item_version>0</item_version>
<item>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>36</first>
<second>0</second>
</first>
<second>1</second>
</item>
</item>
</sop>
</condition>
</item>
</transitions>
</fsm>
<res class_id="-1"></res>
<node_label_latency class_id="37" tracking_level="0" version="0">
<count>83</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>20</first>
<second class_id="39" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>31</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>32</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>33</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>65</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>70</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>71</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>76</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>77</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>79</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>80</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>81</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>82</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>83</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>88</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>89</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>103</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>5</first>
<second>0</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>108</first>
<second>
<first>6</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="40" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="41" tracking_level="0" version="0">
<first>34</first>
<second class_id="42" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>109</first>
<second>
<first>1</first>
<second>6</second>
</second>
</item>
<item>
<first>111</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="43" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="1" version="0" object_id="_380">
<region_name>DCT_Outer_Loop</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>39</item>
<item>109</item>
</basic_blocks>
<nodes>
<count>0</count>
<item_version>0</item_version>
</nodes>
<anchor_node>-1</anchor_node>
<region_type>8</region_type>
<interval>1</interval>
<pipe_depth>6</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="45" tracking_level="0" version="0">
<count>74</count>
<item_version>0</item_version>
<item class_id="46" tracking_level="0" version="0">
<first>82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
<item>
<first>94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>101</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>108</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>115</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>122</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>136</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>143</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>150</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>157</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>56</item>
<item>56</item>
</second>
</item>
<item>
<first>162</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>58</item>
<item>58</item>
</second>
</item>
<item>
<first>166</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>173</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
</second>
</item>
<item>
<first>178</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>70</item>
</second>
</item>
<item>
<first>182</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>189</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>80</item>
<item>80</item>
</second>
</item>
<item>
<first>194</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>82</item>
<item>82</item>
</second>
</item>
<item>
<first>198</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>205</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>50</item>
<item>50</item>
</second>
</item>
<item>
<first>210</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>52</item>
<item>52</item>
</second>
</item>
<item>
<first>214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>221</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>62</item>
<item>62</item>
</second>
</item>
<item>
<first>226</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>64</item>
<item>64</item>
</second>
</item>
<item>
<first>230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>237</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>74</item>
<item>74</item>
</second>
</item>
<item>
<first>242</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>76</item>
<item>76</item>
</second>
</item>
<item>
<first>246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>253</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>86</item>
<item>86</item>
</second>
</item>
<item>
<first>258</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>88</item>
<item>88</item>
</second>
</item>
<item>
<first>262</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>269</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>92</item>
</second>
</item>
<item>
<first>274</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>94</item>
<item>94</item>
</second>
</item>
<item>
<first>278</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>285</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
<item>
<first>294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>301</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>309</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>331</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>337</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>344</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>353</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>356</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>59</item>
</second>
</item>
<item>
<first>359</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>362</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>365</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>368</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>371</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>374</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>380</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>383</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>386</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>389</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>392</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>395</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>398</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>401</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>405</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
<item>
<first>424</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>434</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>440</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>446</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>54</item>
<item>97</item>
</second>
</item>
<item>
<first>454</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>66</item>
<item>98</item>
</second>
</item>
<item>
<first>462</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>78</item>
<item>100</item>
</second>
</item>
<item>
<first>469</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>90</item>
<item>102</item>
</second>
</item>
<item>
<first>476</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>96</item>
<item>101</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="48" tracking_level="0" version="0">
<count>55</count>
<item_version>0</item_version>
<item class_id="49" tracking_level="0" version="0">
<first>coeff_1_cast_fu_353</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>coeff_2_cast_fu_377</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>coeff_3_cast_fu_359</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>coeff_4_cast_fu_383</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>coeff_5_cast_fu_365</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>coeff_6_cast_fu_389</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>coeff_7_cast_fu_395</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>coeff_cast_fu_371</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_ad_gep_fu_198</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_gep_fu_150</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_gep_fu_214</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_gep_fu_166</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_gep_fu_230</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_gep_fu_182</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_gep_fu_246</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_gep_fu_262</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>dst_addr_gep_fu_278</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>grp_fu_446</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>54</item>
<item>97</item>
</second>
</item>
<item>
<first>grp_fu_454</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>66</item>
<item>98</item>
</second>
</item>
<item>
<first>grp_fu_462</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>78</item>
<item>100</item>
</second>
</item>
<item>
<first>grp_fu_469</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>90</item>
<item>102</item>
</second>
</item>
<item>
<first>grp_fu_476</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>96</item>
<item>101</item>
</second>
</item>
<item>
<first>k_1_fu_331</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>k_phi_fu_294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>src1_addr_gep_fu_101</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>src2_addr_gep_fu_108</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>src3_addr_gep_fu_115</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>src4_addr_gep_fu_122</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>src5_addr_gep_fu_129</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>src6_addr_gep_fu_136</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>src7_addr_gep_fu_143</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>src_addr_gep_fu_94</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>tmp1_fu_401</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>tmp4_fu_405</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>tmp_12_fu_301</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>tmp_13_fu_348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>tmp_171_cast_fu_374</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>tmp_17_1_cast_fu_356</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>59</item>
</second>
</item>
<item>
<first>tmp_17_2_cast_fu_380</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>tmp_17_3_cast_fu_362</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>tmp_17_4_cast_fu_386</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>tmp_17_5_cast_fu_368</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>tmp_17_6_cast_fu_392</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>tmp_17_7_cast_fu_398</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>tmp_18_1_fu_428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>tmp_18_3_fu_434</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>tmp_18_5_fu_440</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>tmp_20_cast_fu_309</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>tmp_21_cast_fu_424</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>tmp_5_fu_409</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>tmp_6_cast_fu_313</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>tmp_7_fu_414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
<item>
<first>tmp_cast_fu_344</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>tmp_fu_325</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>tmp_s_fu_337</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
</dp_fu_nodes_expression>
<dp_fu_nodes_module>
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes_module>
<dp_fu_nodes_io>
<count>2</count>
<item_version>0</item_version>
<item>
<first>tmp_61_read_read_fu_82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>tmp_6_read_read_fu_88</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
</dp_fu_nodes_io>
<return_ports>
<count>0</count>
<item_version>0</item_version>
</return_ports>
<dp_mem_port_nodes class_id="50" tracking_level="0" version="0">
<count>17</count>
<item_version>0</item_version>
<item class_id="51" tracking_level="0" version="0">
<first class_id="52" tracking_level="0" version="0">
<first>dct_coeff_table_0</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>50</item>
<item>50</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_1</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>56</item>
<item>56</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_2</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>62</item>
<item>62</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_3</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_4</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>74</item>
<item>74</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_5</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>80</item>
<item>80</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_6</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>86</item>
<item>86</item>
</second>
</item>
<item>
<first>
<first>dct_coeff_table_7</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>92</item>
</second>
</item>
<item>
<first>
<first>dst</first>
<second>0</second>
</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
<item>
<first>
<first>src</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>52</item>
<item>52</item>
</second>
</item>
<item>
<first>
<first>src1</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>58</item>
<item>58</item>
</second>
</item>
<item>
<first>
<first>src2</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>64</item>
<item>64</item>
</second>
</item>
<item>
<first>
<first>src3</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>70</item>
</second>
</item>
<item>
<first>
<first>src4</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>76</item>
<item>76</item>
</second>
</item>
<item>
<first>
<first>src5</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>82</item>
<item>82</item>
</second>
</item>
<item>
<first>
<first>src6</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>88</item>
<item>88</item>
</second>
</item>
<item>
<first>
<first>src7</first>
<second>0</second>
</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>94</item>
<item>94</item>
</second>
</item>
</dp_mem_port_nodes>
<dp_reg_nodes>
<count>45</count>
<item_version>0</item_version>
<item>
<first>290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>485</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>490</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>495</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>500</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>505</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>510</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>515</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>520</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>525</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>530</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>534</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>539</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>548</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>553</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>563</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>568</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>573</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>578</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</second>
</item>
<item>
<first>583</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>588</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>593</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>598</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>603</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>80</item>
</second>
</item>
<item>
<first>608</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>613</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>618</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>623</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>628</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>633</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>638</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>643</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>648</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>653</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>658</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>663</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>668</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>673</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>678</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>92</item>
</second>
</item>
<item>
<first>683</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>688</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>693</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>698</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>102</item>
</second>
</item>
<item>
<first>703</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>45</count>
<item_version>0</item_version>
<item>
<first>dct_coeff_table_0_ad_reg_568</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_lo_reg_623</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_reg_553</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_lo_reg_573</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>56</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_reg_583</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_lo_reg_638</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_reg_558</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_lo_reg_588</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>68</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_reg_598</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_lo_reg_653</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_reg_563</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_lo_reg_603</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>80</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_reg_613</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_lo_reg_668</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_reg_618</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_lo_reg_678</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>92</item>
</second>
</item>
<item>
<first>k_1_reg_534</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>37</item>
</second>
</item>
<item>
<first>k_reg_290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>src1_addr_reg_495</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>src1_load_reg_578</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>58</item>
</second>
</item>
<item>
<first>src2_addr_reg_500</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>src2_load_reg_643</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>64</item>
</second>
</item>
<item>
<first>src3_addr_reg_505</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>src3_load_reg_593</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>70</item>
</second>
</item>
<item>
<first>src4_addr_reg_510</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>src4_load_reg_658</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>76</item>
</second>
</item>
<item>
<first>src5_addr_reg_515</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>src5_load_reg_608</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>82</item>
</second>
</item>
<item>
<first>src6_addr_reg_520</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>src6_load_reg_673</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>src7_addr_reg_525</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>src7_load_reg_683</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>94</item>
</second>
</item>
<item>
<first>src_addr_reg_490</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>src_load_reg_628</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>52</item>
</second>
</item>
<item>
<first>tmp1_reg_688</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>tmp5_reg_693</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>100</item>
</second>
</item>
<item>
<first>tmp6_reg_698</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>102</item>
</second>
</item>
<item>
<first>tmp_13_reg_548</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>tmp_18_1_reg_633</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>tmp_18_3_reg_648</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>tmp_18_5_reg_663</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>tmp_20_cast_reg_485</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>tmp_7_reg_703</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
<item>
<first>tmp_reg_530</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>tmp_s_reg_539</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
</dp_reg_phi>
<dp_regname_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>k_reg_290</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="53" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="54" tracking_level="0" version="0">
<first>dst(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>store</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
</second>
</item>
<item>
<first>src(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>52</item>
<item>52</item>
</second>
</item>
</second>
</item>
<item>
<first>src1(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>58</item>
<item>58</item>
</second>
</item>
</second>
</item>
<item>
<first>src2(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>64</item>
<item>64</item>
</second>
</item>
</second>
</item>
<item>
<first>src3(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>70</item>
</second>
</item>
</second>
</item>
<item>
<first>src4(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>76</item>
<item>76</item>
</second>
</item>
</second>
</item>
<item>
<first>src5(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>82</item>
<item>82</item>
</second>
</item>
</second>
</item>
<item>
<first>src6(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>88</item>
<item>88</item>
</second>
</item>
</second>
</item>
<item>
<first>src7(p0)</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>load</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>94</item>
<item>94</item>
</second>
</item>
</second>
</item>
<item>
<first>tmp_6</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>21</item>
</second>
</item>
</second>
</item>
<item>
<first>tmp_61</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>read</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
</second>
</item>
</dp_port_io_nodes>
<port2core class_id="55" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="56" tracking_level="0" version="0">
<first>1</first>
<second>RAM</second>
</item>
<item>
<first>2</first>
<second>RAM</second>
</item>
<item>
<first>3</first>
<second>RAM</second>
</item>
<item>
<first>4</first>
<second>RAM</second>
</item>
<item>
<first>5</first>
<second>RAM</second>
</item>
<item>
<first>6</first>
<second>RAM</second>
</item>
<item>
<first>7</first>
<second>RAM</second>
</item>
<item>
<first>8</first>
<second>RAM</second>
</item>
<item>
<first>10</first>
<second>RAM</second>
</item>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
| 24.125993 | 90 | 0.577811 |
Subsets and Splits