CombinedText stringlengths 4 3.42M |
|---|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Select_Paths is
function Create
(When_Token : Program.Lexical_Elements.Lexical_Element_Access;
Guard : Program.Elements.Expressions.Expression_Access;
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
Statements : not null Program.Element_Vectors.Element_Vector_Access)
return Select_Path is
begin
return Result : Select_Path :=
(When_Token => When_Token, Guard => Guard, Arrow_Token => Arrow_Token,
Statements => Statements, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Guard : Program.Elements.Expressions.Expression_Access;
Statements : not null Program.Element_Vectors
.Element_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Select_Path is
begin
return Result : Implicit_Select_Path :=
(Guard => Guard, Statements => Statements,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Guard
(Self : Base_Select_Path)
return Program.Elements.Expressions.Expression_Access is
begin
return Self.Guard;
end Guard;
overriding function Statements
(Self : Base_Select_Path)
return not null Program.Element_Vectors.Element_Vector_Access is
begin
return Self.Statements;
end Statements;
overriding function When_Token
(Self : Select_Path)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.When_Token;
end When_Token;
overriding function Arrow_Token
(Self : Select_Path)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Arrow_Token;
end Arrow_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Select_Path)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Select_Path)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Select_Path)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize (Self : aliased in out Base_Select_Path'Class) is
begin
if Self.Guard.Assigned then
Set_Enclosing_Element (Self.Guard, Self'Unchecked_Access);
end if;
for Item in Self.Statements.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Select_Path_Element
(Self : Base_Select_Path)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Select_Path_Element;
overriding function Is_Path_Element
(Self : Base_Select_Path)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Path_Element;
overriding procedure Visit
(Self : not null access Base_Select_Path;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Select_Path (Self);
end Visit;
overriding function To_Select_Path_Text
(Self : aliased in out Select_Path)
return Program.Elements.Select_Paths.Select_Path_Text_Access is
begin
return Self'Unchecked_Access;
end To_Select_Path_Text;
overriding function To_Select_Path_Text
(Self : aliased in out Implicit_Select_Path)
return Program.Elements.Select_Paths.Select_Path_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Select_Path_Text;
end Program.Nodes.Select_Paths;
|
package Vulkan is
function VkEnumerateInstanceVersion return Integer;
Vulkan_Error : exception;
end Vulkan;
|
with Gtkada.Builder;
with Gtk.List_Store;
with Gtk.Status_Bar;
with Gtk.Text_Buffer;
with Gtk.Widget;
package gui is
builder : Gtkada.Builder.Gtkada_Builder;
topLevelWindow : Gtk.Widget.Gtk_Widget;
textbuf : Gtk.Text_Buffer.Gtk_Text_Buffer;
statusBar : Gtk.Status_Bar.Gtk_Status_Bar;
--statusBarContext : Gtk.Status_Bar.Context_Id;
machinecodeList : Gtk.List_Store.Gtk_List_Store;
memoryList : Gtk.List_Store.Gtk_List_Store;
registerList : Gtk.List_Store.Gtk_List_Store;
procedure load;
procedure setTitle(newTitle : String);
procedure updateGUI_VM;
end gui;
|
------------------------------------------------------------------------------
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
with Bitmap_Color_Conversion; use Bitmap_Color_Conversion;
package body Bitmapped_Drawing is
---------------
-- Draw_Char --
---------------
procedure Draw_Char
(Buffer : in out Bitmap_Buffer'Class;
Start : Point;
Char : Character;
Font : BMP_Font;
Foreground : UInt32;
Background : UInt32)
is
begin
for H in 0 .. Char_Height (Font) - 1 loop
for W in 0 .. Char_Width (Font) - 1 loop
if (Data (Font, Char, H) and Mask (Font, W)) /= 0 then
Buffer.Set_Source (Word_To_Bitmap_Color (Buffer.Color_Mode, Foreground));
Buffer.Set_Pixel ((Start.X + W, Start.Y + H));
else
Buffer.Set_Source (Word_To_Bitmap_Color (Buffer.Color_Mode, Background));
Buffer.Set_Pixel ((Start.X + W, Start.Y + H));
end if;
end loop;
end loop;
end Draw_Char;
-----------------
-- Draw_String --
-----------------
procedure Draw_String
(Buffer : in out Bitmap_Buffer'Class;
Start : Point;
Msg : String;
Font : BMP_Font;
Foreground : Bitmap_Color;
Background : Bitmap_Color)
is
Count : Natural := 0;
FG : constant UInt32 := Bitmap_Color_To_Word (Buffer.Color_Mode,
Foreground);
BG : constant UInt32 := Bitmap_Color_To_Word (Buffer.Color_Mode,
Background);
begin
for C of Msg loop
exit when Start.X + Count * Char_Width (Font) > Buffer.Width;
Draw_Char
(Buffer,
(Start.X + Count * Char_Width (Font), Start.Y),
C,
Font,
FG,
BG);
Count := Count + 1;
end loop;
end Draw_String;
-----------------
-- Draw_String --
-----------------
procedure Draw_String
(Buffer : in out Bitmap_Buffer'Class;
Start : Point;
Msg : String;
Font : Hershey_Font;
Height : Natural;
Bold : Boolean;
Foreground : Bitmap_Color;
Fast : Boolean := True)
is
procedure Internal_Draw_Line
(X0, Y0, X1, Y1 : Natural;
Width : Positive);
procedure Internal_Draw_Line
(X0, Y0, X1, Y1 : Natural;
Width : Positive)
is
begin
Draw_Line (Buffer,
(X0, Y0),
(X1, Y1),
Width,
Fast => Fast);
end Internal_Draw_Line;
procedure Draw_Glyph is new Hershey_Fonts.Draw_Glyph
(Internal_Draw_Line);
Current : Point := Start;
begin
Buffer.Set_Source (Foreground);
for C of Msg loop
exit when Current.X > Buffer.Width;
Draw_Glyph
(Fnt => Font,
C => C,
X => Current.X,
Y => Current.Y,
Height => Height,
Bold => Bold);
end loop;
end Draw_String;
-----------------
-- Draw_String --
-----------------
procedure Draw_String
(Buffer : in out Bitmap_Buffer'Class;
Area : Rect;
Msg : String;
Font : Hershey_Font;
Bold : Boolean;
Outline : Boolean;
Foreground : Bitmap_Color;
Fast : Boolean := True)
is
Length : constant Natural :=
Hershey_Fonts.Strlen (Msg, Font, Area.Height);
Ratio : Float;
Current : Point := (0, 0);
Prev : UInt32;
FG : constant UInt32 := Bitmap_Color_To_Word (Buffer.Color_Mode,
Foreground);
Blk : constant UInt32 := Bitmap_Color_To_Word (Buffer.Color_Mode,
Black);
procedure Internal_Draw_Line
(X0, Y0, X1, Y1 : Natural;
Width : Positive);
procedure Internal_Draw_Line
(X0, Y0, X1, Y1 : Natural;
Width : Positive)
is
begin
Draw_Line (Buffer,
(Area.Position.X + Natural (Float (X0) * Ratio),
Area.Position.Y + Y0),
(Area.Position.X + Natural (Float (X1) * Ratio),
Area.Position.Y + Y1),
Width,
Fast);
end Internal_Draw_Line;
procedure Draw_Glyph is new Hershey_Fonts.Draw_Glyph
(Internal_Draw_Line);
begin
if Length > Area.Width then
Ratio := Float (Area.Width) / Float (Length);
else
Ratio := 1.0;
Current.X := (Area.Width - Length) / 2;
end if;
Buffer.Set_Source (Foreground);
for C of Msg loop
Draw_Glyph
(Fnt => Font,
C => C,
X => Current.X,
Y => Current.Y,
Height => Area.Height,
Bold => Bold);
end loop;
if Outline and then Area.Height > 40 then
for Y in Area.Position.Y + 1 .. Area.Position.Y + Area.Height loop
Prev := Buffer.Pixel ((Area.Position.X, Y));
if Prev = FG then
Buffer.Set_Pixel ((Area.Position.X, Y), Black);
end if;
for X in Area.Position.X + 1 .. Area.Position.X + Area.Width loop
declare
Col : constant UInt32 := Buffer.Pixel ((X, Y));
Top : constant UInt32 := Buffer.Pixel ((X, Y - 1));
begin
if Prev /= FG
and then Col = FG
then
Buffer.Set_Pixel ((X, Y), Blk);
elsif Prev = FG
and then Col /= FG
then
Buffer.Set_Pixel ((X - 1, Y), Blk);
elsif Top /= FG
and then Top /= Blk
and then Col = FG
then
Buffer.Set_Pixel ((X, Y), Blk);
elsif Top = FG
and then Col /= FG
then
Buffer.Set_Pixel ((X, Y - 1), Blk);
end if;
Prev := Col;
end;
end loop;
end loop;
end if;
end Draw_String;
end Bitmapped_Drawing;
|
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
generic
Fallback_Instance : Instance_Type_Access;
package Apsepp.Generic_Shared_Instance.Fallback_Switch is
function Instance_FS return Instance_Type_Access
is (if Instantiated then
Instance
else
Fallback_Instance);
end Apsepp.Generic_Shared_Instance.Fallback_Switch;
|
with
openGL.Font,
openGL.Geometry;
package openGL.Model.sphere.lit_colored_textured
--
-- Models a lit, colored, textured sphere.
--
is
type Item is new Model.sphere.item with
record
Image : asset_Name := null_Asset; -- Usually a mercator projection to be mapped onto the sphere.
end record;
type View is access all Item'Class;
function new_Sphere (Radius : in Real;
Image : in asset_Name := null_Asset) return View;
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
end openGL.Model.sphere.lit_colored_textured;
|
with SOCI;
with SOCI.PostgreSQL;
with Ada.Text_IO;
with Ada.Calendar;
with Ada.Exceptions;
with Ada.Numerics.Discrete_Random;
with Ada.Command_Line;
procedure PostgreSQL_Test is
procedure Test_1 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing basic constructor function");
declare
S : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
null;
end;
exception
when E : SOCI.Database_Error =>
Ada.Text_IO.Put_Line ("Database_Error: ");
Ada.Text_IO.Put_Line (Ada.Exceptions.Exception_Message (E));
end Test_1;
procedure Test_2 (Connection_String : in String) is
S : SOCI.Session;
begin
Ada.Text_IO.Put_Line ("testing open/close");
S.Close;
S.Open (Connection_String);
S.Close;
end Test_2;
procedure Test_3 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing empty start/commit");
declare
S : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
S.Start;
S.Commit;
end;
end Test_3;
procedure Test_4 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing simple statements");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
SQL.Execute ("create table ada_test ( i integer )");
SQL.Execute ("drop table ada_test");
end;
end Test_4;
procedure Test_5 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing independent statements");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
St_1 : SOCI.Statement := SOCI.Make_Statement (SQL);
St_2 : SOCI.Statement := SOCI.Make_Statement (SQL);
begin
St_1.Prepare ("create table ada_test ( i integer )");
St_2.Prepare ("drop table ada_test");
St_1.Execute;
St_2.Execute;
end;
end Test_5;
procedure Test_6 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing data types and into elements");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
Pos := St.Into_String;
St.Prepare ("select 'Hello'");
St.Execute (True);
pragma Assert (St.Get_Into_String (Pos) = "Hello");
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
Value : SOCI.DB_Integer;
use type SOCI.DB_Integer;
begin
Pos := St.Into_Integer;
St.Prepare ("select 123");
St.Execute (True);
Value := St.Get_Into_Integer (Pos);
pragma Assert (Value = 123);
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
Value : SOCI.DB_Long_Long_Integer;
use type SOCI.DB_Long_Long_Integer;
begin
Pos := St.Into_Long_Long_Integer;
St.Prepare ("select 10000000000");
St.Execute (True);
Value := St.Get_Into_Long_Long_Integer (Pos);
pragma Assert (Value = 10_000_000_000);
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
Value : SOCI.DB_Long_Float;
use type SOCI.DB_Long_Float;
begin
Pos := St.Into_Long_Float;
St.Prepare ("select 3.625");
St.Execute (True);
Value := St.Get_Into_Long_Float (Pos);
pragma Assert (Value = SOCI.DB_Long_Float (3.625));
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
Value : Ada.Calendar.Time;
begin
Pos := St.Into_Time;
St.Prepare ("select timestamp '2008-06-30 21:01:02'");
St.Execute (True);
Value := St.Get_Into_Time (Pos);
pragma Assert (Ada.Calendar.Year (Value) = 2008);
pragma Assert (Ada.Calendar.Month (Value) = 6);
pragma Assert (Ada.Calendar.Day (Value) = 30);
pragma Assert
(Ada.Calendar.Seconds (Value) =
Ada.Calendar.Day_Duration (21 * 3_600 + 1 * 60 + 2));
end;
end;
end Test_6;
procedure Test_7 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing types with into vectors");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos_Id : SOCI.Into_Position;
Pos_Str : SOCI.Into_Position;
Pos_LL : SOCI.Into_Position;
Pos_LF : SOCI.Into_Position;
Pos_TM : SOCI.Into_Position;
use type SOCI.Data_State;
use type Ada.Calendar.Time;
use type SOCI.DB_Integer;
use type SOCI.DB_Long_Long_Integer;
use type SOCI.DB_Long_Float;
begin
SQL.Execute ("create table soci_test (" &
" id integer," &
" str varchar (20)," &
" ll bigint," &
" lf double precision," &
" tm timestamp" &
")");
SQL.Execute ("insert into soci_test (id, str, ll, lf, tm)" &
" values (1, 'abc', 10000000000, 3.0, timestamp '2008-06-30 21:01:02')");
SQL.Execute ("insert into soci_test (id, str, ll, lf, tm)" &
" values (2, 'xyz', -10000000001, -3.125, timestamp '2008-07-01 21:01:03')");
SQL.Execute ("insert into soci_test (id, str, ll, lf, tm)" &
" values (3, null, null, null, null)");
Pos_Id := St.Into_Vector_Integer;
Pos_Str := St.Into_Vector_String;
Pos_LL := St.Into_Vector_Long_Long_Integer;
Pos_LF := St.Into_Vector_Long_Float;
Pos_TM := St.Into_Vector_Time;
St.Into_Vectors_Resize (10); -- arbitrary batch size
St.Prepare ("select id, str, ll, lf, tm from soci_test order by id");
St.Execute (True);
pragma Assert (St.Get_Into_Vectors_Size = 3);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 0) = 1);
pragma Assert (St.Get_Into_Vector_State (Pos_Str, 0) = SOCI.Data_Not_Null);
pragma Assert (St.Get_Into_Vector_String (Pos_Str, 0) = "abc");
pragma Assert (St.Get_Into_Vector_Long_Long_Integer (Pos_LL, 0) = 10_000_000_000);
pragma Assert (St.Get_Into_Vector_Long_Float (Pos_LF, 0) = SOCI.DB_Long_Float (3.0));
pragma Assert (St.Get_Into_Vector_Time (Pos_TM, 0) =
Ada.Calendar.Time_Of (2008, 6, 30,
Duration (21 * 3_600 + 1 * 60 + 2)));
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 1) = 2);
pragma Assert (St.Get_Into_Vector_State (Pos_Str, 1) = SOCI.Data_Not_Null);
pragma Assert (St.Get_Into_Vector_String (Pos_Str, 1) = "xyz");
pragma Assert (St.Get_Into_Vector_Long_Long_Integer (Pos_LL, 1) = -10_000_000_001);
pragma Assert (St.Get_Into_Vector_Long_Float (Pos_LF, 1) = SOCI.DB_Long_Float (-3.125));
pragma Assert (St.Get_Into_Vector_Time (Pos_TM, 1) =
Ada.Calendar.Time_Of (2008, 7, 1,
Duration (21 * 3_600 + 1 * 60 + 3)));
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 2) = 3);
pragma Assert (St.Get_Into_Vector_State (Pos_Str, 2) = SOCI.Data_Null);
pragma Assert (St.Get_Into_Vector_State (Pos_LL, 2) = SOCI.Data_Null);
pragma Assert (St.Get_Into_Vector_State (Pos_LF, 2) = SOCI.Data_Null);
pragma Assert (St.Get_Into_Vector_State (Pos_TM, 2) = SOCI.Data_Null);
SQL.Execute ("drop table soci_test");
end;
end Test_7;
procedure Test_8 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing multi-batch operation with into vectors");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos_Id : SOCI.Into_Position;
Got_Data : Boolean;
use type SOCI.DB_Integer;
begin
SQL.Execute ("create table soci_test (" &
" id integer" &
")");
SQL.Execute ("insert into soci_test (id) values (1)");
SQL.Execute ("insert into soci_test (id) values (2)");
SQL.Execute ("insert into soci_test (id) values (3)");
SQL.Execute ("insert into soci_test (id) values (4)");
SQL.Execute ("insert into soci_test (id) values (5)");
SQL.Execute ("insert into soci_test (id) values (6)");
SQL.Execute ("insert into soci_test (id) values (7)");
SQL.Execute ("insert into soci_test (id) values (8)");
SQL.Execute ("insert into soci_test (id) values (9)");
SQL.Execute ("insert into soci_test (id) values (10)");
Pos_Id := St.Into_Vector_Integer;
St.Into_Vectors_Resize (4); -- batch of 4 elements
St.Prepare ("select id from soci_test order by id");
St.Execute;
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Vectors_Size = 4);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 0) = 1);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 1) = 2);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 2) = 3);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 3) = 4);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Vectors_Size = 4);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 0) = 5);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 1) = 6);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 2) = 7);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 3) = 8);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Vectors_Size = 2);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 0) = 9);
pragma Assert (St.Get_Into_Vector_Integer (Pos_Id, 1) = 10);
Got_Data := St.Fetch;
pragma Assert (not Got_Data);
pragma Assert (St.Get_Into_Vectors_Size = 0);
SQL.Execute ("drop table soci_test");
end;
end Test_8;
procedure Test_9 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing data types and use elements");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
use type SOCI.DB_Integer;
use type SOCI.DB_Long_Long_Integer;
use type SOCI.DB_Long_Float;
begin
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
St.Use_String ("value");
St.Set_Use_String ("value", "123");
Pos := St.Into_Integer;
St.Prepare ("select cast(:value as integer)");
St.Execute (True);
pragma Assert (St.Get_Into_Integer (Pos) = 123);
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
St.Use_Integer ("value");
St.Set_Use_Integer ("value", 123);
Pos := St.Into_String;
St.Prepare ("select cast(:value as text)");
St.Execute (True);
pragma Assert (St.Get_Into_String (Pos) = "123");
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
St.Use_Long_Long_Integer ("value");
St.Set_Use_Long_Long_Integer ("value", 10_000_000_000);
Pos := St.Into_String;
St.Prepare ("select cast(:value as text)");
St.Execute (True);
pragma Assert (St.Get_Into_String (Pos) = "10000000000");
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
St.Use_Long_Float ("value");
St.Set_Use_Long_Float ("value", SOCI.DB_Long_Float (5.625));
Pos := St.Into_String;
St.Prepare ("select cast(:value as text)");
St.Execute (True);
pragma Assert (St.Get_Into_String (Pos) = "5.625");
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
begin
St.Use_Time ("value");
St.Set_Use_Time ("value", Ada.Calendar.Time_Of
(2008, 7, 1, Ada.Calendar.Day_Duration (3723)));
Pos := St.Into_String;
St.Prepare ("select cast(:value as text)");
St.Execute (True);
pragma Assert (St.Get_Into_String (Pos) = "2008-07-01 01:02:03");
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos : SOCI.Into_Position;
use type SOCI.Data_State;
begin
St.Use_Integer ("value");
St.Set_Use_State ("value", SOCI.Data_Null);
Pos := St.Into_Integer;
St.Prepare ("select cast(:value as integer)");
St.Execute (True);
pragma Assert (St.Get_Into_State (Pos) = SOCI.Data_Null);
end;
end;
end Test_9;
procedure Test_10 (Connection_String : in String) is
begin
Ada.Text_IO.Put_Line ("testing vector use elements and row traversal with single into elements");
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
Time_1 : constant Ada.Calendar.Time := Ada.Calendar.Time_Of
(2008, 7, 1, Ada.Calendar.Day_Duration (1));
Time_2 : constant Ada.Calendar.Time := Ada.Calendar.Time_Of
(2008, 7, 2, Ada.Calendar.Day_Duration (2));
Time_3 : constant Ada.Calendar.Time := Ada.Calendar.Time_Of
(2008, 7, 3, Ada.Calendar.Day_Duration (3));
Time_4 : constant Ada.Calendar.Time := Ada.Calendar.Time_Of
(2008, 7, 4, Ada.Calendar.Day_Duration (4));
Time_5 : constant Ada.Calendar.Time := Ada.Calendar.Time_Of
(2008, 7, 5, Ada.Calendar.Day_Duration (5));
begin
SQL.Execute ("create table soci_test (" &
" id integer," &
" str varchar (20)," &
" ll bigint," &
" lf double precision," &
" tm timestamp" &
")");
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
begin
St.Use_Vector_Integer ("id");
St.Use_Vector_String ("str");
St.Use_Vector_Long_Long_Integer ("ll");
St.Use_Vector_Long_Float ("lf");
St.Use_Vector_Time ("tm");
St.Use_Vectors_Resize (6);
St.Set_Use_Vector_Integer ("id", 0, 1);
St.Set_Use_Vector_Integer ("id", 1, 2);
St.Set_Use_Vector_Integer ("id", 2, 3);
St.Set_Use_Vector_Integer ("id", 3, 4);
St.Set_Use_Vector_Integer ("id", 4, 5);
St.Set_Use_Vector_Integer ("id", 5, 6);
St.Set_Use_Vector_String ("str", 0, "abc");
St.Set_Use_Vector_String ("str", 1, "def");
St.Set_Use_Vector_String ("str", 2, "ghi");
St.Set_Use_Vector_String ("str", 3, "jklm");
St.Set_Use_Vector_String ("str", 4, "no");
St.Set_Use_Vector_State ("str", 5, SOCI.Data_Null);
St.Set_Use_Vector_Long_Long_Integer ("ll", 0, 10_000_000_000);
St.Set_Use_Vector_Long_Long_Integer ("ll", 1, 10_000_000_001);
St.Set_Use_Vector_Long_Long_Integer ("ll", 2, 10_000_000_002);
St.Set_Use_Vector_Long_Long_Integer ("ll", 3, 10_000_000_003);
St.Set_Use_Vector_Long_Long_Integer ("ll", 4, 10_000_000_004);
St.Set_Use_Vector_State ("ll", 5, SOCI.Data_Null);
St.Set_Use_Vector_Long_Float ("lf", 0, SOCI.DB_Long_Float (0.0));
St.Set_Use_Vector_Long_Float ("lf", 1, SOCI.DB_Long_Float (0.125));
St.Set_Use_Vector_Long_Float ("lf", 2, SOCI.DB_Long_Float (0.25));
St.Set_Use_Vector_Long_Float ("lf", 3, SOCI.DB_Long_Float (0.5));
St.Set_Use_Vector_Long_Float ("lf", 4, SOCI.DB_Long_Float (0.625));
St.Set_Use_Vector_State ("lf", 5, SOCI.Data_Null);
St.Set_Use_Vector_Time ("tm", 0, Time_1);
St.Set_Use_Vector_Time ("tm", 1, Time_2);
St.Set_Use_Vector_Time ("tm", 2, Time_3);
St.Set_Use_Vector_Time ("tm", 3, Time_4);
St.Set_Use_Vector_Time ("tm", 4, Time_5);
St.Set_Use_Vector_State ("tm", 5, SOCI.Data_Null);
St.Prepare ("insert into soci_test (id, str, ll, lf, tm)" &
" values (:id, :str, :ll, :lf, :tm)");
St.Execute (True);
end;
declare
St : SOCI.Statement := SOCI.Make_Statement (SQL);
Pos_Id : SOCI.Into_Position;
Pos_Str : SOCI.Into_Position;
Pos_LL : SOCI.Into_Position;
Pos_LF : SOCI.Into_Position;
Pos_TM : SOCI.Into_Position;
Got_Data : Boolean;
use type Ada.Calendar.Time;
use type SOCI.Data_State;
use type SOCI.DB_Integer;
use type SOCI.DB_Long_Long_Integer;
use type SOCI.DB_Long_Float;
begin
Pos_Id := St.Into_Integer;
Pos_Str := St.Into_String;
Pos_LL := St.Into_Long_Long_Integer;
Pos_LF := St.Into_Long_Float;
Pos_TM := St.Into_Time;
St.Prepare ("select id, str, ll, lf, tm from soci_test order by id");
St.Execute;
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 1);
pragma Assert (St.Get_Into_String (Pos_Str) = "abc");
pragma Assert (St.Get_Into_Long_Long_Integer (Pos_LL) = 10_000_000_000);
pragma Assert (St.Get_Into_Long_Float (Pos_LF) = SOCI.DB_Long_Float (0.0));
pragma Assert (St.Get_Into_Time (Pos_TM) = Time_1);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 2);
pragma Assert (St.Get_Into_String (Pos_Str) = "def");
pragma Assert (St.Get_Into_Long_Long_Integer (Pos_LL) = 10_000_000_001);
pragma Assert (St.Get_Into_Long_Float (Pos_LF) = SOCI.DB_Long_Float (0.125));
pragma Assert (St.Get_Into_Time (Pos_TM) = Time_2);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 3);
pragma Assert (St.Get_Into_String (Pos_Str) = "ghi");
pragma Assert (St.Get_Into_Long_Long_Integer (Pos_LL) = 10_000_000_002);
pragma Assert (St.Get_Into_Long_Float (Pos_LF) = SOCI.DB_Long_Float (0.25));
pragma Assert (St.Get_Into_Time (Pos_TM) = Time_3);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 4);
pragma Assert (St.Get_Into_String (Pos_Str) = "jklm");
pragma Assert (St.Get_Into_Long_Long_Integer (Pos_LL) = 10_000_000_003);
pragma Assert (St.Get_Into_Long_Float (Pos_LF) = SOCI.DB_Long_Float (0.5));
pragma Assert (St.Get_Into_Time (Pos_TM) = Time_4);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 5);
pragma Assert (St.Get_Into_String (Pos_Str) = "no");
pragma Assert (St.Get_Into_Long_Long_Integer (Pos_LL) = 10_000_000_004);
pragma Assert (St.Get_Into_Long_Float (Pos_LF) = SOCI.DB_Long_Float (0.625));
pragma Assert (St.Get_Into_Time (Pos_TM) = Time_5);
Got_Data := St.Fetch;
pragma Assert (Got_Data);
pragma Assert (St.Get_Into_State (Pos_Id) = SOCI.Data_Not_Null);
pragma Assert (St.Get_Into_Integer (Pos_Id) = 6);
pragma Assert (St.Get_Into_State (Pos_Str) = SOCI.Data_Null);
pragma Assert (St.Get_Into_State (Pos_LL) = SOCI.Data_Null);
pragma Assert (St.Get_Into_State (Pos_LF) = SOCI.Data_Null);
pragma Assert (St.Get_Into_State (Pos_TM) = SOCI.Data_Null);
Got_Data := St.Fetch;
pragma Assert (not Got_Data);
end;
SQL.Execute ("drop table soci_test");
end;
end Test_10;
procedure Test_11 (Connection_String : in String) is
-- test parameters:
Pool_Size : constant := 3;
Number_Of_Tasks : constant := 10;
Iterations_Per_Task : constant := 1000;
type Small_Integer is mod 20;
package My_Random is new Ada.Numerics.Discrete_Random (Small_Integer);
Rand : My_Random.Generator;
Pool : SOCI.Connection_Pool (Pool_Size);
begin
Ada.Text_IO.Put_Line ("testing connection pool");
My_Random.Reset (Rand);
for I in 1 .. Pool_Size loop
Pool.Open (I, Connection_String);
end loop;
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
SQL.Execute ("create table soci_test ( id integer )");
end;
declare
task type Worker;
task body Worker is
begin
for I in 1 .. Iterations_Per_Task loop
declare
SQL : SOCI.Session;
V : Small_Integer;
begin
Pool.Lease (SQL);
V := My_Random.Random (Rand);
SQL.Execute ("insert into soci_test (id) values (" &
Small_Integer'Image (V) & ")");
end;
end loop;
exception
when others =>
Ada.Text_IO.Put_Line ("An exception occured in the worker task.");
end Worker;
W : array (1 .. Number_Of_Tasks) of Worker;
begin
Ada.Text_IO.Put_Line ("--> waiting for the tasks to complete (might take a while)");
end;
declare
SQL : SOCI.Session := SOCI.Make_Session (Connection_String);
begin
SQL.Execute ("drop table soci_test");
end;
end Test_11;
begin
if Ada.Command_Line.Argument_Count /= 1 then
Ada.Text_IO.Put_Line ("Expecting one argument: connection string");
return;
end if;
declare
Connection_String : String := Ada.Command_Line.Argument (1);
begin
Ada.Text_IO.Put_Line ("testing with " & Connection_String);
SOCI.PostgreSQL.Register_Factory_PostgreSQL;
Test_1 (Connection_String);
Test_2 (Connection_String);
Test_3 (Connection_String);
Test_4 (Connection_String);
Test_5 (Connection_String);
Test_6 (Connection_String);
Test_7 (Connection_String);
Test_8 (Connection_String);
Test_9 (Connection_String);
Test_10 (Connection_String);
Test_11 (Connection_String);
end;
end PostgreSQL_Test;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.UML_Read_Structural_Feature_Actions is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Read_Structural_Feature_Action_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_Read_Structural_Feature_Action
(AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Read_Structural_Feature_Action_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_Read_Structural_Feature_Action
(AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Read_Structural_Feature_Action_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_Read_Structural_Feature_Action
(Visitor,
AMF.UML.Read_Structural_Feature_Actions.UML_Read_Structural_Feature_Action_Access (Self),
Control);
end if;
end Visit_Element;
----------------
-- Get_Result --
----------------
overriding function Get_Result
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Output_Pins.UML_Output_Pin_Access is
begin
return
AMF.UML.Output_Pins.UML_Output_Pin_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Result
(Self.Element)));
end Get_Result;
----------------
-- Set_Result --
----------------
overriding procedure Set_Result
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.Output_Pins.UML_Output_Pin_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Result
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Result;
----------------
-- Get_Object --
----------------
overriding function Get_Object
(Self : not null access constant UML_Read_Structural_Feature_Action_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_Object
(Self.Element)));
end Get_Object;
----------------
-- Set_Object --
----------------
overriding procedure Set_Object
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.Input_Pins.UML_Input_Pin_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Object
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Object;
----------------------------
-- Get_Structural_Feature --
----------------------------
overriding function Get_Structural_Feature
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Structural_Features.UML_Structural_Feature_Access is
begin
return
AMF.UML.Structural_Features.UML_Structural_Feature_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Structural_Feature
(Self.Element)));
end Get_Structural_Feature;
----------------------------
-- Set_Structural_Feature --
----------------------------
overriding procedure Set_Structural_Feature
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.Structural_Features.UML_Structural_Feature_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Structural_Feature
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Structural_Feature;
-----------------
-- Get_Context --
-----------------
overriding function Get_Context
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access is
begin
return
AMF.UML.Classifiers.UML_Classifier_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Context
(Self.Element)));
end Get_Context;
---------------
-- Get_Input --
---------------
overriding function Get_Input
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Input_Pins.Collections.Ordered_Set_Of_UML_Input_Pin is
begin
return
AMF.UML.Input_Pins.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Input
(Self.Element)));
end Get_Input;
------------------------------
-- Get_Is_Locally_Reentrant --
------------------------------
overriding function Get_Is_Locally_Reentrant
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Locally_Reentrant
(Self.Element);
end Get_Is_Locally_Reentrant;
------------------------------
-- Set_Is_Locally_Reentrant --
------------------------------
overriding procedure Set_Is_Locally_Reentrant
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Locally_Reentrant
(Self.Element, To);
end Set_Is_Locally_Reentrant;
-----------------------------
-- Get_Local_Postcondition --
-----------------------------
overriding function Get_Local_Postcondition
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
begin
return
AMF.UML.Constraints.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Postcondition
(Self.Element)));
end Get_Local_Postcondition;
----------------------------
-- Get_Local_Precondition --
----------------------------
overriding function Get_Local_Precondition
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Constraints.Collections.Set_Of_UML_Constraint is
begin
return
AMF.UML.Constraints.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Local_Precondition
(Self.Element)));
end Get_Local_Precondition;
----------------
-- Get_Output --
----------------
overriding function Get_Output
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Output_Pins.Collections.Ordered_Set_Of_UML_Output_Pin is
begin
return
AMF.UML.Output_Pins.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Output
(Self.Element)));
end Get_Output;
-----------------
-- Get_Handler --
-----------------
overriding function Get_Handler
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Exception_Handlers.Collections.Set_Of_UML_Exception_Handler is
begin
return
AMF.UML.Exception_Handlers.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Handler
(Self.Element)));
end Get_Handler;
------------------
-- Get_Activity --
------------------
overriding function Get_Activity
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activities.UML_Activity_Access is
begin
return
AMF.UML.Activities.UML_Activity_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Activity
(Self.Element)));
end Get_Activity;
------------------
-- Set_Activity --
------------------
overriding procedure Set_Activity
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.Activities.UML_Activity_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Activity
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Activity;
------------------
-- Get_In_Group --
------------------
overriding function Get_In_Group
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activity_Groups.Collections.Set_Of_UML_Activity_Group is
begin
return
AMF.UML.Activity_Groups.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Group
(Self.Element)));
end Get_In_Group;
---------------------------------
-- Get_In_Interruptible_Region --
---------------------------------
overriding function Get_In_Interruptible_Region
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Interruptible_Activity_Regions.Collections.Set_Of_UML_Interruptible_Activity_Region is
begin
return
AMF.UML.Interruptible_Activity_Regions.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Interruptible_Region
(Self.Element)));
end Get_In_Interruptible_Region;
----------------------
-- Get_In_Partition --
----------------------
overriding function Get_In_Partition
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activity_Partitions.Collections.Set_Of_UML_Activity_Partition is
begin
return
AMF.UML.Activity_Partitions.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Partition
(Self.Element)));
end Get_In_Partition;
----------------------------
-- Get_In_Structured_Node --
----------------------------
overriding function Get_In_Structured_Node
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access is
begin
return
AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_In_Structured_Node
(Self.Element)));
end Get_In_Structured_Node;
----------------------------
-- Set_In_Structured_Node --
----------------------------
overriding procedure Set_In_Structured_Node
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.Structured_Activity_Nodes.UML_Structured_Activity_Node_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_In_Structured_Node
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_In_Structured_Node;
------------------
-- Get_Incoming --
------------------
overriding function Get_Incoming
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
begin
return
AMF.UML.Activity_Edges.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Incoming
(Self.Element)));
end Get_Incoming;
------------------
-- Get_Outgoing --
------------------
overriding function Get_Outgoing
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activity_Edges.Collections.Set_Of_UML_Activity_Edge is
begin
return
AMF.UML.Activity_Edges.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Outgoing
(Self.Element)));
end Get_Outgoing;
------------------------
-- Get_Redefined_Node --
------------------------
overriding function Get_Redefined_Node
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Activity_Nodes.Collections.Set_Of_UML_Activity_Node is
begin
return
AMF.UML.Activity_Nodes.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Node
(Self.Element)));
end Get_Redefined_Node;
-----------------
-- Get_Is_Leaf --
-----------------
overriding function Get_Is_Leaf
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return Boolean is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Is_Leaf
(Self.Element);
end Get_Is_Leaf;
-----------------
-- Set_Is_Leaf --
-----------------
overriding procedure Set_Is_Leaf
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : Boolean) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Is_Leaf
(Self.Element, To);
end Set_Is_Leaf;
---------------------------
-- Get_Redefined_Element --
---------------------------
overriding function Get_Redefined_Element
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Redefinable_Elements.Collections.Set_Of_UML_Redefinable_Element is
begin
return
AMF.UML.Redefinable_Elements.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefined_Element
(Self.Element)));
end Get_Redefined_Element;
------------------------------
-- Get_Redefinition_Context --
------------------------------
overriding function Get_Redefinition_Context
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Classifiers.Collections.Set_Of_UML_Classifier is
begin
return
AMF.UML.Classifiers.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Redefinition_Context
(Self.Element)));
end Get_Redefinition_Context;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
begin
return
AMF.UML.Dependencies.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access is
begin
return
AMF.UML.String_Expressions.UML_String_Expression_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access UML_Read_Structural_Feature_Action_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Name_Expression;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
return
AMF.UML.Namespaces.UML_Namespace_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Qualified_Name;
-------------
-- Context --
-------------
overriding function Context
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Classifiers.UML_Classifier_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Context unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.Context";
return Context (Self);
end Context;
------------------------
-- Is_Consistent_With --
------------------------
overriding function Is_Consistent_With
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Consistent_With unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.Is_Consistent_With";
return Is_Consistent_With (Self, Redefinee);
end Is_Consistent_With;
-----------------------------------
-- Is_Redefinition_Context_Valid --
-----------------------------------
overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy;
Redefined : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Redefinition_Context_Valid unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.Is_Redefinition_Context_Valid";
return Is_Redefinition_Context_Valid (Self, Redefined);
end Is_Redefinition_Context_Valid;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.All_Owning_Packages";
return All_Owning_Packages (Self);
end All_Owning_Packages;
-----------------------------
-- Is_Distinguishable_From --
-----------------------------
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant UML_Read_Structural_Feature_Action_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
raise Program_Error with "Unimplemented procedure UML_Read_Structural_Feature_Action_Proxy.Namespace";
return Namespace (Self);
end Namespace;
end AMF.Internals.UML_Read_Structural_Feature_Actions;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M --
-- --
-- S p e c --
-- (PikeOS 5 ARM Version) --
-- --
-- Copyright (C) 2016-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 a ZFP version of this package for ARM PikeOS 5 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 := Low_Order_First;
pragma Warnings (Off, Default_Bit_Order); -- kill constant condition warning
-- Priority-related Declarations (RM D.1)
-- For simplicity there is a 1-1 correspondence between Ada and PikeOS
-- priorities. PikeOS priority 0 is reserved by the idle thread, so not
-- available to Ada.
-- PikeOS priorities are 0 .. 255
-- Priorities greather than 245 are reserved to the system software (PSSW)
-- This implementation reserves priorities 224-239 to interrupts
-- Priorities 240-245 are reserved to HM and PikeOS exception handlers
Max_Priority : constant Positive := 223;
Max_Interrupt_Priority : constant Positive := 239;
subtype Any_Priority is Integer range 1 .. Max_Interrupt_Priority;
subtype Priority is Any_Priority
range Any_Priority'First .. Max_Priority;
subtype Interrupt_Priority is Any_Priority
range Priority'Last + 1 .. Any_Priority'Last;
Default_Priority : constant Priority :=
(Priority'First + Priority'Last) / 2;
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 := True;
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;
-- The linker switches ordering comes from a project
-- generated with Codeo or pikeos-cloneproject.
pragma Linker_Options
("-u_p4_entry" & ASCII.NUL &
"-u__cxx_local_dtors" & ASCII.NUL &
"-nostdlib" & ASCII.NUL &
"-T../ld/arm-pikeos5.ld" & ASCII.NUL &
"-T../ld/memory.ld" & ASCII.NUL &
"-lp4ext" & ASCII.NUL &
"-lgnat" & ASCII.NUL &
"-lvm" & ASCII.NUL &
"-lstand" & ASCII.NUL &
"-lp4" & ASCII.NUL &
"-lgcc");
end System;
|
-- Copyright 2012-2015 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/>.
with System;
package Pck is
type Bounded is array (Integer range <>) of Integer;
function New_Bounded (Low, High : Integer) return Bounded;
procedure Do_Nothing (A : System.Address);
end Pck;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Command_Line; use Ada.Command_Line;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Stone is
I: Integer;
C: Character;
begin
--kollar om 2 argument finns
if Argument_Count = 2 then
--Tar in tecknet
C := Argument(1)(1);
--Omvandlar tecknet till integer
I := Character'Pos(C);
-- Lägger till argument 2 till integern
I := I + Integer'Value(Argument(2));
Put(Character'Val(I));
end if;
null;
end;
|
-- Copyright 2007-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/>.
with System;
package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Identifiers;
with Program.Lexical_Elements;
with Program.Elements.Expressions;
with Program.Elements.Discriminant_Associations;
with Program.Element_Visitors;
package Program.Nodes.Discriminant_Associations is
pragma Preelaborate;
type Discriminant_Association is
new Program.Nodes.Node
and Program.Elements.Discriminant_Associations
.Discriminant_Association
and Program.Elements.Discriminant_Associations
.Discriminant_Association_Text
with private;
function Create
(Selector_Names : Program.Elements.Identifiers
.Identifier_Vector_Access;
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
Discriminant_Value : not null Program.Elements.Expressions
.Expression_Access)
return Discriminant_Association;
type Implicit_Discriminant_Association is
new Program.Nodes.Node
and Program.Elements.Discriminant_Associations
.Discriminant_Association
with private;
function Create
(Selector_Names : Program.Elements.Identifiers
.Identifier_Vector_Access;
Discriminant_Value : not null Program.Elements.Expressions
.Expression_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Discriminant_Association
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Discriminant_Association is
abstract new Program.Nodes.Node
and Program.Elements.Discriminant_Associations.Discriminant_Association
with record
Selector_Names : Program.Elements.Identifiers
.Identifier_Vector_Access;
Discriminant_Value : not null Program.Elements.Expressions
.Expression_Access;
end record;
procedure Initialize (Self : in out Base_Discriminant_Association'Class);
overriding procedure Visit
(Self : not null access Base_Discriminant_Association;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Selector_Names
(Self : Base_Discriminant_Association)
return Program.Elements.Identifiers.Identifier_Vector_Access;
overriding function Discriminant_Value
(Self : Base_Discriminant_Association)
return not null Program.Elements.Expressions.Expression_Access;
overriding function Is_Discriminant_Association
(Self : Base_Discriminant_Association)
return Boolean;
overriding function Is_Association
(Self : Base_Discriminant_Association)
return Boolean;
type Discriminant_Association is
new Base_Discriminant_Association
and Program.Elements.Discriminant_Associations
.Discriminant_Association_Text
with record
Arrow_Token : Program.Lexical_Elements.Lexical_Element_Access;
end record;
overriding function To_Discriminant_Association_Text
(Self : in out Discriminant_Association)
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Text_Access;
overriding function Arrow_Token
(Self : Discriminant_Association)
return Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Discriminant_Association is
new Base_Discriminant_Association
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Discriminant_Association_Text
(Self : in out Implicit_Discriminant_Association)
return Program.Elements.Discriminant_Associations
.Discriminant_Association_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Discriminant_Association)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Discriminant_Association)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Discriminant_Association)
return Boolean;
end Program.Nodes.Discriminant_Associations;
|
-- Copyright (C) 2019 Thierry Rascle <thierr26@free.fr>
-- MIT license. Please refer to the LICENSE file.
procedure Apsepp.Test_Node_Class.Generic_Assert (Cond : Boolean;
Message : String := "") is
begin
Assert (Test_Node_Tag, Cond, Message);
end;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- O S I N T - C --
-- --
-- B o d y --
-- --
-- Copyright (C) 2001-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 Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Opt; use Opt;
with Tree_IO; use Tree_IO;
package body Osint.C is
Output_Object_File_Name : String_Ptr;
-- Argument of -o compiler option, if given. This is needed to verify
-- consistency with the ALI file name.
procedure Adjust_OS_Resource_Limits;
pragma Import (C, Adjust_OS_Resource_Limits,
"__gnat_adjust_os_resource_limits");
-- Procedure to make system specific adjustments to make GNAT run better
function Create_Auxiliary_File
(Src : File_Name_Type;
Suffix : String) return File_Name_Type;
-- Common processing for Create_List_File, Create_Repinfo_File and
-- Create_Debug_File. Src is the file name used to create the required
-- output file and Suffix is the desired suffix (dg/rep/xxx for debug/
-- repinfo/list file where xxx is specified extension.
------------------
-- Close_C_File --
------------------
procedure Close_C_File is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing file "
& Get_Name_String (Output_File_Name));
end if;
end Close_C_File;
----------------------
-- Close_Debug_File --
----------------------
procedure Close_Debug_File is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing expanded source file "
& Get_Name_String (Output_File_Name));
end if;
end Close_Debug_File;
------------------
-- Close_H_File --
------------------
procedure Close_H_File is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing file "
& Get_Name_String (Output_File_Name));
end if;
end Close_H_File;
---------------------
-- Close_List_File --
---------------------
procedure Close_List_File is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing list file "
& Get_Name_String (Output_File_Name));
end if;
end Close_List_File;
-------------------------------
-- Close_Output_Library_Info --
-------------------------------
procedure Close_Output_Library_Info is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing ALI file "
& Get_Name_String (Output_File_Name));
end if;
end Close_Output_Library_Info;
------------------------
-- Close_Repinfo_File --
------------------------
procedure Close_Repinfo_File is
Status : Boolean;
begin
Close (Output_FD, Status);
if not Status then
Fail
("error while closing representation info file "
& Get_Name_String (Output_File_Name));
end if;
end Close_Repinfo_File;
---------------------------
-- Create_Auxiliary_File --
---------------------------
function Create_Auxiliary_File
(Src : File_Name_Type;
Suffix : String) return File_Name_Type
is
Result : File_Name_Type;
begin
Get_Name_String (Src);
Name_Buffer (Name_Len + 1) := '.';
Name_Len := Name_Len + 1;
Name_Buffer (Name_Len + 1 .. Name_Len + Suffix'Length) := Suffix;
Name_Len := Name_Len + Suffix'Length;
if Output_Object_File_Name /= null then
for Index in reverse Output_Object_File_Name'Range loop
if Output_Object_File_Name (Index) = Directory_Separator then
declare
File_Name : constant String := Name_Buffer (1 .. Name_Len);
begin
Name_Len := Index - Output_Object_File_Name'First + 1;
Name_Buffer (1 .. Name_Len) :=
Output_Object_File_Name
(Output_Object_File_Name'First .. Index);
Name_Buffer (Name_Len + 1 .. Name_Len + File_Name'Length) :=
File_Name;
Name_Len := Name_Len + File_Name'Length;
end;
exit;
end if;
end loop;
end if;
Result := Name_Find;
Name_Buffer (Name_Len + 1) := ASCII.NUL;
Create_File_And_Check (Output_FD, Text);
return Result;
end Create_Auxiliary_File;
-------------------
-- Create_C_File --
-------------------
procedure Create_C_File is
Dummy : Boolean;
begin
Set_File_Name ("c");
Delete_File (Name_Buffer (1 .. Name_Len), Dummy);
Create_File_And_Check (Output_FD, Text);
end Create_C_File;
-----------------------
-- Create_Debug_File --
-----------------------
function Create_Debug_File (Src : File_Name_Type) return File_Name_Type is
begin
return Create_Auxiliary_File (Src, "dg");
end Create_Debug_File;
-------------------
-- Create_H_File --
-------------------
procedure Create_H_File is
Dummy : Boolean;
begin
Set_File_Name ("h");
Delete_File (Name_Buffer (1 .. Name_Len), Dummy);
Create_File_And_Check (Output_FD, Text);
end Create_H_File;
----------------------
-- Create_List_File --
----------------------
procedure Create_List_File (S : String) is
Dummy : File_Name_Type;
begin
if S (S'First) = '.' then
Dummy :=
Create_Auxiliary_File (Current_Main, S (S'First + 1 .. S'Last));
else
Name_Buffer (1 .. S'Length) := S;
Name_Len := S'Length + 1;
Name_Buffer (Name_Len) := ASCII.NUL;
Create_File_And_Check (Output_FD, Text);
end if;
end Create_List_File;
--------------------------------
-- Create_Output_Library_Info --
--------------------------------
procedure Create_Output_Library_Info is
Dummy : Boolean;
begin
Set_File_Name (ALI_Suffix.all);
Delete_File (Name_Buffer (1 .. Name_Len), Dummy);
Create_File_And_Check (Output_FD, Text);
end Create_Output_Library_Info;
------------------------------
-- Open_Output_Library_Info --
------------------------------
procedure Open_Output_Library_Info is
begin
Set_File_Name (ALI_Suffix.all);
Open_File_To_Append_And_Check (Output_FD, Text);
end Open_Output_Library_Info;
-------------------------
-- Create_Repinfo_File --
-------------------------
procedure Create_Repinfo_File (Src : String) is
Discard : File_Name_Type;
begin
Name_Buffer (1 .. Src'Length) := Src;
Name_Len := Src'Length;
Discard := Create_Auxiliary_File (Name_Find, "rep");
return;
end Create_Repinfo_File;
---------------------------
-- Debug_File_Eol_Length --
---------------------------
function Debug_File_Eol_Length return Nat is
begin
-- There has to be a cleaner way to do this ???
if Directory_Separator = '/' then
return 1;
else
return 2;
end if;
end Debug_File_Eol_Length;
-------------------
-- Delete_C_File --
-------------------
procedure Delete_C_File is
Dummy : Boolean;
begin
Set_File_Name ("c");
Delete_File (Name_Buffer (1 .. Name_Len), Dummy);
end Delete_C_File;
-------------------
-- Delete_H_File --
-------------------
procedure Delete_H_File is
Dummy : Boolean;
begin
Set_File_Name ("h");
Delete_File (Name_Buffer (1 .. Name_Len), Dummy);
end Delete_H_File;
---------------------------------
-- Get_Output_Object_File_Name --
---------------------------------
function Get_Output_Object_File_Name return String is
begin
pragma Assert (Output_Object_File_Name /= null);
return Output_Object_File_Name.all;
end Get_Output_Object_File_Name;
-----------------------
-- More_Source_Files --
-----------------------
function More_Source_Files return Boolean renames More_Files;
----------------------
-- Next_Main_Source --
----------------------
function Next_Main_Source return File_Name_Type renames Next_Main_File;
-----------------------
-- Read_Library_Info --
-----------------------
procedure Read_Library_Info
(Name : out File_Name_Type;
Text : out Text_Buffer_Ptr)
is
begin
Set_File_Name (ALI_Suffix.all);
-- Remove trailing NUL that comes from Set_File_Name above. This is
-- needed for consistency with names that come from Scan_ALI and thus
-- preventing repeated scanning of the same file.
pragma Assert (Name_Len > 1 and then Name_Buffer (Name_Len) = ASCII.NUL);
Name_Len := Name_Len - 1;
Name := Name_Find;
Text := Read_Library_Info (Name, Fatal_Err => False);
end Read_Library_Info;
-------------------
-- Set_File_Name --
-------------------
procedure Set_File_Name (Ext : String) is
Dot_Index : Natural;
begin
Get_Name_String (Current_Main);
-- Find last dot since we replace the existing extension by .ali. The
-- initialization to Name_Len + 1 provides for simply adding the .ali
-- extension if the source file name has no extension.
Dot_Index := Name_Len + 1;
for J in reverse 1 .. Name_Len loop
if Name_Buffer (J) = '.' then
Dot_Index := J;
exit;
end if;
end loop;
-- Make sure that the output file name matches the source file name.
-- To compare them, remove file name directories and extensions.
if Output_Object_File_Name /= null then
-- Make sure there is a dot at Dot_Index. This may not be the case
-- if the source file name has no extension.
Name_Buffer (Dot_Index) := '.';
-- If we are in multiple unit per file mode, then add ~nnn
-- extension to the name before doing the comparison.
if Multiple_Unit_Index /= 0 then
declare
Exten : constant String := Name_Buffer (Dot_Index .. Name_Len);
begin
Name_Len := Dot_Index - 1;
Add_Char_To_Name_Buffer (Multi_Unit_Index_Character);
Add_Nat_To_Name_Buffer (Multiple_Unit_Index);
Dot_Index := Name_Len + 1;
Add_Str_To_Name_Buffer (Exten);
end;
end if;
-- Remove extension preparing to replace it
declare
Name : String := Name_Buffer (1 .. Dot_Index);
First : Positive;
begin
Name_Buffer (1 .. Output_Object_File_Name'Length) :=
Output_Object_File_Name.all;
-- Put two names in canonical case, to allow object file names
-- with upper-case letters on Windows.
Canonical_Case_File_Name (Name);
Canonical_Case_File_Name
(Name_Buffer (1 .. Output_Object_File_Name'Length));
Dot_Index := 0;
for J in reverse Output_Object_File_Name'Range loop
if Name_Buffer (J) = '.' then
Dot_Index := J;
exit;
end if;
end loop;
-- Dot_Index should not be zero now (we check for extension
-- elsewhere).
pragma Assert (Dot_Index /= 0);
-- Look for first character of file name
First := Dot_Index;
while First > 1
and then Name_Buffer (First - 1) /= Directory_Separator
and then Name_Buffer (First - 1) /= '/'
loop
First := First - 1;
end loop;
-- Check name of object file is what we expect
if Name /= Name_Buffer (First .. Dot_Index) then
Fail ("incorrect object file name");
end if;
end;
end if;
Name_Buffer (Dot_Index) := '.';
Name_Buffer (Dot_Index + 1 .. Dot_Index + Ext'Length) := Ext;
Name_Buffer (Dot_Index + Ext'Length + 1) := ASCII.NUL;
Name_Len := Dot_Index + Ext'Length + 1;
end Set_File_Name;
---------------------------------
-- Set_Output_Object_File_Name --
---------------------------------
procedure Set_Output_Object_File_Name (Name : String) is
Ext : constant String := Target_Object_Suffix;
NL : constant Natural := Name'Length;
EL : constant Natural := Ext'Length;
begin
-- Make sure that the object file has the expected extension
if NL <= EL
or else
(Name (NL - EL + Name'First .. Name'Last) /= Ext
and then Name (NL - 2 + Name'First .. Name'Last) /= ".o"
and then
(not Generate_C_Code
or else Name (NL - 2 + Name'First .. Name'Last) /= ".c"))
then
Fail ("incorrect object file extension");
end if;
Output_Object_File_Name := new String'(Name);
end Set_Output_Object_File_Name;
----------------
-- Tree_Close --
----------------
procedure Tree_Close is
Status : Boolean;
begin
Tree_Write_Terminate;
Close (Output_FD, Status);
if not Status then
Fail
("error while closing tree file "
& Get_Name_String (Output_File_Name));
end if;
end Tree_Close;
-----------------
-- Tree_Create --
-----------------
procedure Tree_Create is
Dot_Index : Natural;
begin
Get_Name_String (Current_Main);
-- If an object file has been specified, then the ALI file
-- will be in the same directory as the object file;
-- so, we put the tree file in this same directory,
-- even though no object file needs to be generated.
if Output_Object_File_Name /= null then
Name_Len := Output_Object_File_Name'Length;
Name_Buffer (1 .. Name_Len) := Output_Object_File_Name.all;
end if;
Dot_Index := Name_Len + 1;
for J in reverse 1 .. Name_Len loop
if Name_Buffer (J) = '.' then
Dot_Index := J;
exit;
end if;
end loop;
-- Should be impossible to not have an extension
pragma Assert (Dot_Index /= 0);
-- Change extension to adt
Name_Buffer (Dot_Index) := '.';
Name_Buffer (Dot_Index + 1) := 'a';
Name_Buffer (Dot_Index + 2) := 'd';
Name_Buffer (Dot_Index + 3) := 't';
Name_Buffer (Dot_Index + 4) := ASCII.NUL;
Name_Len := Dot_Index + 3;
Create_File_And_Check (Output_FD, Binary);
Tree_Write_Initialize (Output_FD);
end Tree_Create;
-----------------------
-- Write_Debug_Info --
-----------------------
procedure Write_Debug_Info (Info : String) renames Write_Info;
------------------------
-- Write_Library_Info --
------------------------
procedure Write_Library_Info (Info : String) renames Write_Info;
---------------------
-- Write_List_Info --
---------------------
procedure Write_List_Info (S : String) is
begin
Write_With_Check (S'Address, S'Length);
end Write_List_Info;
------------------------
-- Write_Repinfo_Line --
------------------------
procedure Write_Repinfo_Line (Info : String) renames Write_Info;
begin
Adjust_OS_Resource_Limits;
Opt.Create_Repinfo_File_Access := Create_Repinfo_File'Access;
Opt.Write_Repinfo_Line_Access := Write_Repinfo_Line'Access;
Opt.Close_Repinfo_File_Access := Close_Repinfo_File'Access;
Opt.Create_List_File_Access := Create_List_File'Access;
Opt.Write_List_Info_Access := Write_List_Info'Access;
Opt.Close_List_File_Access := Close_List_File'Access;
Set_Program (Compiler);
end Osint.C;
|
-- The Village of Vampire by YT, このソースコードはNYSLです
procedure Vampire.R3.Log_Index_Page (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Form : in Forms.Root_Form_Type'Class;
Template : in String;
HTML_Directory : in String;
Style_Sheet : in String;
Background : in String;
Summaries : in Tabula.Villages.Lists.Summary_Maps.Map)
is
procedure Handle (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Tag : in String;
Contents : in Web.Producers.Template) is
begin
if Tag = "background" then
Forms.Write_Attribute_Name (Output, "background");
Forms.Write_Link (
Output,
Form,
Current_Directory => HTML_Directory,
Resource => Background);
elsif Tag = "href_index" then
Forms.Write_Attribute_Name (Output, "href");
Forms.Write_Link (
Output,
Form,
Current_Directory => HTML_Directory,
Resource => Forms.Self,
Parameters =>
Form.Parameters_To_Index_Page (
User_Id => "",
User_Password => ""));
elsif Tag = "loglist" then
Handle_Village_List (
Output,
Contents,
Form,
Current_Directory => HTML_Directory,
HTML_Directory => HTML_Directory,
Summaries => Summaries,
Log => True,
Limits => 9999,
User_Id => "",
User_Password => "");
elsif Tag = "href_stylesheet" then
Forms.Write_Attribute_Name (Output, "href");
Forms.Write_Link (
Output,
Form,
Current_Directory => HTML_Directory,
Resource => Style_Sheet);
else
Raise_Unknown_Tag (Tag);
end if;
end Handle;
begin
Web.Producers.Produce (Output, Read (Template), Handler => Handle'Access);
end Vampire.R3.Log_Index_Page;
|
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
-- //
-- // 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.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Sf.Config;
with Sf.Audio.SoundStatus;
with Sf.Audio.Types;
package Sf.Audio.Sound is
use Sf.Config;
use Sf.Audio.SoundStatus;
use Sf.Audio.Types;
-- ////////////////////////////////////////////////////////////
-- /// Construct a new sound
-- ///
-- /// \return A new sfSound object (NULL if failed)
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_Create return sfSound_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Destroy an existing sound
-- ///
-- /// \param Sound : Sound to delete
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_Destroy (Sound : sfSound_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Start playing a sound
-- ///
-- /// \param Sound : Sound to play
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_Play (Sound : sfSound_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Pause a sound
-- ///
-- /// \param Sound : Sound to pause
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_Pause (Sound : sfSound_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Stop playing a sound
-- ///
-- /// \param Sound : Sound to stop
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_Stop (Sound : sfSound_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Bind a sound buffer to a sound
-- ///
-- /// \param Sound : Sound to set the loop state
-- /// \param Buffer : Buffer to bind
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetBuffer (Sound : sfSound_Ptr; Buffer : sfSoundBuffer_Ptr);
-- ////////////////////////////////////////////////////////////
-- /// Get the sound buffer bound to a sound
-- ///
-- /// \param Sound : Sound to get the buffer from
-- ///
-- /// \return Pointer to the sound's buffer
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetBuffer (Sound : sfSound_Ptr) return sfSoundBuffer_Ptr;
-- ////////////////////////////////////////////////////////////
-- /// Set a sound loop state
-- ///
-- /// \param Sound : Sound to set the loop state
-- /// \param Loop : sfTrue to play in loop, sfFalse to play once
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetLoop (Sound : sfSound_Ptr; Enable : sfBool);
-- ////////////////////////////////////////////////////////////
-- /// Tell whether or not a sound is looping
-- ///
-- /// \param Sound : Sound to get the loop state from
-- ///
-- /// \return sfTrue if the sound is looping, sfFalse otherwise
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetLoop (Sound : sfSound_Ptr) return sfBool;
-- ////////////////////////////////////////////////////////////
-- /// Get the status of a sound (stopped, paused, playing)
-- ///
-- /// \param Sound : Sound to get the status from
-- ///
-- /// \return Current status of the sound
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetStatus (Sound : sfSound_Ptr) return sfSoundStatus;
-- ////////////////////////////////////////////////////////////
-- /// Set the pitch of a sound
-- ///
-- /// \param Sound : Sound to modify
-- /// \param Pitch : New pitch
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetPitch (Sound : sfSound_Ptr; Pitch : Float);
-- ////////////////////////////////////////////////////////////
-- /// Set the volume of a sound
-- ///
-- /// \param Sound : Sound to modify
-- /// \param Volume : Volume (in range [0, 100])
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetVolume (Sound : sfSound_Ptr; Volume : Float);
-- ////////////////////////////////////////////////////////////
-- /// Set the position of a sound
-- ///
-- /// \param Sound : Sound to modify
-- /// \param X : X position of the sound in the world
-- /// \param Y : Y position of the sound in the world
-- /// \param Z : Z position of the sound in the world
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetPosition (Sound : sfSound_Ptr; X, Y, Z : Float);
-- ////////////////////////////////////////////////////////////
-- /// Make the sound's position relative to the listener's
-- /// position, or absolute.
-- /// The default value is false (absolute)
-- ///
-- /// \param Sound : Sound to modify
-- /// \param Relative : True to set the position relative, false to set it absolute
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetRelativeToListener (Sound : sfSound_Ptr; Relative : sfBool);
-- ////////////////////////////////////////////////////////////
-- /// Set the minimum distance - closer than this distance,
-- /// the listener will hear the sound at its maximum volume.
-- /// The default minimum distance is 1.0
-- ///
-- /// \param Sound : Sound to modify
-- /// \param MinDistance : New minimum distance for the sound
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetMinDistance (Sound : sfSound_Ptr; MinDistance : Float);
-- ////////////////////////////////////////////////////////////
-- /// Set the attenuation factor - the higher the attenuation, the
-- /// more the sound will be attenuated with distance from listener.
-- /// The default attenuation factor is 1.0
-- ///
-- /// \param Sound : Sound to modify
-- /// \param Attenuation : New attenuation factor for the sound
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetAttenuation (Sound : sfSound_Ptr; Attenuation : Float);
-- ////////////////////////////////////////////////////////////
-- /// Set the current playing position of a sound
-- ///
-- /// \param Sound : Sound to modify
-- /// \param TimeOffset : New playing position, expressed in seconds
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_SetPlayingOffset (Sound : sfSound_Ptr; TimeOffset : Float);
-- ////////////////////////////////////////////////////////////
-- /// Get the pitch of a sound
-- ///
-- /// \param Sound : Sound to get the pitch from
-- ///
-- /// \return Pitch value
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetPitch (Sound : sfSound_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the volume of a sound
-- ///
-- /// \param Sound : Sound to get the volume from
-- ///
-- /// \return Volume value (in range [1, 100])
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetVolume (Sound : sfSound_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the position of a sound
-- ///
-- /// \param Sound : Sound to get the position from
-- /// \param X : X position of the sound in the world
-- /// \param Y : Y position of the sound in the world
-- /// \param Z : Z position of the sound in the world
-- ///
-- ////////////////////////////////////////////////////////////
procedure sfSound_GetPosition (Sound : sfSound_Ptr; X, Y, Z : access Float);
-- ////////////////////////////////////////////////////////////
-- /// Tell if the sound's position is relative to the listener's
-- /// position, or if it's absolute
-- ///
-- /// \param Sound : Sound to check
-- ///
-- /// \return sfTrue if the position is relative, sfFalse if it's absolute
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_IsRelativeToListener (Sound : sfSound_Ptr) return sfBool;
-- ////////////////////////////////////////////////////////////
-- /// Get the minimum distance of a sound
-- ///
-- /// \param Sound : Sound to get the minimum distance from
-- ///
-- /// \return Minimum distance for the sound
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetMinDistance (Sound : sfSound_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the attenuation factor of a sound
-- ///
-- /// \param Sound : Sound to get the attenuation factor from
-- ///
-- /// \return Attenuation factor for the sound
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetAttenuation (Sound : sfSound_Ptr) return Float;
-- ////////////////////////////////////////////////////////////
-- /// Get the current playing position of a sound
-- ///
-- /// \param Sound : Sound to get the position from
-- ///
-- /// \return Current playing position, expressed in seconds
-- ///
-- ////////////////////////////////////////////////////////////
function sfSound_GetPlayingOffset (Sound : sfSound_Ptr) return Float;
private
pragma Import (C, sfSound_Create, "sfSound_Create");
pragma Import (C, sfSound_Destroy, "sfSound_Destroy");
pragma Import (C, sfSound_Play, "sfSound_Play");
pragma Import (C, sfSound_Pause, "sfSound_Pause");
pragma Import (C, sfSound_Stop, "sfSound_Stop");
pragma Import (C, sfSound_SetBuffer, "sfSound_SetBuffer");
pragma Import (C, sfSound_GetBuffer, "sfSound_GetBuffer");
pragma Import (C, sfSound_SetLoop, "sfSound_SetLoop");
pragma Import (C, sfSound_GetLoop, "sfSound_GetLoop");
pragma Import (C, sfSound_GetStatus, "sfSound_GetStatus");
pragma Import (C, sfSound_SetPitch, "sfSound_SetPitch");
pragma Import (C, sfSound_SetVolume, "sfSound_SetVolume");
pragma Import (C, sfSound_SetPosition, "sfSound_SetPosition");
pragma Import (C, sfSound_SetRelativeToListener, "sfSound_SetRelativeToListener");
pragma Import (C, sfSound_SetMinDistance, "sfSound_SetMinDistance");
pragma Import (C, sfSound_SetAttenuation, "sfSound_SetAttenuation");
pragma Import (C, sfSound_SetPlayingOffset, "sfSound_SetPlayingOffset");
pragma Import (C, sfSound_GetPitch, "sfSound_GetPitch");
pragma Import (C, sfSound_GetVolume, "sfSound_GetVolume");
pragma Import (C, sfSound_GetPosition, "sfSound_GetPosition");
pragma Import (C, sfSound_IsRelativeToListener, "sfSound_IsRelativeToListener");
pragma Import (C, sfSound_GetMinDistance, "sfSound_GetMinDistance");
pragma Import (C, sfSound_GetAttenuation, "sfSound_GetAttenuation");
pragma Import (C, sfSound_GetPlayingOffset, "sfSound_GetPlayingOffset");
end Sf.Audio.Sound;
|
with Ada.Text_IO;
use Ada.Text_IO;
with GNAT.Command_Line;
use GNAT.Command_Line;
with Util;
with Ada.Exceptions;
use Ada.Exceptions;
procedure Main is
Config : Command_Line_Configuration;
begin
Util.Define_CLI_Switches(Config);
Getopt(Config);
Util.Process_Command_Arguments;
exception
when E : Util.Execution_Error =>
Put("Execution error: ");
Put_Line(Exception_Message(E));
Put_Line("... stopping.");
when E : Util.Argument_Error =>
Put("Invalid argument: ");
Put_Line(Exception_Message(E));
Display_Help(Config);
when Exit_From_Command_Line =>
return;
end; |
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S Y N C H R O N O U S _ B A R R I E R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2014, 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 body of this package using POSIX barriers
with Interfaces.C; use Interfaces.C;
package body Ada.Synchronous_Barriers is
--------------------
-- POSIX barriers --
--------------------
function pthread_barrier_init
(barrier : not null access pthread_barrier_t;
attr : System.Address := System.Null_Address;
count : unsigned) return int;
pragma Import (C, pthread_barrier_init, "pthread_barrier_init");
-- Initialize barrier with the attributes in attr. The barrier is opened
-- when count waiters arrived. If attr is null the default barrier
-- attributes are used.
function pthread_barrier_destroy
(barrier : not null access pthread_barrier_t) return int;
pragma Import (C, pthread_barrier_destroy, "pthread_barrier_destroy");
-- Destroy a previously dynamically initialized barrier
function pthread_barrier_wait
(barrier : not null access pthread_barrier_t) return int;
pragma Import (C, pthread_barrier_wait, "pthread_barrier_wait");
-- Wait on barrier
--------------
-- Finalize --
--------------
overriding procedure Finalize (Barrier : in out Synchronous_Barrier) is
Result : int;
begin
Result := pthread_barrier_destroy (Barrier.POSIX_Barrier'Access);
pragma Assert (Result = 0);
end Finalize;
overriding procedure Initialize (Barrier : in out Synchronous_Barrier) is
Result : int;
begin
Result :=
pthread_barrier_init
(barrier => Barrier.POSIX_Barrier'Access,
attr => System.Null_Address,
count => unsigned (Barrier.Release_Threshold));
pragma Assert (Result = 0);
end Initialize;
----------------------
-- Wait_For_Release --
----------------------
procedure Wait_For_Release
(The_Barrier : in out Synchronous_Barrier;
Notified : out Boolean)
is
Result : int;
PTHREAD_BARRIER_SERIAL_THREAD : constant := -1;
-- Value used to indicate the task which receives the notification for
-- the barrier open.
begin
Result :=
pthread_barrier_wait
(barrier => The_Barrier.POSIX_Barrier'Access);
pragma Assert
(Result = 0 or else Result = PTHREAD_BARRIER_SERIAL_THREAD);
Notified := (Result = PTHREAD_BARRIER_SERIAL_THREAD);
end Wait_For_Release;
end Ada.Synchronous_Barriers;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
procedure Twelve_Days_Of_Christmas is
type Days is (First, Second, Third, Fourth, Fifth, Sixth,
Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth);
package E_IO is new Ada.Text_IO.Enumeration_IO(Days);
use E_IO;
Gifts : array (Days) of Unbounded_String :=
(To_Unbounded_String(" A partridge in a pear-tree."),
To_Unbounded_String(" Two turtle doves"),
To_Unbounded_String(" Three French hens"),
To_Unbounded_String(" Four calling birds"),
To_Unbounded_String(" Five golden rings"),
To_Unbounded_String(" Six geese a-laying"),
To_Unbounded_String(" Seven swans a-swimming"),
To_Unbounded_String(" Eight maids a-milking"),
To_Unbounded_String(" Nine ladies dancing"),
To_Unbounded_String(" Ten lords a-leaping"),
To_Unbounded_String(" Eleven pipers piping"),
To_Unbounded_String(" Twelve drummers drumming"));
begin
for Day in Days loop
Put("On the "); Put(Day, Set => Lower_Case); Put(" day of Christmas,");
New_Line; Put_Line("My true love gave to me:");
for D in reverse Days'First..Day loop
Put_Line(To_String(Gifts(D)));
end loop;
if Day = First then
Replace_Slice(Gifts(Day), 2, 2, "And a");
end if;
New_Line;
end loop;
end Twelve_Days_Of_Christmas;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- E X P _ C H 3 --
-- --
-- B o d y --
-- --
-- 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. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
with Errout; use Errout;
with Exp_Aggr; use Exp_Aggr;
with Exp_Ch4; use Exp_Ch4;
with Exp_Ch7; use Exp_Ch7;
with Exp_Ch9; use Exp_Ch9;
with Exp_Ch11; use Exp_Ch11;
with Exp_Disp; use Exp_Disp;
with Exp_Dist; use Exp_Dist;
with Exp_Smem; use Exp_Smem;
with Exp_Strm; use Exp_Strm;
with Exp_Tss; use Exp_Tss;
with Exp_Util; use Exp_Util;
with Freeze; use Freeze;
with Hostparm; use Hostparm;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
with Restrict; use Restrict;
with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Attr; use Sem_Attr;
with Sem_Ch3; use Sem_Ch3;
with Sem_Ch8; use Sem_Ch8;
with Sem_Disp; use Sem_Disp;
with Sem_Eval; use Sem_Eval;
with Sem_Mech; use Sem_Mech;
with Sem_Res; use Sem_Res;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Stand; use Stand;
with Snames; use Snames;
with Tbuild; use Tbuild;
with Ttypes; use Ttypes;
with Validsw; use Validsw;
package body Exp_Ch3 is
-----------------------
-- Local Subprograms --
-----------------------
procedure Adjust_Discriminants (Rtype : Entity_Id);
-- This is used when freezing a record type. It attempts to construct
-- more restrictive subtypes for discriminants so that the max size of
-- the record can be calculated more accurately. See the body of this
-- procedure for details.
procedure Build_Array_Init_Proc (A_Type : Entity_Id; Nod : Node_Id);
-- Build initialization procedure for given array type. Nod is a node
-- used for attachment of any actions required in its construction.
-- It also supplies the source location used for the procedure.
function Build_Discriminant_Formals
(Rec_Id : Entity_Id;
Use_Dl : Boolean) return List_Id;
-- This function uses the discriminants of a type to build a list of
-- formal parameters, used in the following function. If the flag Use_Dl
-- is set, the list is built using the already defined discriminals
-- of the type. Otherwise new identifiers are created, with the source
-- names of the discriminants.
procedure Build_Master_Renaming (N : Node_Id; T : Entity_Id);
-- If the designated type of an access type is a task type or contains
-- tasks, we make sure that a _Master variable is declared in the current
-- scope, and then declare a renaming for it:
--
-- atypeM : Master_Id renames _Master;
--
-- where atyp is the name of the access type. This declaration is
-- used when an allocator for the access type is expanded. The node N
-- is the full declaration of the designated type that contains tasks.
-- The renaming declaration is inserted before N, and after the Master
-- declaration.
procedure Build_Record_Init_Proc (N : Node_Id; Pe : Entity_Id);
-- Build record initialization procedure. N is the type declaration
-- node, and Pe is the corresponding entity for the record type.
procedure Build_Slice_Assignment (Typ : Entity_Id);
-- Build assignment procedure for one-dimensional arrays of controlled
-- types. Other array and slice assignments are expanded in-line, but
-- the code expansion for controlled components (when control actions
-- are active) can lead to very large blocks that GCC3 handles poorly.
procedure Build_Variant_Record_Equality (Typ : Entity_Id);
-- Create An Equality function for the non-tagged variant record 'Typ'
-- and attach it to the TSS list
procedure Check_Stream_Attributes (Typ : Entity_Id);
-- Check that if a limited extension has a parent with user-defined
-- stream attributes, and does not itself have user-definer
-- stream-attributes, then any limited component of the extension also
-- has the corresponding user-defined stream attributes.
procedure Expand_Tagged_Root (T : Entity_Id);
-- Add a field _Tag at the beginning of the record. This field carries
-- the value of the access to the Dispatch table. This procedure is only
-- called on root (non CPP_Class) types, the _Tag field being inherited
-- by the descendants.
procedure Expand_Record_Controller (T : Entity_Id);
-- T must be a record type that Has_Controlled_Component. Add a field
-- _controller of type Record_Controller or Limited_Record_Controller
-- in the record T.
procedure Freeze_Array_Type (N : Node_Id);
-- Freeze an array type. Deals with building the initialization procedure,
-- creating the packed array type for a packed array and also with the
-- creation of the controlling procedures for the controlled case. The
-- argument N is the N_Freeze_Entity node for the type.
procedure Freeze_Enumeration_Type (N : Node_Id);
-- Freeze enumeration type with non-standard representation. Builds the
-- array and function needed to convert between enumeration pos and
-- enumeration representation values. N is the N_Freeze_Entity node
-- for the type.
procedure Freeze_Record_Type (N : Node_Id);
-- Freeze record type. Builds all necessary discriminant checking
-- and other ancillary functions, and builds dispatch tables where
-- needed. The argument N is the N_Freeze_Entity node. This processing
-- applies only to E_Record_Type entities, not to class wide types,
-- record subtypes, or private types.
procedure Freeze_Stream_Operations (N : Node_Id; Typ : Entity_Id);
-- Treat user-defined stream operations as renaming_as_body if the
-- subprogram they rename is not frozen when the type is frozen.
function Init_Formals (Typ : Entity_Id) return List_Id;
-- This function builds the list of formals for an initialization routine.
-- The first formal is always _Init with the given type. For task value
-- record types and types containing tasks, three additional formals are
-- added:
--
-- _Master : Master_Id
-- _Chain : in out Activation_Chain
-- _Task_Name : String
--
-- The caller must append additional entries for discriminants if required.
function In_Runtime (E : Entity_Id) return Boolean;
-- Check if E is defined in the RTL (in a child of Ada or System). Used
-- to avoid to bring in the overhead of _Input, _Output for tagged types.
function Make_Eq_Case
(E : Entity_Id;
CL : Node_Id;
Discr : Entity_Id := Empty) return List_Id;
-- Building block for variant record equality. Defined to share the
-- code between the tagged and non-tagged case. Given a Component_List
-- node CL, it generates an 'if' followed by a 'case' statement that
-- compares all components of local temporaries named X and Y (that
-- are declared as formals at some upper level). E provides the Sloc to be
-- used for the generated code. Discr is used as the case statement switch
-- in the case of Unchecked_Union equality.
function Make_Eq_If
(E : Entity_Id;
L : List_Id) return Node_Id;
-- Building block for variant record equality. Defined to share the
-- code between the tagged and non-tagged case. Given the list of
-- components (or discriminants) L, it generates a return statement
-- that compares all components of local temporaries named X and Y
-- (that are declared as formals at some upper level). E provides the Sloc
-- to be used for the generated code.
procedure Make_Predefined_Primitive_Specs
(Tag_Typ : Entity_Id;
Predef_List : out List_Id;
Renamed_Eq : out Node_Id);
-- Create a list with the specs of the predefined primitive operations.
-- The following entries are present for all tagged types, and provide
-- the results of the corresponding attribute applied to the object.
-- Dispatching is required in general, since the result of the attribute
-- will vary with the actual object subtype.
--
-- _alignment provides result of 'Alignment attribute
-- _size provides result of 'Size attribute
-- typSR provides result of 'Read attribute
-- typSW provides result of 'Write attribute
-- typSI provides result of 'Input attribute
-- typSO provides result of 'Output attribute
--
-- The following entries are additionally present for non-limited
-- tagged types, and implement additional dispatching operations
-- for predefined operations:
--
-- _equality implements "=" operator
-- _assign implements assignment operation
-- typDF implements deep finalization
-- typDA implements deep adust
--
-- The latter two are empty procedures unless the type contains some
-- controlled components that require finalization actions (the deep
-- in the name refers to the fact that the action applies to components).
--
-- The list is returned in Predef_List. The Parameter Renamed_Eq
-- either returns the value Empty, or else the defining unit name
-- for the predefined equality function in the case where the type
-- has a primitive operation that is a renaming of predefined equality
-- (but only if there is also an overriding user-defined equality
-- function). The returned Renamed_Eq will be passed to the
-- corresponding parameter of Predefined_Primitive_Bodies.
function Has_New_Non_Standard_Rep (T : Entity_Id) return Boolean;
-- returns True if there are representation clauses for type T that
-- are not inherited. If the result is false, the init_proc and the
-- discriminant_checking functions of the parent can be reused by
-- a derived type.
procedure Make_Controlling_Function_Wrappers
(Tag_Typ : Entity_Id;
Decl_List : out List_Id;
Body_List : out List_Id);
-- Ada 2005 (AI-391): Makes specs and bodies for the wrapper functions
-- associated with inherited functions with controlling results which
-- are not overridden. The body of each wrapper function consists solely
-- of a return statement whose expression is an extension aggregate
-- invoking the inherited subprogram's parent subprogram and extended
-- with a null association list.
function Predef_Spec_Or_Body
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : Name_Id;
Profile : List_Id;
Ret_Type : Entity_Id := Empty;
For_Body : Boolean := False) return Node_Id;
-- This function generates the appropriate expansion for a predefined
-- primitive operation specified by its name, parameter profile and
-- return type (Empty means this is a procedure). If For_Body is false,
-- then the returned node is a subprogram declaration. If For_Body is
-- true, then the returned node is a empty subprogram body containing
-- no declarations and no statements.
function Predef_Stream_Attr_Spec
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : TSS_Name_Type;
For_Body : Boolean := False) return Node_Id;
-- Specialized version of Predef_Spec_Or_Body that apply to read, write,
-- input and output attribute whose specs are constructed in Exp_Strm.
function Predef_Deep_Spec
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : TSS_Name_Type;
For_Body : Boolean := False) return Node_Id;
-- Specialized version of Predef_Spec_Or_Body that apply to _deep_adjust
-- and _deep_finalize
function Predefined_Primitive_Bodies
(Tag_Typ : Entity_Id;
Renamed_Eq : Node_Id) return List_Id;
-- Create the bodies of the predefined primitives that are described in
-- Predefined_Primitive_Specs. When not empty, Renamed_Eq must denote
-- the defining unit name of the type's predefined equality as returned
-- by Make_Predefined_Primitive_Specs.
function Predefined_Primitive_Freeze (Tag_Typ : Entity_Id) return List_Id;
-- Freeze entities of all predefined primitive operations. This is needed
-- because the bodies of these operations do not normally do any freezeing.
function Stream_Operation_OK
(Typ : Entity_Id;
Operation : TSS_Name_Type) return Boolean;
-- Check whether the named stream operation must be emitted for a given
-- type. The rules for inheritance of stream attributes by type extensions
-- are enforced by this function. Furthermore, various restrictions prevent
-- the generation of these operations, as a useful optimization or for
-- certification purposes.
--------------------------
-- Adjust_Discriminants --
--------------------------
-- This procedure attempts to define subtypes for discriminants that
-- are more restrictive than those declared. Such a replacement is
-- possible if we can demonstrate that values outside the restricted
-- range would cause constraint errors in any case. The advantage of
-- restricting the discriminant types in this way is tha the maximum
-- size of the variant record can be calculated more conservatively.
-- An example of a situation in which we can perform this type of
-- restriction is the following:
-- subtype B is range 1 .. 10;
-- type Q is array (B range <>) of Integer;
-- type V (N : Natural) is record
-- C : Q (1 .. N);
-- end record;
-- In this situation, we can restrict the upper bound of N to 10, since
-- any larger value would cause a constraint error in any case.
-- There are many situations in which such restriction is possible, but
-- for now, we just look for cases like the above, where the component
-- in question is a one dimensional array whose upper bound is one of
-- the record discriminants. Also the component must not be part of
-- any variant part, since then the component does not always exist.
procedure Adjust_Discriminants (Rtype : Entity_Id) is
Loc : constant Source_Ptr := Sloc (Rtype);
Comp : Entity_Id;
Ctyp : Entity_Id;
Ityp : Entity_Id;
Lo : Node_Id;
Hi : Node_Id;
P : Node_Id;
Loval : Uint;
Discr : Entity_Id;
Dtyp : Entity_Id;
Dhi : Node_Id;
Dhiv : Uint;
Ahi : Node_Id;
Ahiv : Uint;
Tnn : Entity_Id;
begin
Comp := First_Component (Rtype);
while Present (Comp) loop
-- If our parent is a variant, quit, we do not look at components
-- that are in variant parts, because they may not always exist.
P := Parent (Comp); -- component declaration
P := Parent (P); -- component list
exit when Nkind (Parent (P)) = N_Variant;
-- We are looking for a one dimensional array type
Ctyp := Etype (Comp);
if not Is_Array_Type (Ctyp)
or else Number_Dimensions (Ctyp) > 1
then
goto Continue;
end if;
-- The lower bound must be constant, and the upper bound is a
-- discriminant (which is a discriminant of the current record).
Ityp := Etype (First_Index (Ctyp));
Lo := Type_Low_Bound (Ityp);
Hi := Type_High_Bound (Ityp);
if not Compile_Time_Known_Value (Lo)
or else Nkind (Hi) /= N_Identifier
or else No (Entity (Hi))
or else Ekind (Entity (Hi)) /= E_Discriminant
then
goto Continue;
end if;
-- We have an array with appropriate bounds
Loval := Expr_Value (Lo);
Discr := Entity (Hi);
Dtyp := Etype (Discr);
-- See if the discriminant has a known upper bound
Dhi := Type_High_Bound (Dtyp);
if not Compile_Time_Known_Value (Dhi) then
goto Continue;
end if;
Dhiv := Expr_Value (Dhi);
-- See if base type of component array has known upper bound
Ahi := Type_High_Bound (Etype (First_Index (Base_Type (Ctyp))));
if not Compile_Time_Known_Value (Ahi) then
goto Continue;
end if;
Ahiv := Expr_Value (Ahi);
-- The condition for doing the restriction is that the high bound
-- of the discriminant is greater than the low bound of the array,
-- and is also greater than the high bound of the base type index.
if Dhiv > Loval and then Dhiv > Ahiv then
-- We can reset the upper bound of the discriminant type to
-- whichever is larger, the low bound of the component, or
-- the high bound of the base type array index.
-- We build a subtype that is declared as
-- subtype Tnn is discr_type range discr_type'First .. max;
-- And insert this declaration into the tree. The type of the
-- discriminant is then reset to this more restricted subtype.
Tnn := Make_Defining_Identifier (Loc, New_Internal_Name ('T'));
Insert_Action (Declaration_Node (Rtype),
Make_Subtype_Declaration (Loc,
Defining_Identifier => Tnn,
Subtype_Indication =>
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Occurrence_Of (Dtyp, Loc),
Constraint =>
Make_Range_Constraint (Loc,
Range_Expression =>
Make_Range (Loc,
Low_Bound =>
Make_Attribute_Reference (Loc,
Attribute_Name => Name_First,
Prefix => New_Occurrence_Of (Dtyp, Loc)),
High_Bound =>
Make_Integer_Literal (Loc,
Intval => UI_Max (Loval, Ahiv)))))));
Set_Etype (Discr, Tnn);
end if;
<<Continue>>
Next_Component (Comp);
end loop;
end Adjust_Discriminants;
---------------------------
-- Build_Array_Init_Proc --
---------------------------
procedure Build_Array_Init_Proc (A_Type : Entity_Id; Nod : Node_Id) is
Loc : constant Source_Ptr := Sloc (Nod);
Comp_Type : constant Entity_Id := Component_Type (A_Type);
Index_List : List_Id;
Proc_Id : Entity_Id;
Body_Stmts : List_Id;
function Init_Component return List_Id;
-- Create one statement to initialize one array component, designated
-- by a full set of indices.
function Init_One_Dimension (N : Int) return List_Id;
-- Create loop to initialize one dimension of the array. The single
-- statement in the loop body initializes the inner dimensions if any,
-- or else the single component. Note that this procedure is called
-- recursively, with N being the dimension to be initialized. A call
-- with N greater than the number of dimensions simply generates the
-- component initialization, terminating the recursion.
--------------------
-- Init_Component --
--------------------
function Init_Component return List_Id is
Comp : Node_Id;
begin
Comp :=
Make_Indexed_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Expressions => Index_List);
if Needs_Simple_Initialization (Comp_Type) then
Set_Assignment_OK (Comp);
return New_List (
Make_Assignment_Statement (Loc,
Name => Comp,
Expression =>
Get_Simple_Init_Val
(Comp_Type, Loc, Component_Size (A_Type))));
else
return
Build_Initialization_Call (Loc, Comp, Comp_Type, True, A_Type);
end if;
end Init_Component;
------------------------
-- Init_One_Dimension --
------------------------
function Init_One_Dimension (N : Int) return List_Id is
Index : Entity_Id;
begin
-- If the component does not need initializing, then there is nothing
-- to do here, so we return a null body. This occurs when generating
-- the dummy Init_Proc needed for Initialize_Scalars processing.
if not Has_Non_Null_Base_Init_Proc (Comp_Type)
and then not Needs_Simple_Initialization (Comp_Type)
and then not Has_Task (Comp_Type)
then
return New_List (Make_Null_Statement (Loc));
-- If all dimensions dealt with, we simply initialize the component
elsif N > Number_Dimensions (A_Type) then
return Init_Component;
-- Here we generate the required loop
else
Index :=
Make_Defining_Identifier (Loc, New_External_Name ('J', N));
Append (New_Reference_To (Index, Loc), Index_List);
return New_List (
Make_Implicit_Loop_Statement (Nod,
Identifier => Empty,
Iteration_Scheme =>
Make_Iteration_Scheme (Loc,
Loop_Parameter_Specification =>
Make_Loop_Parameter_Specification (Loc,
Defining_Identifier => Index,
Discrete_Subtype_Definition =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Name_Range,
Expressions => New_List (
Make_Integer_Literal (Loc, N))))),
Statements => Init_One_Dimension (N + 1)));
end if;
end Init_One_Dimension;
-- Start of processing for Build_Array_Init_Proc
begin
if Suppress_Init_Proc (A_Type) then
return;
end if;
Index_List := New_List;
-- We need an initialization procedure if any of the following is true:
-- 1. The component type has an initialization procedure
-- 2. The component type needs simple initialization
-- 3. Tasks are present
-- 4. The type is marked as a publc entity
-- The reason for the public entity test is to deal properly with the
-- Initialize_Scalars pragma. This pragma can be set in the client and
-- not in the declaring package, this means the client will make a call
-- to the initialization procedure (because one of conditions 1-3 must
-- apply in this case), and we must generate a procedure (even if it is
-- null) to satisfy the call in this case.
-- Exception: do not build an array init_proc for a type whose root
-- type is Standard.String or Standard.Wide_[Wide_]String, since there
-- is no place to put the code, and in any case we handle initialization
-- of such types (in the Initialize_Scalars case, that's the only time
-- the issue arises) in a special manner anyway which does not need an
-- init_proc.
if Has_Non_Null_Base_Init_Proc (Comp_Type)
or else Needs_Simple_Initialization (Comp_Type)
or else Has_Task (Comp_Type)
or else (not Restriction_Active (No_Initialize_Scalars)
and then Is_Public (A_Type)
and then Root_Type (A_Type) /= Standard_String
and then Root_Type (A_Type) /= Standard_Wide_String
and then Root_Type (A_Type) /= Standard_Wide_Wide_String)
then
Proc_Id :=
Make_Defining_Identifier (Loc, Make_Init_Proc_Name (A_Type));
Body_Stmts := Init_One_Dimension (1);
Discard_Node (
Make_Subprogram_Body (Loc,
Specification =>
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Proc_Id,
Parameter_Specifications => Init_Formals (A_Type)),
Declarations => New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Body_Stmts)));
Set_Ekind (Proc_Id, E_Procedure);
Set_Is_Public (Proc_Id, Is_Public (A_Type));
Set_Is_Internal (Proc_Id);
Set_Has_Completion (Proc_Id);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Proc_Id);
end if;
-- Set inlined unless controlled stuff or tasks around, in which
-- case we do not want to inline, because nested stuff may cause
-- difficulties in interunit inlining, and furthermore there is
-- in any case no point in inlining such complex init procs.
if not Has_Task (Proc_Id)
and then not Controlled_Type (Proc_Id)
then
Set_Is_Inlined (Proc_Id);
end if;
-- Associate Init_Proc with type, and determine if the procedure
-- is null (happens because of the Initialize_Scalars pragma case,
-- where we have to generate a null procedure in case it is called
-- by a client with Initialize_Scalars set). Such procedures have
-- to be generated, but do not have to be called, so we mark them
-- as null to suppress the call.
Set_Init_Proc (A_Type, Proc_Id);
if List_Length (Body_Stmts) = 1
and then Nkind (First (Body_Stmts)) = N_Null_Statement
then
Set_Is_Null_Init_Proc (Proc_Id);
end if;
end if;
end Build_Array_Init_Proc;
-----------------------------
-- Build_Class_Wide_Master --
-----------------------------
procedure Build_Class_Wide_Master (T : Entity_Id) is
Loc : constant Source_Ptr := Sloc (T);
M_Id : Entity_Id;
Decl : Node_Id;
P : Node_Id;
Par : Node_Id;
begin
-- Nothing to do if there is no task hierarchy
if Restriction_Active (No_Task_Hierarchy) then
return;
end if;
-- Find declaration that created the access type: either a
-- type declaration, or an object declaration with an
-- access definition, in which case the type is anonymous.
if Is_Itype (T) then
P := Associated_Node_For_Itype (T);
else
P := Parent (T);
end if;
-- Nothing to do if we already built a master entity for this scope
if not Has_Master_Entity (Scope (T)) then
-- first build the master entity
-- _Master : constant Master_Id := Current_Master.all;
-- and insert it just before the current declaration
Decl :=
Make_Object_Declaration (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uMaster),
Constant_Present => True,
Object_Definition => New_Reference_To (Standard_Integer, Loc),
Expression =>
Make_Explicit_Dereference (Loc,
New_Reference_To (RTE (RE_Current_Master), Loc)));
Insert_Before (P, Decl);
Analyze (Decl);
Set_Has_Master_Entity (Scope (T));
-- Now mark the containing scope as a task master
Par := P;
while Nkind (Par) /= N_Compilation_Unit loop
Par := Parent (Par);
-- If we fall off the top, we are at the outer level, and the
-- environment task is our effective master, so nothing to mark.
if Nkind (Par) = N_Task_Body
or else Nkind (Par) = N_Block_Statement
or else Nkind (Par) = N_Subprogram_Body
then
Set_Is_Task_Master (Par, True);
exit;
end if;
end loop;
end if;
-- Now define the renaming of the master_id
M_Id :=
Make_Defining_Identifier (Loc,
New_External_Name (Chars (T), 'M'));
Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => M_Id,
Subtype_Mark => New_Reference_To (Standard_Integer, Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Insert_Before (P, Decl);
Analyze (Decl);
Set_Master_Id (T, M_Id);
exception
when RE_Not_Available =>
return;
end Build_Class_Wide_Master;
--------------------------------
-- Build_Discr_Checking_Funcs --
--------------------------------
procedure Build_Discr_Checking_Funcs (N : Node_Id) is
Rec_Id : Entity_Id;
Loc : Source_Ptr;
Enclosing_Func_Id : Entity_Id;
Sequence : Nat := 1;
Type_Def : Node_Id;
V : Node_Id;
function Build_Case_Statement
(Case_Id : Entity_Id;
Variant : Node_Id) return Node_Id;
-- Build a case statement containing only two alternatives. The
-- first alternative corresponds exactly to the discrete choices
-- given on the variant with contains the components that we are
-- generating the checks for. If the discriminant is one of these
-- return False. The second alternative is an OTHERS choice that
-- will return True indicating the discriminant did not match.
function Build_Dcheck_Function
(Case_Id : Entity_Id;
Variant : Node_Id) return Entity_Id;
-- Build the discriminant checking function for a given variant
procedure Build_Dcheck_Functions (Variant_Part_Node : Node_Id);
-- Builds the discriminant checking function for each variant of the
-- given variant part of the record type.
--------------------------
-- Build_Case_Statement --
--------------------------
function Build_Case_Statement
(Case_Id : Entity_Id;
Variant : Node_Id) return Node_Id
is
Alt_List : constant List_Id := New_List;
Actuals_List : List_Id;
Case_Node : Node_Id;
Case_Alt_Node : Node_Id;
Choice : Node_Id;
Choice_List : List_Id;
D : Entity_Id;
Return_Node : Node_Id;
begin
Case_Node := New_Node (N_Case_Statement, Loc);
-- Replace the discriminant which controls the variant, with the
-- name of the formal of the checking function.
Set_Expression (Case_Node,
Make_Identifier (Loc, Chars (Case_Id)));
Choice := First (Discrete_Choices (Variant));
if Nkind (Choice) = N_Others_Choice then
Choice_List := New_Copy_List (Others_Discrete_Choices (Choice));
else
Choice_List := New_Copy_List (Discrete_Choices (Variant));
end if;
if not Is_Empty_List (Choice_List) then
Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Loc);
Set_Discrete_Choices (Case_Alt_Node, Choice_List);
-- In case this is a nested variant, we need to return the result
-- of the discriminant checking function for the immediately
-- enclosing variant.
if Present (Enclosing_Func_Id) then
Actuals_List := New_List;
D := First_Discriminant (Rec_Id);
while Present (D) loop
Append (Make_Identifier (Loc, Chars (D)), Actuals_List);
Next_Discriminant (D);
end loop;
Return_Node :=
Make_Return_Statement (Loc,
Expression =>
Make_Function_Call (Loc,
Name =>
New_Reference_To (Enclosing_Func_Id, Loc),
Parameter_Associations =>
Actuals_List));
else
Return_Node :=
Make_Return_Statement (Loc,
Expression =>
New_Reference_To (Standard_False, Loc));
end if;
Set_Statements (Case_Alt_Node, New_List (Return_Node));
Append (Case_Alt_Node, Alt_List);
end if;
Case_Alt_Node := New_Node (N_Case_Statement_Alternative, Loc);
Choice_List := New_List (New_Node (N_Others_Choice, Loc));
Set_Discrete_Choices (Case_Alt_Node, Choice_List);
Return_Node :=
Make_Return_Statement (Loc,
Expression =>
New_Reference_To (Standard_True, Loc));
Set_Statements (Case_Alt_Node, New_List (Return_Node));
Append (Case_Alt_Node, Alt_List);
Set_Alternatives (Case_Node, Alt_List);
return Case_Node;
end Build_Case_Statement;
---------------------------
-- Build_Dcheck_Function --
---------------------------
function Build_Dcheck_Function
(Case_Id : Entity_Id;
Variant : Node_Id) return Entity_Id
is
Body_Node : Node_Id;
Func_Id : Entity_Id;
Parameter_List : List_Id;
Spec_Node : Node_Id;
begin
Body_Node := New_Node (N_Subprogram_Body, Loc);
Sequence := Sequence + 1;
Func_Id :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Rec_Id), 'D', Sequence));
Spec_Node := New_Node (N_Function_Specification, Loc);
Set_Defining_Unit_Name (Spec_Node, Func_Id);
Parameter_List := Build_Discriminant_Formals (Rec_Id, False);
Set_Parameter_Specifications (Spec_Node, Parameter_List);
Set_Result_Definition (Spec_Node,
New_Reference_To (Standard_Boolean, Loc));
Set_Specification (Body_Node, Spec_Node);
Set_Declarations (Body_Node, New_List);
Set_Handled_Statement_Sequence (Body_Node,
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Build_Case_Statement (Case_Id, Variant))));
Set_Ekind (Func_Id, E_Function);
Set_Mechanism (Func_Id, Default_Mechanism);
Set_Is_Inlined (Func_Id, True);
Set_Is_Pure (Func_Id, True);
Set_Is_Public (Func_Id, Is_Public (Rec_Id));
Set_Is_Internal (Func_Id, True);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Func_Id);
end if;
Analyze (Body_Node);
Append_Freeze_Action (Rec_Id, Body_Node);
Set_Dcheck_Function (Variant, Func_Id);
return Func_Id;
end Build_Dcheck_Function;
----------------------------
-- Build_Dcheck_Functions --
----------------------------
procedure Build_Dcheck_Functions (Variant_Part_Node : Node_Id) is
Component_List_Node : Node_Id;
Decl : Entity_Id;
Discr_Name : Entity_Id;
Func_Id : Entity_Id;
Variant : Node_Id;
Saved_Enclosing_Func_Id : Entity_Id;
begin
-- Build the discriminant checking function for each variant, label
-- all components of that variant with the function's name.
Discr_Name := Entity (Name (Variant_Part_Node));
Variant := First_Non_Pragma (Variants (Variant_Part_Node));
while Present (Variant) loop
Func_Id := Build_Dcheck_Function (Discr_Name, Variant);
Component_List_Node := Component_List (Variant);
if not Null_Present (Component_List_Node) then
Decl :=
First_Non_Pragma (Component_Items (Component_List_Node));
while Present (Decl) loop
Set_Discriminant_Checking_Func
(Defining_Identifier (Decl), Func_Id);
Next_Non_Pragma (Decl);
end loop;
if Present (Variant_Part (Component_List_Node)) then
Saved_Enclosing_Func_Id := Enclosing_Func_Id;
Enclosing_Func_Id := Func_Id;
Build_Dcheck_Functions (Variant_Part (Component_List_Node));
Enclosing_Func_Id := Saved_Enclosing_Func_Id;
end if;
end if;
Next_Non_Pragma (Variant);
end loop;
end Build_Dcheck_Functions;
-- Start of processing for Build_Discr_Checking_Funcs
begin
-- Only build if not done already
if not Discr_Check_Funcs_Built (N) then
Type_Def := Type_Definition (N);
if Nkind (Type_Def) = N_Record_Definition then
if No (Component_List (Type_Def)) then -- null record.
return;
else
V := Variant_Part (Component_List (Type_Def));
end if;
else pragma Assert (Nkind (Type_Def) = N_Derived_Type_Definition);
if No (Component_List (Record_Extension_Part (Type_Def))) then
return;
else
V := Variant_Part
(Component_List (Record_Extension_Part (Type_Def)));
end if;
end if;
Rec_Id := Defining_Identifier (N);
if Present (V) and then not Is_Unchecked_Union (Rec_Id) then
Loc := Sloc (N);
Enclosing_Func_Id := Empty;
Build_Dcheck_Functions (V);
end if;
Set_Discr_Check_Funcs_Built (N);
end if;
end Build_Discr_Checking_Funcs;
--------------------------------
-- Build_Discriminant_Formals --
--------------------------------
function Build_Discriminant_Formals
(Rec_Id : Entity_Id;
Use_Dl : Boolean) return List_Id
is
Loc : Source_Ptr := Sloc (Rec_Id);
Parameter_List : constant List_Id := New_List;
D : Entity_Id;
Formal : Entity_Id;
Param_Spec_Node : Node_Id;
begin
if Has_Discriminants (Rec_Id) then
D := First_Discriminant (Rec_Id);
while Present (D) loop
Loc := Sloc (D);
if Use_Dl then
Formal := Discriminal (D);
else
Formal := Make_Defining_Identifier (Loc, Chars (D));
end if;
Param_Spec_Node :=
Make_Parameter_Specification (Loc,
Defining_Identifier => Formal,
Parameter_Type =>
New_Reference_To (Etype (D), Loc));
Append (Param_Spec_Node, Parameter_List);
Next_Discriminant (D);
end loop;
end if;
return Parameter_List;
end Build_Discriminant_Formals;
-------------------------------
-- Build_Initialization_Call --
-------------------------------
-- References to a discriminant inside the record type declaration
-- can appear either in the subtype_indication to constrain a
-- record or an array, or as part of a larger expression given for
-- the initial value of a component. In both of these cases N appears
-- in the record initialization procedure and needs to be replaced by
-- the formal parameter of the initialization procedure which
-- corresponds to that discriminant.
-- In the example below, references to discriminants D1 and D2 in proc_1
-- are replaced by references to formals with the same name
-- (discriminals)
-- A similar replacement is done for calls to any record
-- initialization procedure for any components that are themselves
-- of a record type.
-- type R (D1, D2 : Integer) is record
-- X : Integer := F * D1;
-- Y : Integer := F * D2;
-- end record;
-- procedure proc_1 (Out_2 : out R; D1 : Integer; D2 : Integer) is
-- begin
-- Out_2.D1 := D1;
-- Out_2.D2 := D2;
-- Out_2.X := F * D1;
-- Out_2.Y := F * D2;
-- end;
function Build_Initialization_Call
(Loc : Source_Ptr;
Id_Ref : Node_Id;
Typ : Entity_Id;
In_Init_Proc : Boolean := False;
Enclos_Type : Entity_Id := Empty;
Discr_Map : Elist_Id := New_Elmt_List;
With_Default_Init : Boolean := False) return List_Id
is
First_Arg : Node_Id;
Args : List_Id;
Decls : List_Id;
Decl : Node_Id;
Discr : Entity_Id;
Arg : Node_Id;
Proc : constant Entity_Id := Base_Init_Proc (Typ);
Init_Type : constant Entity_Id := Etype (First_Formal (Proc));
Full_Init_Type : constant Entity_Id := Underlying_Type (Init_Type);
Res : constant List_Id := New_List;
Full_Type : Entity_Id := Typ;
Controller_Typ : Entity_Id;
begin
-- Nothing to do if the Init_Proc is null, unless Initialize_Scalars
-- is active (in which case we make the call anyway, since in the
-- actual compiled client it may be non null).
if Is_Null_Init_Proc (Proc) and then not Init_Or_Norm_Scalars then
return Empty_List;
end if;
-- Go to full view if private type. In the case of successive
-- private derivations, this can require more than one step.
while Is_Private_Type (Full_Type)
and then Present (Full_View (Full_Type))
loop
Full_Type := Full_View (Full_Type);
end loop;
-- If Typ is derived, the procedure is the initialization procedure for
-- the root type. Wrap the argument in an conversion to make it type
-- honest. Actually it isn't quite type honest, because there can be
-- conflicts of views in the private type case. That is why we set
-- Conversion_OK in the conversion node.
if (Is_Record_Type (Typ)
or else Is_Array_Type (Typ)
or else Is_Private_Type (Typ))
and then Init_Type /= Base_Type (Typ)
then
First_Arg := OK_Convert_To (Etype (Init_Type), Id_Ref);
Set_Etype (First_Arg, Init_Type);
else
First_Arg := Id_Ref;
end if;
Args := New_List (Convert_Concurrent (First_Arg, Typ));
-- In the tasks case, add _Master as the value of the _Master parameter
-- and _Chain as the value of the _Chain parameter. At the outer level,
-- these will be variables holding the corresponding values obtained
-- from GNARL. At inner levels, they will be the parameters passed down
-- through the outer routines.
if Has_Task (Full_Type) then
if Restriction_Active (No_Task_Hierarchy) then
-- See comments in System.Tasking.Initialization.Init_RTS
-- for the value 3 (should be rtsfindable constant ???)
Append_To (Args, Make_Integer_Literal (Loc, 3));
else
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
end if;
Append_To (Args, Make_Identifier (Loc, Name_uChain));
-- Ada 2005 (AI-287): In case of default initialized components
-- with tasks, we generate a null string actual parameter.
-- This is just a workaround that must be improved later???
if With_Default_Init then
Append_To (Args,
Make_String_Literal (Loc,
Strval => ""));
else
Decls := Build_Task_Image_Decls (Loc, Id_Ref, Enclos_Type);
Decl := Last (Decls);
Append_To (Args,
New_Occurrence_Of (Defining_Identifier (Decl), Loc));
Append_List (Decls, Res);
end if;
else
Decls := No_List;
Decl := Empty;
end if;
-- Add discriminant values if discriminants are present
if Has_Discriminants (Full_Init_Type) then
Discr := First_Discriminant (Full_Init_Type);
while Present (Discr) loop
-- If this is a discriminated concurrent type, the init_proc
-- for the corresponding record is being called. Use that
-- type directly to find the discriminant value, to handle
-- properly intervening renamed discriminants.
declare
T : Entity_Id := Full_Type;
begin
if Is_Protected_Type (T) then
T := Corresponding_Record_Type (T);
elsif Is_Private_Type (T)
and then Present (Underlying_Full_View (T))
and then Is_Protected_Type (Underlying_Full_View (T))
then
T := Corresponding_Record_Type (Underlying_Full_View (T));
end if;
Arg :=
Get_Discriminant_Value (
Discr,
T,
Discriminant_Constraint (Full_Type));
end;
if In_Init_Proc then
-- Replace any possible references to the discriminant in the
-- call to the record initialization procedure with references
-- to the appropriate formal parameter.
if Nkind (Arg) = N_Identifier
and then Ekind (Entity (Arg)) = E_Discriminant
then
Arg := New_Reference_To (Discriminal (Entity (Arg)), Loc);
-- Case of access discriminants. We replace the reference
-- to the type by a reference to the actual object
elsif Nkind (Arg) = N_Attribute_Reference
and then Is_Access_Type (Etype (Arg))
and then Is_Entity_Name (Prefix (Arg))
and then Is_Type (Entity (Prefix (Arg)))
then
Arg :=
Make_Attribute_Reference (Loc,
Prefix => New_Copy (Prefix (Id_Ref)),
Attribute_Name => Name_Unrestricted_Access);
-- Otherwise make a copy of the default expression. Note
-- that we use the current Sloc for this, because we do not
-- want the call to appear to be at the declaration point.
-- Within the expression, replace discriminants with their
-- discriminals.
else
Arg :=
New_Copy_Tree (Arg, Map => Discr_Map, New_Sloc => Loc);
end if;
else
if Is_Constrained (Full_Type) then
Arg := Duplicate_Subexpr_No_Checks (Arg);
else
-- The constraints come from the discriminant default
-- exps, they must be reevaluated, so we use New_Copy_Tree
-- but we ensure the proper Sloc (for any embedded calls).
Arg := New_Copy_Tree (Arg, New_Sloc => Loc);
end if;
end if;
-- Ada 2005 (AI-287) In case of default initialized components,
-- we need to generate the corresponding selected component node
-- to access the discriminant value. In other cases this is not
-- required because we are inside the init proc and we use the
-- corresponding formal.
if With_Default_Init
and then Nkind (Id_Ref) = N_Selected_Component
and then Nkind (Arg) = N_Identifier
then
Append_To (Args,
Make_Selected_Component (Loc,
Prefix => New_Copy_Tree (Prefix (Id_Ref)),
Selector_Name => Arg));
else
Append_To (Args, Arg);
end if;
Next_Discriminant (Discr);
end loop;
end if;
-- If this is a call to initialize the parent component of a derived
-- tagged type, indicate that the tag should not be set in the parent.
if Is_Tagged_Type (Full_Init_Type)
and then not Is_CPP_Class (Full_Init_Type)
and then Nkind (Id_Ref) = N_Selected_Component
and then Chars (Selector_Name (Id_Ref)) = Name_uParent
then
Append_To (Args, New_Occurrence_Of (Standard_False, Loc));
end if;
Append_To (Res,
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Proc, Loc),
Parameter_Associations => Args));
if Controlled_Type (Typ)
and then Nkind (Id_Ref) = N_Selected_Component
then
if Chars (Selector_Name (Id_Ref)) /= Name_uParent then
Append_List_To (Res,
Make_Init_Call (
Ref => New_Copy_Tree (First_Arg),
Typ => Typ,
Flist_Ref =>
Find_Final_List (Typ, New_Copy_Tree (First_Arg)),
With_Attach => Make_Integer_Literal (Loc, 1)));
-- If the enclosing type is an extension with new controlled
-- components, it has his own record controller. If the parent
-- also had a record controller, attach it to the new one.
-- Build_Init_Statements relies on the fact that in this specific
-- case the last statement of the result is the attach call to
-- the controller. If this is changed, it must be synchronized.
elsif Present (Enclos_Type)
and then Has_New_Controlled_Component (Enclos_Type)
and then Has_Controlled_Component (Typ)
then
if Is_Return_By_Reference_Type (Typ) then
Controller_Typ := RTE (RE_Limited_Record_Controller);
else
Controller_Typ := RTE (RE_Record_Controller);
end if;
Append_List_To (Res,
Make_Init_Call (
Ref =>
Make_Selected_Component (Loc,
Prefix => New_Copy_Tree (First_Arg),
Selector_Name => Make_Identifier (Loc, Name_uController)),
Typ => Controller_Typ,
Flist_Ref => Find_Final_List (Typ, New_Copy_Tree (First_Arg)),
With_Attach => Make_Integer_Literal (Loc, 1)));
end if;
end if;
return Res;
exception
when RE_Not_Available =>
return Empty_List;
end Build_Initialization_Call;
---------------------------
-- Build_Master_Renaming --
---------------------------
procedure Build_Master_Renaming (N : Node_Id; T : Entity_Id) is
Loc : constant Source_Ptr := Sloc (N);
M_Id : Entity_Id;
Decl : Node_Id;
begin
-- Nothing to do if there is no task hierarchy
if Restriction_Active (No_Task_Hierarchy) then
return;
end if;
M_Id :=
Make_Defining_Identifier (Loc,
New_External_Name (Chars (T), 'M'));
Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => M_Id,
Subtype_Mark => New_Reference_To (RTE (RE_Master_Id), Loc),
Name => Make_Identifier (Loc, Name_uMaster));
Insert_Before (N, Decl);
Analyze (Decl);
Set_Master_Id (T, M_Id);
exception
when RE_Not_Available =>
return;
end Build_Master_Renaming;
----------------------------
-- Build_Record_Init_Proc --
----------------------------
procedure Build_Record_Init_Proc (N : Node_Id; Pe : Entity_Id) is
Loc : Source_Ptr := Sloc (N);
Discr_Map : constant Elist_Id := New_Elmt_List;
Proc_Id : Entity_Id;
Rec_Type : Entity_Id;
Set_Tag : Entity_Id := Empty;
function Build_Assignment (Id : Entity_Id; N : Node_Id) return List_Id;
-- Build a assignment statement node which assigns to record
-- component its default expression if defined. The left hand side
-- of the assignment is marked Assignment_OK so that initialization
-- of limited private records works correctly, Return also the
-- adjustment call for controlled objects
procedure Build_Discriminant_Assignments (Statement_List : List_Id);
-- If the record has discriminants, adds assignment statements to
-- statement list to initialize the discriminant values from the
-- arguments of the initialization procedure.
function Build_Init_Statements (Comp_List : Node_Id) return List_Id;
-- Build a list representing a sequence of statements which initialize
-- components of the given component list. This may involve building
-- case statements for the variant parts.
function Build_Init_Call_Thru (Parameters : List_Id) return List_Id;
-- Given a non-tagged type-derivation that declares discriminants,
-- such as
--
-- type R (R1, R2 : Integer) is record ... end record;
--
-- type D (D1 : Integer) is new R (1, D1);
--
-- we make the _init_proc of D be
--
-- procedure _init_proc(X : D; D1 : Integer) is
-- begin
-- _init_proc( R(X), 1, D1);
-- end _init_proc;
--
-- This function builds the call statement in this _init_proc.
procedure Build_Init_Procedure;
-- Build the tree corresponding to the procedure specification and body
-- of the initialization procedure (by calling all the preceding
-- auxiliary routines), and install it as the _init TSS.
procedure Build_Offset_To_Top_Functions;
-- Ada 2005 (AI-251): Build the tree corresponding to the procedure spec
-- and body of the Offset_To_Top function that is generated when the
-- parent of a type with discriminants has secondary dispatch tables.
procedure Build_Record_Checks (S : Node_Id; Check_List : List_Id);
-- Add range checks to components of disciminated records. S is a
-- subtype indication of a record component. Check_List is a list
-- to which the check actions are appended.
function Component_Needs_Simple_Initialization
(T : Entity_Id) return Boolean;
-- Determines if a component needs simple initialization, given its type
-- T. This is the same as Needs_Simple_Initialization except for the
-- following difference: the types Tag, Interface_Tag, and Vtable_Ptr
-- which are access types which would normally require simple
-- initialization to null, do not require initialization as components,
-- since they are explicitly initialized by other means.
procedure Constrain_Array
(SI : Node_Id;
Check_List : List_Id);
-- Called from Build_Record_Checks.
-- Apply a list of index constraints to an unconstrained array type.
-- The first parameter is the entity for the resulting subtype.
-- Check_List is a list to which the check actions are appended.
procedure Constrain_Index
(Index : Node_Id;
S : Node_Id;
Check_List : List_Id);
-- Called from Build_Record_Checks.
-- Process an index constraint in a constrained array declaration.
-- The constraint can be a subtype name, or a range with or without
-- an explicit subtype mark. The index is the corresponding index of the
-- unconstrained array. S is the range expression. Check_List is a list
-- to which the check actions are appended.
function Parent_Subtype_Renaming_Discrims return Boolean;
-- Returns True for base types N that rename discriminants, else False
function Requires_Init_Proc (Rec_Id : Entity_Id) return Boolean;
-- Determines whether a record initialization procedure needs to be
-- generated for the given record type.
----------------------
-- Build_Assignment --
----------------------
function Build_Assignment (Id : Entity_Id; N : Node_Id) return List_Id is
Exp : Node_Id := N;
Lhs : Node_Id;
Typ : constant Entity_Id := Underlying_Type (Etype (Id));
Kind : Node_Kind := Nkind (N);
Res : List_Id;
begin
Loc := Sloc (N);
Lhs :=
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => New_Occurrence_Of (Id, Loc));
Set_Assignment_OK (Lhs);
-- Case of an access attribute applied to the current instance.
-- Replace the reference to the type by a reference to the actual
-- object. (Note that this handles the case of the top level of
-- the expression being given by such an attribute, but does not
-- cover uses nested within an initial value expression. Nested
-- uses are unlikely to occur in practice, but are theoretically
-- possible. It is not clear how to handle them without fully
-- traversing the expression. ???
if Kind = N_Attribute_Reference
and then (Attribute_Name (N) = Name_Unchecked_Access
or else
Attribute_Name (N) = Name_Unrestricted_Access)
and then Is_Entity_Name (Prefix (N))
and then Is_Type (Entity (Prefix (N)))
and then Entity (Prefix (N)) = Rec_Type
then
Exp :=
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Name_Unrestricted_Access);
end if;
-- Ada 2005 (AI-231): Add the run-time check if required
if Ada_Version >= Ada_05
and then Can_Never_Be_Null (Etype (Id)) -- Lhs
then
if Nkind (Exp) = N_Null then
return New_List (
Make_Raise_Constraint_Error (Sloc (Exp),
Reason => CE_Null_Not_Allowed));
elsif Present (Etype (Exp))
and then not Can_Never_Be_Null (Etype (Exp))
then
Install_Null_Excluding_Check (Exp);
end if;
end if;
-- Take a copy of Exp to ensure that later copies of this
-- component_declaration in derived types see the original tree,
-- not a node rewritten during expansion of the init_proc.
Exp := New_Copy_Tree (Exp);
Res := New_List (
Make_Assignment_Statement (Loc,
Name => Lhs,
Expression => Exp));
Set_No_Ctrl_Actions (First (Res));
-- Adjust the tag if tagged (because of possible view conversions).
-- Suppress the tag adjustment when Java_VM because JVM tags are
-- represented implicitly in objects.
if Is_Tagged_Type (Typ) and then not Java_VM then
Append_To (Res,
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => New_Copy_Tree (Lhs),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ), Loc)),
Expression =>
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To
(Node (First_Elmt (Access_Disp_Table (Typ))), Loc))));
end if;
-- Adjust the component if controlled except if it is an
-- aggregate that will be expanded inline
if Kind = N_Qualified_Expression then
Kind := Nkind (Expression (N));
end if;
if Controlled_Type (Typ)
and then not (Kind = N_Aggregate or else Kind = N_Extension_Aggregate)
then
Append_List_To (Res,
Make_Adjust_Call (
Ref => New_Copy_Tree (Lhs),
Typ => Etype (Id),
Flist_Ref =>
Find_Final_List (Etype (Id), New_Copy_Tree (Lhs)),
With_Attach => Make_Integer_Literal (Loc, 1)));
end if;
return Res;
exception
when RE_Not_Available =>
return Empty_List;
end Build_Assignment;
------------------------------------
-- Build_Discriminant_Assignments --
------------------------------------
procedure Build_Discriminant_Assignments (Statement_List : List_Id) is
D : Entity_Id;
Is_Tagged : constant Boolean := Is_Tagged_Type (Rec_Type);
begin
if Has_Discriminants (Rec_Type)
and then not Is_Unchecked_Union (Rec_Type)
then
D := First_Discriminant (Rec_Type);
while Present (D) loop
-- Don't generate the assignment for discriminants in derived
-- tagged types if the discriminant is a renaming of some
-- ancestor discriminant. This initialization will be done
-- when initializing the _parent field of the derived record.
if Is_Tagged and then
Present (Corresponding_Discriminant (D))
then
null;
else
Loc := Sloc (D);
Append_List_To (Statement_List,
Build_Assignment (D,
New_Reference_To (Discriminal (D), Loc)));
end if;
Next_Discriminant (D);
end loop;
end if;
end Build_Discriminant_Assignments;
--------------------------
-- Build_Init_Call_Thru --
--------------------------
function Build_Init_Call_Thru (Parameters : List_Id) return List_Id is
Parent_Proc : constant Entity_Id :=
Base_Init_Proc (Etype (Rec_Type));
Parent_Type : constant Entity_Id :=
Etype (First_Formal (Parent_Proc));
Uparent_Type : constant Entity_Id :=
Underlying_Type (Parent_Type);
First_Discr_Param : Node_Id;
Parent_Discr : Entity_Id;
First_Arg : Node_Id;
Args : List_Id;
Arg : Node_Id;
Res : List_Id;
begin
-- First argument (_Init) is the object to be initialized.
-- ??? not sure where to get a reasonable Loc for First_Arg
First_Arg :=
OK_Convert_To (Parent_Type,
New_Reference_To (Defining_Identifier (First (Parameters)), Loc));
Set_Etype (First_Arg, Parent_Type);
Args := New_List (Convert_Concurrent (First_Arg, Rec_Type));
-- In the tasks case,
-- add _Master as the value of the _Master parameter
-- add _Chain as the value of the _Chain parameter.
-- add _Task_Name as the value of the _Task_Name parameter.
-- At the outer level, these will be variables holding the
-- corresponding values obtained from GNARL or the expander.
--
-- At inner levels, they will be the parameters passed down through
-- the outer routines.
First_Discr_Param := Next (First (Parameters));
if Has_Task (Rec_Type) then
if Restriction_Active (No_Task_Hierarchy) then
-- See comments in System.Tasking.Initialization.Init_RTS
-- for the value 3.
Append_To (Args, Make_Integer_Literal (Loc, 3));
else
Append_To (Args, Make_Identifier (Loc, Name_uMaster));
end if;
Append_To (Args, Make_Identifier (Loc, Name_uChain));
Append_To (Args, Make_Identifier (Loc, Name_uTask_Name));
First_Discr_Param := Next (Next (Next (First_Discr_Param)));
end if;
-- Append discriminant values
if Has_Discriminants (Uparent_Type) then
pragma Assert (not Is_Tagged_Type (Uparent_Type));
Parent_Discr := First_Discriminant (Uparent_Type);
while Present (Parent_Discr) loop
-- Get the initial value for this discriminant
-- ??? needs to be cleaned up to use parent_Discr_Constr
-- directly.
declare
Discr_Value : Elmt_Id :=
First_Elmt
(Stored_Constraint (Rec_Type));
Discr : Entity_Id :=
First_Stored_Discriminant (Uparent_Type);
begin
while Original_Record_Component (Parent_Discr) /= Discr loop
Next_Stored_Discriminant (Discr);
Next_Elmt (Discr_Value);
end loop;
Arg := Node (Discr_Value);
end;
-- Append it to the list
if Nkind (Arg) = N_Identifier
and then Ekind (Entity (Arg)) = E_Discriminant
then
Append_To (Args,
New_Reference_To (Discriminal (Entity (Arg)), Loc));
-- Case of access discriminants. We replace the reference
-- to the type by a reference to the actual object
-- ??? why is this code deleted without comment
-- elsif Nkind (Arg) = N_Attribute_Reference
-- and then Is_Entity_Name (Prefix (Arg))
-- and then Is_Type (Entity (Prefix (Arg)))
-- then
-- Append_To (Args,
-- Make_Attribute_Reference (Loc,
-- Prefix => New_Copy (Prefix (Id_Ref)),
-- Attribute_Name => Name_Unrestricted_Access));
else
Append_To (Args, New_Copy (Arg));
end if;
Next_Discriminant (Parent_Discr);
end loop;
end if;
Res :=
New_List (
Make_Procedure_Call_Statement (Loc,
Name => New_Occurrence_Of (Parent_Proc, Loc),
Parameter_Associations => Args));
return Res;
end Build_Init_Call_Thru;
-----------------------------------
-- Build_Offset_To_Top_Functions --
-----------------------------------
procedure Build_Offset_To_Top_Functions is
ADT : Elmt_Id;
Body_Node : Node_Id;
Func_Id : Entity_Id;
Spec_Node : Node_Id;
E : Entity_Id;
procedure Build_Offset_To_Top_Internal (Typ : Entity_Id);
-- Internal subprogram used to recursively traverse all the ancestors
----------------------------------
-- Build_Offset_To_Top_Internal --
----------------------------------
procedure Build_Offset_To_Top_Internal (Typ : Entity_Id) is
begin
-- Climb to the ancestor (if any) handling private types
if Present (Full_View (Etype (Typ))) then
if Full_View (Etype (Typ)) /= Typ then
Build_Offset_To_Top_Internal (Full_View (Etype (Typ)));
end if;
elsif Etype (Typ) /= Typ then
Build_Offset_To_Top_Internal (Etype (Typ));
end if;
if Present (Abstract_Interfaces (Typ))
and then not Is_Empty_Elmt_List (Abstract_Interfaces (Typ))
then
E := First_Entity (Typ);
while Present (E) loop
if Is_Tag (E)
and then Chars (E) /= Name_uTag
then
if Typ = Rec_Type then
Body_Node := New_Node (N_Subprogram_Body, Loc);
Func_Id := Make_Defining_Identifier (Loc,
New_Internal_Name ('F'));
Set_DT_Offset_To_Top_Func (E, Func_Id);
Spec_Node := New_Node (N_Function_Specification, Loc);
Set_Defining_Unit_Name (Spec_Node, Func_Id);
Set_Parameter_Specifications (Spec_Node, New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uO),
In_Present => True,
Parameter_Type => New_Reference_To (Typ, Loc))));
Set_Result_Definition (Spec_Node,
New_Reference_To (RTE (RE_Storage_Offset), Loc));
Set_Specification (Body_Node, Spec_Node);
Set_Declarations (Body_Node, New_List);
Set_Handled_Statement_Sequence (Body_Node,
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Make_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc,
Name_uO),
Selector_Name => New_Reference_To
(E, Loc)),
Attribute_Name => Name_Position)))));
Set_Ekind (Func_Id, E_Function);
Set_Mechanism (Func_Id, Default_Mechanism);
Set_Is_Internal (Func_Id, True);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Func_Id);
end if;
Analyze (Body_Node);
Append_Freeze_Action (Rec_Type, Body_Node);
end if;
Next_Elmt (ADT);
end if;
Next_Entity (E);
end loop;
end if;
end Build_Offset_To_Top_Internal;
-- Start of processing for Build_Offset_To_Top_Functions
begin
if Etype (Rec_Type) = Rec_Type
or else not Has_Discriminants (Etype (Rec_Type))
or else No (Abstract_Interfaces (Rec_Type))
or else Is_Empty_Elmt_List (Abstract_Interfaces (Rec_Type))
then
return;
end if;
-- Skip the first _Tag, which is the main tag of the
-- tagged type. Following tags correspond with abstract
-- interfaces.
ADT := Next_Elmt (First_Elmt (Access_Disp_Table (Rec_Type)));
-- Handle private types
if Present (Full_View (Rec_Type)) then
Build_Offset_To_Top_Internal (Full_View (Rec_Type));
else
Build_Offset_To_Top_Internal (Rec_Type);
end if;
end Build_Offset_To_Top_Functions;
--------------------------
-- Build_Init_Procedure --
--------------------------
procedure Build_Init_Procedure is
Body_Node : Node_Id;
Handled_Stmt_Node : Node_Id;
Parameters : List_Id;
Proc_Spec_Node : Node_Id;
Body_Stmts : List_Id;
Record_Extension_Node : Node_Id;
Init_Tag : Node_Id;
procedure Init_Secondary_Tags (Typ : Entity_Id);
-- Ada 2005 (AI-251): Initialize the tags of all the secondary
-- tables associated with abstract interface types
-------------------------
-- Init_Secondary_Tags --
-------------------------
procedure Init_Secondary_Tags (Typ : Entity_Id) is
ADT : Elmt_Id;
procedure Init_Secondary_Tags_Internal (Typ : Entity_Id);
-- Internal subprogram used to recursively climb to the root type
----------------------------------
-- Init_Secondary_Tags_Internal --
----------------------------------
procedure Init_Secondary_Tags_Internal (Typ : Entity_Id) is
Aux_N : Node_Id;
E : Entity_Id;
Iface : Entity_Id;
Prev_E : Entity_Id;
begin
-- Climb to the ancestor (if any) handling private types
if Present (Full_View (Etype (Typ))) then
if Full_View (Etype (Typ)) /= Typ then
Init_Secondary_Tags_Internal (Full_View (Etype (Typ)));
end if;
elsif Etype (Typ) /= Typ then
Init_Secondary_Tags_Internal (Etype (Typ));
end if;
if Present (Abstract_Interfaces (Typ))
and then not Is_Empty_Elmt_List (Abstract_Interfaces (Typ))
then
E := First_Entity (Typ);
while Present (E) loop
if Is_Tag (E)
and then Chars (E) /= Name_uTag
then
Aux_N := Node (ADT);
pragma Assert (Present (Aux_N));
Iface := Find_Interface (Typ, E);
-- Initialize the pointer to the secondary DT
-- associated with the interface
Append_To (Body_Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
New_Reference_To (E, Loc)),
Expression =>
New_Reference_To (Aux_N, Loc)));
-- Issue error if Set_Offset_To_Top is not available
-- in a configurable run-time environment.
if not RTE_Available (RE_Set_Offset_To_Top) then
Error_Msg_CRT ("abstract interface types", Typ);
return;
end if;
-- We generate a different call to Set_Offset_To_Top
-- when the parent of the type has discriminants
if Typ /= Etype (Typ)
and then Has_Discriminants (Etype (Typ))
then
pragma Assert (Present (DT_Offset_To_Top_Func (E)));
-- Generate:
-- Set_Offset_To_Top
-- (This => Init,
-- Interface_T => Iface'Tag,
-- Is_Constant => False,
-- Offset_Value => n,
-- Offset_Func => Fn'Address)
Append_To (Body_Stmts,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To
(RTE (RE_Set_Offset_To_Top), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc,
Name_uInit),
Attribute_Name => Name_Address),
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To
(Node (First_Elmt
(Access_Disp_Table (Iface))),
Loc)),
New_Occurrence_Of (Standard_False, Loc),
Unchecked_Convert_To (RTE (RE_Storage_Offset),
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc,
Name_uInit),
Selector_Name => New_Reference_To
(E, Loc)),
Attribute_Name => Name_Position)),
Unchecked_Convert_To (RTE (RE_Address),
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To
(DT_Offset_To_Top_Func (E),
Loc),
Attribute_Name =>
Name_Address)))));
-- In this case the next component stores the value
-- of the offset to the top
Prev_E := E;
Next_Entity (E);
pragma Assert (Present (E));
Append_To (Body_Stmts,
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc,
Name_uInit),
Selector_Name =>
New_Reference_To (E, Loc)),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc,
Name_uInit),
Selector_Name => New_Reference_To
(Prev_E, Loc)),
Attribute_Name => Name_Position)));
-- Normal case: No discriminants in the parent type
else
-- Generate:
-- Set_Offset_To_Top
-- (This => Init,
-- Interface_T => Iface'Tag,
-- Is_Constant => True,
-- Offset_Value => n,
-- Offset_Func => null);
Append_To (Body_Stmts,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To
(RTE (RE_Set_Offset_To_Top), Loc),
Parameter_Associations => New_List (
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Attribute_Name => Name_Address),
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To
(Node (First_Elmt
(Access_Disp_Table (Iface))),
Loc)),
New_Occurrence_Of (Standard_True, Loc),
Unchecked_Convert_To (RTE (RE_Storage_Offset),
Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc,
Name_uInit),
Selector_Name => New_Reference_To
(E, Loc)),
Attribute_Name => Name_Position)),
New_Reference_To
(RTE (RE_Null_Address), Loc))));
end if;
Next_Elmt (ADT);
end if;
Next_Entity (E);
end loop;
end if;
end Init_Secondary_Tags_Internal;
-- Start of processing for Init_Secondary_Tags
begin
-- Skip the first _Tag, which is the main tag of the
-- tagged type. Following tags correspond with abstract
-- interfaces.
ADT := Next_Elmt (First_Elmt (Access_Disp_Table (Typ)));
-- Handle private types
if Present (Full_View (Typ)) then
Init_Secondary_Tags_Internal (Full_View (Typ));
else
Init_Secondary_Tags_Internal (Typ);
end if;
end Init_Secondary_Tags;
-- Start of processing for Build_Init_Procedure
begin
Body_Stmts := New_List;
Body_Node := New_Node (N_Subprogram_Body, Loc);
Proc_Id :=
Make_Defining_Identifier (Loc,
Chars => Make_Init_Proc_Name (Rec_Type));
Set_Ekind (Proc_Id, E_Procedure);
Proc_Spec_Node := New_Node (N_Procedure_Specification, Loc);
Set_Defining_Unit_Name (Proc_Spec_Node, Proc_Id);
Parameters := Init_Formals (Rec_Type);
Append_List_To (Parameters,
Build_Discriminant_Formals (Rec_Type, True));
-- For tagged types, we add a flag to indicate whether the routine
-- is called to initialize a parent component in the init_proc of
-- a type extension. If the flag is false, we do not set the tag
-- because it has been set already in the extension.
if Is_Tagged_Type (Rec_Type)
and then not Is_CPP_Class (Rec_Type)
then
Set_Tag :=
Make_Defining_Identifier (Loc, New_Internal_Name ('P'));
Append_To (Parameters,
Make_Parameter_Specification (Loc,
Defining_Identifier => Set_Tag,
Parameter_Type => New_Occurrence_Of (Standard_Boolean, Loc),
Expression => New_Occurrence_Of (Standard_True, Loc)));
end if;
Set_Parameter_Specifications (Proc_Spec_Node, Parameters);
Set_Specification (Body_Node, Proc_Spec_Node);
Set_Declarations (Body_Node, New_List);
if Parent_Subtype_Renaming_Discrims then
-- N is a Derived_Type_Definition that renames the parameters
-- of the ancestor type. We initialize it by expanding our
-- discriminants and call the ancestor _init_proc with a
-- type-converted object
Append_List_To (Body_Stmts,
Build_Init_Call_Thru (Parameters));
elsif Nkind (Type_Definition (N)) = N_Record_Definition then
Build_Discriminant_Assignments (Body_Stmts);
if not Null_Present (Type_Definition (N)) then
Append_List_To (Body_Stmts,
Build_Init_Statements (
Component_List (Type_Definition (N))));
end if;
else
-- N is a Derived_Type_Definition with a possible non-empty
-- extension. The initialization of a type extension consists
-- in the initialization of the components in the extension.
Build_Discriminant_Assignments (Body_Stmts);
Record_Extension_Node :=
Record_Extension_Part (Type_Definition (N));
if not Null_Present (Record_Extension_Node) then
declare
Stmts : constant List_Id :=
Build_Init_Statements (
Component_List (Record_Extension_Node));
begin
-- The parent field must be initialized first because
-- the offset of the new discriminants may depend on it
Prepend_To (Body_Stmts, Remove_Head (Stmts));
Append_List_To (Body_Stmts, Stmts);
end;
end if;
end if;
-- Add here the assignment to instantiate the Tag
-- The assignement corresponds to the code:
-- _Init._Tag := Typ'Tag;
-- Suppress the tag assignment when Java_VM because JVM tags are
-- represented implicitly in objects. It is also suppressed in
-- case of CPP_Class types because in this case the tag is
-- initialized in the C++ side.
if Is_Tagged_Type (Rec_Type)
and then not Is_CPP_Class (Rec_Type)
and then not Java_VM
then
Init_Tag :=
Make_Assignment_Statement (Loc,
Name =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
New_Reference_To (First_Tag_Component (Rec_Type), Loc)),
Expression =>
New_Reference_To
(Node (First_Elmt (Access_Disp_Table (Rec_Type))), Loc));
-- The tag must be inserted before the assignments to other
-- components, because the initial value of the component may
-- depend ot the tag (eg. through a dispatching operation on
-- an access to the current type). The tag assignment is not done
-- when initializing the parent component of a type extension,
-- because in that case the tag is set in the extension.
-- Extensions of imported C++ classes add a final complication,
-- because we cannot inhibit tag setting in the constructor for
-- the parent. In that case we insert the tag initialization
-- after the calls to initialize the parent.
Init_Tag :=
Make_If_Statement (Loc,
Condition => New_Occurrence_Of (Set_Tag, Loc),
Then_Statements => New_List (Init_Tag));
if not Is_CPP_Class (Etype (Rec_Type)) then
Prepend_To (Body_Stmts, Init_Tag);
-- Ada 2005 (AI-251): Initialization of all the tags
-- corresponding with abstract interfaces
if Ada_Version >= Ada_05
and then not Is_Interface (Rec_Type)
then
Init_Secondary_Tags (Rec_Type);
end if;
else
declare
Nod : Node_Id := First (Body_Stmts);
begin
-- We assume the first init_proc call is for the parent
while Present (Next (Nod))
and then (Nkind (Nod) /= N_Procedure_Call_Statement
or else not Is_Init_Proc (Name (Nod)))
loop
Nod := Next (Nod);
end loop;
Insert_After (Nod, Init_Tag);
end;
end if;
end if;
Handled_Stmt_Node := New_Node (N_Handled_Sequence_Of_Statements, Loc);
Set_Statements (Handled_Stmt_Node, Body_Stmts);
Set_Exception_Handlers (Handled_Stmt_Node, No_List);
Set_Handled_Statement_Sequence (Body_Node, Handled_Stmt_Node);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Proc_Id);
end if;
-- Associate Init_Proc with type, and determine if the procedure
-- is null (happens because of the Initialize_Scalars pragma case,
-- where we have to generate a null procedure in case it is called
-- by a client with Initialize_Scalars set). Such procedures have
-- to be generated, but do not have to be called, so we mark them
-- as null to suppress the call.
Set_Init_Proc (Rec_Type, Proc_Id);
if List_Length (Body_Stmts) = 1
and then Nkind (First (Body_Stmts)) = N_Null_Statement
then
Set_Is_Null_Init_Proc (Proc_Id);
end if;
end Build_Init_Procedure;
---------------------------
-- Build_Init_Statements --
---------------------------
function Build_Init_Statements (Comp_List : Node_Id) return List_Id is
Check_List : constant List_Id := New_List;
Alt_List : List_Id;
Statement_List : List_Id;
Stmts : List_Id;
Per_Object_Constraint_Components : Boolean;
Decl : Node_Id;
Variant : Node_Id;
Id : Entity_Id;
Typ : Entity_Id;
function Has_Access_Constraint (E : Entity_Id) return Boolean;
-- Components with access discriminants that depend on the current
-- instance must be initialized after all other components.
---------------------------
-- Has_Access_Constraint --
---------------------------
function Has_Access_Constraint (E : Entity_Id) return Boolean is
Disc : Entity_Id;
T : constant Entity_Id := Etype (E);
begin
if Has_Per_Object_Constraint (E)
and then Has_Discriminants (T)
then
Disc := First_Discriminant (T);
while Present (Disc) loop
if Is_Access_Type (Etype (Disc)) then
return True;
end if;
Next_Discriminant (Disc);
end loop;
return False;
else
return False;
end if;
end Has_Access_Constraint;
-- Start of processing for Build_Init_Statements
begin
if Null_Present (Comp_List) then
return New_List (Make_Null_Statement (Loc));
end if;
Statement_List := New_List;
-- Loop through components, skipping pragmas, in 2 steps. The first
-- step deals with regular components. The second step deals with
-- components have per object constraints, and no explicit initia-
-- lization.
Per_Object_Constraint_Components := False;
-- First step : regular components
Decl := First_Non_Pragma (Component_Items (Comp_List));
while Present (Decl) loop
Loc := Sloc (Decl);
Build_Record_Checks
(Subtype_Indication (Component_Definition (Decl)), Check_List);
Id := Defining_Identifier (Decl);
Typ := Etype (Id);
if Has_Access_Constraint (Id)
and then No (Expression (Decl))
then
-- Skip processing for now and ask for a second pass
Per_Object_Constraint_Components := True;
else
-- Case of explicit initialization
if Present (Expression (Decl)) then
Stmts := Build_Assignment (Id, Expression (Decl));
-- Case of composite component with its own Init_Proc
elsif not Is_Interface (Typ)
and then Has_Non_Null_Base_Init_Proc (Typ)
then
Stmts :=
Build_Initialization_Call
(Loc,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => New_Occurrence_Of (Id, Loc)),
Typ,
True,
Rec_Type,
Discr_Map => Discr_Map);
-- Case of component needing simple initialization
elsif Component_Needs_Simple_Initialization (Typ) then
Stmts :=
Build_Assignment
(Id, Get_Simple_Init_Val (Typ, Loc, Esize (Id)));
-- Nothing needed for this case
else
Stmts := No_List;
end if;
if Present (Check_List) then
Append_List_To (Statement_List, Check_List);
end if;
if Present (Stmts) then
-- Add the initialization of the record controller before
-- the _Parent field is attached to it when the attachment
-- can occur. It does not work to simply initialize the
-- controller first: it must be initialized after the parent
-- if the parent holds discriminants that can be used
-- to compute the offset of the controller. We assume here
-- that the last statement of the initialization call is the
-- attachement of the parent (see Build_Initialization_Call)
if Chars (Id) = Name_uController
and then Rec_Type /= Etype (Rec_Type)
and then Has_Controlled_Component (Etype (Rec_Type))
and then Has_New_Controlled_Component (Rec_Type)
then
Insert_List_Before (Last (Statement_List), Stmts);
else
Append_List_To (Statement_List, Stmts);
end if;
end if;
end if;
Next_Non_Pragma (Decl);
end loop;
if Per_Object_Constraint_Components then
-- Second pass: components with per-object constraints
Decl := First_Non_Pragma (Component_Items (Comp_List));
while Present (Decl) loop
Loc := Sloc (Decl);
Id := Defining_Identifier (Decl);
Typ := Etype (Id);
if Has_Access_Constraint (Id)
and then No (Expression (Decl))
then
if Has_Non_Null_Base_Init_Proc (Typ) then
Append_List_To (Statement_List,
Build_Initialization_Call (Loc,
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => New_Occurrence_Of (Id, Loc)),
Typ, True, Rec_Type, Discr_Map => Discr_Map));
elsif Component_Needs_Simple_Initialization (Typ) then
Append_List_To (Statement_List,
Build_Assignment
(Id, Get_Simple_Init_Val (Typ, Loc, Esize (Id))));
end if;
end if;
Next_Non_Pragma (Decl);
end loop;
end if;
-- Process the variant part
if Present (Variant_Part (Comp_List)) then
Alt_List := New_List;
Variant := First_Non_Pragma (Variants (Variant_Part (Comp_List)));
while Present (Variant) loop
Loc := Sloc (Variant);
Append_To (Alt_List,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices =>
New_Copy_List (Discrete_Choices (Variant)),
Statements =>
Build_Init_Statements (Component_List (Variant))));
Next_Non_Pragma (Variant);
end loop;
-- The expression of the case statement which is a reference
-- to one of the discriminants is replaced by the appropriate
-- formal parameter of the initialization procedure.
Append_To (Statement_List,
Make_Case_Statement (Loc,
Expression =>
New_Reference_To (Discriminal (
Entity (Name (Variant_Part (Comp_List)))), Loc),
Alternatives => Alt_List));
end if;
-- For a task record type, add the task create call and calls
-- to bind any interrupt (signal) entries.
if Is_Task_Record_Type (Rec_Type) then
-- In the case of the restricted run time the ATCB has already
-- been preallocated.
if Restricted_Profile then
Append_To (Statement_List,
Make_Assignment_Statement (Loc,
Name => Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name => Make_Identifier (Loc, Name_uTask_Id)),
Expression => Make_Attribute_Reference (Loc,
Prefix =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uATCB)),
Attribute_Name => Name_Unchecked_Access)));
end if;
Append_To (Statement_List, Make_Task_Create_Call (Rec_Type));
declare
Task_Type : constant Entity_Id :=
Corresponding_Concurrent_Type (Rec_Type);
Task_Decl : constant Node_Id := Parent (Task_Type);
Task_Def : constant Node_Id := Task_Definition (Task_Decl);
Vis_Decl : Node_Id;
Ent : Entity_Id;
begin
if Present (Task_Def) then
Vis_Decl := First (Visible_Declarations (Task_Def));
while Present (Vis_Decl) loop
Loc := Sloc (Vis_Decl);
if Nkind (Vis_Decl) = N_Attribute_Definition_Clause then
if Get_Attribute_Id (Chars (Vis_Decl)) =
Attribute_Address
then
Ent := Entity (Name (Vis_Decl));
if Ekind (Ent) = E_Entry then
Append_To (Statement_List,
Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To (
RTE (RE_Bind_Interrupt_To_Entry), Loc),
Parameter_Associations => New_List (
Make_Selected_Component (Loc,
Prefix =>
Make_Identifier (Loc, Name_uInit),
Selector_Name =>
Make_Identifier (Loc, Name_uTask_Id)),
Entry_Index_Expression (
Loc, Ent, Empty, Task_Type),
Expression (Vis_Decl))));
end if;
end if;
end if;
Next (Vis_Decl);
end loop;
end if;
end;
end if;
-- For a protected type, add statements generated by
-- Make_Initialize_Protection.
if Is_Protected_Record_Type (Rec_Type) then
Append_List_To (Statement_List,
Make_Initialize_Protection (Rec_Type));
end if;
-- If no initializations when generated for component declarations
-- corresponding to this Statement_List, append a null statement
-- to the Statement_List to make it a valid Ada tree.
if Is_Empty_List (Statement_List) then
Append (New_Node (N_Null_Statement, Loc), Statement_List);
end if;
return Statement_List;
exception
when RE_Not_Available =>
return Empty_List;
end Build_Init_Statements;
-------------------------
-- Build_Record_Checks --
-------------------------
procedure Build_Record_Checks (S : Node_Id; Check_List : List_Id) is
Subtype_Mark_Id : Entity_Id;
begin
if Nkind (S) = N_Subtype_Indication then
Find_Type (Subtype_Mark (S));
Subtype_Mark_Id := Entity (Subtype_Mark (S));
-- Remaining processing depends on type
case Ekind (Subtype_Mark_Id) is
when Array_Kind =>
Constrain_Array (S, Check_List);
when others =>
null;
end case;
end if;
end Build_Record_Checks;
-------------------------------------------
-- Component_Needs_Simple_Initialization --
-------------------------------------------
function Component_Needs_Simple_Initialization
(T : Entity_Id) return Boolean
is
begin
return
Needs_Simple_Initialization (T)
and then not Is_RTE (T, RE_Tag)
and then not Is_RTE (T, RE_Vtable_Ptr)
-- Ada 2005 (AI-251): Check also the tag of abstract interfaces
and then not Is_RTE (T, RE_Interface_Tag);
end Component_Needs_Simple_Initialization;
---------------------
-- Constrain_Array --
---------------------
procedure Constrain_Array
(SI : Node_Id;
Check_List : List_Id)
is
C : constant Node_Id := Constraint (SI);
Number_Of_Constraints : Nat := 0;
Index : Node_Id;
S, T : Entity_Id;
begin
T := Entity (Subtype_Mark (SI));
if Ekind (T) in Access_Kind then
T := Designated_Type (T);
end if;
S := First (Constraints (C));
while Present (S) loop
Number_Of_Constraints := Number_Of_Constraints + 1;
Next (S);
end loop;
-- In either case, the index constraint must provide a discrete
-- range for each index of the array type and the type of each
-- discrete range must be the same as that of the corresponding
-- index. (RM 3.6.1)
S := First (Constraints (C));
Index := First_Index (T);
Analyze (Index);
-- Apply constraints to each index type
for J in 1 .. Number_Of_Constraints loop
Constrain_Index (Index, S, Check_List);
Next (Index);
Next (S);
end loop;
end Constrain_Array;
---------------------
-- Constrain_Index --
---------------------
procedure Constrain_Index
(Index : Node_Id;
S : Node_Id;
Check_List : List_Id)
is
T : constant Entity_Id := Etype (Index);
begin
if Nkind (S) = N_Range then
Process_Range_Expr_In_Decl (S, T, Check_List);
end if;
end Constrain_Index;
--------------------------------------
-- Parent_Subtype_Renaming_Discrims --
--------------------------------------
function Parent_Subtype_Renaming_Discrims return Boolean is
De : Entity_Id;
Dp : Entity_Id;
begin
if Base_Type (Pe) /= Pe then
return False;
end if;
if Etype (Pe) = Pe
or else not Has_Discriminants (Pe)
or else Is_Constrained (Pe)
or else Is_Tagged_Type (Pe)
then
return False;
end if;
-- If there are no explicit stored discriminants we have inherited
-- the root type discriminants so far, so no renamings occurred.
if First_Discriminant (Pe) = First_Stored_Discriminant (Pe) then
return False;
end if;
-- Check if we have done some trivial renaming of the parent
-- discriminants, i.e. someting like
--
-- type DT (X1,X2: int) is new PT (X1,X2);
De := First_Discriminant (Pe);
Dp := First_Discriminant (Etype (Pe));
while Present (De) loop
pragma Assert (Present (Dp));
if Corresponding_Discriminant (De) /= Dp then
return True;
end if;
Next_Discriminant (De);
Next_Discriminant (Dp);
end loop;
return Present (Dp);
end Parent_Subtype_Renaming_Discrims;
------------------------
-- Requires_Init_Proc --
------------------------
function Requires_Init_Proc (Rec_Id : Entity_Id) return Boolean is
Comp_Decl : Node_Id;
Id : Entity_Id;
Typ : Entity_Id;
begin
-- Definitely do not need one if specifically suppressed
if Suppress_Init_Proc (Rec_Id) then
return False;
end if;
-- If it is a type derived from a type with unknown discriminants,
-- we cannot build an initialization procedure for it.
if Has_Unknown_Discriminants (Rec_Id) then
return False;
end if;
-- Otherwise we need to generate an initialization procedure if
-- Is_CPP_Class is False and at least one of the following applies:
-- 1. Discriminants are present, since they need to be initialized
-- with the appropriate discriminant constraint expressions.
-- However, the discriminant of an unchecked union does not
-- count, since the discriminant is not present.
-- 2. The type is a tagged type, since the implicit Tag component
-- needs to be initialized with a pointer to the dispatch table.
-- 3. The type contains tasks
-- 4. One or more components has an initial value
-- 5. One or more components is for a type which itself requires
-- an initialization procedure.
-- 6. One or more components is a type that requires simple
-- initialization (see Needs_Simple_Initialization), except
-- that types Tag and Interface_Tag are excluded, since fields
-- of these types are initialized by other means.
-- 7. The type is the record type built for a task type (since at
-- the very least, Create_Task must be called)
-- 8. The type is the record type built for a protected type (since
-- at least Initialize_Protection must be called)
-- 9. The type is marked as a public entity. The reason we add this
-- case (even if none of the above apply) is to properly handle
-- Initialize_Scalars. If a package is compiled without an IS
-- pragma, and the client is compiled with an IS pragma, then
-- the client will think an initialization procedure is present
-- and call it, when in fact no such procedure is required, but
-- since the call is generated, there had better be a routine
-- at the other end of the call, even if it does nothing!)
-- Note: the reason we exclude the CPP_Class case is because in this
-- case the initialization is performed in the C++ side.
if Is_CPP_Class (Rec_Id) then
return False;
elsif not Restriction_Active (No_Initialize_Scalars)
and then Is_Public (Rec_Id)
then
return True;
elsif (Has_Discriminants (Rec_Id)
and then not Is_Unchecked_Union (Rec_Id))
or else Is_Tagged_Type (Rec_Id)
or else Is_Concurrent_Record_Type (Rec_Id)
or else Has_Task (Rec_Id)
then
return True;
end if;
Id := First_Component (Rec_Id);
while Present (Id) loop
Comp_Decl := Parent (Id);
Typ := Etype (Id);
if Present (Expression (Comp_Decl))
or else Has_Non_Null_Base_Init_Proc (Typ)
or else Component_Needs_Simple_Initialization (Typ)
then
return True;
end if;
Next_Component (Id);
end loop;
return False;
end Requires_Init_Proc;
-- Start of processing for Build_Record_Init_Proc
begin
Rec_Type := Defining_Identifier (N);
-- This may be full declaration of a private type, in which case
-- the visible entity is a record, and the private entity has been
-- exchanged with it in the private part of the current package.
-- The initialization procedure is built for the record type, which
-- is retrievable from the private entity.
if Is_Incomplete_Or_Private_Type (Rec_Type) then
Rec_Type := Underlying_Type (Rec_Type);
end if;
-- If there are discriminants, build the discriminant map to replace
-- discriminants by their discriminals in complex bound expressions.
-- These only arise for the corresponding records of protected types.
if Is_Concurrent_Record_Type (Rec_Type)
and then Has_Discriminants (Rec_Type)
then
declare
Disc : Entity_Id;
begin
Disc := First_Discriminant (Rec_Type);
while Present (Disc) loop
Append_Elmt (Disc, Discr_Map);
Append_Elmt (Discriminal (Disc), Discr_Map);
Next_Discriminant (Disc);
end loop;
end;
end if;
-- Derived types that have no type extension can use the initialization
-- procedure of their parent and do not need a procedure of their own.
-- This is only correct if there are no representation clauses for the
-- type or its parent, and if the parent has in fact been frozen so
-- that its initialization procedure exists.
if Is_Derived_Type (Rec_Type)
and then not Is_Tagged_Type (Rec_Type)
and then not Is_Unchecked_Union (Rec_Type)
and then not Has_New_Non_Standard_Rep (Rec_Type)
and then not Parent_Subtype_Renaming_Discrims
and then Has_Non_Null_Base_Init_Proc (Etype (Rec_Type))
then
Copy_TSS (Base_Init_Proc (Etype (Rec_Type)), Rec_Type);
-- Otherwise if we need an initialization procedure, then build one,
-- mark it as public and inlinable and as having a completion.
elsif Requires_Init_Proc (Rec_Type)
or else Is_Unchecked_Union (Rec_Type)
then
Build_Offset_To_Top_Functions;
Build_Init_Procedure;
Set_Is_Public (Proc_Id, Is_Public (Pe));
-- The initialization of protected records is not worth inlining.
-- In addition, when compiled for another unit for inlining purposes,
-- it may make reference to entities that have not been elaborated
-- yet. The initialization of controlled records contains a nested
-- clean-up procedure that makes it impractical to inline as well,
-- and leads to undefined symbols if inlined in a different unit.
-- Similar considerations apply to task types.
if not Is_Concurrent_Type (Rec_Type)
and then not Has_Task (Rec_Type)
and then not Controlled_Type (Rec_Type)
then
Set_Is_Inlined (Proc_Id);
end if;
Set_Is_Internal (Proc_Id);
Set_Has_Completion (Proc_Id);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Proc_Id);
end if;
end if;
end Build_Record_Init_Proc;
----------------------------
-- Build_Slice_Assignment --
----------------------------
-- Generates the following subprogram:
-- procedure Assign
-- (Source, Target : Array_Type,
-- Left_Lo, Left_Hi, Right_Lo, Right_Hi : Index;
-- Rev : Boolean)
-- is
-- Li1 : Index;
-- Ri1 : Index;
-- begin
-- if Rev then
-- Li1 := Left_Hi;
-- Ri1 := Right_Hi;
-- else
-- Li1 := Left_Lo;
-- Ri1 := Right_Lo;
-- end if;
-- loop
-- if Rev then
-- exit when Li1 < Left_Lo;
-- else
-- exit when Li1 > Left_Hi;
-- end if;
-- Target (Li1) := Source (Ri1);
-- if Rev then
-- Li1 := Index'pred (Li1);
-- Ri1 := Index'pred (Ri1);
-- else
-- Li1 := Index'succ (Li1);
-- Ri1 := Index'succ (Ri1);
-- end if;
-- end loop;
-- end Assign;
procedure Build_Slice_Assignment (Typ : Entity_Id) is
Loc : constant Source_Ptr := Sloc (Typ);
Index : constant Entity_Id := Base_Type (Etype (First_Index (Typ)));
-- Build formal parameters of procedure
Larray : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('A'));
Rarray : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('R'));
Left_Lo : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('L'));
Left_Hi : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('L'));
Right_Lo : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('R'));
Right_Hi : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('R'));
Rev : constant Entity_Id :=
Make_Defining_Identifier
(Loc, Chars => New_Internal_Name ('D'));
Proc_Name : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => Make_TSS_Name (Typ, TSS_Slice_Assign));
Lnn : constant Entity_Id :=
Make_Defining_Identifier (Loc, New_Internal_Name ('L'));
Rnn : constant Entity_Id :=
Make_Defining_Identifier (Loc, New_Internal_Name ('R'));
-- Subscripts for left and right sides
Decls : List_Id;
Loops : Node_Id;
Stats : List_Id;
begin
-- Build declarations for indices
Decls := New_List;
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Lnn,
Object_Definition =>
New_Occurrence_Of (Index, Loc)));
Append_To (Decls,
Make_Object_Declaration (Loc,
Defining_Identifier => Rnn,
Object_Definition =>
New_Occurrence_Of (Index, Loc)));
Stats := New_List;
-- Build initializations for indices
declare
F_Init : constant List_Id := New_List;
B_Init : constant List_Id := New_List;
begin
Append_To (F_Init,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Lnn, Loc),
Expression => New_Occurrence_Of (Left_Lo, Loc)));
Append_To (F_Init,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Rnn, Loc),
Expression => New_Occurrence_Of (Right_Lo, Loc)));
Append_To (B_Init,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Lnn, Loc),
Expression => New_Occurrence_Of (Left_Hi, Loc)));
Append_To (B_Init,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Rnn, Loc),
Expression => New_Occurrence_Of (Right_Hi, Loc)));
Append_To (Stats,
Make_If_Statement (Loc,
Condition => New_Occurrence_Of (Rev, Loc),
Then_Statements => B_Init,
Else_Statements => F_Init));
end;
-- Now construct the assignment statement
Loops :=
Make_Loop_Statement (Loc,
Statements => New_List (
Make_Assignment_Statement (Loc,
Name =>
Make_Indexed_Component (Loc,
Prefix => New_Occurrence_Of (Larray, Loc),
Expressions => New_List (New_Occurrence_Of (Lnn, Loc))),
Expression =>
Make_Indexed_Component (Loc,
Prefix => New_Occurrence_Of (Rarray, Loc),
Expressions => New_List (New_Occurrence_Of (Rnn, Loc))))),
End_Label => Empty);
-- Build exit condition
declare
F_Ass : constant List_Id := New_List;
B_Ass : constant List_Id := New_List;
begin
Append_To (F_Ass,
Make_Exit_Statement (Loc,
Condition =>
Make_Op_Gt (Loc,
Left_Opnd => New_Occurrence_Of (Lnn, Loc),
Right_Opnd => New_Occurrence_Of (Left_Hi, Loc))));
Append_To (B_Ass,
Make_Exit_Statement (Loc,
Condition =>
Make_Op_Lt (Loc,
Left_Opnd => New_Occurrence_Of (Lnn, Loc),
Right_Opnd => New_Occurrence_Of (Left_Lo, Loc))));
Prepend_To (Statements (Loops),
Make_If_Statement (Loc,
Condition => New_Occurrence_Of (Rev, Loc),
Then_Statements => B_Ass,
Else_Statements => F_Ass));
end;
-- Build the increment/decrement statements
declare
F_Ass : constant List_Id := New_List;
B_Ass : constant List_Id := New_List;
begin
Append_To (F_Ass,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Lnn, Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Index, Loc),
Attribute_Name => Name_Succ,
Expressions => New_List (
New_Occurrence_Of (Lnn, Loc)))));
Append_To (F_Ass,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Rnn, Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Index, Loc),
Attribute_Name => Name_Succ,
Expressions => New_List (
New_Occurrence_Of (Rnn, Loc)))));
Append_To (B_Ass,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Lnn, Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Index, Loc),
Attribute_Name => Name_Pred,
Expressions => New_List (
New_Occurrence_Of (Lnn, Loc)))));
Append_To (B_Ass,
Make_Assignment_Statement (Loc,
Name => New_Occurrence_Of (Rnn, Loc),
Expression =>
Make_Attribute_Reference (Loc,
Prefix =>
New_Occurrence_Of (Index, Loc),
Attribute_Name => Name_Pred,
Expressions => New_List (
New_Occurrence_Of (Rnn, Loc)))));
Append_To (Statements (Loops),
Make_If_Statement (Loc,
Condition => New_Occurrence_Of (Rev, Loc),
Then_Statements => B_Ass,
Else_Statements => F_Ass));
end;
Append_To (Stats, Loops);
declare
Spec : Node_Id;
Formals : List_Id := New_List;
begin
Formals := New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Larray,
Out_Present => True,
Parameter_Type =>
New_Reference_To (Base_Type (Typ), Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Rarray,
Parameter_Type =>
New_Reference_To (Base_Type (Typ), Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Left_Lo,
Parameter_Type =>
New_Reference_To (Index, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Left_Hi,
Parameter_Type =>
New_Reference_To (Index, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Right_Lo,
Parameter_Type =>
New_Reference_To (Index, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Right_Hi,
Parameter_Type =>
New_Reference_To (Index, Loc)));
Append_To (Formals,
Make_Parameter_Specification (Loc,
Defining_Identifier => Rev,
Parameter_Type =>
New_Reference_To (Standard_Boolean, Loc)));
Spec :=
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Proc_Name,
Parameter_Specifications => Formals);
Discard_Node (
Make_Subprogram_Body (Loc,
Specification => Spec,
Declarations => Decls,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stats)));
end;
Set_TSS (Typ, Proc_Name);
Set_Is_Pure (Proc_Name);
end Build_Slice_Assignment;
------------------------------------
-- Build_Variant_Record_Equality --
------------------------------------
-- Generates:
-- function _Equality (X, Y : T) return Boolean is
-- begin
-- -- Compare discriminants
-- if False or else X.D1 /= Y.D1 or else X.D2 /= Y.D2 then
-- return False;
-- end if;
-- -- Compare components
-- if False or else X.C1 /= Y.C1 or else X.C2 /= Y.C2 then
-- return False;
-- end if;
-- -- Compare variant part
-- case X.D1 is
-- when V1 =>
-- if False or else X.C2 /= Y.C2 or else X.C3 /= Y.C3 then
-- return False;
-- end if;
-- ...
-- when Vn =>
-- if False or else X.Cn /= Y.Cn then
-- return False;
-- end if;
-- end case;
-- return True;
-- end _Equality;
procedure Build_Variant_Record_Equality (Typ : Entity_Id) is
Loc : constant Source_Ptr := Sloc (Typ);
F : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => Make_TSS_Name (Typ, TSS_Composite_Equality));
X : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => Name_X);
Y : constant Entity_Id :=
Make_Defining_Identifier (Loc,
Chars => Name_Y);
Def : constant Node_Id := Parent (Typ);
Comps : constant Node_Id := Component_List (Type_Definition (Def));
Stmts : constant List_Id := New_List;
Pspecs : constant List_Id := New_List;
begin
-- Derived Unchecked_Union types no longer inherit the equality function
-- of their parent.
if Is_Derived_Type (Typ)
and then not Is_Unchecked_Union (Typ)
and then not Has_New_Non_Standard_Rep (Typ)
then
declare
Parent_Eq : constant Entity_Id :=
TSS (Root_Type (Typ), TSS_Composite_Equality);
begin
if Present (Parent_Eq) then
Copy_TSS (Parent_Eq, Typ);
return;
end if;
end;
end if;
Discard_Node (
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => F,
Parameter_Specifications => Pspecs,
Result_Definition => New_Reference_To (Standard_Boolean, Loc)),
Declarations => New_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => Stmts)));
Append_To (Pspecs,
Make_Parameter_Specification (Loc,
Defining_Identifier => X,
Parameter_Type => New_Reference_To (Typ, Loc)));
Append_To (Pspecs,
Make_Parameter_Specification (Loc,
Defining_Identifier => Y,
Parameter_Type => New_Reference_To (Typ, Loc)));
-- Unchecked_Unions require additional machinery to support equality.
-- Two extra parameters (A and B) are added to the equality function
-- parameter list in order to capture the inferred values of the
-- discriminants in later calls.
if Is_Unchecked_Union (Typ) then
declare
Discr_Type : constant Node_Id := Etype (First_Discriminant (Typ));
A : constant Node_Id :=
Make_Defining_Identifier (Loc,
Chars => Name_A);
B : constant Node_Id :=
Make_Defining_Identifier (Loc,
Chars => Name_B);
begin
-- Add A and B to the parameter list
Append_To (Pspecs,
Make_Parameter_Specification (Loc,
Defining_Identifier => A,
Parameter_Type => New_Reference_To (Discr_Type, Loc)));
Append_To (Pspecs,
Make_Parameter_Specification (Loc,
Defining_Identifier => B,
Parameter_Type => New_Reference_To (Discr_Type, Loc)));
-- Generate the following header code to compare the inferred
-- discriminants:
-- if a /= b then
-- return False;
-- end if;
Append_To (Stmts,
Make_If_Statement (Loc,
Condition =>
Make_Op_Ne (Loc,
Left_Opnd => New_Reference_To (A, Loc),
Right_Opnd => New_Reference_To (B, Loc)),
Then_Statements => New_List (
Make_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_False, Loc)))));
-- Generate component-by-component comparison. Note that we must
-- propagate one of the inferred discriminant formals to act as
-- the case statement switch.
Append_List_To (Stmts,
Make_Eq_Case (Typ, Comps, A));
end;
-- Normal case (not unchecked union)
else
Append_To (Stmts,
Make_Eq_If (Typ,
Discriminant_Specifications (Def)));
Append_List_To (Stmts,
Make_Eq_Case (Typ, Comps));
end if;
Append_To (Stmts,
Make_Return_Statement (Loc,
Expression => New_Reference_To (Standard_True, Loc)));
Set_TSS (Typ, F);
Set_Is_Pure (F);
if not Debug_Generated_Code then
Set_Debug_Info_Off (F);
end if;
end Build_Variant_Record_Equality;
-----------------------------
-- Check_Stream_Attributes --
-----------------------------
procedure Check_Stream_Attributes (Typ : Entity_Id) is
Comp : Entity_Id;
Par_Read : constant Boolean :=
Stream_Attribute_Available (Typ, TSS_Stream_Read)
and then not Has_Specified_Stream_Read (Typ);
Par_Write : constant Boolean :=
Stream_Attribute_Available (Typ, TSS_Stream_Write)
and then not Has_Specified_Stream_Write (Typ);
procedure Check_Attr (Nam : Name_Id; TSS_Nam : TSS_Name_Type);
-- Check that Comp has a user-specified Nam stream attribute
----------------
-- Check_Attr --
----------------
procedure Check_Attr (Nam : Name_Id; TSS_Nam : TSS_Name_Type) is
begin
if not Stream_Attribute_Available (Etype (Comp), TSS_Nam) then
Error_Msg_Name_1 := Nam;
Error_Msg_N
("|component& in limited extension must have% attribute", Comp);
end if;
end Check_Attr;
-- Start of processing for Check_Stream_Attributes
begin
if Par_Read or else Par_Write then
Comp := First_Component (Typ);
while Present (Comp) loop
if Comes_From_Source (Comp)
and then Original_Record_Component (Comp) = Comp
and then Is_Limited_Type (Etype (Comp))
then
if Par_Read then
Check_Attr (Name_Read, TSS_Stream_Read);
end if;
if Par_Write then
Check_Attr (Name_Write, TSS_Stream_Write);
end if;
end if;
Next_Component (Comp);
end loop;
end if;
end Check_Stream_Attributes;
-----------------------------
-- Expand_Record_Extension --
-----------------------------
-- Add a field _parent at the beginning of the record extension. This is
-- used to implement inheritance. Here are some examples of expansion:
-- 1. no discriminants
-- type T2 is new T1 with null record;
-- gives
-- type T2 is new T1 with record
-- _Parent : T1;
-- end record;
-- 2. renamed discriminants
-- type T2 (B, C : Int) is new T1 (A => B) with record
-- _Parent : T1 (A => B);
-- D : Int;
-- end;
-- 3. inherited discriminants
-- type T2 is new T1 with record -- discriminant A inherited
-- _Parent : T1 (A);
-- D : Int;
-- end;
procedure Expand_Record_Extension (T : Entity_Id; Def : Node_Id) is
Indic : constant Node_Id := Subtype_Indication (Def);
Loc : constant Source_Ptr := Sloc (Def);
Rec_Ext_Part : Node_Id := Record_Extension_Part (Def);
Par_Subtype : Entity_Id;
Comp_List : Node_Id;
Comp_Decl : Node_Id;
Parent_N : Node_Id;
D : Entity_Id;
List_Constr : constant List_Id := New_List;
begin
-- Expand_Record_Extension is called directly from the semantics, so
-- we must check to see whether expansion is active before proceeding
if not Expander_Active then
return;
end if;
-- This may be a derivation of an untagged private type whose full
-- view is tagged, in which case the Derived_Type_Definition has no
-- extension part. Build an empty one now.
if No (Rec_Ext_Part) then
Rec_Ext_Part :=
Make_Record_Definition (Loc,
End_Label => Empty,
Component_List => Empty,
Null_Present => True);
Set_Record_Extension_Part (Def, Rec_Ext_Part);
Mark_Rewrite_Insertion (Rec_Ext_Part);
end if;
Comp_List := Component_List (Rec_Ext_Part);
Parent_N := Make_Defining_Identifier (Loc, Name_uParent);
-- If the derived type inherits its discriminants the type of the
-- _parent field must be constrained by the inherited discriminants
if Has_Discriminants (T)
and then Nkind (Indic) /= N_Subtype_Indication
and then not Is_Constrained (Entity (Indic))
then
D := First_Discriminant (T);
while Present (D) loop
Append_To (List_Constr, New_Occurrence_Of (D, Loc));
Next_Discriminant (D);
end loop;
Par_Subtype :=
Process_Subtype (
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (Entity (Indic), Loc),
Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => List_Constr)),
Def);
-- Otherwise the original subtype_indication is just what is needed
else
Par_Subtype := Process_Subtype (New_Copy_Tree (Indic), Def);
end if;
Set_Parent_Subtype (T, Par_Subtype);
Comp_Decl :=
Make_Component_Declaration (Loc,
Defining_Identifier => Parent_N,
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
Subtype_Indication => New_Reference_To (Par_Subtype, Loc)));
if Null_Present (Rec_Ext_Part) then
Set_Component_List (Rec_Ext_Part,
Make_Component_List (Loc,
Component_Items => New_List (Comp_Decl),
Variant_Part => Empty,
Null_Present => False));
Set_Null_Present (Rec_Ext_Part, False);
elsif Null_Present (Comp_List)
or else Is_Empty_List (Component_Items (Comp_List))
then
Set_Component_Items (Comp_List, New_List (Comp_Decl));
Set_Null_Present (Comp_List, False);
else
Insert_Before (First (Component_Items (Comp_List)), Comp_Decl);
end if;
Analyze (Comp_Decl);
end Expand_Record_Extension;
------------------------------------
-- Expand_N_Full_Type_Declaration --
------------------------------------
procedure Expand_N_Full_Type_Declaration (N : Node_Id) is
Def_Id : constant Entity_Id := Defining_Identifier (N);
B_Id : constant Entity_Id := Base_Type (Def_Id);
Par_Id : Entity_Id;
FN : Node_Id;
begin
if Is_Access_Type (Def_Id) then
-- Anonymous access types are created for the components of the
-- record parameter for an entry declaration. No master is created
-- for such a type.
if Has_Task (Designated_Type (Def_Id))
and then Comes_From_Source (N)
then
Build_Master_Entity (Def_Id);
Build_Master_Renaming (Parent (Def_Id), Def_Id);
-- Create a class-wide master because a Master_Id must be generated
-- for access-to-limited-class-wide types whose root may be extended
-- with task components, and for access-to-limited-interfaces because
-- they can be used to reference tasks implementing such interface.
elsif Is_Class_Wide_Type (Designated_Type (Def_Id))
and then (Is_Limited_Type (Designated_Type (Def_Id))
or else
(Is_Interface (Designated_Type (Def_Id))
and then
Is_Limited_Interface (Designated_Type (Def_Id))))
and then Tasking_Allowed
-- Do not create a class-wide master for types whose convention is
-- Java since these types cannot embed Ada tasks anyway. Note that
-- the following test cannot catch the following case:
-- package java.lang.Object is
-- type Typ is tagged limited private;
-- type Ref is access all Typ'Class;
-- private
-- type Typ is tagged limited ...;
-- pragma Convention (Typ, Java)
-- end;
-- Because the convention appears after we have done the
-- processing for type Ref.
and then Convention (Designated_Type (Def_Id)) /= Convention_Java
then
Build_Class_Wide_Master (Def_Id);
elsif Ekind (Def_Id) = E_Access_Protected_Subprogram_Type then
Expand_Access_Protected_Subprogram_Type (N);
end if;
elsif Has_Task (Def_Id) then
Expand_Previous_Access_Type (Def_Id);
end if;
Par_Id := Etype (B_Id);
-- The parent type is private then we need to inherit
-- any TSS operations from the full view.
if Ekind (Par_Id) in Private_Kind
and then Present (Full_View (Par_Id))
then
Par_Id := Base_Type (Full_View (Par_Id));
end if;
if Nkind (Type_Definition (Original_Node (N)))
= N_Derived_Type_Definition
and then not Is_Tagged_Type (Def_Id)
and then Present (Freeze_Node (Par_Id))
and then Present (TSS_Elist (Freeze_Node (Par_Id)))
then
Ensure_Freeze_Node (B_Id);
FN := Freeze_Node (B_Id);
if No (TSS_Elist (FN)) then
Set_TSS_Elist (FN, New_Elmt_List);
end if;
declare
T_E : constant Elist_Id := TSS_Elist (FN);
Elmt : Elmt_Id;
begin
Elmt := First_Elmt (TSS_Elist (Freeze_Node (Par_Id)));
while Present (Elmt) loop
if Chars (Node (Elmt)) /= Name_uInit then
Append_Elmt (Node (Elmt), T_E);
end if;
Next_Elmt (Elmt);
end loop;
-- If the derived type itself is private with a full view, then
-- associate the full view with the inherited TSS_Elist as well.
if Ekind (B_Id) in Private_Kind
and then Present (Full_View (B_Id))
then
Ensure_Freeze_Node (Base_Type (Full_View (B_Id)));
Set_TSS_Elist
(Freeze_Node (Base_Type (Full_View (B_Id))), TSS_Elist (FN));
end if;
end;
end if;
end Expand_N_Full_Type_Declaration;
---------------------------------
-- Expand_N_Object_Declaration --
---------------------------------
-- First we do special processing for objects of a tagged type where this
-- is the point at which the type is frozen. The creation of the dispatch
-- table and the initialization procedure have to be deferred to this
-- point, since we reference previously declared primitive subprograms.
-- For all types, we call an initialization procedure if there is one
procedure Expand_N_Object_Declaration (N : Node_Id) is
Def_Id : constant Entity_Id := Defining_Identifier (N);
Typ : constant Entity_Id := Etype (Def_Id);
Loc : constant Source_Ptr := Sloc (N);
Expr : constant Node_Id := Expression (N);
New_Ref : Node_Id;
Id_Ref : Node_Id;
Expr_Q : Node_Id;
begin
-- Don't do anything for deferred constants. All proper actions will
-- be expanded during the full declaration.
if No (Expr) and Constant_Present (N) then
return;
end if;
-- Make shared memory routines for shared passive variable
if Is_Shared_Passive (Def_Id) then
Make_Shared_Var_Procs (N);
end if;
-- If tasks being declared, make sure we have an activation chain
-- defined for the tasks (has no effect if we already have one), and
-- also that a Master variable is established and that the appropriate
-- enclosing construct is established as a task master.
if Has_Task (Typ) then
Build_Activation_Chain_Entity (N);
Build_Master_Entity (Def_Id);
end if;
-- Default initialization required, and no expression present
if No (Expr) then
-- Expand Initialize call for controlled objects. One may wonder why
-- the Initialize Call is not done in the regular Init procedure
-- attached to the record type. That's because the init procedure is
-- recursively called on each component, including _Parent, thus the
-- Init call for a controlled object would generate not only one
-- Initialize call as it is required but one for each ancestor of
-- its type. This processing is suppressed if No_Initialization set.
if not Controlled_Type (Typ)
or else No_Initialization (N)
then
null;
elsif not Abort_Allowed
or else not Comes_From_Source (N)
then
Insert_Actions_After (N,
Make_Init_Call (
Ref => New_Occurrence_Of (Def_Id, Loc),
Typ => Base_Type (Typ),
Flist_Ref => Find_Final_List (Def_Id),
With_Attach => Make_Integer_Literal (Loc, 1)));
-- Abort allowed
else
-- We need to protect the initialize call
-- begin
-- Defer_Abort.all;
-- Initialize (...);
-- at end
-- Undefer_Abort.all;
-- end;
-- ??? this won't protect the initialize call for controlled
-- components which are part of the init proc, so this block
-- should probably also contain the call to _init_proc but this
-- requires some code reorganization...
declare
L : constant List_Id :=
Make_Init_Call (
Ref => New_Occurrence_Of (Def_Id, Loc),
Typ => Base_Type (Typ),
Flist_Ref => Find_Final_List (Def_Id),
With_Attach => Make_Integer_Literal (Loc, 1));
Blk : constant Node_Id :=
Make_Block_Statement (Loc,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc, L));
begin
Prepend_To (L, Build_Runtime_Call (Loc, RE_Abort_Defer));
Set_At_End_Proc (Handled_Statement_Sequence (Blk),
New_Occurrence_Of (RTE (RE_Abort_Undefer_Direct), Loc));
Insert_Actions_After (N, New_List (Blk));
Expand_At_End_Handler
(Handled_Statement_Sequence (Blk), Entity (Identifier (Blk)));
end;
end if;
-- Call type initialization procedure if there is one. We build the
-- call and put it immediately after the object declaration, so that
-- it will be expanded in the usual manner. Note that this will
-- result in proper handling of defaulted discriminants. The call
-- to the Init_Proc is suppressed if No_Initialization is set.
if Has_Non_Null_Base_Init_Proc (Typ)
and then not No_Initialization (N)
then
-- The call to the initialization procedure does NOT freeze
-- the object being initialized. This is because the call is
-- not a source level call. This works fine, because the only
-- possible statements depending on freeze status that can
-- appear after the _Init call are rep clauses which can
-- safely appear after actual references to the object.
Id_Ref := New_Reference_To (Def_Id, Loc);
Set_Must_Not_Freeze (Id_Ref);
Set_Assignment_OK (Id_Ref);
Insert_Actions_After (N,
Build_Initialization_Call (Loc, Id_Ref, Typ));
-- If simple initialization is required, then set an appropriate
-- simple initialization expression in place. This special
-- initialization is required even though No_Init_Flag is present.
-- An internally generated temporary needs no initialization because
-- it will be assigned subsequently. In particular, there is no
-- point in applying Initialize_Scalars to such a temporary.
elsif Needs_Simple_Initialization (Typ)
and then not Is_Internal (Def_Id)
then
Set_No_Initialization (N, False);
Set_Expression (N, Get_Simple_Init_Val (Typ, Loc, Esize (Def_Id)));
Analyze_And_Resolve (Expression (N), Typ);
end if;
-- Generate attribute for Persistent_BSS if needed
if Persistent_BSS_Mode
and then Comes_From_Source (N)
and then Is_Potentially_Persistent_Type (Typ)
and then Is_Library_Level_Entity (Def_Id)
then
declare
Prag : Node_Id;
begin
Prag :=
Make_Linker_Section_Pragma
(Def_Id, Sloc (N), ".persistent.bss");
Insert_After (N, Prag);
Analyze (Prag);
end;
end if;
-- If access type, then we know it is null if not initialized
if Is_Access_Type (Typ) then
Set_Is_Known_Null (Def_Id);
end if;
-- Explicit initialization present
else
-- Obtain actual expression from qualified expression
if Nkind (Expr) = N_Qualified_Expression then
Expr_Q := Expression (Expr);
else
Expr_Q := Expr;
end if;
-- When we have the appropriate type of aggregate in the expression
-- (it has been determined during analysis of the aggregate by
-- setting the delay flag), let's perform in place assignment and
-- thus avoid creating a temporary.
if Is_Delayed_Aggregate (Expr_Q) then
Convert_Aggr_In_Object_Decl (N);
else
-- In most cases, we must check that the initial value meets any
-- constraint imposed by the declared type. However, there is one
-- very important exception to this rule. If the entity has an
-- unconstrained nominal subtype, then it acquired its constraints
-- from the expression in the first place, and not only does this
-- mean that the constraint check is not needed, but an attempt to
-- perform the constraint check can cause order order of
-- elaboration problems.
if not Is_Constr_Subt_For_U_Nominal (Typ) then
-- If this is an allocator for an aggregate that has been
-- allocated in place, delay checks until assignments are
-- made, because the discriminants are not initialized.
if Nkind (Expr) = N_Allocator
and then No_Initialization (Expr)
then
null;
else
Apply_Constraint_Check (Expr, Typ);
end if;
end if;
-- If the type is controlled we attach the object to the final
-- list and adjust the target after the copy. This
-- ??? incomplete sentence
if Controlled_Type (Typ) then
declare
Flist : Node_Id;
F : Entity_Id;
begin
-- Attach the result to a dummy final list which will never
-- be finalized if Delay_Finalize_Attachis set. It is
-- important to attach to a dummy final list rather than not
-- attaching at all in order to reset the pointers coming
-- from the initial value. Equivalent code exists in the
-- sec-stack case in Exp_Ch4.Expand_N_Allocator.
if Delay_Finalize_Attach (N) then
F :=
Make_Defining_Identifier (Loc, New_Internal_Name ('F'));
Insert_Action (N,
Make_Object_Declaration (Loc,
Defining_Identifier => F,
Object_Definition =>
New_Reference_To (RTE (RE_Finalizable_Ptr), Loc)));
Flist := New_Reference_To (F, Loc);
else
Flist := Find_Final_List (Def_Id);
end if;
Insert_Actions_After (N,
Make_Adjust_Call (
Ref => New_Reference_To (Def_Id, Loc),
Typ => Base_Type (Typ),
Flist_Ref => Flist,
With_Attach => Make_Integer_Literal (Loc, 1)));
end;
end if;
-- For tagged types, when an init value is given, the tag has to
-- be re-initialized separately in order to avoid the propagation
-- of a wrong tag coming from a view conversion unless the type
-- is class wide (in this case the tag comes from the init value).
-- Suppress the tag assignment when Java_VM because JVM tags are
-- represented implicitly in objects. Ditto for types that are
-- CPP_CLASS, and for initializations that are aggregates, because
-- they have to have the right tag.
if Is_Tagged_Type (Typ)
and then not Is_Class_Wide_Type (Typ)
and then not Is_CPP_Class (Typ)
and then not Java_VM
and then Nkind (Expr) /= N_Aggregate
then
-- The re-assignment of the tag has to be done even if the
-- object is a constant.
New_Ref :=
Make_Selected_Component (Loc,
Prefix => New_Reference_To (Def_Id, Loc),
Selector_Name =>
New_Reference_To (First_Tag_Component (Typ), Loc));
Set_Assignment_OK (New_Ref);
Insert_After (N,
Make_Assignment_Statement (Loc,
Name => New_Ref,
Expression =>
Unchecked_Convert_To (RTE (RE_Tag),
New_Reference_To
(Node
(First_Elmt
(Access_Disp_Table (Base_Type (Typ)))),
Loc))));
-- For discrete types, set the Is_Known_Valid flag if the
-- initializing value is known to be valid.
elsif Is_Discrete_Type (Typ) and then Expr_Known_Valid (Expr) then
Set_Is_Known_Valid (Def_Id);
elsif Is_Access_Type (Typ) then
-- For access types set the Is_Known_Non_Null flag if the
-- initializing value is known to be non-null. We can also set
-- Can_Never_Be_Null if this is a constant.
if Known_Non_Null (Expr) then
Set_Is_Known_Non_Null (Def_Id, True);
if Constant_Present (N) then
Set_Can_Never_Be_Null (Def_Id);
end if;
end if;
end if;
-- If validity checking on copies, validate initial expression
if Validity_Checks_On
and then Validity_Check_Copies
then
Ensure_Valid (Expr);
Set_Is_Known_Valid (Def_Id);
end if;
end if;
-- Cases where the back end cannot handle the initialization directly
-- In such cases, we expand an assignment that will be appropriately
-- handled by Expand_N_Assignment_Statement.
-- The exclusion of the unconstrained case is wrong, but for now it
-- is too much trouble ???
if (Is_Possibly_Unaligned_Slice (Expr)
or else (Is_Possibly_Unaligned_Object (Expr)
and then not Represented_As_Scalar (Etype (Expr))))
-- The exclusion of the unconstrained case is wrong, but for now
-- it is too much trouble ???
and then not (Is_Array_Type (Etype (Expr))
and then not Is_Constrained (Etype (Expr)))
then
declare
Stat : constant Node_Id :=
Make_Assignment_Statement (Loc,
Name => New_Reference_To (Def_Id, Loc),
Expression => Relocate_Node (Expr));
begin
Set_Expression (N, Empty);
Set_No_Initialization (N);
Set_Assignment_OK (Name (Stat));
Set_No_Ctrl_Actions (Stat);
Insert_After (N, Stat);
Analyze (Stat);
end;
end if;
end if;
-- For array type, check for size too large
-- We really need this for record types too???
if Is_Array_Type (Typ) then
Apply_Array_Size_Check (N, Typ);
end if;
exception
when RE_Not_Available =>
return;
end Expand_N_Object_Declaration;
---------------------------------
-- Expand_N_Subtype_Indication --
---------------------------------
-- Add a check on the range of the subtype. The static case is partially
-- duplicated by Process_Range_Expr_In_Decl in Sem_Ch3, but we still need
-- to check here for the static case in order to avoid generating
-- extraneous expanded code.
procedure Expand_N_Subtype_Indication (N : Node_Id) is
Ran : constant Node_Id := Range_Expression (Constraint (N));
Typ : constant Entity_Id := Entity (Subtype_Mark (N));
begin
if Nkind (Parent (N)) = N_Constrained_Array_Definition or else
Nkind (Parent (N)) = N_Slice
then
Resolve (Ran, Typ);
Apply_Range_Check (Ran, Typ);
end if;
end Expand_N_Subtype_Indication;
---------------------------
-- Expand_N_Variant_Part --
---------------------------
-- If the last variant does not contain the Others choice, replace it with
-- an N_Others_Choice node since Gigi always wants an Others. Note that we
-- do not bother to call Analyze on the modified variant part, since it's
-- only effect would be to compute the contents of the
-- Others_Discrete_Choices node laboriously, and of course we already know
-- the list of choices that corresponds to the others choice (it's the
-- list we are replacing!)
procedure Expand_N_Variant_Part (N : Node_Id) is
Last_Var : constant Node_Id := Last_Non_Pragma (Variants (N));
Others_Node : Node_Id;
begin
if Nkind (First (Discrete_Choices (Last_Var))) /= N_Others_Choice then
Others_Node := Make_Others_Choice (Sloc (Last_Var));
Set_Others_Discrete_Choices
(Others_Node, Discrete_Choices (Last_Var));
Set_Discrete_Choices (Last_Var, New_List (Others_Node));
end if;
end Expand_N_Variant_Part;
---------------------------------
-- Expand_Previous_Access_Type --
---------------------------------
procedure Expand_Previous_Access_Type (Def_Id : Entity_Id) is
T : Entity_Id := First_Entity (Current_Scope);
begin
-- Find all access types declared in the current scope, whose
-- designated type is Def_Id.
while Present (T) loop
if Is_Access_Type (T)
and then Designated_Type (T) = Def_Id
then
Build_Master_Entity (Def_Id);
Build_Master_Renaming (Parent (Def_Id), T);
end if;
Next_Entity (T);
end loop;
end Expand_Previous_Access_Type;
------------------------------
-- Expand_Record_Controller --
------------------------------
procedure Expand_Record_Controller (T : Entity_Id) is
Def : Node_Id := Type_Definition (Parent (T));
Comp_List : Node_Id;
Comp_Decl : Node_Id;
Loc : Source_Ptr;
First_Comp : Node_Id;
Controller_Type : Entity_Id;
Ent : Entity_Id;
begin
if Nkind (Def) = N_Derived_Type_Definition then
Def := Record_Extension_Part (Def);
end if;
if Null_Present (Def) then
Set_Component_List (Def,
Make_Component_List (Sloc (Def),
Component_Items => Empty_List,
Variant_Part => Empty,
Null_Present => True));
end if;
Comp_List := Component_List (Def);
if Null_Present (Comp_List)
or else Is_Empty_List (Component_Items (Comp_List))
then
Loc := Sloc (Comp_List);
else
Loc := Sloc (First (Component_Items (Comp_List)));
end if;
if Is_Return_By_Reference_Type (T) then
Controller_Type := RTE (RE_Limited_Record_Controller);
else
Controller_Type := RTE (RE_Record_Controller);
end if;
Ent := Make_Defining_Identifier (Loc, Name_uController);
Comp_Decl :=
Make_Component_Declaration (Loc,
Defining_Identifier => Ent,
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
Subtype_Indication => New_Reference_To (Controller_Type, Loc)));
if Null_Present (Comp_List)
or else Is_Empty_List (Component_Items (Comp_List))
then
Set_Component_Items (Comp_List, New_List (Comp_Decl));
Set_Null_Present (Comp_List, False);
else
-- The controller cannot be placed before the _Parent field since
-- gigi lays out field in order and _parent must be first to
-- preserve the polymorphism of tagged types.
First_Comp := First (Component_Items (Comp_List));
if Chars (Defining_Identifier (First_Comp)) /= Name_uParent
and then Chars (Defining_Identifier (First_Comp)) /= Name_uTag
then
Insert_Before (First_Comp, Comp_Decl);
else
Insert_After (First_Comp, Comp_Decl);
end if;
end if;
New_Scope (T);
Analyze (Comp_Decl);
Set_Ekind (Ent, E_Component);
Init_Component_Location (Ent);
-- Move the _controller entity ahead in the list of internal entities
-- of the enclosing record so that it is selected instead of a
-- potentially inherited one.
declare
E : constant Entity_Id := Last_Entity (T);
Comp : Entity_Id;
begin
pragma Assert (Chars (E) = Name_uController);
Set_Next_Entity (E, First_Entity (T));
Set_First_Entity (T, E);
Comp := Next_Entity (E);
while Next_Entity (Comp) /= E loop
Next_Entity (Comp);
end loop;
Set_Next_Entity (Comp, Empty);
Set_Last_Entity (T, Comp);
end;
End_Scope;
exception
when RE_Not_Available =>
return;
end Expand_Record_Controller;
------------------------
-- Expand_Tagged_Root --
------------------------
procedure Expand_Tagged_Root (T : Entity_Id) is
Def : constant Node_Id := Type_Definition (Parent (T));
Comp_List : Node_Id;
Comp_Decl : Node_Id;
Sloc_N : Source_Ptr;
begin
if Null_Present (Def) then
Set_Component_List (Def,
Make_Component_List (Sloc (Def),
Component_Items => Empty_List,
Variant_Part => Empty,
Null_Present => True));
end if;
Comp_List := Component_List (Def);
if Null_Present (Comp_List)
or else Is_Empty_List (Component_Items (Comp_List))
then
Sloc_N := Sloc (Comp_List);
else
Sloc_N := Sloc (First (Component_Items (Comp_List)));
end if;
Comp_Decl :=
Make_Component_Declaration (Sloc_N,
Defining_Identifier => First_Tag_Component (T),
Component_Definition =>
Make_Component_Definition (Sloc_N,
Aliased_Present => False,
Subtype_Indication => New_Reference_To (RTE (RE_Tag), Sloc_N)));
if Null_Present (Comp_List)
or else Is_Empty_List (Component_Items (Comp_List))
then
Set_Component_Items (Comp_List, New_List (Comp_Decl));
Set_Null_Present (Comp_List, False);
else
Insert_Before (First (Component_Items (Comp_List)), Comp_Decl);
end if;
-- We don't Analyze the whole expansion because the tag component has
-- already been analyzed previously. Here we just insure that the tree
-- is coherent with the semantic decoration
Find_Type (Subtype_Indication (Component_Definition (Comp_Decl)));
exception
when RE_Not_Available =>
return;
end Expand_Tagged_Root;
-----------------------
-- Freeze_Array_Type --
-----------------------
procedure Freeze_Array_Type (N : Node_Id) is
Typ : constant Entity_Id := Entity (N);
Base : constant Entity_Id := Base_Type (Typ);
begin
if not Is_Bit_Packed_Array (Typ) then
-- If the component contains tasks, so does the array type. This may
-- not be indicated in the array type because the component may have
-- been a private type at the point of definition. Same if component
-- type is controlled.
Set_Has_Task (Base, Has_Task (Component_Type (Typ)));
Set_Has_Controlled_Component (Base,
Has_Controlled_Component (Component_Type (Typ))
or else Is_Controlled (Component_Type (Typ)));
if No (Init_Proc (Base)) then
-- If this is an anonymous array created for a declaration with
-- an initial value, its init_proc will never be called. The
-- initial value itself may have been expanded into assign-
-- ments, in which case the object declaration is carries the
-- No_Initialization flag.
if Is_Itype (Base)
and then Nkind (Associated_Node_For_Itype (Base)) =
N_Object_Declaration
and then (Present (Expression (Associated_Node_For_Itype (Base)))
or else
No_Initialization (Associated_Node_For_Itype (Base)))
then
null;
-- We do not need an init proc for string or wide [wide] string,
-- since the only time these need initialization in normalize or
-- initialize scalars mode, and these types are treated specially
-- and do not need initialization procedures.
elsif Root_Type (Base) = Standard_String
or else Root_Type (Base) = Standard_Wide_String
or else Root_Type (Base) = Standard_Wide_Wide_String
then
null;
-- Otherwise we have to build an init proc for the subtype
else
Build_Array_Init_Proc (Base, N);
end if;
end if;
if Typ = Base and then Has_Controlled_Component (Base) then
Build_Controlling_Procs (Base);
if not Is_Limited_Type (Component_Type (Typ))
and then Number_Dimensions (Typ) = 1
then
Build_Slice_Assignment (Typ);
end if;
end if;
-- For packed case, there is a default initialization, except if the
-- component type is itself a packed structure with an initialization
-- procedure.
elsif Present (Init_Proc (Component_Type (Base)))
and then No (Base_Init_Proc (Base))
then
Build_Array_Init_Proc (Base, N);
end if;
end Freeze_Array_Type;
-----------------------------
-- Freeze_Enumeration_Type --
-----------------------------
procedure Freeze_Enumeration_Type (N : Node_Id) is
Typ : constant Entity_Id := Entity (N);
Loc : constant Source_Ptr := Sloc (Typ);
Ent : Entity_Id;
Lst : List_Id;
Num : Nat;
Arr : Entity_Id;
Fent : Entity_Id;
Ityp : Entity_Id;
Is_Contiguous : Boolean;
Pos_Expr : Node_Id;
Last_Repval : Uint;
Func : Entity_Id;
pragma Warnings (Off, Func);
begin
-- Various optimization are possible if the given representation is
-- contiguous.
Is_Contiguous := True;
Ent := First_Literal (Typ);
Last_Repval := Enumeration_Rep (Ent);
Next_Literal (Ent);
while Present (Ent) loop
if Enumeration_Rep (Ent) - Last_Repval /= 1 then
Is_Contiguous := False;
exit;
else
Last_Repval := Enumeration_Rep (Ent);
end if;
Next_Literal (Ent);
end loop;
if Is_Contiguous then
Set_Has_Contiguous_Rep (Typ);
Ent := First_Literal (Typ);
Num := 1;
Lst := New_List (New_Reference_To (Ent, Sloc (Ent)));
else
-- Build list of literal references
Lst := New_List;
Num := 0;
Ent := First_Literal (Typ);
while Present (Ent) loop
Append_To (Lst, New_Reference_To (Ent, Sloc (Ent)));
Num := Num + 1;
Next_Literal (Ent);
end loop;
end if;
-- Now build an array declaration
-- typA : array (Natural range 0 .. num - 1) of ctype :=
-- (v, v, v, v, v, ....)
-- where ctype is the corresponding integer type. If the representation
-- is contiguous, we only keep the first literal, which provides the
-- offset for Pos_To_Rep computations.
Arr :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Typ), 'A'));
Append_Freeze_Action (Typ,
Make_Object_Declaration (Loc,
Defining_Identifier => Arr,
Constant_Present => True,
Object_Definition =>
Make_Constrained_Array_Definition (Loc,
Discrete_Subtype_Definitions => New_List (
Make_Subtype_Indication (Loc,
Subtype_Mark => New_Reference_To (Standard_Natural, Loc),
Constraint =>
Make_Range_Constraint (Loc,
Range_Expression =>
Make_Range (Loc,
Low_Bound =>
Make_Integer_Literal (Loc, 0),
High_Bound =>
Make_Integer_Literal (Loc, Num - 1))))),
Component_Definition =>
Make_Component_Definition (Loc,
Aliased_Present => False,
Subtype_Indication => New_Reference_To (Typ, Loc))),
Expression =>
Make_Aggregate (Loc,
Expressions => Lst)));
Set_Enum_Pos_To_Rep (Typ, Arr);
-- Now we build the function that converts representation values to
-- position values. This function has the form:
-- function _Rep_To_Pos (A : etype; F : Boolean) return Integer is
-- begin
-- case ityp!(A) is
-- when enum-lit'Enum_Rep => return posval;
-- when enum-lit'Enum_Rep => return posval;
-- ...
-- when others =>
-- [raise Constraint_Error when F "invalid data"]
-- return -1;
-- end case;
-- end;
-- Note: the F parameter determines whether the others case (no valid
-- representation) raises Constraint_Error or returns a unique value
-- of minus one. The latter case is used, e.g. in 'Valid code.
-- Note: the reason we use Enum_Rep values in the case here is to avoid
-- the code generator making inappropriate assumptions about the range
-- of the values in the case where the value is invalid. ityp is a
-- signed or unsigned integer type of appropriate width.
-- Note: if exceptions are not supported, then we suppress the raise
-- and return -1 unconditionally (this is an erroneous program in any
-- case and there is no obligation to raise Constraint_Error here!) We
-- also do this if pragma Restrictions (No_Exceptions) is active.
-- Representations are signed
if Enumeration_Rep (First_Literal (Typ)) < 0 then
-- The underlying type is signed. Reset the Is_Unsigned_Type
-- explicitly, because it might have been inherited from
-- parent type.
Set_Is_Unsigned_Type (Typ, False);
if Esize (Typ) <= Standard_Integer_Size then
Ityp := Standard_Integer;
else
Ityp := Universal_Integer;
end if;
-- Representations are unsigned
else
if Esize (Typ) <= Standard_Integer_Size then
Ityp := RTE (RE_Unsigned);
else
Ityp := RTE (RE_Long_Long_Unsigned);
end if;
end if;
-- The body of the function is a case statement. First collect case
-- alternatives, or optimize the contiguous case.
Lst := New_List;
-- If representation is contiguous, Pos is computed by subtracting
-- the representation of the first literal.
if Is_Contiguous then
Ent := First_Literal (Typ);
if Enumeration_Rep (Ent) = Last_Repval then
-- Another special case: for a single literal, Pos is zero
Pos_Expr := Make_Integer_Literal (Loc, Uint_0);
else
Pos_Expr :=
Convert_To (Standard_Integer,
Make_Op_Subtract (Loc,
Left_Opnd =>
Unchecked_Convert_To (Ityp,
Make_Identifier (Loc, Name_uA)),
Right_Opnd =>
Make_Integer_Literal (Loc,
Intval =>
Enumeration_Rep (First_Literal (Typ)))));
end if;
Append_To (Lst,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_List (
Make_Range (Sloc (Enumeration_Rep_Expr (Ent)),
Low_Bound =>
Make_Integer_Literal (Loc,
Intval => Enumeration_Rep (Ent)),
High_Bound =>
Make_Integer_Literal (Loc, Intval => Last_Repval))),
Statements => New_List (
Make_Return_Statement (Loc,
Expression => Pos_Expr))));
else
Ent := First_Literal (Typ);
while Present (Ent) loop
Append_To (Lst,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_List (
Make_Integer_Literal (Sloc (Enumeration_Rep_Expr (Ent)),
Intval => Enumeration_Rep (Ent))),
Statements => New_List (
Make_Return_Statement (Loc,
Expression =>
Make_Integer_Literal (Loc,
Intval => Enumeration_Pos (Ent))))));
Next_Literal (Ent);
end loop;
end if;
-- In normal mode, add the others clause with the test
if not Restriction_Active (No_Exception_Handlers) then
Append_To (Lst,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_List (Make_Others_Choice (Loc)),
Statements => New_List (
Make_Raise_Constraint_Error (Loc,
Condition => Make_Identifier (Loc, Name_uF),
Reason => CE_Invalid_Data),
Make_Return_Statement (Loc,
Expression =>
Make_Integer_Literal (Loc, -1)))));
-- If Restriction (No_Exceptions_Handlers) is active then we always
-- return -1 (since we cannot usefully raise Constraint_Error in
-- this case). See description above for further details.
else
Append_To (Lst,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_List (Make_Others_Choice (Loc)),
Statements => New_List (
Make_Return_Statement (Loc,
Expression =>
Make_Integer_Literal (Loc, -1)))));
end if;
-- Now we can build the function body
Fent :=
Make_Defining_Identifier (Loc, Make_TSS_Name (Typ, TSS_Rep_To_Pos));
Func :=
Make_Subprogram_Body (Loc,
Specification =>
Make_Function_Specification (Loc,
Defining_Unit_Name => Fent,
Parameter_Specifications => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uA),
Parameter_Type => New_Reference_To (Typ, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uF),
Parameter_Type => New_Reference_To (Standard_Boolean, Loc))),
Result_Definition => New_Reference_To (Standard_Integer, Loc)),
Declarations => Empty_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (
Make_Case_Statement (Loc,
Expression =>
Unchecked_Convert_To (Ityp,
Make_Identifier (Loc, Name_uA)),
Alternatives => Lst))));
Set_TSS (Typ, Fent);
Set_Is_Pure (Fent);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Fent);
end if;
exception
when RE_Not_Available =>
return;
end Freeze_Enumeration_Type;
------------------------
-- Freeze_Record_Type --
------------------------
procedure Freeze_Record_Type (N : Node_Id) is
Comp : Entity_Id;
Def_Id : constant Node_Id := Entity (N);
Predef_List : List_Id;
Type_Decl : constant Node_Id := Parent (Def_Id);
Renamed_Eq : Node_Id := Empty;
-- Could use some comments ???
Wrapper_Decl_List : List_Id := No_List;
Wrapper_Body_List : List_Id := No_List;
begin
-- Build discriminant checking functions if not a derived type (for
-- derived types that are not tagged types, we always use the
-- discriminant checking functions of the parent type). However, for
-- untagged types the derivation may have taken place before the
-- parent was frozen, so we copy explicitly the discriminant checking
-- functions from the parent into the components of the derived type.
if not Is_Derived_Type (Def_Id)
or else Has_New_Non_Standard_Rep (Def_Id)
or else Is_Tagged_Type (Def_Id)
then
Build_Discr_Checking_Funcs (Type_Decl);
elsif Is_Derived_Type (Def_Id)
and then not Is_Tagged_Type (Def_Id)
-- If we have a derived Unchecked_Union, we do not inherit the
-- discriminant checking functions from the parent type since the
-- discriminants are non existent.
and then not Is_Unchecked_Union (Def_Id)
and then Has_Discriminants (Def_Id)
then
declare
Old_Comp : Entity_Id;
begin
Old_Comp :=
First_Component (Base_Type (Underlying_Type (Etype (Def_Id))));
Comp := First_Component (Def_Id);
while Present (Comp) loop
if Ekind (Comp) = E_Component
and then Chars (Comp) = Chars (Old_Comp)
then
Set_Discriminant_Checking_Func (Comp,
Discriminant_Checking_Func (Old_Comp));
end if;
Next_Component (Old_Comp);
Next_Component (Comp);
end loop;
end;
end if;
if Is_Derived_Type (Def_Id)
and then Is_Limited_Type (Def_Id)
and then Is_Tagged_Type (Def_Id)
then
Check_Stream_Attributes (Def_Id);
end if;
-- Update task and controlled component flags, because some of the
-- component types may have been private at the point of the record
-- declaration.
Comp := First_Component (Def_Id);
while Present (Comp) loop
if Has_Task (Etype (Comp)) then
Set_Has_Task (Def_Id);
elsif Has_Controlled_Component (Etype (Comp))
or else (Chars (Comp) /= Name_uParent
and then Is_Controlled (Etype (Comp)))
then
Set_Has_Controlled_Component (Def_Id);
end if;
Next_Component (Comp);
end loop;
-- Creation of the Dispatch Table. Note that a Dispatch Table is
-- created for regular tagged types as well as for Ada types deriving
-- from a C++ Class, but not for tagged types directly corresponding to
-- the C++ classes. In the later case we assume that the Vtable is
-- created in the C++ side and we just use it.
if Is_Tagged_Type (Def_Id) then
if Is_CPP_Class (Def_Id) then
-- Because of the new C++ ABI compatibility we now allow the
-- programer to use the Ada tag (and in this case we must do
-- the normal expansion of the tag)
if Etype (First_Component (Def_Id)) = RTE (RE_Tag)
and then Underlying_Type (Etype (Def_Id)) = Def_Id
then
Expand_Tagged_Root (Def_Id);
end if;
Set_All_DT_Position (Def_Id);
Set_Default_Constructor (Def_Id);
else
-- Usually inherited primitives are not delayed but the first Ada
-- extension of a CPP_Class is an exception since the address of
-- the inherited subprogram has to be inserted in the new Ada
-- Dispatch Table and this is a freezing action (usually the
-- inherited primitive address is inserted in the DT by
-- Inherit_DT)
-- Similarly, if this is an inherited operation whose parent is
-- not frozen yet, it is not in the DT of the parent, and we
-- generate an explicit freeze node for the inherited operation,
-- so that it is properly inserted in the DT of the current type.
declare
Elmt : Elmt_Id := First_Elmt (Primitive_Operations (Def_Id));
Subp : Entity_Id;
begin
while Present (Elmt) loop
Subp := Node (Elmt);
if Present (Alias (Subp)) then
if Is_CPP_Class (Etype (Def_Id)) then
Set_Has_Delayed_Freeze (Subp);
elsif Has_Delayed_Freeze (Alias (Subp))
and then not Is_Frozen (Alias (Subp))
then
Set_Is_Frozen (Subp, False);
Set_Has_Delayed_Freeze (Subp);
end if;
end if;
Next_Elmt (Elmt);
end loop;
end;
if Underlying_Type (Etype (Def_Id)) = Def_Id then
Expand_Tagged_Root (Def_Id);
end if;
-- Unfreeze momentarily the type to add the predefined primitives
-- operations. The reason we unfreeze is so that these predefined
-- operations will indeed end up as primitive operations (which
-- must be before the freeze point).
Set_Is_Frozen (Def_Id, False);
Make_Predefined_Primitive_Specs
(Def_Id, Predef_List, Renamed_Eq);
Insert_List_Before_And_Analyze (N, Predef_List);
-- Ada 2005 (AI-391): For a nonabstract null extension, create
-- wrapper functions for each nonoverridden inherited function
-- with a controlling result of the type. The wrapper for such
-- a function returns an extension aggregate that invokes the
-- the parent function.
if Ada_Version >= Ada_05
and then not Is_Abstract (Def_Id)
and then Is_Null_Extension (Def_Id)
then
Make_Controlling_Function_Wrappers
(Def_Id, Wrapper_Decl_List, Wrapper_Body_List);
Insert_List_Before_And_Analyze (N, Wrapper_Decl_List);
end if;
Set_Is_Frozen (Def_Id, True);
Set_All_DT_Position (Def_Id);
-- Add the controlled component before the freezing actions
-- referenced in those actions.
if Has_New_Controlled_Component (Def_Id) then
Expand_Record_Controller (Def_Id);
end if;
-- Suppress creation of a dispatch table when Java_VM because the
-- dispatching mechanism is handled internally by the JVM.
if not Java_VM then
-- Ada 2005 (AI-251): Build the secondary dispatch tables
declare
ADT : Elist_Id := Access_Disp_Table (Def_Id);
procedure Add_Secondary_Tables (Typ : Entity_Id);
-- Internal subprogram, recursively climb to the ancestors
--------------------------
-- Add_Secondary_Tables --
--------------------------
procedure Add_Secondary_Tables (Typ : Entity_Id) is
E : Entity_Id;
Iface : Elmt_Id;
Result : List_Id;
Suffix_Index : Int;
begin
-- Climb to the ancestor (if any) handling private types
if Present (Full_View (Etype (Typ))) then
if Full_View (Etype (Typ)) /= Typ then
Add_Secondary_Tables (Full_View (Etype (Typ)));
end if;
elsif Etype (Typ) /= Typ then
Add_Secondary_Tables (Etype (Typ));
end if;
if Present (Abstract_Interfaces (Typ))
and then
not Is_Empty_Elmt_List (Abstract_Interfaces (Typ))
then
Iface := First_Elmt (Abstract_Interfaces (Typ));
Suffix_Index := 0;
E := First_Entity (Typ);
while Present (E) loop
if Is_Tag (E) and then Chars (E) /= Name_uTag then
Make_Secondary_DT
(Typ => Def_Id,
Ancestor_Typ => Typ,
Suffix_Index => Suffix_Index,
Iface => Node (Iface),
AI_Tag => E,
Acc_Disp_Tables => ADT,
Result => Result);
Append_Freeze_Actions (Def_Id, Result);
Suffix_Index := Suffix_Index + 1;
Next_Elmt (Iface);
end if;
Next_Entity (E);
end loop;
end if;
end Add_Secondary_Tables;
-- Start of processing to build secondary dispatch tables
begin
-- Handle private types
if Present (Full_View (Def_Id)) then
Add_Secondary_Tables (Full_View (Def_Id));
else
Add_Secondary_Tables (Def_Id);
end if;
Set_Access_Disp_Table (Def_Id, ADT);
Append_Freeze_Actions (Def_Id, Make_DT (Def_Id));
end;
end if;
-- Make sure that the primitives Initialize, Adjust and Finalize
-- are Frozen before other TSS subprograms. We don't want them
-- Frozen inside.
if Is_Controlled (Def_Id) then
if not Is_Limited_Type (Def_Id) then
Append_Freeze_Actions (Def_Id,
Freeze_Entity
(Find_Prim_Op (Def_Id, Name_Adjust), Sloc (Def_Id)));
end if;
Append_Freeze_Actions (Def_Id,
Freeze_Entity
(Find_Prim_Op (Def_Id, Name_Initialize), Sloc (Def_Id)));
Append_Freeze_Actions (Def_Id,
Freeze_Entity
(Find_Prim_Op (Def_Id, Name_Finalize), Sloc (Def_Id)));
end if;
-- Freeze rest of primitive operations
Append_Freeze_Actions
(Def_Id, Predefined_Primitive_Freeze (Def_Id));
Append_Freeze_Actions
(Def_Id, Init_Predefined_Interface_Primitives (Def_Id));
end if;
-- In the non-tagged case, an equality function is provided only for
-- variant records (that are not unchecked unions).
elsif Has_Discriminants (Def_Id)
and then not Is_Limited_Type (Def_Id)
then
declare
Comps : constant Node_Id :=
Component_List (Type_Definition (Type_Decl));
begin
if Present (Comps)
and then Present (Variant_Part (Comps))
then
Build_Variant_Record_Equality (Def_Id);
end if;
end;
end if;
-- Before building the record initialization procedure, if we are
-- dealing with a concurrent record value type, then we must go through
-- the discriminants, exchanging discriminals between the concurrent
-- type and the concurrent record value type. See the section "Handling
-- of Discriminants" in the Einfo spec for details.
if Is_Concurrent_Record_Type (Def_Id)
and then Has_Discriminants (Def_Id)
then
declare
Ctyp : constant Entity_Id :=
Corresponding_Concurrent_Type (Def_Id);
Conc_Discr : Entity_Id;
Rec_Discr : Entity_Id;
Temp : Entity_Id;
begin
Conc_Discr := First_Discriminant (Ctyp);
Rec_Discr := First_Discriminant (Def_Id);
while Present (Conc_Discr) loop
Temp := Discriminal (Conc_Discr);
Set_Discriminal (Conc_Discr, Discriminal (Rec_Discr));
Set_Discriminal (Rec_Discr, Temp);
Set_Discriminal_Link (Discriminal (Conc_Discr), Conc_Discr);
Set_Discriminal_Link (Discriminal (Rec_Discr), Rec_Discr);
Next_Discriminant (Conc_Discr);
Next_Discriminant (Rec_Discr);
end loop;
end;
end if;
if Has_Controlled_Component (Def_Id) then
if No (Controller_Component (Def_Id)) then
Expand_Record_Controller (Def_Id);
end if;
Build_Controlling_Procs (Def_Id);
end if;
Adjust_Discriminants (Def_Id);
Build_Record_Init_Proc (Type_Decl, Def_Id);
-- For tagged type, build bodies of primitive operations. Note that we
-- do this after building the record initialization experiment, since
-- the primitive operations may need the initialization routine
if Is_Tagged_Type (Def_Id) then
Predef_List := Predefined_Primitive_Bodies (Def_Id, Renamed_Eq);
Append_Freeze_Actions (Def_Id, Predef_List);
-- Ada 2005 (AI-391): If any wrappers were created for nonoverridden
-- inherited functions, then add their bodies to the freeze actions.
if Present (Wrapper_Body_List) then
Append_Freeze_Actions (Def_Id, Wrapper_Body_List);
end if;
-- Populate the two auxiliary tables used for dispatching
-- asynchronous, conditional and timed selects for synchronized
-- types that implement a limited interface.
if Ada_Version >= Ada_05
and then not Restriction_Active (No_Dispatching_Calls)
and then Is_Concurrent_Record_Type (Def_Id)
and then Implements_Interface (
Typ => Def_Id,
Kind => Any_Limited_Interface,
Check_Parent => True)
then
Append_Freeze_Actions (Def_Id,
Make_Select_Specific_Data_Table (Def_Id));
end if;
end if;
end Freeze_Record_Type;
------------------------------
-- Freeze_Stream_Operations --
------------------------------
procedure Freeze_Stream_Operations (N : Node_Id; Typ : Entity_Id) is
Names : constant array (1 .. 4) of TSS_Name_Type :=
(TSS_Stream_Input,
TSS_Stream_Output,
TSS_Stream_Read,
TSS_Stream_Write);
Stream_Op : Entity_Id;
begin
-- Primitive operations of tagged types are frozen when the dispatch
-- table is constructed.
if not Comes_From_Source (Typ)
or else Is_Tagged_Type (Typ)
then
return;
end if;
for J in Names'Range loop
Stream_Op := TSS (Typ, Names (J));
if Present (Stream_Op)
and then Is_Subprogram (Stream_Op)
and then Nkind (Unit_Declaration_Node (Stream_Op)) =
N_Subprogram_Declaration
and then not Is_Frozen (Stream_Op)
then
Append_Freeze_Actions
(Typ, Freeze_Entity (Stream_Op, Sloc (N)));
end if;
end loop;
end Freeze_Stream_Operations;
-----------------
-- Freeze_Type --
-----------------
-- Full type declarations are expanded at the point at which the type is
-- frozen. The formal N is the Freeze_Node for the type. Any statements or
-- declarations generated by the freezing (e.g. the procedure generated
-- for initialization) are chained in the Actions field list of the freeze
-- node using Append_Freeze_Actions.
function Freeze_Type (N : Node_Id) return Boolean is
Def_Id : constant Entity_Id := Entity (N);
RACW_Seen : Boolean := False;
Result : Boolean := False;
begin
-- Process associated access types needing special processing
if Present (Access_Types_To_Process (N)) then
declare
E : Elmt_Id := First_Elmt (Access_Types_To_Process (N));
begin
while Present (E) loop
if Is_Remote_Access_To_Class_Wide_Type (Node (E)) then
RACW_Seen := True;
end if;
E := Next_Elmt (E);
end loop;
end;
if RACW_Seen then
-- If there are RACWs designating this type, make stubs now
Remote_Types_Tagged_Full_View_Encountered (Def_Id);
end if;
end if;
-- Freeze processing for record types
if Is_Record_Type (Def_Id) then
if Ekind (Def_Id) = E_Record_Type then
Freeze_Record_Type (N);
-- The subtype may have been declared before the type was frozen. If
-- the type has controlled components it is necessary to create the
-- entity for the controller explicitly because it did not exist at
-- the point of the subtype declaration. Only the entity is needed,
-- the back-end will obtain the layout from the type. This is only
-- necessary if this is constrained subtype whose component list is
-- not shared with the base type.
elsif Ekind (Def_Id) = E_Record_Subtype
and then Has_Discriminants (Def_Id)
and then Last_Entity (Def_Id) /= Last_Entity (Base_Type (Def_Id))
and then Present (Controller_Component (Def_Id))
then
declare
Old_C : constant Entity_Id := Controller_Component (Def_Id);
New_C : Entity_Id;
begin
if Scope (Old_C) = Base_Type (Def_Id) then
-- The entity is the one in the parent. Create new one
New_C := New_Copy (Old_C);
Set_Parent (New_C, Parent (Old_C));
New_Scope (Def_Id);
Enter_Name (New_C);
End_Scope;
end if;
end;
if Is_Itype (Def_Id)
and then Is_Record_Type (Underlying_Type (Scope (Def_Id)))
then
-- The freeze node is only used to introduce the controller,
-- the back-end has no use for it for a discriminated
-- component.
Set_Freeze_Node (Def_Id, Empty);
Set_Has_Delayed_Freeze (Def_Id, False);
Result := True;
end if;
-- Similar process if the controller of the subtype is not present
-- but the parent has it. This can happen with constrained
-- record components where the subtype is an itype.
elsif Ekind (Def_Id) = E_Record_Subtype
and then Is_Itype (Def_Id)
and then No (Controller_Component (Def_Id))
and then Present (Controller_Component (Etype (Def_Id)))
then
declare
Old_C : constant Entity_Id :=
Controller_Component (Etype (Def_Id));
New_C : constant Entity_Id := New_Copy (Old_C);
begin
Set_Next_Entity (New_C, First_Entity (Def_Id));
Set_First_Entity (Def_Id, New_C);
-- The freeze node is only used to introduce the controller,
-- the back-end has no use for it for a discriminated
-- component.
Set_Freeze_Node (Def_Id, Empty);
Set_Has_Delayed_Freeze (Def_Id, False);
Result := True;
end;
end if;
-- Freeze processing for array types
elsif Is_Array_Type (Def_Id) then
Freeze_Array_Type (N);
-- Freeze processing for access types
-- For pool-specific access types, find out the pool object used for
-- this type, needs actual expansion of it in some cases. Here are the
-- different cases :
-- 1. Rep Clause "for Def_Id'Storage_Size use 0;"
-- ---> don't use any storage pool
-- 2. Rep Clause : for Def_Id'Storage_Size use Expr.
-- Expand:
-- Def_Id__Pool : Stack_Bounded_Pool (Expr, DT'Size, DT'Alignment);
-- 3. Rep Clause "for Def_Id'Storage_Pool use a_Pool_Object"
-- ---> Storage Pool is the specified one
-- See GNAT Pool packages in the Run-Time for more details
elsif Ekind (Def_Id) = E_Access_Type
or else Ekind (Def_Id) = E_General_Access_Type
then
declare
Loc : constant Source_Ptr := Sloc (N);
Desig_Type : constant Entity_Id := Designated_Type (Def_Id);
Pool_Object : Entity_Id;
Siz_Exp : Node_Id;
Freeze_Action_Typ : Entity_Id;
begin
if Has_Storage_Size_Clause (Def_Id) then
Siz_Exp := Expression (Parent (Storage_Size_Variable (Def_Id)));
else
Siz_Exp := Empty;
end if;
-- Case 1
-- Rep Clause "for Def_Id'Storage_Size use 0;"
-- ---> don't use any storage pool
if Has_Storage_Size_Clause (Def_Id)
and then Compile_Time_Known_Value (Siz_Exp)
and then Expr_Value (Siz_Exp) = 0
then
null;
-- Case 2
-- Rep Clause : for Def_Id'Storage_Size use Expr.
-- ---> Expand:
-- Def_Id__Pool : Stack_Bounded_Pool
-- (Expr, DT'Size, DT'Alignment);
elsif Has_Storage_Size_Clause (Def_Id) then
declare
DT_Size : Node_Id;
DT_Align : Node_Id;
begin
-- For unconstrained composite types we give a size of zero
-- so that the pool knows that it needs a special algorithm
-- for variable size object allocation.
if Is_Composite_Type (Desig_Type)
and then not Is_Constrained (Desig_Type)
then
DT_Size :=
Make_Integer_Literal (Loc, 0);
DT_Align :=
Make_Integer_Literal (Loc, Maximum_Alignment);
else
DT_Size :=
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Desig_Type, Loc),
Attribute_Name => Name_Max_Size_In_Storage_Elements);
DT_Align :=
Make_Attribute_Reference (Loc,
Prefix => New_Reference_To (Desig_Type, Loc),
Attribute_Name => Name_Alignment);
end if;
Pool_Object :=
Make_Defining_Identifier (Loc,
Chars => New_External_Name (Chars (Def_Id), 'P'));
-- We put the code associated with the pools in the entity
-- that has the later freeze node, usually the acces type
-- but it can also be the designated_type; because the pool
-- code requires both those types to be frozen
if Is_Frozen (Desig_Type)
and then (No (Freeze_Node (Desig_Type))
or else Analyzed (Freeze_Node (Desig_Type)))
then
Freeze_Action_Typ := Def_Id;
-- A Taft amendment type cannot get the freeze actions
-- since the full view is not there.
elsif Is_Incomplete_Or_Private_Type (Desig_Type)
and then No (Full_View (Desig_Type))
then
Freeze_Action_Typ := Def_Id;
else
Freeze_Action_Typ := Desig_Type;
end if;
Append_Freeze_Action (Freeze_Action_Typ,
Make_Object_Declaration (Loc,
Defining_Identifier => Pool_Object,
Object_Definition =>
Make_Subtype_Indication (Loc,
Subtype_Mark =>
New_Reference_To
(RTE (RE_Stack_Bounded_Pool), Loc),
Constraint =>
Make_Index_Or_Discriminant_Constraint (Loc,
Constraints => New_List (
-- First discriminant is the Pool Size
New_Reference_To (
Storage_Size_Variable (Def_Id), Loc),
-- Second discriminant is the element size
DT_Size,
-- Third discriminant is the alignment
DT_Align)))));
end;
Set_Associated_Storage_Pool (Def_Id, Pool_Object);
-- Case 3
-- Rep Clause "for Def_Id'Storage_Pool use a_Pool_Object"
-- ---> Storage Pool is the specified one
elsif Present (Associated_Storage_Pool (Def_Id)) then
-- Nothing to do the associated storage pool has been attached
-- when analyzing the rep. clause
null;
end if;
-- For access-to-controlled types (including class-wide types and
-- Taft-amendment types which potentially have controlled
-- components), expand the list controller object that will store
-- the dynamically allocated objects. Do not do this
-- transformation for expander-generated access types, but do it
-- for types that are the full view of types derived from other
-- private types. Also suppress the list controller in the case
-- of a designated type with convention Java, since this is used
-- when binding to Java API specs, where there's no equivalent of
-- a finalization list and we don't want to pull in the
-- finalization support if not needed.
if not Comes_From_Source (Def_Id)
and then not Has_Private_Declaration (Def_Id)
then
null;
elsif (Controlled_Type (Desig_Type)
and then Convention (Desig_Type) /= Convention_Java)
or else
(Is_Incomplete_Or_Private_Type (Desig_Type)
and then No (Full_View (Desig_Type))
-- An exception is made for types defined in the run-time
-- because Ada.Tags.Tag itself is such a type and cannot
-- afford this unnecessary overhead that would generates a
-- loop in the expansion scheme...
and then not In_Runtime (Def_Id)
-- Another exception is if Restrictions (No_Finalization)
-- is active, since then we know nothing is controlled.
and then not Restriction_Active (No_Finalization))
-- If the designated type is not frozen yet, its controlled
-- status must be retrieved explicitly.
or else (Is_Array_Type (Desig_Type)
and then not Is_Frozen (Desig_Type)
and then Controlled_Type (Component_Type (Desig_Type)))
then
Set_Associated_Final_Chain (Def_Id,
Make_Defining_Identifier (Loc,
New_External_Name (Chars (Def_Id), 'L')));
Append_Freeze_Action (Def_Id,
Make_Object_Declaration (Loc,
Defining_Identifier => Associated_Final_Chain (Def_Id),
Object_Definition =>
New_Reference_To (RTE (RE_List_Controller), Loc)));
end if;
end;
-- Freeze processing for enumeration types
elsif Ekind (Def_Id) = E_Enumeration_Type then
-- We only have something to do if we have a non-standard
-- representation (i.e. at least one literal whose pos value
-- is not the same as its representation)
if Has_Non_Standard_Rep (Def_Id) then
Freeze_Enumeration_Type (N);
end if;
-- Private types that are completed by a derivation from a private
-- type have an internally generated full view, that needs to be
-- frozen. This must be done explicitly because the two views share
-- the freeze node, and the underlying full view is not visible when
-- the freeze node is analyzed.
elsif Is_Private_Type (Def_Id)
and then Is_Derived_Type (Def_Id)
and then Present (Full_View (Def_Id))
and then Is_Itype (Full_View (Def_Id))
and then Has_Private_Declaration (Full_View (Def_Id))
and then Freeze_Node (Full_View (Def_Id)) = N
then
Set_Entity (N, Full_View (Def_Id));
Result := Freeze_Type (N);
Set_Entity (N, Def_Id);
-- All other types require no expander action. There are such cases
-- (e.g. task types and protected types). In such cases, the freeze
-- nodes are there for use by Gigi.
end if;
Freeze_Stream_Operations (N, Def_Id);
return Result;
exception
when RE_Not_Available =>
return False;
end Freeze_Type;
-------------------------
-- Get_Simple_Init_Val --
-------------------------
function Get_Simple_Init_Val
(T : Entity_Id;
Loc : Source_Ptr;
Size : Uint := No_Uint) return Node_Id
is
Val : Node_Id;
Result : Node_Id;
Val_RE : RE_Id;
Size_To_Use : Uint;
-- This is the size to be used for computation of the appropriate
-- initial value for the Normalize_Scalars and Initialize_Scalars case.
Lo_Bound : Uint;
Hi_Bound : Uint;
-- These are the values computed by the procedure Check_Subtype_Bounds
procedure Check_Subtype_Bounds;
-- This procedure examines the subtype T, and its ancestor subtypes and
-- derived types to determine the best known information about the
-- bounds of the subtype. After the call Lo_Bound is set either to
-- No_Uint if no information can be determined, or to a value which
-- represents a known low bound, i.e. a valid value of the subtype can
-- not be less than this value. Hi_Bound is similarly set to a known
-- high bound (valid value cannot be greater than this).
--------------------------
-- Check_Subtype_Bounds --
--------------------------
procedure Check_Subtype_Bounds is
ST1 : Entity_Id;
ST2 : Entity_Id;
Lo : Node_Id;
Hi : Node_Id;
Loval : Uint;
Hival : Uint;
begin
Lo_Bound := No_Uint;
Hi_Bound := No_Uint;
-- Loop to climb ancestor subtypes and derived types
ST1 := T;
loop
if not Is_Discrete_Type (ST1) then
return;
end if;
Lo := Type_Low_Bound (ST1);
Hi := Type_High_Bound (ST1);
if Compile_Time_Known_Value (Lo) then
Loval := Expr_Value (Lo);
if Lo_Bound = No_Uint or else Lo_Bound < Loval then
Lo_Bound := Loval;
end if;
end if;
if Compile_Time_Known_Value (Hi) then
Hival := Expr_Value (Hi);
if Hi_Bound = No_Uint or else Hi_Bound > Hival then
Hi_Bound := Hival;
end if;
end if;
ST2 := Ancestor_Subtype (ST1);
if No (ST2) then
ST2 := Etype (ST1);
end if;
exit when ST1 = ST2;
ST1 := ST2;
end loop;
end Check_Subtype_Bounds;
-- Start of processing for Get_Simple_Init_Val
begin
-- For a private type, we should always have an underlying type
-- (because this was already checked in Needs_Simple_Initialization).
-- What we do is to get the value for the underlying type and then do
-- an Unchecked_Convert to the private type.
if Is_Private_Type (T) then
Val := Get_Simple_Init_Val (Underlying_Type (T), Loc, Size);
-- A special case, if the underlying value is null, then qualify it
-- with the underlying type, so that the null is properly typed
-- Similarly, if it is an aggregate it must be qualified, because an
-- unchecked conversion does not provide a context for it.
if Nkind (Val) = N_Null
or else Nkind (Val) = N_Aggregate
then
Val :=
Make_Qualified_Expression (Loc,
Subtype_Mark =>
New_Occurrence_Of (Underlying_Type (T), Loc),
Expression => Val);
end if;
Result := Unchecked_Convert_To (T, Val);
-- Don't truncate result (important for Initialize/Normalize_Scalars)
if Nkind (Result) = N_Unchecked_Type_Conversion
and then Is_Scalar_Type (Underlying_Type (T))
then
Set_No_Truncation (Result);
end if;
return Result;
-- For scalars, we must have normalize/initialize scalars case
elsif Is_Scalar_Type (T) then
pragma Assert (Init_Or_Norm_Scalars);
-- Compute size of object. If it is given by the caller, we can use
-- it directly, otherwise we use Esize (T) as an estimate. As far as
-- we know this covers all cases correctly.
if Size = No_Uint or else Size <= Uint_0 then
Size_To_Use := UI_Max (Uint_1, Esize (T));
else
Size_To_Use := Size;
end if;
-- Maximum size to use is 64 bits, since we will create values
-- of type Unsigned_64 and the range must fit this type.
if Size_To_Use /= No_Uint and then Size_To_Use > Uint_64 then
Size_To_Use := Uint_64;
end if;
-- Check known bounds of subtype
Check_Subtype_Bounds;
-- Processing for Normalize_Scalars case
if Normalize_Scalars then
-- If zero is invalid, it is a convenient value to use that is
-- for sure an appropriate invalid value in all situations.
if Lo_Bound /= No_Uint and then Lo_Bound > Uint_0 then
Val := Make_Integer_Literal (Loc, 0);
-- Cases where all one bits is the appropriate invalid value
-- For modular types, all 1 bits is either invalid or valid. If
-- it is valid, then there is nothing that can be done since there
-- are no invalid values (we ruled out zero already).
-- For signed integer types that have no negative values, either
-- there is room for negative values, or there is not. If there
-- is, then all 1 bits may be interpretecd as minus one, which is
-- certainly invalid. Alternatively it is treated as the largest
-- positive value, in which case the observation for modular types
-- still applies.
-- For float types, all 1-bits is a NaN (not a number), which is
-- certainly an appropriately invalid value.
elsif Is_Unsigned_Type (T)
or else Is_Floating_Point_Type (T)
or else Is_Enumeration_Type (T)
then
Val := Make_Integer_Literal (Loc, 2 ** Size_To_Use - 1);
-- Resolve as Unsigned_64, because the largest number we
-- can generate is out of range of universal integer.
Analyze_And_Resolve (Val, RTE (RE_Unsigned_64));
-- Case of signed types
else
declare
Signed_Size : constant Uint :=
UI_Min (Uint_63, Size_To_Use - 1);
begin
-- Normally we like to use the most negative number. The
-- one exception is when this number is in the known
-- subtype range and the largest positive number is not in
-- the known subtype range.
-- For this exceptional case, use largest positive value
if Lo_Bound /= No_Uint and then Hi_Bound /= No_Uint
and then Lo_Bound <= (-(2 ** Signed_Size))
and then Hi_Bound < 2 ** Signed_Size
then
Val := Make_Integer_Literal (Loc, 2 ** Signed_Size - 1);
-- Normal case of largest negative value
else
Val := Make_Integer_Literal (Loc, -(2 ** Signed_Size));
end if;
end;
end if;
-- Here for Initialize_Scalars case
else
-- For float types, use float values from System.Scalar_Values
if Is_Floating_Point_Type (T) then
if Root_Type (T) = Standard_Short_Float then
Val_RE := RE_IS_Isf;
elsif Root_Type (T) = Standard_Float then
Val_RE := RE_IS_Ifl;
elsif Root_Type (T) = Standard_Long_Float then
Val_RE := RE_IS_Ilf;
else pragma Assert (Root_Type (T) = Standard_Long_Long_Float);
Val_RE := RE_IS_Ill;
end if;
-- If zero is invalid, use zero values from System.Scalar_Values
elsif Lo_Bound /= No_Uint and then Lo_Bound > Uint_0 then
if Size_To_Use <= 8 then
Val_RE := RE_IS_Iz1;
elsif Size_To_Use <= 16 then
Val_RE := RE_IS_Iz2;
elsif Size_To_Use <= 32 then
Val_RE := RE_IS_Iz4;
else
Val_RE := RE_IS_Iz8;
end if;
-- For unsigned, use unsigned values from System.Scalar_Values
elsif Is_Unsigned_Type (T) then
if Size_To_Use <= 8 then
Val_RE := RE_IS_Iu1;
elsif Size_To_Use <= 16 then
Val_RE := RE_IS_Iu2;
elsif Size_To_Use <= 32 then
Val_RE := RE_IS_Iu4;
else
Val_RE := RE_IS_Iu8;
end if;
-- For signed, use signed values from System.Scalar_Values
else
if Size_To_Use <= 8 then
Val_RE := RE_IS_Is1;
elsif Size_To_Use <= 16 then
Val_RE := RE_IS_Is2;
elsif Size_To_Use <= 32 then
Val_RE := RE_IS_Is4;
else
Val_RE := RE_IS_Is8;
end if;
end if;
Val := New_Occurrence_Of (RTE (Val_RE), Loc);
end if;
-- The final expression is obtained by doing an unchecked conversion
-- of this result to the base type of the required subtype. We use
-- the base type to avoid the unchecked conversion from chopping
-- bits, and then we set Kill_Range_Check to preserve the "bad"
-- value.
Result := Unchecked_Convert_To (Base_Type (T), Val);
-- Ensure result is not truncated, since we want the "bad" bits
-- and also kill range check on result.
if Nkind (Result) = N_Unchecked_Type_Conversion then
Set_No_Truncation (Result);
Set_Kill_Range_Check (Result, True);
end if;
return Result;
-- String or Wide_[Wide]_String (must have Initialize_Scalars set)
elsif Root_Type (T) = Standard_String
or else
Root_Type (T) = Standard_Wide_String
or else
Root_Type (T) = Standard_Wide_Wide_String
then
pragma Assert (Init_Or_Norm_Scalars);
return
Make_Aggregate (Loc,
Component_Associations => New_List (
Make_Component_Association (Loc,
Choices => New_List (
Make_Others_Choice (Loc)),
Expression =>
Get_Simple_Init_Val
(Component_Type (T), Loc, Esize (Root_Type (T))))));
-- Access type is initialized to null
elsif Is_Access_Type (T) then
return
Make_Null (Loc);
-- No other possibilities should arise, since we should only be
-- calling Get_Simple_Init_Val if Needs_Simple_Initialization
-- returned True, indicating one of the above cases held.
else
raise Program_Error;
end if;
exception
when RE_Not_Available =>
return Empty;
end Get_Simple_Init_Val;
------------------------------
-- Has_New_Non_Standard_Rep --
------------------------------
function Has_New_Non_Standard_Rep (T : Entity_Id) return Boolean is
begin
if not Is_Derived_Type (T) then
return Has_Non_Standard_Rep (T)
or else Has_Non_Standard_Rep (Root_Type (T));
-- If Has_Non_Standard_Rep is not set on the derived type, the
-- representation is fully inherited.
elsif not Has_Non_Standard_Rep (T) then
return False;
else
return First_Rep_Item (T) /= First_Rep_Item (Root_Type (T));
-- May need a more precise check here: the First_Rep_Item may
-- be a stream attribute, which does not affect the representation
-- of the type ???
end if;
end Has_New_Non_Standard_Rep;
----------------
-- In_Runtime --
----------------
function In_Runtime (E : Entity_Id) return Boolean is
S1 : Entity_Id := Scope (E);
begin
while Scope (S1) /= Standard_Standard loop
S1 := Scope (S1);
end loop;
return Chars (S1) = Name_System or else Chars (S1) = Name_Ada;
end In_Runtime;
------------------
-- Init_Formals --
------------------
function Init_Formals (Typ : Entity_Id) return List_Id is
Loc : constant Source_Ptr := Sloc (Typ);
Formals : List_Id;
begin
-- First parameter is always _Init : in out typ. Note that we need
-- this to be in/out because in the case of the task record value,
-- there are default record fields (_Priority, _Size, -Task_Info)
-- that may be referenced in the generated initialization routine.
Formals := New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uInit),
In_Present => True,
Out_Present => True,
Parameter_Type => New_Reference_To (Typ, Loc)));
-- For task record value, or type that contains tasks, add two more
-- formals, _Master : Master_Id and _Chain : in out Activation_Chain
-- We also add these parameters for the task record type case.
if Has_Task (Typ)
or else (Is_Record_Type (Typ) and then Is_Task_Record_Type (Typ))
then
Append_To (Formals,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uMaster),
Parameter_Type => New_Reference_To (RTE (RE_Master_Id), Loc)));
Append_To (Formals,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uChain),
In_Present => True,
Out_Present => True,
Parameter_Type =>
New_Reference_To (RTE (RE_Activation_Chain), Loc)));
Append_To (Formals,
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_uTask_Name),
In_Present => True,
Parameter_Type =>
New_Reference_To (Standard_String, Loc)));
end if;
return Formals;
exception
when RE_Not_Available =>
return Empty_List;
end Init_Formals;
-------------------------------------
-- Make_Predefined_Primitive_Specs --
-------------------------------------
procedure Make_Controlling_Function_Wrappers
(Tag_Typ : Entity_Id;
Decl_List : out List_Id;
Body_List : out List_Id)
is
Loc : constant Source_Ptr := Sloc (Tag_Typ);
Prim_Elmt : Elmt_Id;
Subp : Entity_Id;
Actual_List : List_Id;
Formal_List : List_Id;
Formal : Entity_Id;
Par_Formal : Entity_Id;
Formal_Node : Node_Id;
Func_Spec : Node_Id;
Func_Decl : Node_Id;
Func_Body : Node_Id;
Return_Stmt : Node_Id;
begin
Decl_List := New_List;
Body_List := New_List;
Prim_Elmt := First_Elmt (Primitive_Operations (Tag_Typ));
while Present (Prim_Elmt) loop
Subp := Node (Prim_Elmt);
-- If a primitive function with a controlling result of the type has
-- not been overridden by the user, then we must create a wrapper
-- function here that effectively overrides it and invokes the
-- abstract inherited function's nonabstract parent. This can only
-- occur for a null extension. Note that functions with anonymous
-- controlling access results don't qualify and must be overridden.
-- We also exclude Input attributes, since each type will have its
-- own version of Input constructed by the expander. The test for
-- Comes_From_Source is needed to distinguish inherited operations
-- from renamings (which also have Alias set).
if Is_Abstract (Subp)
and then Present (Alias (Subp))
and then not Comes_From_Source (Subp)
and then Ekind (Subp) = E_Function
and then Has_Controlling_Result (Subp)
and then not Is_Access_Type (Etype (Subp))
and then not Is_TSS (Subp, TSS_Stream_Input)
then
Formal_List := No_List;
Formal := First_Formal (Subp);
if Present (Formal) then
Formal_List := New_List;
while Present (Formal) loop
Append
(Make_Parameter_Specification
(Loc,
Defining_Identifier =>
Make_Defining_Identifier (Sloc (Formal),
Chars => Chars (Formal)),
In_Present => In_Present (Parent (Formal)),
Out_Present => Out_Present (Parent (Formal)),
Parameter_Type =>
New_Reference_To (Etype (Formal), Loc),
Expression =>
New_Copy_Tree (Expression (Parent (Formal)))),
Formal_List);
Next_Formal (Formal);
end loop;
end if;
Func_Spec :=
Make_Function_Specification (Loc,
Defining_Unit_Name =>
Make_Defining_Identifier (Loc, Chars (Subp)),
Parameter_Specifications =>
Formal_List,
Result_Definition =>
New_Reference_To (Etype (Subp), Loc));
Func_Decl := Make_Subprogram_Declaration (Loc, Func_Spec);
Append_To (Decl_List, Func_Decl);
-- Build a wrapper body that calls the parent function. The body
-- contains a single return statement that returns an extension
-- aggregate whose ancestor part is a call to the parent function,
-- passing the formals as actuals (with any controlling arguments
-- converted to the types of the corresponding formals of the
-- parent function, which might be anonymous access types), and
-- having a null extension.
Formal := First_Formal (Subp);
Par_Formal := First_Formal (Alias (Subp));
Formal_Node := First (Formal_List);
if Present (Formal) then
Actual_List := New_List;
else
Actual_List := No_List;
end if;
while Present (Formal) loop
if Is_Controlling_Formal (Formal) then
Append_To (Actual_List,
Make_Type_Conversion (Loc,
Subtype_Mark =>
New_Occurrence_Of (Etype (Par_Formal), Loc),
Expression =>
New_Reference_To
(Defining_Identifier (Formal_Node), Loc)));
else
Append_To
(Actual_List,
New_Reference_To
(Defining_Identifier (Formal_Node), Loc));
end if;
Next_Formal (Formal);
Next_Formal (Par_Formal);
Next (Formal_Node);
end loop;
Return_Stmt :=
Make_Return_Statement (Loc,
Expression =>
Make_Extension_Aggregate (Loc,
Ancestor_Part =>
Make_Function_Call (Loc,
Name => New_Reference_To (Alias (Subp), Loc),
Parameter_Associations => Actual_List),
Null_Record_Present => True));
Func_Body :=
Make_Subprogram_Body (Loc,
Specification => New_Copy_Tree (Func_Spec),
Declarations => Empty_List,
Handled_Statement_Sequence =>
Make_Handled_Sequence_Of_Statements (Loc,
Statements => New_List (Return_Stmt)));
Set_Defining_Unit_Name
(Specification (Func_Body),
Make_Defining_Identifier (Loc, Chars (Subp)));
Append_To (Body_List, Func_Body);
-- Replace the inherited function with the wrapper function
-- in the primitive operations list.
Override_Dispatching_Operation
(Tag_Typ, Subp, New_Op => Defining_Unit_Name (Func_Spec));
end if;
Next_Elmt (Prim_Elmt);
end loop;
end Make_Controlling_Function_Wrappers;
------------------
-- Make_Eq_Case --
------------------
-- <Make_Eq_if shared components>
-- case X.D1 is
-- when V1 => <Make_Eq_Case> on subcomponents
-- ...
-- when Vn => <Make_Eq_Case> on subcomponents
-- end case;
function Make_Eq_Case
(E : Entity_Id;
CL : Node_Id;
Discr : Entity_Id := Empty) return List_Id
is
Loc : constant Source_Ptr := Sloc (E);
Result : constant List_Id := New_List;
Variant : Node_Id;
Alt_List : List_Id;
begin
Append_To (Result, Make_Eq_If (E, Component_Items (CL)));
if No (Variant_Part (CL)) then
return Result;
end if;
Variant := First_Non_Pragma (Variants (Variant_Part (CL)));
if No (Variant) then
return Result;
end if;
Alt_List := New_List;
while Present (Variant) loop
Append_To (Alt_List,
Make_Case_Statement_Alternative (Loc,
Discrete_Choices => New_Copy_List (Discrete_Choices (Variant)),
Statements => Make_Eq_Case (E, Component_List (Variant))));
Next_Non_Pragma (Variant);
end loop;
-- If we have an Unchecked_Union, use one of the parameters that
-- captures the discriminants.
if Is_Unchecked_Union (E) then
Append_To (Result,
Make_Case_Statement (Loc,
Expression => New_Reference_To (Discr, Loc),
Alternatives => Alt_List));
else
Append_To (Result,
Make_Case_Statement (Loc,
Expression =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Selector_Name => New_Copy (Name (Variant_Part (CL)))),
Alternatives => Alt_List));
end if;
return Result;
end Make_Eq_Case;
----------------
-- Make_Eq_If --
----------------
-- Generates:
-- if
-- X.C1 /= Y.C1
-- or else
-- X.C2 /= Y.C2
-- ...
-- then
-- return False;
-- end if;
-- or a null statement if the list L is empty
function Make_Eq_If
(E : Entity_Id;
L : List_Id) return Node_Id
is
Loc : constant Source_Ptr := Sloc (E);
C : Node_Id;
Field_Name : Name_Id;
Cond : Node_Id;
begin
if No (L) then
return Make_Null_Statement (Loc);
else
Cond := Empty;
C := First_Non_Pragma (L);
while Present (C) loop
Field_Name := Chars (Defining_Identifier (C));
-- The tags must not be compared they are not part of the value.
-- Note also that in the following, we use Make_Identifier for
-- the component names. Use of New_Reference_To to identify the
-- components would be incorrect because the wrong entities for
-- discriminants could be picked up in the private type case.
if Field_Name /= Name_uTag then
Evolve_Or_Else (Cond,
Make_Op_Ne (Loc,
Left_Opnd =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Selector_Name =>
Make_Identifier (Loc, Field_Name)),
Right_Opnd =>
Make_Selected_Component (Loc,
Prefix => Make_Identifier (Loc, Name_Y),
Selector_Name =>
Make_Identifier (Loc, Field_Name))));
end if;
Next_Non_Pragma (C);
end loop;
if No (Cond) then
return Make_Null_Statement (Loc);
else
return
Make_Implicit_If_Statement (E,
Condition => Cond,
Then_Statements => New_List (
Make_Return_Statement (Loc,
Expression => New_Occurrence_Of (Standard_False, Loc))));
end if;
end if;
end Make_Eq_If;
-------------------------------------
-- Make_Predefined_Primitive_Specs --
-------------------------------------
procedure Make_Predefined_Primitive_Specs
(Tag_Typ : Entity_Id;
Predef_List : out List_Id;
Renamed_Eq : out Node_Id)
is
Loc : constant Source_Ptr := Sloc (Tag_Typ);
Res : constant List_Id := New_List;
Prim : Elmt_Id;
Eq_Needed : Boolean;
Eq_Spec : Node_Id;
Eq_Name : Name_Id := Name_Op_Eq;
function Is_Predefined_Eq_Renaming (Prim : Node_Id) return Boolean;
-- Returns true if Prim is a renaming of an unresolved predefined
-- equality operation.
-------------------------------
-- Is_Predefined_Eq_Renaming --
-------------------------------
function Is_Predefined_Eq_Renaming (Prim : Node_Id) return Boolean is
begin
return Chars (Prim) /= Name_Op_Eq
and then Present (Alias (Prim))
and then Comes_From_Source (Prim)
and then Is_Intrinsic_Subprogram (Alias (Prim))
and then Chars (Alias (Prim)) = Name_Op_Eq;
end Is_Predefined_Eq_Renaming;
-- Start of processing for Make_Predefined_Primitive_Specs
begin
Renamed_Eq := Empty;
-- Spec of _Size
Append_To (Res, Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uSize,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Long_Long_Integer));
-- Spec of _Alignment
Append_To (Res, Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uAlignment,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Integer));
-- Specs for dispatching stream attributes
declare
Stream_Op_TSS_Names :
constant array (Integer range <>) of TSS_Name_Type :=
(TSS_Stream_Read,
TSS_Stream_Write,
TSS_Stream_Input,
TSS_Stream_Output);
begin
for Op in Stream_Op_TSS_Names'Range loop
if Stream_Operation_OK (Tag_Typ, Stream_Op_TSS_Names (Op)) then
Append_To (Res,
Predef_Stream_Attr_Spec (Loc, Tag_Typ,
Stream_Op_TSS_Names (Op)));
end if;
end loop;
end;
-- Spec of "=" if expanded if the type is not limited and if a
-- user defined "=" was not already declared for the non-full
-- view of a private extension
if not Is_Limited_Type (Tag_Typ) then
Eq_Needed := True;
Prim := First_Elmt (Primitive_Operations (Tag_Typ));
while Present (Prim) loop
-- If a primitive is encountered that renames the predefined
-- equality operator before reaching any explicit equality
-- primitive, then we still need to create a predefined
-- equality function, because calls to it can occur via
-- the renaming. A new name is created for the equality
-- to avoid conflicting with any user-defined equality.
-- (Note that this doesn't account for renamings of
-- equality nested within subpackages???)
if Is_Predefined_Eq_Renaming (Node (Prim)) then
Eq_Name := New_External_Name (Chars (Node (Prim)), 'E');
elsif Chars (Node (Prim)) = Name_Op_Eq
and then (No (Alias (Node (Prim)))
or else Nkind (Unit_Declaration_Node (Node (Prim))) =
N_Subprogram_Renaming_Declaration)
and then Etype (First_Formal (Node (Prim))) =
Etype (Next_Formal (First_Formal (Node (Prim))))
and then Base_Type (Etype (Node (Prim))) = Standard_Boolean
then
Eq_Needed := False;
exit;
-- If the parent equality is abstract, the inherited equality is
-- abstract as well, and no body can be created for for it.
elsif Chars (Node (Prim)) = Name_Op_Eq
and then Present (Alias (Node (Prim)))
and then Is_Abstract (Alias (Node (Prim)))
then
Eq_Needed := False;
exit;
end if;
Next_Elmt (Prim);
end loop;
-- If a renaming of predefined equality was found
-- but there was no user-defined equality (so Eq_Needed
-- is still true), then set the name back to Name_Op_Eq.
-- But in the case where a user-defined equality was
-- located after such a renaming, then the predefined
-- equality function is still needed, so Eq_Needed must
-- be set back to True.
if Eq_Name /= Name_Op_Eq then
if Eq_Needed then
Eq_Name := Name_Op_Eq;
else
Eq_Needed := True;
end if;
end if;
if Eq_Needed then
Eq_Spec := Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Eq_Name,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_Y),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Boolean);
Append_To (Res, Eq_Spec);
if Eq_Name /= Name_Op_Eq then
Renamed_Eq := Defining_Unit_Name (Specification (Eq_Spec));
Prim := First_Elmt (Primitive_Operations (Tag_Typ));
while Present (Prim) loop
-- Any renamings of equality that appeared before an
-- overriding equality must be updated to refer to
-- the entity for the predefined equality, otherwise
-- calls via the renaming would get incorrectly
-- resolved to call the user-defined equality function.
if Is_Predefined_Eq_Renaming (Node (Prim)) then
Set_Alias (Node (Prim), Renamed_Eq);
-- Exit upon encountering a user-defined equality
elsif Chars (Node (Prim)) = Name_Op_Eq
and then No (Alias (Node (Prim)))
then
exit;
end if;
Next_Elmt (Prim);
end loop;
end if;
end if;
-- Spec for dispatching assignment
Append_To (Res, Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uAssign,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Out_Present => True,
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y),
Parameter_Type => New_Reference_To (Tag_Typ, Loc)))));
end if;
-- Generate the declarations for the following primitive operations:
-- disp_asynchronous_select
-- disp_conditional_select
-- disp_get_prim_op_kind
-- disp_get_task_id
-- disp_timed_select
-- for limited interfaces and synchronized types that implement a
-- limited interface.
if Ada_Version >= Ada_05
and then
((Is_Interface (Tag_Typ) and then Is_Limited_Record (Tag_Typ))
or else
(Is_Concurrent_Record_Type (Tag_Typ)
and then Implements_Interface (
Typ => Tag_Typ,
Kind => Any_Limited_Interface,
Check_Parent => True)))
then
Append_To (Res,
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Disp_Asynchronous_Select_Spec (Tag_Typ)));
Append_To (Res,
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Disp_Conditional_Select_Spec (Tag_Typ)));
Append_To (Res,
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Disp_Get_Prim_Op_Kind_Spec (Tag_Typ)));
Append_To (Res,
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Disp_Get_Task_Id_Spec (Tag_Typ)));
Append_To (Res,
Make_Subprogram_Declaration (Loc,
Specification =>
Make_Disp_Timed_Select_Spec (Tag_Typ)));
end if;
-- Specs for finalization actions that may be required in case a
-- future extension contain a controlled element. We generate those
-- only for root tagged types where they will get dummy bodies or
-- when the type has controlled components and their body must be
-- generated. It is also impossible to provide those for tagged
-- types defined within s-finimp since it would involve circularity
-- problems
if In_Finalization_Root (Tag_Typ) then
null;
-- We also skip these if finalization is not available
elsif Restriction_Active (No_Finalization) then
null;
elsif Etype (Tag_Typ) = Tag_Typ or else Controlled_Type (Tag_Typ) then
if not Is_Limited_Type (Tag_Typ) then
Append_To (Res,
Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust));
end if;
Append_To (Res, Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Finalize));
end if;
Predef_List := Res;
end Make_Predefined_Primitive_Specs;
---------------------------------
-- Needs_Simple_Initialization --
---------------------------------
function Needs_Simple_Initialization (T : Entity_Id) return Boolean is
begin
-- Check for private type, in which case test applies to the
-- underlying type of the private type.
if Is_Private_Type (T) then
declare
RT : constant Entity_Id := Underlying_Type (T);
begin
if Present (RT) then
return Needs_Simple_Initialization (RT);
else
return False;
end if;
end;
-- Cases needing simple initialization are access types, and, if pragma
-- Normalize_Scalars or Initialize_Scalars is in effect, then all scalar
-- types.
elsif Is_Access_Type (T)
or else (Init_Or_Norm_Scalars and then (Is_Scalar_Type (T)))
then
return True;
-- If Initialize/Normalize_Scalars is in effect, string objects also
-- need initialization, unless they are created in the course of
-- expanding an aggregate (since in the latter case they will be
-- filled with appropriate initializing values before they are used).
elsif Init_Or_Norm_Scalars
and then
(Root_Type (T) = Standard_String
or else Root_Type (T) = Standard_Wide_String
or else Root_Type (T) = Standard_Wide_Wide_String)
and then
(not Is_Itype (T)
or else Nkind (Associated_Node_For_Itype (T)) /= N_Aggregate)
then
return True;
else
return False;
end if;
end Needs_Simple_Initialization;
----------------------
-- Predef_Deep_Spec --
----------------------
function Predef_Deep_Spec
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : TSS_Name_Type;
For_Body : Boolean := False) return Node_Id
is
Prof : List_Id;
Type_B : Entity_Id;
begin
if Name = TSS_Deep_Finalize then
Prof := New_List;
Type_B := Standard_Boolean;
else
Prof := New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_L),
In_Present => True,
Out_Present => True,
Parameter_Type =>
New_Reference_To (RTE (RE_Finalizable_Ptr), Loc)));
Type_B := Standard_Short_Short_Integer;
end if;
Append_To (Prof,
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_V),
In_Present => True,
Out_Present => True,
Parameter_Type => New_Reference_To (Tag_Typ, Loc)));
Append_To (Prof,
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_B),
Parameter_Type => New_Reference_To (Type_B, Loc)));
return Predef_Spec_Or_Body (Loc,
Name => Make_TSS_Name (Tag_Typ, Name),
Tag_Typ => Tag_Typ,
Profile => Prof,
For_Body => For_Body);
exception
when RE_Not_Available =>
return Empty;
end Predef_Deep_Spec;
-------------------------
-- Predef_Spec_Or_Body --
-------------------------
function Predef_Spec_Or_Body
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : Name_Id;
Profile : List_Id;
Ret_Type : Entity_Id := Empty;
For_Body : Boolean := False) return Node_Id
is
Id : constant Entity_Id := Make_Defining_Identifier (Loc, Name);
Spec : Node_Id;
begin
Set_Is_Public (Id, Is_Public (Tag_Typ));
-- The internal flag is set to mark these declarations because
-- they have specific properties. First they are primitives even
-- if they are not defined in the type scope (the freezing point
-- is not necessarily in the same scope), furthermore the
-- predefined equality can be overridden by a user-defined
-- equality, no body will be generated in this case.
Set_Is_Internal (Id);
if not Debug_Generated_Code then
Set_Debug_Info_Off (Id);
end if;
if No (Ret_Type) then
Spec :=
Make_Procedure_Specification (Loc,
Defining_Unit_Name => Id,
Parameter_Specifications => Profile);
else
Spec :=
Make_Function_Specification (Loc,
Defining_Unit_Name => Id,
Parameter_Specifications => Profile,
Result_Definition =>
New_Reference_To (Ret_Type, Loc));
end if;
-- If body case, return empty subprogram body. Note that this is
-- ill-formed, because there is not even a null statement, and
-- certainly not a return in the function case. The caller is
-- expected to do surgery on the body to add the appropriate stuff.
if For_Body then
return Make_Subprogram_Body (Loc, Spec, Empty_List, Empty);
-- For the case of Input/Output attributes applied to an abstract type,
-- generate abstract specifications. These will never be called,
-- but we need the slots allocated in the dispatching table so
-- that typ'Class'Input and typ'Class'Output will work properly.
elsif (Is_TSS (Name, TSS_Stream_Input)
or else
Is_TSS (Name, TSS_Stream_Output))
and then Is_Abstract (Tag_Typ)
then
return Make_Abstract_Subprogram_Declaration (Loc, Spec);
-- Normal spec case, where we return a subprogram declaration
else
return Make_Subprogram_Declaration (Loc, Spec);
end if;
end Predef_Spec_Or_Body;
-----------------------------
-- Predef_Stream_Attr_Spec --
-----------------------------
function Predef_Stream_Attr_Spec
(Loc : Source_Ptr;
Tag_Typ : Entity_Id;
Name : TSS_Name_Type;
For_Body : Boolean := False) return Node_Id
is
Ret_Type : Entity_Id;
begin
if Name = TSS_Stream_Input then
Ret_Type := Tag_Typ;
else
Ret_Type := Empty;
end if;
return Predef_Spec_Or_Body (Loc,
Name => Make_TSS_Name (Tag_Typ, Name),
Tag_Typ => Tag_Typ,
Profile => Build_Stream_Attr_Profile (Loc, Tag_Typ, Name),
Ret_Type => Ret_Type,
For_Body => For_Body);
end Predef_Stream_Attr_Spec;
---------------------------------
-- Predefined_Primitive_Bodies --
---------------------------------
function Predefined_Primitive_Bodies
(Tag_Typ : Entity_Id;
Renamed_Eq : Node_Id) return List_Id
is
Loc : constant Source_Ptr := Sloc (Tag_Typ);
Res : constant List_Id := New_List;
Decl : Node_Id;
Prim : Elmt_Id;
Eq_Needed : Boolean;
Eq_Name : Name_Id;
Ent : Entity_Id;
begin
-- See if we have a predefined "=" operator
if Present (Renamed_Eq) then
Eq_Needed := True;
Eq_Name := Chars (Renamed_Eq);
else
Eq_Needed := False;
Eq_Name := No_Name;
Prim := First_Elmt (Primitive_Operations (Tag_Typ));
while Present (Prim) loop
if Chars (Node (Prim)) = Name_Op_Eq
and then Is_Internal (Node (Prim))
then
Eq_Needed := True;
Eq_Name := Name_Op_Eq;
end if;
Next_Elmt (Prim);
end loop;
end if;
-- Body of _Alignment
Decl := Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uAlignment,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Integer,
For_Body => True);
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, New_List (
Make_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Attribute_Name => Name_Alignment)))));
Append_To (Res, Decl);
-- Body of _Size
Decl := Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uSize,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Long_Long_Integer,
For_Body => True);
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, New_List (
Make_Return_Statement (Loc,
Expression =>
Make_Attribute_Reference (Loc,
Prefix => Make_Identifier (Loc, Name_X),
Attribute_Name => Name_Size)))));
Append_To (Res, Decl);
-- Bodies for Dispatching stream IO routines. We need these only for
-- non-limited types (in the limited case there is no dispatching).
-- We also skip them if dispatching or finalization are not available.
if Stream_Operation_OK (Tag_Typ, TSS_Stream_Read)
and then No (TSS (Tag_Typ, TSS_Stream_Read))
then
Build_Record_Read_Procedure (Loc, Tag_Typ, Decl, Ent);
Append_To (Res, Decl);
end if;
if Stream_Operation_OK (Tag_Typ, TSS_Stream_Write)
and then No (TSS (Tag_Typ, TSS_Stream_Write))
then
Build_Record_Write_Procedure (Loc, Tag_Typ, Decl, Ent);
Append_To (Res, Decl);
end if;
-- Skip bodies of _Input and _Output for the abstract case, since
-- the corresponding specs are abstract (see Predef_Spec_Or_Body)
if not Is_Abstract (Tag_Typ) then
if Stream_Operation_OK (Tag_Typ, TSS_Stream_Input)
and then No (TSS (Tag_Typ, TSS_Stream_Input))
then
Build_Record_Or_Elementary_Input_Function
(Loc, Tag_Typ, Decl, Ent);
Append_To (Res, Decl);
end if;
if Stream_Operation_OK (Tag_Typ, TSS_Stream_Output)
and then No (TSS (Tag_Typ, TSS_Stream_Output))
then
Build_Record_Or_Elementary_Output_Procedure
(Loc, Tag_Typ, Decl, Ent);
Append_To (Res, Decl);
end if;
end if;
-- Generate the bodies for the following primitive operations:
-- disp_asynchronous_select
-- disp_conditional_select
-- disp_get_prim_op_kind
-- disp_get_task_id
-- disp_timed_select
-- for limited interfaces and synchronized types that implement a
-- limited interface. The interface versions will have null bodies.
if Ada_Version >= Ada_05
and then
not Restriction_Active (No_Dispatching_Calls)
and then
((Is_Interface (Tag_Typ) and then Is_Limited_Record (Tag_Typ))
or else
(Is_Concurrent_Record_Type (Tag_Typ)
and then Implements_Interface (
Typ => Tag_Typ,
Kind => Any_Limited_Interface,
Check_Parent => True)))
then
Append_To (Res, Make_Disp_Asynchronous_Select_Body (Tag_Typ));
Append_To (Res, Make_Disp_Conditional_Select_Body (Tag_Typ));
Append_To (Res, Make_Disp_Get_Prim_Op_Kind_Body (Tag_Typ));
Append_To (Res, Make_Disp_Get_Task_Id_Body (Tag_Typ));
Append_To (Res, Make_Disp_Timed_Select_Body (Tag_Typ));
end if;
if not Is_Limited_Type (Tag_Typ) then
-- Body for equality
if Eq_Needed then
Decl :=
Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Eq_Name,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_X),
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier =>
Make_Defining_Identifier (Loc, Name_Y),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
Ret_Type => Standard_Boolean,
For_Body => True);
declare
Def : constant Node_Id := Parent (Tag_Typ);
Stmts : constant List_Id := New_List;
Variant_Case : Boolean := Has_Discriminants (Tag_Typ);
Comps : Node_Id := Empty;
Typ_Def : Node_Id := Type_Definition (Def);
begin
if Variant_Case then
if Nkind (Typ_Def) = N_Derived_Type_Definition then
Typ_Def := Record_Extension_Part (Typ_Def);
end if;
if Present (Typ_Def) then
Comps := Component_List (Typ_Def);
end if;
Variant_Case := Present (Comps)
and then Present (Variant_Part (Comps));
end if;
if Variant_Case then
Append_To (Stmts,
Make_Eq_If (Tag_Typ, Discriminant_Specifications (Def)));
Append_List_To (Stmts, Make_Eq_Case (Tag_Typ, Comps));
Append_To (Stmts,
Make_Return_Statement (Loc,
Expression => New_Reference_To (Standard_True, Loc)));
else
Append_To (Stmts,
Make_Return_Statement (Loc,
Expression =>
Expand_Record_Equality (Tag_Typ,
Typ => Tag_Typ,
Lhs => Make_Identifier (Loc, Name_X),
Rhs => Make_Identifier (Loc, Name_Y),
Bodies => Declarations (Decl))));
end if;
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, Stmts));
end;
Append_To (Res, Decl);
end if;
-- Body for dispatching assignment
Decl :=
Predef_Spec_Or_Body (Loc,
Tag_Typ => Tag_Typ,
Name => Name_uAssign,
Profile => New_List (
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_X),
Out_Present => True,
Parameter_Type => New_Reference_To (Tag_Typ, Loc)),
Make_Parameter_Specification (Loc,
Defining_Identifier => Make_Defining_Identifier (Loc, Name_Y),
Parameter_Type => New_Reference_To (Tag_Typ, Loc))),
For_Body => True);
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, New_List (
Make_Assignment_Statement (Loc,
Name => Make_Identifier (Loc, Name_X),
Expression => Make_Identifier (Loc, Name_Y)))));
Append_To (Res, Decl);
end if;
-- Generate dummy bodies for finalization actions of types that have
-- no controlled components.
-- Skip this processing if we are in the finalization routine in the
-- runtime itself, otherwise we get hopelessly circularly confused!
if In_Finalization_Root (Tag_Typ) then
null;
-- Skip this if finalization is not available
elsif Restriction_Active (No_Finalization) then
null;
elsif (Etype (Tag_Typ) = Tag_Typ or else Is_Controlled (Tag_Typ))
and then not Has_Controlled_Component (Tag_Typ)
then
if not Is_Limited_Type (Tag_Typ) then
Decl := Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Adjust, True);
if Is_Controlled (Tag_Typ) then
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc,
Make_Adjust_Call (
Ref => Make_Identifier (Loc, Name_V),
Typ => Tag_Typ,
Flist_Ref => Make_Identifier (Loc, Name_L),
With_Attach => Make_Identifier (Loc, Name_B))));
else
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, New_List (
Make_Null_Statement (Loc))));
end if;
Append_To (Res, Decl);
end if;
Decl := Predef_Deep_Spec (Loc, Tag_Typ, TSS_Deep_Finalize, True);
if Is_Controlled (Tag_Typ) then
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc,
Make_Final_Call (
Ref => Make_Identifier (Loc, Name_V),
Typ => Tag_Typ,
With_Detach => Make_Identifier (Loc, Name_B))));
else
Set_Handled_Statement_Sequence (Decl,
Make_Handled_Sequence_Of_Statements (Loc, New_List (
Make_Null_Statement (Loc))));
end if;
Append_To (Res, Decl);
end if;
return Res;
end Predefined_Primitive_Bodies;
---------------------------------
-- Predefined_Primitive_Freeze --
---------------------------------
function Predefined_Primitive_Freeze
(Tag_Typ : Entity_Id) return List_Id
is
Loc : constant Source_Ptr := Sloc (Tag_Typ);
Res : constant List_Id := New_List;
Prim : Elmt_Id;
Frnodes : List_Id;
begin
Prim := First_Elmt (Primitive_Operations (Tag_Typ));
while Present (Prim) loop
if Is_Internal (Node (Prim)) then
Frnodes := Freeze_Entity (Node (Prim), Loc);
if Present (Frnodes) then
Append_List_To (Res, Frnodes);
end if;
end if;
Next_Elmt (Prim);
end loop;
return Res;
end Predefined_Primitive_Freeze;
-------------------------
-- Stream_Operation_OK --
-------------------------
function Stream_Operation_OK
(Typ : Entity_Id;
Operation : TSS_Name_Type) return Boolean
is
Has_Inheritable_Stream_Attribute : Boolean := False;
begin
if Is_Limited_Type (Typ)
and then Is_Tagged_Type (Typ)
and then Is_Derived_Type (Typ)
then
-- Special case of a limited type extension: a default implementation
-- of the stream attributes Read and Write exists if the attribute
-- has been specified for an ancestor type.
Has_Inheritable_Stream_Attribute :=
Present (Find_Inherited_TSS (Base_Type (Etype (Typ)), Operation));
end if;
return
not (Is_Limited_Type (Typ)
and then not Has_Inheritable_Stream_Attribute)
and then not Has_Unknown_Discriminants (Typ)
and then RTE_Available (RE_Tag)
and then RTE_Available (RE_Root_Stream_Type)
and then not Restriction_Active (No_Dispatch)
and then not Restriction_Active (No_Streams);
end Stream_Operation_OK;
end Exp_Ch3;
|
------------------------------------------------------------------------
-- Copyright (C) 2010-2020 by Heisenbug Ltd. (github@heisenbug.eu)
--
-- 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);
------------------------------------------------------------------------
-- Msg_Passing.Blackboard
--
-- This package provides message passing based on blackboard semantics.
--
-- This means, there is only one sender, one receiver, and one message
-- at a time. Upon receiving the message, it is erased immediately.
--
------------------------------------------------------------------------
generic
package Msg_Passing.Blackboard is
pragma Pure;
---------------------------------------------------------------------
-- The messaging object.
---------------------------------------------------------------------
type Object is new Msg_Passing.Object with private;
---------------------------------------------------------------------
-- Object.Read
---------------------------------------------------------------------
procedure Read (Instance : in out Object;
Message : out Msg_Passing.Letter);
---------------------------------------------------------------------
-- Object.Write
---------------------------------------------------------------------
procedure Write (Instance : in out Object;
Message : in Msg_Passing.Letter);
private
---------------------------------------------------------------------
-- protected spec Mutex
---------------------------------------------------------------------
protected type Mutex is
------------------------------------------------------------------
-- Blackboard.Get
--
-- Reads the message on the blackboard and erases it. If there is
-- no message, the calling task is blocked until a new message is
-- written on the blackboard.
--
------------------------------------------------------------------
entry Get (Message : out Letter);
------------------------------------------------------------------
-- Blackboard.Put
--
-- Writes a message to the blackboard. If the last message hasn't
-- been read yet, the calling task is blocked until the previous
-- message has been read and erased.
--
------------------------------------------------------------------
entry Put (Message : in Letter);
private
Msg_Available : Boolean := False;
The_Message : Letter;
end Mutex;
---------------------------------------------------------------------
-- Object type completion.
---------------------------------------------------------------------
type Object is new Msg_Passing.Object with
record
Locked : Mutex;
end record;
end Msg_Passing.Blackboard;
|
with Gnat.Heap_Sort_G;
procedure Integer_Sort is
-- Heap sort package requires data to be in index values starting at
-- 1 while index value 0 is used as temporary storage
type Int_Array is array(Natural range <>) of Integer;
Values : Int_Array := (0,1,8,2,7,3,6,4,5);
-- define move and less than subprograms for use by the heap sort package
procedure Move_Int(From : Natural; To : Natural) is
begin
Values(To) := Values(From);
end Move_Int;
function Lt_Int(Left, Right : Natural) return Boolean is
begin
return Values(Left) < Values (Right);
end Lt_Int;
-- Instantiate the generic heap sort package
package Heap_Sort is new Gnat.Heap_Sort_G(Move_Int, Lt_Int);
begin
Heap_Sort.Sort(8);
end Integer_Sort;
requires an Ada05 compiler, e.g GNAT GPL 2007
with Ada.Containers.Generic_Array_Sort;
procedure Integer_Sort is
--
type Int_Array is array(Natural range <>) of Integer;
Values : Int_Array := (0,1,8,2,7,3,6,4,5);
-- Instantiate the generic sort package from the standard Ada library
procedure Sort is new Ada.Containers.Generic_Array_Sort
(Index_Type => Natural,
Element_Type => Integer,
Array_Type => Int_Array);
begin
Sort(Values);
end Integer_Sort;
|
-- Copyright 2008-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/>.
with Pck; use Pck;
procedure P is
W : Wrap;
begin
W := Create;
end P; -- START
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
with Program.Elements.Pragmas;
with Program.Elements.Defining_Identifiers;
with Program.Elements.Defining_Character_Literals;
with Program.Elements.Defining_Operator_Symbols;
with Program.Elements.Defining_Expanded_Names;
with Program.Elements.Type_Declarations;
with Program.Elements.Task_Type_Declarations;
with Program.Elements.Protected_Type_Declarations;
with Program.Elements.Subtype_Declarations;
with Program.Elements.Object_Declarations;
with Program.Elements.Single_Task_Declarations;
with Program.Elements.Single_Protected_Declarations;
with Program.Elements.Number_Declarations;
with Program.Elements.Enumeration_Literal_Specifications;
with Program.Elements.Discriminant_Specifications;
with Program.Elements.Component_Declarations;
with Program.Elements.Loop_Parameter_Specifications;
with Program.Elements.Generalized_Iterator_Specifications;
with Program.Elements.Element_Iterator_Specifications;
with Program.Elements.Procedure_Declarations;
with Program.Elements.Function_Declarations;
with Program.Elements.Parameter_Specifications;
with Program.Elements.Procedure_Body_Declarations;
with Program.Elements.Function_Body_Declarations;
with Program.Elements.Return_Object_Specifications;
with Program.Elements.Package_Declarations;
with Program.Elements.Package_Body_Declarations;
with Program.Elements.Object_Renaming_Declarations;
with Program.Elements.Exception_Renaming_Declarations;
with Program.Elements.Procedure_Renaming_Declarations;
with Program.Elements.Function_Renaming_Declarations;
with Program.Elements.Package_Renaming_Declarations;
with Program.Elements.Generic_Package_Renaming_Declarations;
with Program.Elements.Generic_Procedure_Renaming_Declarations;
with Program.Elements.Generic_Function_Renaming_Declarations;
with Program.Elements.Task_Body_Declarations;
with Program.Elements.Protected_Body_Declarations;
with Program.Elements.Entry_Declarations;
with Program.Elements.Entry_Body_Declarations;
with Program.Elements.Entry_Index_Specifications;
with Program.Elements.Procedure_Body_Stubs;
with Program.Elements.Function_Body_Stubs;
with Program.Elements.Package_Body_Stubs;
with Program.Elements.Task_Body_Stubs;
with Program.Elements.Protected_Body_Stubs;
with Program.Elements.Exception_Declarations;
with Program.Elements.Choice_Parameter_Specifications;
with Program.Elements.Generic_Package_Declarations;
with Program.Elements.Generic_Procedure_Declarations;
with Program.Elements.Generic_Function_Declarations;
with Program.Elements.Package_Instantiations;
with Program.Elements.Procedure_Instantiations;
with Program.Elements.Function_Instantiations;
with Program.Elements.Formal_Object_Declarations;
with Program.Elements.Formal_Type_Declarations;
with Program.Elements.Formal_Procedure_Declarations;
with Program.Elements.Formal_Function_Declarations;
with Program.Elements.Formal_Package_Declarations;
with Program.Elements.Subtype_Indications;
with Program.Elements.Component_Definitions;
with Program.Elements.Discrete_Subtype_Indications;
with Program.Elements.Discrete_Range_Attribute_References;
with Program.Elements.Discrete_Simple_Expression_Ranges;
with Program.Elements.Unknown_Discriminant_Parts;
with Program.Elements.Known_Discriminant_Parts;
with Program.Elements.Record_Definitions;
with Program.Elements.Null_Components;
with Program.Elements.Variant_Parts;
with Program.Elements.Variants;
with Program.Elements.Others_Choices;
with Program.Elements.Anonymous_Access_To_Objects;
with Program.Elements.Anonymous_Access_To_Procedures;
with Program.Elements.Anonymous_Access_To_Functions;
with Program.Elements.Private_Type_Definitions;
with Program.Elements.Private_Extension_Definitions;
with Program.Elements.Incomplete_Type_Definitions;
with Program.Elements.Task_Definitions;
with Program.Elements.Protected_Definitions;
with Program.Elements.Aspect_Specifications;
with Program.Elements.Real_Range_Specifications;
with Program.Elements.Numeric_Literals;
with Program.Elements.String_Literals;
with Program.Elements.Identifiers;
with Program.Elements.Operator_Symbols;
with Program.Elements.Character_Literals;
with Program.Elements.Explicit_Dereferences;
with Program.Elements.Infix_Operators;
with Program.Elements.Function_Calls;
with Program.Elements.Indexed_Components;
with Program.Elements.Slices;
with Program.Elements.Selected_Components;
with Program.Elements.Attribute_References;
with Program.Elements.Record_Aggregates;
with Program.Elements.Extension_Aggregates;
with Program.Elements.Array_Aggregates;
with Program.Elements.Short_Circuit_Operations;
with Program.Elements.Membership_Tests;
with Program.Elements.Null_Literals;
with Program.Elements.Parenthesized_Expressions;
with Program.Elements.Raise_Expressions;
with Program.Elements.Type_Conversions;
with Program.Elements.Qualified_Expressions;
with Program.Elements.Allocators;
with Program.Elements.Case_Expressions;
with Program.Elements.If_Expressions;
with Program.Elements.Quantified_Expressions;
with Program.Elements.Discriminant_Associations;
with Program.Elements.Record_Component_Associations;
with Program.Elements.Array_Component_Associations;
with Program.Elements.Parameter_Associations;
with Program.Elements.Formal_Package_Associations;
with Program.Elements.Null_Statements;
with Program.Elements.Assignment_Statements;
with Program.Elements.If_Statements;
with Program.Elements.Case_Statements;
with Program.Elements.Loop_Statements;
with Program.Elements.While_Loop_Statements;
with Program.Elements.For_Loop_Statements;
with Program.Elements.Block_Statements;
with Program.Elements.Exit_Statements;
with Program.Elements.Goto_Statements;
with Program.Elements.Call_Statements;
with Program.Elements.Simple_Return_Statements;
with Program.Elements.Extended_Return_Statements;
with Program.Elements.Accept_Statements;
with Program.Elements.Requeue_Statements;
with Program.Elements.Delay_Statements;
with Program.Elements.Terminate_Alternative_Statements;
with Program.Elements.Select_Statements;
with Program.Elements.Abort_Statements;
with Program.Elements.Raise_Statements;
with Program.Elements.Code_Statements;
with Program.Elements.Elsif_Paths;
with Program.Elements.Case_Paths;
with Program.Elements.Select_Paths;
with Program.Elements.Case_Expression_Paths;
with Program.Elements.Elsif_Expression_Paths;
with Program.Elements.Use_Clauses;
with Program.Elements.With_Clauses;
with Program.Elements.Component_Clauses;
with Program.Elements.Derived_Types;
with Program.Elements.Derived_Record_Extensions;
with Program.Elements.Enumeration_Types;
with Program.Elements.Signed_Integer_Types;
with Program.Elements.Modular_Types;
with Program.Elements.Root_Types;
with Program.Elements.Floating_Point_Types;
with Program.Elements.Ordinary_Fixed_Point_Types;
with Program.Elements.Decimal_Fixed_Point_Types;
with Program.Elements.Unconstrained_Array_Types;
with Program.Elements.Constrained_Array_Types;
with Program.Elements.Record_Types;
with Program.Elements.Interface_Types;
with Program.Elements.Object_Access_Types;
with Program.Elements.Procedure_Access_Types;
with Program.Elements.Function_Access_Types;
with Program.Elements.Formal_Private_Type_Definitions;
with Program.Elements.Formal_Derived_Type_Definitions;
with Program.Elements.Formal_Discrete_Type_Definitions;
with Program.Elements.Formal_Signed_Integer_Type_Definitions;
with Program.Elements.Formal_Modular_Type_Definitions;
with Program.Elements.Formal_Floating_Point_Definitions;
with Program.Elements.Formal_Ordinary_Fixed_Point_Definitions;
with Program.Elements.Formal_Decimal_Fixed_Point_Definitions;
with Program.Elements.Formal_Unconstrained_Array_Types;
with Program.Elements.Formal_Constrained_Array_Types;
with Program.Elements.Formal_Object_Access_Types;
with Program.Elements.Formal_Procedure_Access_Types;
with Program.Elements.Formal_Function_Access_Types;
with Program.Elements.Formal_Interface_Types;
with Program.Elements.Range_Attribute_References;
with Program.Elements.Simple_Expression_Ranges;
with Program.Elements.Digits_Constraints;
with Program.Elements.Delta_Constraints;
with Program.Elements.Index_Constraints;
with Program.Elements.Discriminant_Constraints;
with Program.Elements.Attribute_Definition_Clauses;
with Program.Elements.Enumeration_Representation_Clauses;
with Program.Elements.Record_Representation_Clauses;
with Program.Elements.At_Clauses;
with Program.Elements.Exception_Handlers;
package Program.Element_Visitors is
pragma Pure (Program.Element_Visitors);
type Element_Visitor is limited interface;
-- See also Safe_Element_Visitors package.
procedure Pragma_Element
(Self : in out Element_Visitor;
Element : not null Program.Elements.Pragmas.Pragma_Access) is null;
procedure Defining_Identifier
(Self : in out Element_Visitor;
Element : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access) is null;
procedure Defining_Character_Literal
(Self : in out Element_Visitor;
Element : not null Program.Elements.Defining_Character_Literals
.Defining_Character_Literal_Access) is null;
procedure Defining_Operator_Symbol
(Self : in out Element_Visitor;
Element : not null Program.Elements.Defining_Operator_Symbols
.Defining_Operator_Symbol_Access) is null;
procedure Defining_Expanded_Name
(Self : in out Element_Visitor;
Element : not null Program.Elements.Defining_Expanded_Names
.Defining_Expanded_Name_Access) is null;
procedure Type_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Type_Declarations
.Type_Declaration_Access) is null;
procedure Task_Type_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Task_Type_Declarations
.Task_Type_Declaration_Access) is null;
procedure Protected_Type_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Protected_Type_Declarations
.Protected_Type_Declaration_Access) is null;
procedure Subtype_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Subtype_Declarations
.Subtype_Declaration_Access) is null;
procedure Object_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Object_Declarations
.Object_Declaration_Access) is null;
procedure Single_Task_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Single_Task_Declarations
.Single_Task_Declaration_Access) is null;
procedure Single_Protected_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Single_Protected_Declarations
.Single_Protected_Declaration_Access) is null;
procedure Number_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Number_Declarations
.Number_Declaration_Access) is null;
procedure Enumeration_Literal_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Enumeration_Literal_Specifications
.Enumeration_Literal_Specification_Access) is null;
procedure Discriminant_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discriminant_Specifications
.Discriminant_Specification_Access) is null;
procedure Component_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Component_Declarations
.Component_Declaration_Access) is null;
procedure Loop_Parameter_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Loop_Parameter_Specifications
.Loop_Parameter_Specification_Access) is null;
procedure Generalized_Iterator_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generalized_Iterator_Specifications
.Generalized_Iterator_Specification_Access) is null;
procedure Element_Iterator_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Element_Iterator_Specifications
.Element_Iterator_Specification_Access) is null;
procedure Procedure_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Declarations
.Procedure_Declaration_Access) is null;
procedure Function_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Declarations
.Function_Declaration_Access) is null;
procedure Parameter_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Parameter_Specifications
.Parameter_Specification_Access) is null;
procedure Procedure_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Body_Declarations
.Procedure_Body_Declaration_Access) is null;
procedure Function_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Body_Declarations
.Function_Body_Declaration_Access) is null;
procedure Return_Object_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Return_Object_Specifications
.Return_Object_Specification_Access) is null;
procedure Package_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Package_Declarations
.Package_Declaration_Access) is null;
procedure Package_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Package_Body_Declarations
.Package_Body_Declaration_Access) is null;
procedure Object_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Object_Renaming_Declarations
.Object_Renaming_Declaration_Access) is null;
procedure Exception_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Exception_Renaming_Declarations
.Exception_Renaming_Declaration_Access) is null;
procedure Procedure_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Renaming_Declarations
.Procedure_Renaming_Declaration_Access) is null;
procedure Function_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Renaming_Declarations
.Function_Renaming_Declaration_Access) is null;
procedure Package_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Package_Renaming_Declarations
.Package_Renaming_Declaration_Access) is null;
procedure Generic_Package_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generic_Package_Renaming_Declarations
.Generic_Package_Renaming_Declaration_Access) is null;
procedure Generic_Procedure_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements
.Generic_Procedure_Renaming_Declarations
.Generic_Procedure_Renaming_Declaration_Access) is null;
procedure Generic_Function_Renaming_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generic_Function_Renaming_Declarations
.Generic_Function_Renaming_Declaration_Access) is null;
procedure Task_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Task_Body_Declarations
.Task_Body_Declaration_Access) is null;
procedure Protected_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Protected_Body_Declarations
.Protected_Body_Declaration_Access) is null;
procedure Entry_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Entry_Declarations
.Entry_Declaration_Access) is null;
procedure Entry_Body_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Entry_Body_Declarations
.Entry_Body_Declaration_Access) is null;
procedure Entry_Index_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Entry_Index_Specifications
.Entry_Index_Specification_Access) is null;
procedure Procedure_Body_Stub
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Body_Stubs
.Procedure_Body_Stub_Access) is null;
procedure Function_Body_Stub
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Body_Stubs
.Function_Body_Stub_Access) is null;
procedure Package_Body_Stub
(Self : in out Element_Visitor;
Element : not null Program.Elements.Package_Body_Stubs
.Package_Body_Stub_Access) is null;
procedure Task_Body_Stub
(Self : in out Element_Visitor;
Element : not null Program.Elements.Task_Body_Stubs.Task_Body_Stub_Access)
is null;
procedure Protected_Body_Stub
(Self : in out Element_Visitor;
Element : not null Program.Elements.Protected_Body_Stubs
.Protected_Body_Stub_Access) is null;
procedure Exception_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Exception_Declarations
.Exception_Declaration_Access) is null;
procedure Choice_Parameter_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Choice_Parameter_Specifications
.Choice_Parameter_Specification_Access) is null;
procedure Generic_Package_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generic_Package_Declarations
.Generic_Package_Declaration_Access) is null;
procedure Generic_Procedure_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generic_Procedure_Declarations
.Generic_Procedure_Declaration_Access) is null;
procedure Generic_Function_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Generic_Function_Declarations
.Generic_Function_Declaration_Access) is null;
procedure Package_Instantiation
(Self : in out Element_Visitor;
Element : not null Program.Elements.Package_Instantiations
.Package_Instantiation_Access) is null;
procedure Procedure_Instantiation
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Instantiations
.Procedure_Instantiation_Access) is null;
procedure Function_Instantiation
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Instantiations
.Function_Instantiation_Access) is null;
procedure Formal_Object_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Object_Declarations
.Formal_Object_Declaration_Access) is null;
procedure Formal_Type_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Type_Declarations
.Formal_Type_Declaration_Access) is null;
procedure Formal_Procedure_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Procedure_Declarations
.Formal_Procedure_Declaration_Access) is null;
procedure Formal_Function_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Function_Declarations
.Formal_Function_Declaration_Access) is null;
procedure Formal_Package_Declaration
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Package_Declarations
.Formal_Package_Declaration_Access) is null;
procedure Subtype_Indication
(Self : in out Element_Visitor;
Element : not null Program.Elements.Subtype_Indications
.Subtype_Indication_Access) is null;
procedure Component_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Component_Definitions
.Component_Definition_Access) is null;
procedure Discrete_Subtype_Indication
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discrete_Subtype_Indications
.Discrete_Subtype_Indication_Access) is null;
procedure Discrete_Range_Attribute_Reference
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discrete_Range_Attribute_References
.Discrete_Range_Attribute_Reference_Access) is null;
procedure Discrete_Simple_Expression_Range
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discrete_Simple_Expression_Ranges
.Discrete_Simple_Expression_Range_Access) is null;
procedure Unknown_Discriminant_Part
(Self : in out Element_Visitor;
Element : not null Program.Elements.Unknown_Discriminant_Parts
.Unknown_Discriminant_Part_Access) is null;
procedure Known_Discriminant_Part
(Self : in out Element_Visitor;
Element : not null Program.Elements.Known_Discriminant_Parts
.Known_Discriminant_Part_Access) is null;
procedure Record_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Record_Definitions
.Record_Definition_Access) is null;
procedure Null_Component
(Self : in out Element_Visitor;
Element : not null Program.Elements.Null_Components.Null_Component_Access)
is null;
procedure Variant_Part
(Self : in out Element_Visitor;
Element : not null Program.Elements.Variant_Parts.Variant_Part_Access)
is null;
procedure Variant
(Self : in out Element_Visitor;
Element : not null Program.Elements.Variants.Variant_Access) is null;
procedure Others_Choice
(Self : in out Element_Visitor;
Element : not null Program.Elements.Others_Choices.Others_Choice_Access)
is null;
procedure Anonymous_Access_To_Object
(Self : in out Element_Visitor;
Element : not null Program.Elements.Anonymous_Access_To_Objects
.Anonymous_Access_To_Object_Access) is null;
procedure Anonymous_Access_To_Procedure
(Self : in out Element_Visitor;
Element : not null Program.Elements.Anonymous_Access_To_Procedures
.Anonymous_Access_To_Procedure_Access) is null;
procedure Anonymous_Access_To_Function
(Self : in out Element_Visitor;
Element : not null Program.Elements.Anonymous_Access_To_Functions
.Anonymous_Access_To_Function_Access) is null;
procedure Private_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Private_Type_Definitions
.Private_Type_Definition_Access) is null;
procedure Private_Extension_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Private_Extension_Definitions
.Private_Extension_Definition_Access) is null;
procedure Incomplete_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Incomplete_Type_Definitions
.Incomplete_Type_Definition_Access) is null;
procedure Task_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Task_Definitions
.Task_Definition_Access) is null;
procedure Protected_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Protected_Definitions
.Protected_Definition_Access) is null;
procedure Aspect_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Aspect_Specifications
.Aspect_Specification_Access) is null;
procedure Real_Range_Specification
(Self : in out Element_Visitor;
Element : not null Program.Elements.Real_Range_Specifications
.Real_Range_Specification_Access) is null;
procedure Numeric_Literal
(Self : in out Element_Visitor;
Element : not null Program.Elements.Numeric_Literals
.Numeric_Literal_Access) is null;
procedure String_Literal
(Self : in out Element_Visitor;
Element : not null Program.Elements.String_Literals.String_Literal_Access)
is null;
procedure Identifier
(Self : in out Element_Visitor;
Element : not null Program.Elements.Identifiers.Identifier_Access)
is null;
procedure Operator_Symbol
(Self : in out Element_Visitor;
Element : not null Program.Elements.Operator_Symbols
.Operator_Symbol_Access) is null;
procedure Character_Literal
(Self : in out Element_Visitor;
Element : not null Program.Elements.Character_Literals
.Character_Literal_Access) is null;
procedure Explicit_Dereference
(Self : in out Element_Visitor;
Element : not null Program.Elements.Explicit_Dereferences
.Explicit_Dereference_Access) is null;
procedure Infix_Operator
(Self : in out Element_Visitor;
Element : not null Program.Elements.Infix_Operators.Infix_Operator_Access)
is null;
procedure Function_Call
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Calls.Function_Call_Access)
is null;
procedure Indexed_Component
(Self : in out Element_Visitor;
Element : not null Program.Elements.Indexed_Components
.Indexed_Component_Access) is null;
procedure Slice
(Self : in out Element_Visitor;
Element : not null Program.Elements.Slices.Slice_Access) is null;
procedure Selected_Component
(Self : in out Element_Visitor;
Element : not null Program.Elements.Selected_Components
.Selected_Component_Access) is null;
procedure Attribute_Reference
(Self : in out Element_Visitor;
Element : not null Program.Elements.Attribute_References
.Attribute_Reference_Access) is null;
procedure Record_Aggregate
(Self : in out Element_Visitor;
Element : not null Program.Elements.Record_Aggregates
.Record_Aggregate_Access) is null;
procedure Extension_Aggregate
(Self : in out Element_Visitor;
Element : not null Program.Elements.Extension_Aggregates
.Extension_Aggregate_Access) is null;
procedure Array_Aggregate
(Self : in out Element_Visitor;
Element : not null Program.Elements.Array_Aggregates
.Array_Aggregate_Access) is null;
procedure Short_Circuit_Operation
(Self : in out Element_Visitor;
Element : not null Program.Elements.Short_Circuit_Operations
.Short_Circuit_Operation_Access) is null;
procedure Membership_Test
(Self : in out Element_Visitor;
Element : not null Program.Elements.Membership_Tests
.Membership_Test_Access) is null;
procedure Null_Literal
(Self : in out Element_Visitor;
Element : not null Program.Elements.Null_Literals.Null_Literal_Access)
is null;
procedure Parenthesized_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.Parenthesized_Expressions
.Parenthesized_Expression_Access) is null;
procedure Raise_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.Raise_Expressions
.Raise_Expression_Access) is null;
procedure Type_Conversion
(Self : in out Element_Visitor;
Element : not null Program.Elements.Type_Conversions
.Type_Conversion_Access) is null;
procedure Qualified_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.Qualified_Expressions
.Qualified_Expression_Access) is null;
procedure Allocator
(Self : in out Element_Visitor;
Element : not null Program.Elements.Allocators.Allocator_Access) is null;
procedure Case_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.Case_Expressions
.Case_Expression_Access) is null;
procedure If_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.If_Expressions.If_Expression_Access)
is null;
procedure Quantified_Expression
(Self : in out Element_Visitor;
Element : not null Program.Elements.Quantified_Expressions
.Quantified_Expression_Access) is null;
procedure Discriminant_Association
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discriminant_Associations
.Discriminant_Association_Access) is null;
procedure Record_Component_Association
(Self : in out Element_Visitor;
Element : not null Program.Elements.Record_Component_Associations
.Record_Component_Association_Access) is null;
procedure Array_Component_Association
(Self : in out Element_Visitor;
Element : not null Program.Elements.Array_Component_Associations
.Array_Component_Association_Access) is null;
procedure Parameter_Association
(Self : in out Element_Visitor;
Element : not null Program.Elements.Parameter_Associations
.Parameter_Association_Access) is null;
procedure Formal_Package_Association
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Package_Associations
.Formal_Package_Association_Access) is null;
procedure Null_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Null_Statements.Null_Statement_Access)
is null;
procedure Assignment_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Assignment_Statements
.Assignment_Statement_Access) is null;
procedure If_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.If_Statements.If_Statement_Access)
is null;
procedure Case_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Case_Statements.Case_Statement_Access)
is null;
procedure Loop_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Loop_Statements.Loop_Statement_Access)
is null;
procedure While_Loop_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.While_Loop_Statements
.While_Loop_Statement_Access) is null;
procedure For_Loop_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.For_Loop_Statements
.For_Loop_Statement_Access) is null;
procedure Block_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Block_Statements
.Block_Statement_Access) is null;
procedure Exit_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Exit_Statements.Exit_Statement_Access)
is null;
procedure Goto_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Goto_Statements.Goto_Statement_Access)
is null;
procedure Call_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Call_Statements.Call_Statement_Access)
is null;
procedure Simple_Return_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Simple_Return_Statements
.Simple_Return_Statement_Access) is null;
procedure Extended_Return_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Extended_Return_Statements
.Extended_Return_Statement_Access) is null;
procedure Accept_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Accept_Statements
.Accept_Statement_Access) is null;
procedure Requeue_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Requeue_Statements
.Requeue_Statement_Access) is null;
procedure Delay_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Delay_Statements
.Delay_Statement_Access) is null;
procedure Terminate_Alternative_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Terminate_Alternative_Statements
.Terminate_Alternative_Statement_Access) is null;
procedure Select_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Select_Statements
.Select_Statement_Access) is null;
procedure Abort_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Abort_Statements
.Abort_Statement_Access) is null;
procedure Raise_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Raise_Statements
.Raise_Statement_Access) is null;
procedure Code_Statement
(Self : in out Element_Visitor;
Element : not null Program.Elements.Code_Statements.Code_Statement_Access)
is null;
procedure Elsif_Path
(Self : in out Element_Visitor;
Element : not null Program.Elements.Elsif_Paths.Elsif_Path_Access)
is null;
procedure Case_Path
(Self : in out Element_Visitor;
Element : not null Program.Elements.Case_Paths.Case_Path_Access) is null;
procedure Select_Path
(Self : in out Element_Visitor;
Element : not null Program.Elements.Select_Paths.Select_Path_Access)
is null;
procedure Case_Expression_Path
(Self : in out Element_Visitor;
Element : not null Program.Elements.Case_Expression_Paths
.Case_Expression_Path_Access) is null;
procedure Elsif_Expression_Path
(Self : in out Element_Visitor;
Element : not null Program.Elements.Elsif_Expression_Paths
.Elsif_Expression_Path_Access) is null;
procedure Use_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.Use_Clauses.Use_Clause_Access)
is null;
procedure With_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.With_Clauses.With_Clause_Access)
is null;
procedure Component_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.Component_Clauses
.Component_Clause_Access) is null;
procedure Derived_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Derived_Types.Derived_Type_Access)
is null;
procedure Derived_Record_Extension
(Self : in out Element_Visitor;
Element : not null Program.Elements.Derived_Record_Extensions
.Derived_Record_Extension_Access) is null;
procedure Enumeration_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Enumeration_Types
.Enumeration_Type_Access) is null;
procedure Signed_Integer_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Signed_Integer_Types
.Signed_Integer_Type_Access) is null;
procedure Modular_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Modular_Types.Modular_Type_Access)
is null;
procedure Root_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Root_Types.Root_Type_Access) is null;
procedure Floating_Point_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Floating_Point_Types
.Floating_Point_Type_Access) is null;
procedure Ordinary_Fixed_Point_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Ordinary_Fixed_Point_Types
.Ordinary_Fixed_Point_Type_Access) is null;
procedure Decimal_Fixed_Point_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Decimal_Fixed_Point_Types
.Decimal_Fixed_Point_Type_Access) is null;
procedure Unconstrained_Array_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Unconstrained_Array_Types
.Unconstrained_Array_Type_Access) is null;
procedure Constrained_Array_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Constrained_Array_Types
.Constrained_Array_Type_Access) is null;
procedure Record_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Record_Types.Record_Type_Access)
is null;
procedure Interface_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Interface_Types.Interface_Type_Access)
is null;
procedure Object_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Object_Access_Types
.Object_Access_Type_Access) is null;
procedure Procedure_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Procedure_Access_Types
.Procedure_Access_Type_Access) is null;
procedure Function_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Function_Access_Types
.Function_Access_Type_Access) is null;
procedure Formal_Private_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Private_Type_Definitions
.Formal_Private_Type_Definition_Access) is null;
procedure Formal_Derived_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Derived_Type_Definitions
.Formal_Derived_Type_Definition_Access) is null;
procedure Formal_Discrete_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Discrete_Type_Definitions
.Formal_Discrete_Type_Definition_Access) is null;
procedure Formal_Signed_Integer_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Signed_Integer_Type_Definitions
.Formal_Signed_Integer_Type_Definition_Access) is null;
procedure Formal_Modular_Type_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Modular_Type_Definitions
.Formal_Modular_Type_Definition_Access) is null;
procedure Formal_Floating_Point_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Floating_Point_Definitions
.Formal_Floating_Point_Definition_Access) is null;
procedure Formal_Ordinary_Fixed_Point_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements
.Formal_Ordinary_Fixed_Point_Definitions
.Formal_Ordinary_Fixed_Point_Definition_Access) is null;
procedure Formal_Decimal_Fixed_Point_Definition
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Decimal_Fixed_Point_Definitions
.Formal_Decimal_Fixed_Point_Definition_Access) is null;
procedure Formal_Unconstrained_Array_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Unconstrained_Array_Types
.Formal_Unconstrained_Array_Type_Access) is null;
procedure Formal_Constrained_Array_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Constrained_Array_Types
.Formal_Constrained_Array_Type_Access) is null;
procedure Formal_Object_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Object_Access_Types
.Formal_Object_Access_Type_Access) is null;
procedure Formal_Procedure_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Procedure_Access_Types
.Formal_Procedure_Access_Type_Access) is null;
procedure Formal_Function_Access_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Function_Access_Types
.Formal_Function_Access_Type_Access) is null;
procedure Formal_Interface_Type
(Self : in out Element_Visitor;
Element : not null Program.Elements.Formal_Interface_Types
.Formal_Interface_Type_Access) is null;
procedure Range_Attribute_Reference
(Self : in out Element_Visitor;
Element : not null Program.Elements.Range_Attribute_References
.Range_Attribute_Reference_Access) is null;
procedure Simple_Expression_Range
(Self : in out Element_Visitor;
Element : not null Program.Elements.Simple_Expression_Ranges
.Simple_Expression_Range_Access) is null;
procedure Digits_Constraint
(Self : in out Element_Visitor;
Element : not null Program.Elements.Digits_Constraints
.Digits_Constraint_Access) is null;
procedure Delta_Constraint
(Self : in out Element_Visitor;
Element : not null Program.Elements.Delta_Constraints
.Delta_Constraint_Access) is null;
procedure Index_Constraint
(Self : in out Element_Visitor;
Element : not null Program.Elements.Index_Constraints
.Index_Constraint_Access) is null;
procedure Discriminant_Constraint
(Self : in out Element_Visitor;
Element : not null Program.Elements.Discriminant_Constraints
.Discriminant_Constraint_Access) is null;
procedure Attribute_Definition_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.Attribute_Definition_Clauses
.Attribute_Definition_Clause_Access) is null;
procedure Enumeration_Representation_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.Enumeration_Representation_Clauses
.Enumeration_Representation_Clause_Access) is null;
procedure Record_Representation_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.Record_Representation_Clauses
.Record_Representation_Clause_Access) is null;
procedure At_Clause
(Self : in out Element_Visitor;
Element : not null Program.Elements.At_Clauses.At_Clause_Access) is null;
procedure Exception_Handler
(Self : in out Element_Visitor;
Element : not null Program.Elements.Exception_Handlers
.Exception_Handler_Access) is null;
end Program.Element_Visitors;
|
No-one has translated the flclient1 example into Ada yet. Be the first to create
flclient1 in Ada and get one free Internet! If you're the author of the Ada
binding, this is a great way to get people to use 0MQ in Ada.
To submit a new translation email it to zeromq-dev@lists.zeromq.org. Please:
* Stick to identical functionality and naming used in examples so that readers
can easily compare languages.
* You MUST place your name as author in the examples so readers can contact you.
* You MUST state in the email that you license your code under the MIT/X11
license.
Subscribe to the email list at http://lists.zeromq.org/mailman/listinfo/zeromq-dev.
|
-----------------------------------------------------------------------
-- servlet-cookies -- Servlet Cookies
-- Copyright (C) 2011, 2012 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Http.Cookies;
package Servlet.Cookies renames Util.Http.Cookies;
|
-----------------------------------------------------------------------
-- popen -- Print the GNAT version by using a pipe
-- Copyright (C) 2011, 2021 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Text_IO;
with Ada.Strings.Unbounded;
with Util.Processes;
with Util.Streams.Pipes;
with Util.Streams.Buffered;
procedure Popen is
Command : constant String := "gnatmake --version";
Pipe : aliased Util.Streams.Pipes.Pipe_Stream;
Buffer : Util.Streams.Buffered.Input_Buffer_Stream;
Content : Ada.Strings.Unbounded.Unbounded_String;
begin
Pipe.Open (Command, Util.Processes.READ);
Buffer.Initialize (Pipe'Unchecked_Access, 1024);
Buffer.Read (Content);
Pipe.Close;
if Pipe.Get_Exit_Status /= 0 then
Ada.Text_IO.Put_Line (Command & " exited with status "
& Integer'Image (Pipe.Get_Exit_Status));
return;
end if;
Ada.Text_IO.Put_Line ("Result: " & Ada.Strings.Unbounded.To_String (Content));
end Popen;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Tools Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <vgodunko@gmail.com> --
-- 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$
------------------------------------------------------------------------------
-- Root package for AST of WSDL.
------------------------------------------------------------------------------
with Ada.Containers;
with League.Strings;
limited with WSDL.AST.Bindings;
limited with WSDL.AST.Descriptions;
limited with WSDL.AST.Faults;
limited with WSDL.AST.Interfaces;
limited with WSDL.AST.Messages;
limited with WSDL.AST.Operations;
limited with WSDL.Iterators;
limited with WSDL.Visitors;
package WSDL.AST is
pragma Preelaborate;
type Qualified_Name is record
Namespace_URI : League.Strings.Universal_String;
Local_Name : League.Strings.Universal_String;
end record;
function Image
(Item : Qualified_Name) return League.Strings.Universal_String;
function Hash (Item : Qualified_Name) return Ada.Containers.Hash_Type;
type Message_Content_Models is (Element, Any, None, Other);
type Message_Directions is (In_Message, Out_Message);
-------------------
-- Abstract Node --
-------------------
type Abstract_Node is abstract tagged record
null;
end record;
type Node_Access is access all Abstract_Node'Class;
not overriding procedure Enter
(Self : not null access Abstract_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is abstract;
not overriding procedure Leave
(Self : not null access Abstract_Node;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is abstract;
not overriding procedure Visit
(Self : not null access Abstract_Node;
Iterator : in out WSDL.Iterators.WSDL_Iterator'Class;
Visitor : in out WSDL.Visitors.WSDL_Visitor'Class;
Control : in out WSDL.Iterators.Traverse_Control) is abstract;
type Binding_Access is access all WSDL.AST.Bindings.Binding_Node'Class;
type Binding_Fault_Access is
access all WSDL.AST.Faults.Binding_Fault_Node'Class;
type Binding_Operation_Access is
access all WSDL.AST.Operations.Binding_Operation_Node'Class;
type Description_Access is
access all WSDL.AST.Descriptions.Description_Node'Class;
type Interface_Access is
access all WSDL.AST.Interfaces.Interface_Node'Class;
type Interface_Fault_Access is
access all WSDL.AST.Faults.Interface_Fault_Node'Class;
type Interface_Message_Access is
access all WSDL.AST.Messages.Interface_Message_Node'Class;
type Interface_Operation_Access is
access all WSDL.AST.Operations.Interface_Operation_Node'Class;
type Interface_Fault_Reference_Access is
access all WSDL.AST.Faults.Interface_Fault_Reference_Node'Class;
end WSDL.AST;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . M U L T I P R O C E S S O R S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2010-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/>. --
-- --
------------------------------------------------------------------------------
with Interfaces.C; use Interfaces.C;
package body System.Multiprocessors is
--------------------
-- Number_Of_CPUs --
--------------------
function Number_Of_CPUs return CPU is
begin
if CPU'Last = 1 then
return 1;
else
declare
function Gnat_Number_Of_CPUs return int;
pragma Import (C, Gnat_Number_Of_CPUs, "__gnat_number_of_cpus");
begin
return CPU (Gnat_Number_Of_CPUs);
end;
end if;
end Number_Of_CPUs;
end System.Multiprocessors;
|
-- Weather proxy device
with Ada.Command_Line;
with Ada.Text_IO;
with GNAT.Formatted_String;
with Ada.Calendar;
with ZMQ;
procedure WUPRoxy is
use type Ada.Calendar.Time;
use type GNAT.Formatted_String.Formatted_String;
function Main return Ada.Command_Line.Exit_Status
is
begin
declare
Context : ZMQ.Context_Type := ZMQ.New_Context;
-- This is where the weather server sits
Frontend : ZMQ.Socket_Type'Class := Context.New_Socket (ZMQ.ZMQ_XSUB);
-- This is our public endpoint for subscribers
Backend : ZMQ.Socket_Type'Class := Context.New_Socket (ZMQ.ZMQ_XPUB);
begin
Frontend.Connect ("tcp://192.168.55.210:5556");
Backend.Bind ("tcp://10.1.1.0:8100");
-- Run the proxy until the user interrupts us
ZMQ.Proxy (Frontend, Backend);
-- We never get here...
Backend.Close;
Frontend.Close;
Context.Term;
end;
return 0;
end Main;
begin
Ada.Command_Line.Set_Exit_Status (Main);
end WUPRoxy;
|
-- 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_drawable_iterator_t is
-- Item
--
type Item is record
data : access xcb.xcb_glx_drawable_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_drawable_iterator_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_drawable_iterator_t.Item,
Element_Array => xcb.xcb_glx_drawable_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_drawable_iterator_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_drawable_iterator_t.Pointer,
Element_Array => xcb.xcb_glx_drawable_iterator_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_drawable_iterator_t;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . A L T I V E C . V E C T O R _ O P E R A T I O N S --
-- --
-- B o d y --
-- --
-- Copyright (C) 2004-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, 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. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with GNAT.Altivec.Low_Level_Vectors; use GNAT.Altivec.Low_Level_Vectors;
package body GNAT.Altivec.Vector_Operations is
--------------------------------------------------------
-- Bodies for generic and specific Altivec operations --
--------------------------------------------------------
-- vec_abs --
function vec_abs
(A : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (abs_v16qi (A));
end vec_abs;
function vec_abs
(A : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (abs_v8hi (A));
end vec_abs;
function vec_abs
(A : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (abs_v4si (A));
end vec_abs;
function vec_abs
(A : vector_float) return vector_float
is
begin
return To_LL_VF (abs_v4sf (A));
end vec_abs;
-- vec_abss --
function vec_abss
(A : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (abss_v16qi (A));
end vec_abss;
function vec_abss
(A : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (abss_v8hi (A));
end vec_abss;
function vec_abss
(A : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (abss_v4si (A));
end vec_abss;
-- vec_add --
function vec_add
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_add;
function vec_add
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_add;
function vec_add
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_add;
function vec_add
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vaddfp (To_LL_VF (A), To_LL_VF (B)));
end vec_add;
-- vec_vaddfp --
function vec_vaddfp
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vaddfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vaddfp;
-- vec_vadduwm --
function vec_vadduwm
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
function vec_vadduwm
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
function vec_vadduwm
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
function vec_vadduwm
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
function vec_vadduwm
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
function vec_vadduwm
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduwm;
-- vec_vadduhm --
function vec_vadduhm
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
function vec_vadduhm
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
function vec_vadduhm
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
function vec_vadduhm
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
function vec_vadduhm
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
function vec_vadduhm
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhm;
-- vec_vaddubm --
function vec_vaddubm
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
function vec_vaddubm
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
function vec_vaddubm
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
function vec_vaddubm
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
function vec_vaddubm
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
function vec_vaddubm
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubm;
-- vec_addc --
function vec_addc
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vaddcuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_addc;
-- vec_adds --
function vec_adds
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_adds;
function vec_adds
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_adds;
function vec_adds
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
function vec_adds
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
function vec_adds
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
function vec_adds
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
function vec_adds
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_adds;
-- vec_vaddsws --
function vec_vaddsws
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vaddsws;
function vec_vaddsws
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vaddsws;
function vec_vaddsws
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vaddsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vaddsws;
-- vec_vadduws --
function vec_vadduws
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduws;
function vec_vadduws
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduws;
function vec_vadduws
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vadduws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vadduws;
-- vec_vaddshs --
function vec_vaddshs
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vaddshs;
function vec_vaddshs
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vaddshs;
function vec_vaddshs
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vaddshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vaddshs;
-- vec_vadduhs --
function vec_vadduhs
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhs;
function vec_vadduhs
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhs;
function vec_vadduhs
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vadduhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vadduhs;
-- vec_vaddsbs --
function vec_vaddsbs
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddsbs;
function vec_vaddsbs
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddsbs;
function vec_vaddsbs
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vaddsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddsbs;
-- vec_vaddubs --
function vec_vaddubs
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubs;
function vec_vaddubs
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubs;
function vec_vaddubs
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vaddubs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vaddubs;
-- vec_and --
function vec_and
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_float;
B : vector_bool_int) return vector_float
is
begin
return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_int;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
function vec_and
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vand (To_LL_VSI (A), To_LL_VSI (B)));
end vec_and;
-- vec_andc --
function vec_andc
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_float;
B : vector_bool_int) return vector_float
is
begin
return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_int;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
function vec_andc
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vandc (To_LL_VSI (A), To_LL_VSI (B)));
end vec_andc;
-- vec_avg --
function vec_avg
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vavgub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_avg;
function vec_avg
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vavgsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_avg;
function vec_avg
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vavguh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_avg;
function vec_avg
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vavgsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_avg;
function vec_avg
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vavguw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_avg;
function vec_avg
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vavgsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_avg;
-- vec_vavgsw --
function vec_vavgsw
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vavgsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vavgsw;
-- vec_vavguw --
function vec_vavguw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vavguw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vavguw;
-- vec_vavgsh --
function vec_vavgsh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vavgsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vavgsh;
-- vec_vavguh --
function vec_vavguh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vavguh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vavguh;
-- vec_vavgsb --
function vec_vavgsb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vavgsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vavgsb;
-- vec_vavgub --
function vec_vavgub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vavgub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vavgub;
-- vec_ceil --
function vec_ceil
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrfip (To_LL_VF (A)));
end vec_ceil;
-- vec_cmpb --
function vec_cmpb
(A : vector_float;
B : vector_float) return vector_signed_int
is
begin
return To_LL_VSI (vcmpbfp (To_LL_VF (A), To_LL_VF (B)));
end vec_cmpb;
-- vec_cmpeq --
function vec_cmpeq
(A : vector_signed_char;
B : vector_signed_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_signed_short;
B : vector_signed_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_signed_int;
B : vector_signed_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_cmpeq;
function vec_cmpeq
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpeqfp (To_LL_VF (A), To_LL_VF (B)));
end vec_cmpeq;
-- vec_vcmpeqfp --
function vec_vcmpeqfp
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpeqfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vcmpeqfp;
-- vec_vcmpequw --
function vec_vcmpequw
(A : vector_signed_int;
B : vector_signed_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vcmpequw;
function vec_vcmpequw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpequw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vcmpequw;
-- vec_vcmpequh --
function vec_vcmpequh
(A : vector_signed_short;
B : vector_signed_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vcmpequh;
function vec_vcmpequh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpequh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vcmpequh;
-- vec_vcmpequb --
function vec_vcmpequb
(A : vector_signed_char;
B : vector_signed_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vcmpequb;
function vec_vcmpequb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpequb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vcmpequb;
-- vec_cmpge --
function vec_cmpge
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgefp (To_LL_VF (A), To_LL_VF (B)));
end vec_cmpge;
-- vec_cmpgt --
function vec_cmpgt
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_signed_char;
B : vector_signed_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_signed_short;
B : vector_signed_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_signed_int;
B : vector_signed_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_cmpgt;
function vec_cmpgt
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtfp (To_LL_VF (A), To_LL_VF (B)));
end vec_cmpgt;
-- vec_vcmpgtfp --
function vec_vcmpgtfp
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vcmpgtfp;
-- vec_vcmpgtsw --
function vec_vcmpgtsw
(A : vector_signed_int;
B : vector_signed_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vcmpgtsw;
-- vec_vcmpgtuw --
function vec_vcmpgtuw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vcmpgtuw;
-- vec_vcmpgtsh --
function vec_vcmpgtsh
(A : vector_signed_short;
B : vector_signed_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vcmpgtsh;
-- vec_vcmpgtuh --
function vec_vcmpgtuh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vcmpgtuh;
-- vec_vcmpgtsb --
function vec_vcmpgtsb
(A : vector_signed_char;
B : vector_signed_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vcmpgtsb;
-- vec_vcmpgtub --
function vec_vcmpgtub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vcmpgtub;
-- vec_cmple --
function vec_cmple
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgefp (To_LL_VF (B), To_LL_VF (A)));
end vec_cmple;
-- vec_cmplt --
function vec_cmplt
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtub (To_LL_VSC (B), To_LL_VSC (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_signed_char;
B : vector_signed_char) return vector_bool_char
is
begin
return To_LL_VBC (vcmpgtsb (To_LL_VSC (B), To_LL_VSC (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtuh (To_LL_VSS (B), To_LL_VSS (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_signed_short;
B : vector_signed_short) return vector_bool_short
is
begin
return To_LL_VBS (vcmpgtsh (To_LL_VSS (B), To_LL_VSS (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtuw (To_LL_VSI (B), To_LL_VSI (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_signed_int;
B : vector_signed_int) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtsw (To_LL_VSI (B), To_LL_VSI (A)));
end vec_cmplt;
function vec_cmplt
(A : vector_float;
B : vector_float) return vector_bool_int
is
begin
return To_LL_VBI (vcmpgtfp (To_LL_VF (B), To_LL_VF (A)));
end vec_cmplt;
-- vec_expte --
function vec_expte
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vexptefp (To_LL_VF (A)));
end vec_expte;
-- vec_floor --
function vec_floor
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrfim (To_LL_VF (A)));
end vec_floor;
-- vec_ld --
function vec_ld
(A : c_long;
B : const_vector_float_ptr) return vector_float
is
begin
return To_LL_VF (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_float_ptr) return vector_float
is
begin
return To_LL_VF (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_bool_int_ptr) return vector_bool_int
is
begin
return To_LL_VBI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_signed_int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_long_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_unsigned_long_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_bool_short_ptr) return vector_bool_short
is
begin
return To_LL_VBS (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_pixel_ptr) return vector_pixel
is
begin
return To_LL_VP (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_signed_short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_bool_char_ptr) return vector_bool_char
is
begin
return To_LL_VBC (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_vector_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvx (A, To_PTR (B)));
end vec_ld;
function vec_ld
(A : c_long;
B : const_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvx (A, To_PTR (B)));
end vec_ld;
-- vec_lde --
function vec_lde
(A : c_long;
B : const_signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvebx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvebx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvehx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvehx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_float_ptr) return vector_float
is
begin
return To_LL_VF (lvewx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvewx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvewx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_long_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvewx (A, To_PTR (B)));
end vec_lde;
function vec_lde
(A : c_long;
B : const_unsigned_long_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvewx (A, To_PTR (B)));
end vec_lde;
-- vec_lvewx --
function vec_lvewx
(A : c_long;
B : float_ptr) return vector_float
is
begin
return To_LL_VF (lvewx (A, To_PTR (B)));
end vec_lvewx;
function vec_lvewx
(A : c_long;
B : int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvewx (A, To_PTR (B)));
end vec_lvewx;
function vec_lvewx
(A : c_long;
B : unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvewx (A, To_PTR (B)));
end vec_lvewx;
function vec_lvewx
(A : c_long;
B : long_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvewx (A, To_PTR (B)));
end vec_lvewx;
function vec_lvewx
(A : c_long;
B : unsigned_long_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvewx (A, To_PTR (B)));
end vec_lvewx;
-- vec_lvehx --
function vec_lvehx
(A : c_long;
B : short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvehx (A, To_PTR (B)));
end vec_lvehx;
function vec_lvehx
(A : c_long;
B : unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvehx (A, To_PTR (B)));
end vec_lvehx;
-- vec_lvebx --
function vec_lvebx
(A : c_long;
B : signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvebx (A, To_PTR (B)));
end vec_lvebx;
function vec_lvebx
(A : c_long;
B : unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvebx (A, To_PTR (B)));
end vec_lvebx;
-- vec_ldl --
function vec_ldl
(A : c_long;
B : const_vector_float_ptr) return vector_float
is
begin
return To_LL_VF (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_float_ptr) return vector_float
is
begin
return To_LL_VF (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_bool_int_ptr) return vector_bool_int
is
begin
return To_LL_VBI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_signed_int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_int_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_long_ptr) return vector_signed_int
is
begin
return To_LL_VSI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_unsigned_int_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_unsigned_long_ptr) return vector_unsigned_int
is
begin
return To_LL_VUI (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_bool_short_ptr) return vector_bool_short
is
begin
return To_LL_VBS (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_pixel_ptr) return vector_pixel
is
begin
return To_LL_VP (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_signed_short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_short_ptr) return vector_signed_short
is
begin
return To_LL_VSS (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_unsigned_short_ptr) return vector_unsigned_short
is
begin
return To_LL_VUS (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_bool_char_ptr) return vector_bool_char
is
begin
return To_LL_VBC (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_signed_char_ptr) return vector_signed_char
is
begin
return To_LL_VSC (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_vector_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvxl (A, To_PTR (B)));
end vec_ldl;
function vec_ldl
(A : c_long;
B : const_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvxl (A, To_PTR (B)));
end vec_ldl;
-- vec_loge --
function vec_loge
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vlogefp (To_LL_VF (A)));
end vec_loge;
-- vec_lvsl --
function vec_lvsl
(A : c_long;
B : constv_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_signed_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_unsigned_short_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_short_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_unsigned_int_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_int_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_unsigned_long_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_long_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
function vec_lvsl
(A : c_long;
B : constv_float_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsl (A, To_PTR (B)));
end vec_lvsl;
-- vec_lvsr --
function vec_lvsr
(A : c_long;
B : constv_unsigned_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_signed_char_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_unsigned_short_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_short_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_unsigned_int_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_int_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_unsigned_long_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_long_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
function vec_lvsr
(A : c_long;
B : constv_float_ptr) return vector_unsigned_char
is
begin
return To_LL_VUC (lvsr (A, To_PTR (B)));
end vec_lvsr;
-- vec_madd --
function vec_madd
(A : vector_float;
B : vector_float;
C : vector_float) return vector_float
is
begin
return vmaddfp (A, B, C);
end vec_madd;
-- vec_madds --
function vec_madds
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_short) return vector_signed_short
is
begin
return vmhaddshs (A, B, C);
end vec_madds;
-- vec_max --
function vec_max
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_max;
function vec_max
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_max;
function vec_max
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_max;
function vec_max
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmaxfp (To_LL_VF (A), To_LL_VF (B)));
end vec_max;
-- vec_vmaxfp --
function vec_vmaxfp
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmaxfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vmaxfp;
-- vec_vmaxsw --
function vec_vmaxsw
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxsw;
function vec_vmaxsw
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxsw;
function vec_vmaxsw
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmaxsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxsw;
-- vec_vmaxuw --
function vec_vmaxuw
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxuw;
function vec_vmaxuw
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxuw;
function vec_vmaxuw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmaxuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmaxuw;
-- vec_vmaxsh --
function vec_vmaxsh
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxsh;
function vec_vmaxsh
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxsh;
function vec_vmaxsh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmaxsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxsh;
-- vec_vmaxuh --
function vec_vmaxuh
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxuh;
function vec_vmaxuh
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxuh;
function vec_vmaxuh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmaxuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmaxuh;
-- vec_vmaxsb --
function vec_vmaxsb
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxsb;
function vec_vmaxsb
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxsb;
function vec_vmaxsb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmaxsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxsb;
-- vec_vmaxub --
function vec_vmaxub
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxub;
function vec_vmaxub
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxub;
function vec_vmaxub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmaxub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmaxub;
-- vec_mergeh --
function vec_mergeh
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_pixel;
B : vector_pixel) return vector_pixel
is
begin
return To_LL_VP (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergeh;
function vec_mergeh
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergeh;
-- vec_vmrghw --
function vec_vmrghw
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrghw;
function vec_vmrghw
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrghw;
function vec_vmrghw
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrghw;
function vec_vmrghw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmrghw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrghw;
-- vec_vmrghh --
function vec_vmrghh
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrghh;
function vec_vmrghh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrghh;
function vec_vmrghh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrghh;
function vec_vmrghh
(A : vector_pixel;
B : vector_pixel) return vector_pixel
is
begin
return To_LL_VP (vmrghh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrghh;
-- vec_vmrghb --
function vec_vmrghb
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrghb;
function vec_vmrghb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrghb;
function vec_vmrghb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmrghb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrghb;
-- vec_mergel --
function vec_mergel
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergel;
function vec_mergel
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergel;
function vec_mergel
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mergel;
function vec_mergel
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergel;
function vec_mergel
(A : vector_pixel;
B : vector_pixel) return vector_pixel
is
begin
return To_LL_VP (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergel;
function vec_mergel
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergel;
function vec_mergel
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mergel;
function vec_mergel
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergel;
function vec_mergel
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergel;
function vec_mergel
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergel;
function vec_mergel
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_mergel;
-- vec_vmrglw --
function vec_vmrglw
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrglw;
function vec_vmrglw
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrglw;
function vec_vmrglw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrglw;
function vec_vmrglw
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vmrglw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vmrglw;
-- vec_vmrglh --
function vec_vmrglh
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrglh;
function vec_vmrglh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrglh;
function vec_vmrglh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrglh;
function vec_vmrglh
(A : vector_pixel;
B : vector_pixel) return vector_pixel
is
begin
return To_LL_VP (vmrglh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmrglh;
-- vec_vmrglb --
function vec_vmrglb
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrglb;
function vec_vmrglb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrglb;
function vec_vmrglb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vmrglb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmrglb;
-- vec_mfvscr --
function vec_mfvscr return vector_unsigned_short
is
begin
return To_LL_VUS (mfvscr);
end vec_mfvscr;
-- vec_min --
function vec_min
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_min;
function vec_min
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_min;
function vec_min
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_min;
function vec_min
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vminfp (To_LL_VF (A), To_LL_VF (B)));
end vec_min;
-- vec_vminfp --
function vec_vminfp
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vminfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vminfp;
-- vec_vminsw --
function vec_vminsw
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminsw;
function vec_vminsw
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminsw;
function vec_vminsw
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vminsw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminsw;
-- vec_vminuw --
function vec_vminuw
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminuw;
function vec_vminuw
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminuw;
function vec_vminuw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vminuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vminuw;
-- vec_vminsh --
function vec_vminsh
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminsh;
function vec_vminsh
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminsh;
function vec_vminsh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vminsh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminsh;
-- vec_vminuh --
function vec_vminuh
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminuh;
function vec_vminuh
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminuh;
function vec_vminuh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vminuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vminuh;
-- vec_vminsb --
function vec_vminsb
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminsb;
function vec_vminsb
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminsb;
function vec_vminsb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vminsb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminsb;
-- vec_vminub --
function vec_vminub
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminub;
function vec_vminub
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminub;
function vec_vminub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vminub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vminub;
-- vec_mladd --
function vec_mladd
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_short) return vector_signed_short
is
begin
return vmladduhm (A, B, C);
end vec_mladd;
function vec_mladd
(A : vector_signed_short;
B : vector_unsigned_short;
C : vector_unsigned_short) return vector_signed_short
is
begin
return vmladduhm (A, To_LL_VSS (B), To_LL_VSS (C));
end vec_mladd;
function vec_mladd
(A : vector_unsigned_short;
B : vector_signed_short;
C : vector_signed_short) return vector_signed_short
is
begin
return vmladduhm (To_LL_VSS (A), B, C);
end vec_mladd;
function vec_mladd
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_short) return vector_unsigned_short
is
begin
return
To_LL_VUS (vmladduhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSS (C)));
end vec_mladd;
-- vec_mradds --
function vec_mradds
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_short) return vector_signed_short
is
begin
return vmhraddshs (A, B, C);
end vec_mradds;
-- vec_msum --
function vec_msum
(A : vector_unsigned_char;
B : vector_unsigned_char;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumubm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C)));
end vec_msum;
function vec_msum
(A : vector_signed_char;
B : vector_unsigned_char;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsummbm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C)));
end vec_msum;
function vec_msum
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumuhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_msum;
function vec_msum
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsumshm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_msum;
-- vec_vmsumshm --
function vec_vmsumshm
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsumshm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_vmsumshm;
-- vec_vmsumuhm --
function vec_vmsumuhm
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumuhm (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_vmsumuhm;
-- vec_vmsummbm --
function vec_vmsummbm
(A : vector_signed_char;
B : vector_unsigned_char;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsummbm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C)));
end vec_vmsummbm;
-- vec_vmsumubm --
function vec_vmsumubm
(A : vector_unsigned_char;
B : vector_unsigned_char;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumubm (To_LL_VSC (A), To_LL_VSC (B), To_LL_VSI (C)));
end vec_vmsumubm;
-- vec_msums --
function vec_msums
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumuhs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_msums;
function vec_msums
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsumshs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_msums;
-- vec_vmsumshs --
function vec_vmsumshs
(A : vector_signed_short;
B : vector_signed_short;
C : vector_signed_int) return vector_signed_int
is
begin
return
To_LL_VSI (vmsumshs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_vmsumshs;
-- vec_vmsumuhs --
function vec_vmsumuhs
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vmsumuhs (To_LL_VSS (A), To_LL_VSS (B), To_LL_VSI (C)));
end vec_vmsumuhs;
-- vec_mtvscr --
procedure vec_mtvscr
(A : vector_signed_int)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_unsigned_int)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_bool_int)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_signed_short)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_unsigned_short)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_bool_short)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_pixel)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_signed_char)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_unsigned_char)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
procedure vec_mtvscr
(A : vector_bool_char)
is
begin
mtvscr (To_LL_VSI (A));
end vec_mtvscr;
-- vec_mule --
function vec_mule
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vmuleub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mule;
function vec_mule
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vmulesb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mule;
function vec_mule
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vmuleuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mule;
function vec_mule
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vmulesh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mule;
-- vec_vmulesh --
function vec_vmulesh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vmulesh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmulesh;
-- vec_vmuleuh --
function vec_vmuleuh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vmuleuh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmuleuh;
-- vec_vmulesb --
function vec_vmulesb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vmuleub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmulesb;
-- vec_vmuleub --
function vec_vmuleub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vmuleub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmuleub;
-- vec_mulo --
function vec_mulo
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vmuloub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mulo;
function vec_mulo
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vmulosb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_mulo;
function vec_mulo
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vmulouh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mulo;
function vec_mulo
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vmulosh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_mulo;
-- vec_vmulosh --
function vec_vmulosh
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vmulosh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmulosh;
-- vec_vmulouh --
function vec_vmulouh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vmulouh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vmulouh;
-- vec_vmulosb --
function vec_vmulosb
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vmulosb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmulosb;
-- vec_vmuloub --
function vec_vmuloub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vmuloub (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vmuloub;
-- vec_nmsub --
function vec_nmsub
(A : vector_float;
B : vector_float;
C : vector_float) return vector_float
is
begin
return To_LL_VF (vnmsubfp (To_LL_VF (A), To_LL_VF (B), To_LL_VF (C)));
end vec_nmsub;
-- vec_nor --
function vec_nor
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
function vec_nor
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vnor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_nor;
-- vec_or --
function vec_or
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_float;
B : vector_bool_int) return vector_float
is
begin
return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_int;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
function vec_or
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_or;
-- vec_pack --
function vec_pack
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_char
is
begin
return To_LL_VSC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_pack;
function vec_pack
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_pack;
function vec_pack
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_char
is
begin
return To_LL_VBC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_pack;
function vec_pack
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_short
is
begin
return To_LL_VSS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_pack;
function vec_pack
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_pack;
function vec_pack
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_short
is
begin
return To_LL_VBS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_pack;
-- vec_vpkuwum --
function vec_vpkuwum
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_short
is
begin
return To_LL_VBS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkuwum;
function vec_vpkuwum
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_short
is
begin
return To_LL_VSS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkuwum;
function vec_vpkuwum
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkuwum (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkuwum;
-- vec_vpkuhum --
function vec_vpkuhum
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_char
is
begin
return To_LL_VBC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkuhum;
function vec_vpkuhum
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_char
is
begin
return To_LL_VSC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkuhum;
function vec_vpkuhum
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkuhum (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkuhum;
-- vec_packpx --
function vec_packpx
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_pixel
is
begin
return To_LL_VP (vpkpx (To_LL_VSI (A), To_LL_VSI (B)));
end vec_packpx;
-- vec_packs --
function vec_packs
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B)));
end vec_packs;
function vec_packs
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_char
is
begin
return To_LL_VSC (vpkshss (To_LL_VSS (A), To_LL_VSS (B)));
end vec_packs;
function vec_packs
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B)));
end vec_packs;
function vec_packs
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_short
is
begin
return To_LL_VSS (vpkswss (To_LL_VSI (A), To_LL_VSI (B)));
end vec_packs;
-- vec_vpkswss --
function vec_vpkswss
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_short
is
begin
return To_LL_VSS (vpkswss (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkswss;
-- vec_vpkuwus --
function vec_vpkuwus
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkuwus;
-- vec_vpkshss --
function vec_vpkshss
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_char
is
begin
return To_LL_VSC (vpkshss (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkshss;
-- vec_vpkuhus --
function vec_vpkuhus
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkuhus;
-- vec_packsu --
function vec_packsu
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkuhus (To_LL_VSS (A), To_LL_VSS (B)));
end vec_packsu;
function vec_packsu
(A : vector_signed_short;
B : vector_signed_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkshus (To_LL_VSS (A), To_LL_VSS (B)));
end vec_packsu;
function vec_packsu
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkuwus (To_LL_VSI (A), To_LL_VSI (B)));
end vec_packsu;
function vec_packsu
(A : vector_signed_int;
B : vector_signed_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkswus (To_LL_VSI (A), To_LL_VSI (B)));
end vec_packsu;
-- vec_vpkswus --
function vec_vpkswus
(A : vector_signed_int;
B : vector_signed_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vpkswus (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vpkswus;
-- vec_vpkshus --
function vec_vpkshus
(A : vector_signed_short;
B : vector_signed_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vpkshus (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vpkshus;
-- vec_perm --
function vec_perm
(A : vector_float;
B : vector_float;
C : vector_unsigned_char) return vector_float
is
begin
return
To_LL_VF (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_signed_int;
B : vector_signed_int;
C : vector_unsigned_char) return vector_signed_int
is
begin
return
To_LL_VSI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_unsigned_int;
B : vector_unsigned_int;
C : vector_unsigned_char) return vector_unsigned_int
is
begin
return
To_LL_VUI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_bool_int;
B : vector_bool_int;
C : vector_unsigned_char) return vector_bool_int
is
begin
return
To_LL_VBI (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_signed_short;
B : vector_signed_short;
C : vector_unsigned_char) return vector_signed_short
is
begin
return
To_LL_VSS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_char) return vector_unsigned_short
is
begin
return
To_LL_VUS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_bool_short;
B : vector_bool_short;
C : vector_unsigned_char) return vector_bool_short
is
begin
return
To_LL_VBS (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_pixel;
B : vector_pixel;
C : vector_unsigned_char) return vector_pixel
is
begin
return To_LL_VP
(vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_signed_char;
B : vector_signed_char;
C : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC
(vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_unsigned_char;
B : vector_unsigned_char;
C : vector_unsigned_char) return vector_unsigned_char
is
begin
return
To_LL_VUC (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
function vec_perm
(A : vector_bool_char;
B : vector_bool_char;
C : vector_unsigned_char) return vector_bool_char
is
begin
return
To_LL_VBC (vperm_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSC (C)));
end vec_perm;
-- vec_re --
function vec_re
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrefp (To_LL_VF (A)));
end vec_re;
-- vec_rl --
function vec_rl
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vrlb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_rl;
function vec_rl
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vrlb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_rl;
function vec_rl
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vrlh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_rl;
function vec_rl
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vrlh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_rl;
function vec_rl
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vrlw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_rl;
function vec_rl
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vrlw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_rl;
-- vec_vrlw --
function vec_vrlw
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vrlw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vrlw;
function vec_vrlw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vrlw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vrlw;
-- vec_vrlh --
function vec_vrlh
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vrlh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vrlh;
function vec_vrlh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vrlh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vrlh;
-- vec_vrlb --
function vec_vrlb
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vrlb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vrlb;
function vec_vrlb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vrlb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vrlb;
-- vec_round --
function vec_round
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrfin (To_LL_VF (A)));
end vec_round;
-- vec_rsqrte --
function vec_rsqrte
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrsqrtefp (To_LL_VF (A)));
end vec_rsqrte;
-- vec_sel --
function vec_sel
(A : vector_float;
B : vector_float;
C : vector_bool_int) return vector_float
is
begin
return To_LL_VF (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_float;
B : vector_float;
C : vector_unsigned_int) return vector_float
is
begin
return To_LL_VF (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_int;
B : vector_signed_int;
C : vector_bool_int) return vector_signed_int
is
begin
return
To_LL_VSI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_int;
B : vector_signed_int;
C : vector_unsigned_int) return vector_signed_int
is
begin
return
To_LL_VSI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_int;
B : vector_unsigned_int;
C : vector_bool_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_int;
B : vector_unsigned_int;
C : vector_unsigned_int) return vector_unsigned_int
is
begin
return
To_LL_VUI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_int;
B : vector_bool_int;
C : vector_bool_int) return vector_bool_int
is
begin
return
To_LL_VBI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_int;
B : vector_bool_int;
C : vector_unsigned_int) return vector_bool_int
is
begin
return
To_LL_VBI (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_short;
B : vector_signed_short;
C : vector_bool_short) return vector_signed_short
is
begin
return
To_LL_VSS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_short;
B : vector_signed_short;
C : vector_unsigned_short) return vector_signed_short
is
begin
return
To_LL_VSS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_bool_short) return vector_unsigned_short
is
begin
return
To_LL_VUS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_short;
B : vector_unsigned_short;
C : vector_unsigned_short) return vector_unsigned_short
is
begin
return
To_LL_VUS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_short;
B : vector_bool_short;
C : vector_bool_short) return vector_bool_short
is
begin
return
To_LL_VBS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_short;
B : vector_bool_short;
C : vector_unsigned_short) return vector_bool_short
is
begin
return
To_LL_VBS (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_char;
B : vector_signed_char;
C : vector_bool_char) return vector_signed_char
is
begin
return
To_LL_VSC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_signed_char;
B : vector_signed_char;
C : vector_unsigned_char) return vector_signed_char
is
begin
return
To_LL_VSC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_char;
B : vector_unsigned_char;
C : vector_bool_char) return vector_unsigned_char
is
begin
return
To_LL_VUC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_unsigned_char;
B : vector_unsigned_char;
C : vector_unsigned_char) return vector_unsigned_char
is
begin
return
To_LL_VUC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_char;
B : vector_bool_char;
C : vector_bool_char) return vector_bool_char
is
begin
return
To_LL_VBC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
function vec_sel
(A : vector_bool_char;
B : vector_bool_char;
C : vector_unsigned_char) return vector_bool_char
is
begin
return
To_LL_VBC (vsel_4si (To_LL_VSI (A), To_LL_VSI (B), To_LL_VSI (C)));
end vec_sel;
-- vec_sl --
function vec_sl
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vslb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sl;
function vec_sl
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vslb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sl;
function vec_sl
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vslh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sl;
function vec_sl
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vslh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sl;
function vec_sl
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vslw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sl;
function vec_sl
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vslw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sl;
-- vec_vslw --
function vec_vslw
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vslw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vslw;
function vec_vslw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vslw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vslw;
-- vec_vslh --
function vec_vslh
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vslh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vslh;
function vec_vslh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vslh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vslh;
-- vec_vslb --
function vec_vslb
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vslb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vslb;
function vec_vslb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vslb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vslb;
-- vec_sll --
function vec_sll
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_int;
B : vector_unsigned_short) return vector_signed_int
is
begin
return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_int;
B : vector_unsigned_char) return vector_signed_int
is
begin
return To_LL_VSI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_int;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_int;
B : vector_unsigned_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_int;
B : vector_unsigned_short) return vector_bool_int
is
begin
return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_int;
B : vector_unsigned_char) return vector_bool_int
is
begin
return To_LL_VBI (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_short;
B : vector_unsigned_int) return vector_signed_short
is
begin
return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_short;
B : vector_unsigned_char) return vector_signed_short
is
begin
return To_LL_VSS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_short;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_short;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_short;
B : vector_unsigned_int) return vector_bool_short
is
begin
return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_short;
B : vector_unsigned_char) return vector_bool_short
is
begin
return To_LL_VBS (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_pixel;
B : vector_unsigned_int) return vector_pixel
is
begin
return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_pixel;
B : vector_unsigned_short) return vector_pixel
is
begin
return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_pixel;
B : vector_unsigned_char) return vector_pixel
is
begin
return To_LL_VP (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_char;
B : vector_unsigned_int) return vector_signed_char
is
begin
return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_char;
B : vector_unsigned_short) return vector_signed_char
is
begin
return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_char;
B : vector_unsigned_int) return vector_unsigned_char
is
begin
return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_char;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_char;
B : vector_unsigned_int) return vector_bool_char
is
begin
return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_char;
B : vector_unsigned_short) return vector_bool_char
is
begin
return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
function vec_sll
(A : vector_bool_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vsl (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sll;
-- vec_slo --
function vec_slo
(A : vector_float;
B : vector_signed_char) return vector_float
is
begin
return To_LL_VF (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_float;
B : vector_unsigned_char) return vector_float
is
begin
return To_LL_VF (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_int;
B : vector_signed_char) return vector_signed_int
is
begin
return To_LL_VSI (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_int;
B : vector_unsigned_char) return vector_signed_int
is
begin
return To_LL_VSI (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_int;
B : vector_signed_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_int;
B : vector_unsigned_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_short;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_short;
B : vector_unsigned_char) return vector_signed_short
is
begin
return To_LL_VSS (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_short;
B : vector_signed_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_short;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_pixel;
B : vector_signed_char) return vector_pixel
is
begin
return To_LL_VP (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_pixel;
B : vector_unsigned_char) return vector_pixel
is
begin
return To_LL_VP (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_char;
B : vector_signed_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
function vec_slo
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vslo (To_LL_VSI (A), To_LL_VSI (B)));
end vec_slo;
-- vec_sr --
function vec_sr
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsrb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sr;
function vec_sr
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsrb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sr;
function vec_sr
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsrh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sr;
function vec_sr
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsrh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sr;
function vec_sr
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsrw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sr;
function vec_sr
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsrw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sr;
-- vec_vsrw --
function vec_vsrw
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsrw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsrw;
function vec_vsrw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsrw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsrw;
-- vec_vsrh --
function vec_vsrh
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsrh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsrh;
function vec_vsrh
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsrh (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsrh;
-- vec_vsrb --
function vec_vsrb
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsrb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsrb;
function vec_vsrb
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsrb (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsrb;
-- vec_sra --
function vec_sra
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsrab (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sra;
function vec_sra
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsrab (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sra;
function vec_sra
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsrah (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sra;
function vec_sra
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsrah (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sra;
function vec_sra
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsraw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sra;
function vec_sra
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsraw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sra;
-- vec_vsraw --
function vec_vsraw
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsraw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsraw;
function vec_vsraw
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsraw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsraw;
-- vec_vsrah --
function vec_vsrah
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsrah (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsrah;
function vec_vsrah
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsrah (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsrah;
-- vec_vsrab --
function vec_vsrab
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsrab (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsrab;
function vec_vsrab
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsrab (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsrab;
-- vec_srl --
function vec_srl
(A : vector_signed_int;
B : vector_unsigned_int) return vector_signed_int
is
begin
return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_int;
B : vector_unsigned_short) return vector_signed_int
is
begin
return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_int;
B : vector_unsigned_char) return vector_signed_int
is
begin
return To_LL_VSI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_int;
B : vector_unsigned_short) return vector_unsigned_int
is
begin
return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_int;
B : vector_unsigned_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_int;
B : vector_unsigned_int) return vector_bool_int
is
begin
return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_int;
B : vector_unsigned_short) return vector_bool_int
is
begin
return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_int;
B : vector_unsigned_char) return vector_bool_int
is
begin
return To_LL_VBI (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_short;
B : vector_unsigned_int) return vector_signed_short
is
begin
return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_short;
B : vector_unsigned_short) return vector_signed_short
is
begin
return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_short;
B : vector_unsigned_char) return vector_signed_short
is
begin
return To_LL_VSS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_short;
B : vector_unsigned_int) return vector_unsigned_short
is
begin
return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_short;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_short;
B : vector_unsigned_int) return vector_bool_short
is
begin
return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_short;
B : vector_unsigned_short) return vector_bool_short
is
begin
return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_short;
B : vector_unsigned_char) return vector_bool_short
is
begin
return To_LL_VBS (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_pixel;
B : vector_unsigned_int) return vector_pixel
is
begin
return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_pixel;
B : vector_unsigned_short) return vector_pixel
is
begin
return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_pixel;
B : vector_unsigned_char) return vector_pixel
is
begin
return To_LL_VP (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_char;
B : vector_unsigned_int) return vector_signed_char
is
begin
return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_char;
B : vector_unsigned_short) return vector_signed_char
is
begin
return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_char;
B : vector_unsigned_int) return vector_unsigned_char
is
begin
return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_char;
B : vector_unsigned_short) return vector_unsigned_char
is
begin
return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_char;
B : vector_unsigned_int) return vector_bool_char
is
begin
return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_char;
B : vector_unsigned_short) return vector_bool_char
is
begin
return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
function vec_srl
(A : vector_bool_char;
B : vector_unsigned_char) return vector_bool_char
is
begin
return To_LL_VBC (vsr (To_LL_VSI (A), To_LL_VSI (B)));
end vec_srl;
-- vec_sro --
function vec_sro
(A : vector_float;
B : vector_signed_char) return vector_float
is
begin
return To_LL_VF (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_float;
B : vector_unsigned_char) return vector_float
is
begin
return To_LL_VF (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_int;
B : vector_signed_char) return vector_signed_int
is
begin
return To_LL_VSI (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_int;
B : vector_unsigned_char) return vector_signed_int
is
begin
return To_LL_VSI (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_int;
B : vector_signed_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_int;
B : vector_unsigned_char) return vector_unsigned_int
is
begin
return To_LL_VUI (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_short;
B : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_short;
B : vector_unsigned_char) return vector_signed_short
is
begin
return To_LL_VSS (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_short;
B : vector_signed_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_short;
B : vector_unsigned_char) return vector_unsigned_short
is
begin
return To_LL_VUS (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_pixel;
B : vector_signed_char) return vector_pixel
is
begin
return To_LL_VP (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_pixel;
B : vector_unsigned_char) return vector_pixel
is
begin
return To_LL_VP (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_signed_char;
B : vector_unsigned_char) return vector_signed_char
is
begin
return To_LL_VSC (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_char;
B : vector_signed_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
function vec_sro
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsro (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sro;
-- vec_st --
procedure vec_st
(A : vector_float;
B : c_int;
C : vector_float_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_float;
B : c_int;
C : float_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_int;
B : c_int;
C : vector_signed_int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_int;
B : c_int;
C : int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_int;
B : c_int;
C : vector_unsigned_int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_int;
B : c_int;
C : vector_bool_int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_int;
B : c_int;
C : int_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_short;
B : c_int;
C : vector_signed_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_short;
B : c_int;
C : short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_short;
B : c_int;
C : vector_unsigned_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_short;
B : c_int;
C : vector_bool_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_pixel;
B : c_int;
C : vector_pixel_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_pixel;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_pixel;
B : c_int;
C : short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_short;
B : c_int;
C : short_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_char;
B : c_int;
C : vector_signed_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_signed_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_char;
B : c_int;
C : vector_unsigned_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_unsigned_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_char;
B : c_int;
C : vector_bool_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
procedure vec_st
(A : vector_bool_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvx (To_LL_VSI (A), B, To_PTR (C));
end vec_st;
-- vec_ste --
procedure vec_ste
(A : vector_signed_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_unsigned_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_signed_short;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_unsigned_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_short;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_pixel;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_pixel;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_float;
B : c_int;
C : float_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_signed_int;
B : c_int;
C : int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_unsigned_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_int;
B : c_int;
C : int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_ste;
procedure vec_ste
(A : vector_bool_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_ste;
-- vec_stvewx --
procedure vec_stvewx
(A : vector_float;
B : c_int;
C : float_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_stvewx;
procedure vec_stvewx
(A : vector_signed_int;
B : c_int;
C : int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_stvewx;
procedure vec_stvewx
(A : vector_unsigned_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_stvewx;
procedure vec_stvewx
(A : vector_bool_int;
B : c_int;
C : int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_stvewx;
procedure vec_stvewx
(A : vector_bool_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvewx (To_LL_VSI (A), B, To_PTR (C));
end vec_stvewx;
-- vec_stvehx --
procedure vec_stvehx
(A : vector_signed_short;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
procedure vec_stvehx
(A : vector_unsigned_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
procedure vec_stvehx
(A : vector_bool_short;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
procedure vec_stvehx
(A : vector_bool_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
procedure vec_stvehx
(A : vector_pixel;
B : c_int;
C : short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
procedure vec_stvehx
(A : vector_pixel;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvehx (To_LL_VSS (A), B, To_PTR (C));
end vec_stvehx;
-- vec_stvebx --
procedure vec_stvebx
(A : vector_signed_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_stvebx;
procedure vec_stvebx
(A : vector_unsigned_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_stvebx;
procedure vec_stvebx
(A : vector_bool_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_stvebx;
procedure vec_stvebx
(A : vector_bool_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvebx (To_LL_VSC (A), B, To_PTR (C));
end vec_stvebx;
-- vec_stl --
procedure vec_stl
(A : vector_float;
B : c_int;
C : vector_float_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_float;
B : c_int;
C : float_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_int;
B : c_int;
C : vector_signed_int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_int;
B : c_int;
C : int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_int;
B : c_int;
C : vector_unsigned_int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_int;
B : c_int;
C : vector_bool_int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_int;
B : c_int;
C : unsigned_int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_int;
B : c_int;
C : int_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_short;
B : c_int;
C : vector_signed_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_short;
B : c_int;
C : short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_short;
B : c_int;
C : vector_unsigned_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_short;
B : c_int;
C : vector_bool_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_short;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_short;
B : c_int;
C : short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_pixel;
B : c_int;
C : vector_pixel_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_pixel;
B : c_int;
C : unsigned_short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_pixel;
B : c_int;
C : short_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_char;
B : c_int;
C : vector_signed_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_signed_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_char;
B : c_int;
C : vector_unsigned_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_unsigned_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_char;
B : c_int;
C : vector_bool_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_char;
B : c_int;
C : unsigned_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
procedure vec_stl
(A : vector_bool_char;
B : c_int;
C : signed_char_ptr)
is
begin
stvxl (To_LL_VSI (A), B, To_PTR (C));
end vec_stl;
-- vec_sub --
function vec_sub
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_sub;
function vec_sub
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_sub;
function vec_sub
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sub;
function vec_sub
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vsubfp (To_LL_VF (A), To_LL_VF (B)));
end vec_sub;
-- vec_vsubfp --
function vec_vsubfp
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vsubfp (To_LL_VF (A), To_LL_VF (B)));
end vec_vsubfp;
-- vec_vsubuwm --
function vec_vsubuwm
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
function vec_vsubuwm
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
function vec_vsubuwm
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
function vec_vsubuwm
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
function vec_vsubuwm
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
function vec_vsubuwm
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuwm (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuwm;
-- vec_vsubuhm --
function vec_vsubuhm
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
function vec_vsubuhm
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
function vec_vsubuhm
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
function vec_vsubuhm
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
function vec_vsubuhm
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
function vec_vsubuhm
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhm (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhm;
-- vec_vsububm --
function vec_vsububm
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
function vec_vsububm
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
function vec_vsububm
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
function vec_vsububm
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
function vec_vsububm
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
function vec_vsububm
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububm (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububm;
-- vec_subc --
function vec_subc
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubcuw (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subc;
-- vec_subs --
function vec_subs
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_subs;
function vec_subs
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_subs;
function vec_subs
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
function vec_subs
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
function vec_subs
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
function vec_subs
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
function vec_subs
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_subs;
-- vec_vsubsws --
function vec_vsubsws
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubsws;
function vec_vsubsws
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubsws;
function vec_vsubsws
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsubsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubsws;
-- vec_vsubuws --
function vec_vsubuws
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuws;
function vec_vsubuws
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuws;
function vec_vsubuws
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsubuws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_vsubuws;
-- vec_vsubshs --
function vec_vsubshs
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubshs;
function vec_vsubshs
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubshs;
function vec_vsubshs
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vsubshs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubshs;
-- vec_vsubuhs --
function vec_vsubuhs
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhs;
function vec_vsubuhs
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhs;
function vec_vsubuhs
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vsubuhs (To_LL_VSS (A), To_LL_VSS (B)));
end vec_vsubuhs;
-- vec_vsubsbs --
function vec_vsubsbs
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsubsbs;
function vec_vsubsbs
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsubsbs;
function vec_vsubsbs
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vsubsbs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsubsbs;
-- vec_vsububs --
function vec_vsububs
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububs;
function vec_vsububs
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububs;
function vec_vsububs
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vsububs (To_LL_VSC (A), To_LL_VSC (B)));
end vec_vsububs;
-- vec_sum4s --
function vec_sum4s
(A : vector_unsigned_char;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsum4ubs (To_LL_VSC (A), To_LL_VSI (B)));
end vec_sum4s;
function vec_sum4s
(A : vector_signed_char;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsum4sbs (To_LL_VSC (A), To_LL_VSI (B)));
end vec_sum4s;
function vec_sum4s
(A : vector_signed_short;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsum4shs (To_LL_VSS (A), To_LL_VSI (B)));
end vec_sum4s;
-- vec_vsum4shs --
function vec_vsum4shs
(A : vector_signed_short;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsum4shs (To_LL_VSS (A), To_LL_VSI (B)));
end vec_vsum4shs;
-- vec_vsum4sbs --
function vec_vsum4sbs
(A : vector_signed_char;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsum4sbs (To_LL_VSC (A), To_LL_VSI (B)));
end vec_vsum4sbs;
-- vec_vsum4ubs --
function vec_vsum4ubs
(A : vector_unsigned_char;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vsum4ubs (To_LL_VSC (A), To_LL_VSI (B)));
end vec_vsum4ubs;
-- vec_sum2s --
function vec_sum2s
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsum2sws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sum2s;
-- vec_sums --
function vec_sums
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vsumsws (To_LL_VSI (A), To_LL_VSI (B)));
end vec_sums;
-- vec_trunc --
function vec_trunc
(A : vector_float) return vector_float
is
begin
return To_LL_VF (vrfiz (To_LL_VF (A)));
end vec_trunc;
-- vec_unpackh --
function vec_unpackh
(A : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vupkhsb (To_LL_VSC (A)));
end vec_unpackh;
function vec_unpackh
(A : vector_bool_char) return vector_bool_short
is
begin
return To_LL_VBS (vupkhsb (To_LL_VSC (A)));
end vec_unpackh;
function vec_unpackh
(A : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vupkhsh (To_LL_VSS (A)));
end vec_unpackh;
function vec_unpackh
(A : vector_bool_short) return vector_bool_int
is
begin
return To_LL_VBI (vupkhsh (To_LL_VSS (A)));
end vec_unpackh;
function vec_unpackh
(A : vector_pixel) return vector_unsigned_int
is
begin
return To_LL_VUI (vupkhpx (To_LL_VSS (A)));
end vec_unpackh;
-- vec_vupkhsh --
function vec_vupkhsh
(A : vector_bool_short) return vector_bool_int
is
begin
return To_LL_VBI (vupkhsh (To_LL_VSS (A)));
end vec_vupkhsh;
function vec_vupkhsh
(A : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vupkhsh (To_LL_VSS (A)));
end vec_vupkhsh;
-- vec_vupkhpx --
function vec_vupkhpx
(A : vector_pixel) return vector_unsigned_int
is
begin
return To_LL_VUI (vupkhpx (To_LL_VSS (A)));
end vec_vupkhpx;
-- vec_vupkhsb --
function vec_vupkhsb
(A : vector_bool_char) return vector_bool_short
is
begin
return To_LL_VBS (vupkhsb (To_LL_VSC (A)));
end vec_vupkhsb;
function vec_vupkhsb
(A : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vupkhsb (To_LL_VSC (A)));
end vec_vupkhsb;
-- vec_unpackl --
function vec_unpackl
(A : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vupklsb (To_LL_VSC (A)));
end vec_unpackl;
function vec_unpackl
(A : vector_bool_char) return vector_bool_short
is
begin
return To_LL_VBS (vupklsb (To_LL_VSC (A)));
end vec_unpackl;
function vec_unpackl
(A : vector_pixel) return vector_unsigned_int
is
begin
return To_LL_VUI (vupklpx (To_LL_VSS (A)));
end vec_unpackl;
function vec_unpackl
(A : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vupklsh (To_LL_VSS (A)));
end vec_unpackl;
function vec_unpackl
(A : vector_bool_short) return vector_bool_int
is
begin
return To_LL_VBI (vupklsh (To_LL_VSS (A)));
end vec_unpackl;
-- vec_vupklpx --
function vec_vupklpx
(A : vector_pixel) return vector_unsigned_int
is
begin
return To_LL_VUI (vupklpx (To_LL_VSS (A)));
end vec_vupklpx;
-- vec_upklsh --
function vec_vupklsh
(A : vector_bool_short) return vector_bool_int
is
begin
return To_LL_VBI (vupklsh (To_LL_VSS (A)));
end vec_vupklsh;
function vec_vupklsh
(A : vector_signed_short) return vector_signed_int
is
begin
return To_LL_VSI (vupklsh (To_LL_VSS (A)));
end vec_vupklsh;
-- vec_vupklsb --
function vec_vupklsb
(A : vector_bool_char) return vector_bool_short
is
begin
return To_LL_VBS (vupklsb (To_LL_VSC (A)));
end vec_vupklsb;
function vec_vupklsb
(A : vector_signed_char) return vector_signed_short
is
begin
return To_LL_VSS (vupklsb (To_LL_VSC (A)));
end vec_vupklsb;
-- vec_xor --
function vec_xor
(A : vector_float;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_float;
B : vector_bool_int) return vector_float
is
begin
return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_int;
B : vector_float) return vector_float
is
begin
return To_LL_VF (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_int;
B : vector_bool_int) return vector_bool_int
is
begin
return To_LL_VBI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_int;
B : vector_bool_int) return vector_signed_int
is
begin
return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_int;
B : vector_signed_int) return vector_signed_int
is
begin
return To_LL_VSI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_int;
B : vector_bool_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_int;
B : vector_unsigned_int) return vector_unsigned_int
is
begin
return To_LL_VUI (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_short;
B : vector_bool_short) return vector_bool_short
is
begin
return To_LL_VBS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_short;
B : vector_bool_short) return vector_signed_short
is
begin
return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_short;
B : vector_signed_short) return vector_signed_short
is
begin
return To_LL_VSS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_short;
B : vector_bool_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_short;
B : vector_unsigned_short) return vector_unsigned_short
is
begin
return To_LL_VUS (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_char;
B : vector_bool_char) return vector_bool_char
is
begin
return To_LL_VBC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_char;
B : vector_bool_char) return vector_signed_char
is
begin
return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_signed_char;
B : vector_signed_char) return vector_signed_char
is
begin
return To_LL_VSC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_bool_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_char;
B : vector_bool_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
function vec_xor
(A : vector_unsigned_char;
B : vector_unsigned_char) return vector_unsigned_char
is
begin
return To_LL_VUC (vxor (To_LL_VSI (A), To_LL_VSI (B)));
end vec_xor;
-----------------------------------
-- Bodies for Altivec predicates --
-----------------------------------
-- vec_all_eq --
function vec_all_eq
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_eq;
function vec_all_eq
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_pixel;
B : vector_pixel) return c_int
is
begin
return vcmpequh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_eq;
function vec_all_eq
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_eq;
function vec_all_eq
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B));
end vec_all_eq;
-- vec_all_ge --
function vec_all_ge
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_ge;
function vec_all_ge
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_ge;
function vec_all_ge
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_ge;
function vec_all_ge
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B));
end vec_all_ge;
-- vec_all_gt --
function vec_all_gt
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_gt;
function vec_all_gt
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_gt;
function vec_all_gt
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_gt;
function vec_all_gt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (B));
end vec_all_gt;
-- vec_all_in --
function vec_all_in
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpbfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B));
end vec_all_in;
-- vec_all_le --
function vec_all_le
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_le;
function vec_all_le
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_le;
function vec_all_le
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_le;
function vec_all_le
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_LT, To_LL_VF (B), To_LL_VF (A));
end vec_all_le;
-- vec_all_lt --
function vec_all_lt
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT, To_LL_VSC (B), To_LL_VSC (A));
end vec_all_lt;
function vec_all_lt
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT, To_LL_VSS (B), To_LL_VSS (A));
end vec_all_lt;
function vec_all_lt
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT, To_LL_VSI (B), To_LL_VSI (A));
end vec_all_lt;
function vec_all_lt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_LT, To_LL_VF (B), To_LL_VF (A));
end vec_all_lt;
-- vec_all_nan --
function vec_all_nan
(A : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (A));
end vec_all_nan;
-- vec_all_ne --
function vec_all_ne
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ, To_LL_VSC (A), To_LL_VSC (B));
end vec_all_ne;
function vec_all_ne
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_pixel;
B : vector_pixel) return c_int
is
begin
return vcmpequh_p (CR6_EQ, To_LL_VSS (A), To_LL_VSS (B));
end vec_all_ne;
function vec_all_ne
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ, To_LL_VSI (A), To_LL_VSI (B));
end vec_all_ne;
function vec_all_ne
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B));
end vec_all_ne;
-- vec_all_nge --
function vec_all_nge
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B));
end vec_all_nge;
-- vec_all_ngt --
function vec_all_ngt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_EQ, To_LL_VF (A), To_LL_VF (B));
end vec_all_ngt;
-- vec_all_nle --
function vec_all_nle
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_EQ, To_LL_VF (B), To_LL_VF (A));
end vec_all_nle;
-- vec_all_nlt --
function vec_all_nlt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_EQ, To_LL_VF (B), To_LL_VF (A));
end vec_all_nlt;
-- vec_all_numeric --
function vec_all_numeric
(A : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_LT, To_LL_VF (A), To_LL_VF (A));
end vec_all_numeric;
-- vec_any_eq --
function vec_any_eq
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_eq;
function vec_any_eq
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_pixel;
B : vector_pixel) return c_int
is
begin
return vcmpequh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_eq;
function vec_any_eq
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_eq;
function vec_any_eq
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_eq;
-- vec_any_ge --
function vec_any_ge
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_ge;
function vec_any_ge
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_ge;
function vec_any_ge
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_ge;
-- vec_any_gt --
function vec_any_gt
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_gt;
function vec_any_gt
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_gt;
function vec_any_gt
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_gt;
function vec_any_gt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_gt;
-- vec_any_le --
function vec_any_le
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_le;
function vec_any_le
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_le;
function vec_any_le
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_le;
function vec_any_le
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_EQ_REV, To_LL_VF (B), To_LL_VF (A));
end vec_any_le;
-- vec_any_lt --
function vec_any_lt
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpgtub_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpgtsb_p (CR6_EQ_REV, To_LL_VSC (B), To_LL_VSC (A));
end vec_any_lt;
function vec_any_lt
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpgtuh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpgtsh_p (CR6_EQ_REV, To_LL_VSS (B), To_LL_VSS (A));
end vec_any_lt;
function vec_any_lt
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpgtuw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpgtsw_p (CR6_EQ_REV, To_LL_VSI (B), To_LL_VSI (A));
end vec_any_lt;
function vec_any_lt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_EQ_REV, To_LL_VF (B), To_LL_VF (A));
end vec_any_lt;
-- vec_any_nan --
function vec_any_nan
(A : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (A));
end vec_any_nan;
-- vec_any_ne --
function vec_any_ne
(A : vector_signed_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_signed_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_char;
B : vector_bool_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_char;
B : vector_unsigned_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_char;
B : vector_signed_char) return c_int
is
begin
return vcmpequb_p (CR6_LT_REV, To_LL_VSC (A), To_LL_VSC (B));
end vec_any_ne;
function vec_any_ne
(A : vector_signed_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_signed_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_short;
B : vector_bool_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_short;
B : vector_unsigned_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_short;
B : vector_signed_short) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_pixel;
B : vector_pixel) return c_int
is
begin
return vcmpequh_p (CR6_LT_REV, To_LL_VSS (A), To_LL_VSS (B));
end vec_any_ne;
function vec_any_ne
(A : vector_signed_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_signed_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_unsigned_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_int;
B : vector_bool_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_int;
B : vector_unsigned_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_bool_int;
B : vector_signed_int) return c_int
is
begin
return vcmpequw_p (CR6_LT_REV, To_LL_VSI (A), To_LL_VSI (B));
end vec_any_ne;
function vec_any_ne
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_ne;
-- vec_any_nge --
function vec_any_nge
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_nge;
-- vec_any_ngt --
function vec_any_ngt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_LT_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_ngt;
-- vec_any_nle --
function vec_any_nle
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgefp_p (CR6_LT_REV, To_LL_VF (B), To_LL_VF (A));
end vec_any_nle;
-- vec_any_nlt --
function vec_any_nlt
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpgtfp_p (CR6_LT_REV, To_LL_VF (B), To_LL_VF (A));
end vec_any_nlt;
-- vec_any_numeric --
function vec_any_numeric
(A : vector_float) return c_int
is
begin
return vcmpeqfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (A));
end vec_any_numeric;
-- vec_any_out --
function vec_any_out
(A : vector_float;
B : vector_float) return c_int
is
begin
return vcmpbfp_p (CR6_EQ_REV, To_LL_VF (A), To_LL_VF (B));
end vec_any_out;
-- vec_step --
function vec_step
(V : vector_unsigned_char) return Integer
is
pragma Unreferenced (V);
begin
return 16;
end vec_step;
function vec_step
(V : vector_signed_char) return Integer
is
pragma Unreferenced (V);
begin
return 16;
end vec_step;
function vec_step
(V : vector_bool_char) return Integer
is
pragma Unreferenced (V);
begin
return 16;
end vec_step;
function vec_step
(V : vector_unsigned_short) return Integer
is
pragma Unreferenced (V);
begin
return 8;
end vec_step;
function vec_step
(V : vector_signed_short) return Integer
is
pragma Unreferenced (V);
begin
return 8;
end vec_step;
function vec_step
(V : vector_bool_short) return Integer
is
pragma Unreferenced (V);
begin
return 8;
end vec_step;
function vec_step
(V : vector_unsigned_int) return Integer
is
pragma Unreferenced (V);
begin
return 4;
end vec_step;
function vec_step
(V : vector_signed_int) return Integer
is
pragma Unreferenced (V);
begin
return 4;
end vec_step;
function vec_step
(V : vector_bool_int) return Integer
is
pragma Unreferenced (V);
begin
return 4;
end vec_step;
function vec_step
(V : vector_float) return Integer
is
pragma Unreferenced (V);
begin
return 4;
end vec_step;
function vec_step
(V : vector_pixel) return Integer
is
pragma Unreferenced (V);
begin
return 4;
end vec_step;
end GNAT.Altivec.Vector_Operations;
|
with opencl; use opencl;
with cl_objects; use cl_objects;
with NeuralNet; use NeuralNet;
with Ada.Characters.Latin_1;
with Ada.Unchecked_Deallocation;
with System;
with Ada.Text_IO;
with Ada.Containers; use Ada.Containers;
package body GpuInference is
NL: constant Character := Ada.Characters.Latin_1.LF;
multiply_weight_kernel_text: constant String :=
"__kernel void multiply_weights(__global float *input, __global float *output, __global float *weights, int weight_offset, int layer_size)" & NL &
"{" & NL &
" const int px_x = get_global_id(0);" & NL &
" const int px_y = get_global_id(1);" & NL &
" const int px_i = px_x + get_global_size(0) * px_y;" & NL &
" output[px_i] = weights[px_i + weight_offset] * input[px_i % layer_size];" & NL &
"}" & NL &
"" & NL;
reduce_sum_kernel_text: constant String :=
"__kernel void reduce_sum(__global float *input, __global float *output, __global float *bias, int bias_offset, int layer_size, int activator)" & NL &
"{" & NL &
" const int px_x = get_global_id(0);" & NL &
" const int px_y = get_global_id(1);" & NL &
" const int px_i = px_x + get_global_size(0) * px_y;" & NL &
" float sum = 0.0f;" & NL &
" for (int i=0 ; i<layer_size; ++i) {" & NL &
" sum += input[px_i * layer_size + i];" & NL &
" }" & NL &
" const float res = sum + bias[px_i + bias_offset];" & NL &
" output[px_i] = (activator == 0) ? (fmax(0.0f, res)) : (1.0f / (1.0f + exp(-res)));" & NL &
"}" & NL &
"" & NL;
processing_program_text: constant String :=
multiply_weight_kernel_text & NL &
reduce_sum_kernel_text & NL;
function Get_Temp_Buffer_Size(nn: in NeuralNet.Net) return Positive is
result: Positive := nn.conf.inputSize * nn.conf.sizes(1);
current_size: Positive := 1;
begin
for n in 2 .. nn.conf.sizes'Length loop
current_size := nn.conf.sizes(n) * nn.conf.sizes(n - 1);
if current_size > result then
result := current_size;
end if;
end loop;
return result;
end Get_Temp_Buffer_Size;
function Get_Temp_Input_Buffer_Size(nn: in NeuralNet.Net) return Positive is
result: Positive := nn.conf.sizes(1);
begin
for n in 2 .. nn.conf.sizes'Length loop
if nn.conf.sizes(n) > result then
result := nn.conf.sizes(n);
end if;
end loop;
return result;
end Get_Temp_Input_Buffer_Size;
function Create(ctx: cl_objects.Context_Access; nn: in NeuralNet.Net; cl_code: out opencl.Status) return NNData is
begin
return res: NNData do
res.ctx := ctx;
res.nn_activator := nn.conf.act;
res.nn_shape.Append(nn.conf.inputSize);
for i in 1 .. nn.conf.sizes'Length loop
res.nn_shape.Append(nn.conf.sizes(i));
end loop;
res.processing_queue := new cl_objects.Command_Queue'(ctx.Create_Command_Queue(result_status => cl_code));
res.processing_prog := new cl_objects.Program'(ctx.Create_Program(source => processing_program_text,
result_status => cl_code));
cl_code := ctx.Build(prog => res.processing_prog.all,
options => "-w -Werror -cl-fast-relaxed-math -cl-strict-aliasing -cl-mad-enable");
res.multiply_weights_kernel := new cl_objects.Kernel'(res.processing_prog.Create_Kernel("multiply_weights", cl_code));
res.reduce_sum_kernel := new cl_objects.Kernel'(res.processing_prog.Create_Kernel("reduce_sum", cl_code));
res.nn_weights := new cl_objects.Buffer'(Upload_Weights(ctx => ctx.all,
nn => nn,
cl_code => cl_code));
res.nn_biases := new cl_objects.Buffer'(Upload_Biases(ctx => ctx.all,
nn => nn,
cl_code => cl_code));
res.temp_buffer := new cl_objects.Buffer'(cl_objects.Create_Buffer(ctx => ctx.all,
flags => (opencl.ALLOC_HOST_PTR => True, others => False),
size => Get_Temp_Buffer_Size(nn) * 4,
host_ptr => System.Null_Address,
result_status => cl_code));
res.temp_input_buffer := new cl_objects.Buffer'(cl_objects.Create_Buffer(ctx => ctx.all,
flags => (opencl.ALLOC_HOST_PTR => True, others => False),
size => Get_Temp_Input_Buffer_Size(nn) * 4,
host_ptr => System.Null_Address,
result_status => cl_code));
end return;
end Create;
procedure Finalize(This: in out NNData) is
use cl_objects;
begin
Free(This.processing_queue);
Free(This.reduce_sum_kernel);
Free(This.multiply_weights_kernel);
Free(This.processing_prog);
Free(This.nn_weights);
Free(This.nn_biases);
Free(This.temp_buffer);
Free(This.temp_input_buffer);
end Finalize;
type FlattenedWeights is array(Positive range <>) of aliased opencl.cl_float;
type FlattenedBiases is array(Positive range <>) of aliased opencl.cl_float;
function flatten_weights(nn: in NeuralNet.Net) return FlattenedWeights is
total_size: Natural := 0;
begin
for layer of nn.layers loop
for neuron of layer loop
total_size := total_size + neuron.w'Length;
end loop;
end loop;
return result: FlattenedWeights(1 .. total_size) do
declare
i: Positive := 1;
begin
for layer of nn.layers loop
for neuron of layer loop
for weight of neuron.w loop
result(i) := opencl.cl_float(weight);
i := i + 1;
end loop;
end loop;
end loop;
end;
end return;
end flatten_weights;
function flatten_biases(nn: in NeuralNet.Net) return FlattenedBiases is
total_size: Natural := 0;
begin
for layer of nn.layers loop
total_size := total_size + Natural(layer.Length);
end loop;
return result: FlattenedBiases(1 .. total_size) do
declare
i: Positive := 1;
begin
for layer of nn.layers loop
for neuron of layer loop
result(i) := opencl.cl_float(neuron.bias);
i := i + 1;
end loop;
end loop;
end;
end return;
end flatten_biases;
function Get_Local_Group_Size(global_size: in Positive) return Positive is
type Sizes is array (Positive range <>) of Positive;
preferred_sizes: constant Sizes := (64, 32, 16, 8, 4, 2, 1);
begin
for size of preferred_sizes loop
if global_size mod size = 0 then
return size;
end if;
end loop;
return 1;
end Get_Local_Group_Size;
function Upload_Weights(ctx: in out cl_objects.Context; nn: in NeuralNet.Net; cl_code: out opencl.Status) return cl_objects.Buffer is
host_buffer: aliased FlattenedWeights := flatten_weights(nn);
begin
return ctx.Create_Buffer(flags => (opencl.COPY_HOST_PTR => True, others => False),
size => host_buffer'Length * 4,
host_ptr => host_buffer'Address,
result_status => cl_code);
end Upload_Weights;
function Upload_Biases(ctx: in out cl_objects.Context; nn: in NeuralNet.Net; cl_code: out opencl.Status) return cl_objects.Buffer is
host_buffer: aliased FlattenedBiases := flatten_biases(nn);
begin
return ctx.Create_Buffer(flags => (opencl.COPY_HOST_PTR => True, others => False),
size => host_buffer'Length * 4,
host_ptr => host_buffer'Address,
result_status => cl_code);
end Upload_Biases;
function Multiply_Weights(context: NNData; input, output: in System.Address; weight_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event is
layer_size_arg: aliased opencl.cl_int := opencl.cl_int(layer_size);
weight_offset_arg: aliased opencl.cl_int := opencl.cl_int(weight_offset);
begin
cl_code := context.multiply_weights_kernel.Set_Arg(0, opencl.Raw_Address'Size / 8, input);
cl_code := context.multiply_weights_kernel.Set_Arg(1, opencl.Raw_Address'Size / 8, output);
cl_code := context.multiply_weights_kernel.Set_Arg(2, opencl.Raw_Address'Size / 8, context.nn_weights.Get_Address);
cl_code := context.multiply_weights_kernel.Set_Arg(3, 4, weight_offset_arg'Address);
cl_code := context.multiply_weights_kernel.Set_Arg(4, 4, layer_size_arg'Address);
return context.processing_queue.Enqueue_Kernel(kern => context.multiply_weights_kernel.all,
glob_ws => (1 => output_size),
loc_ws => (1 => Get_Local_Group_Size(output_size)),
events_to_wait_for => events_to_wait,
code => cl_code);
end Multiply_Weights;
function Multiply_Weights(context: NNData; input, output: in out cl_objects.Buffer; weight_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event is
begin
return Multiply_Weights(context, input.Get_Address, output.Get_Address, weight_offset, layer_size, output_size, events_to_wait, cl_code);
end Multiply_Weights;
function Reduce_Activate(context: NNData; input, output: in System.Address; bias_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event is
layer_size_arg: aliased opencl.cl_int := opencl.cl_int(layer_size);
activator_arg: aliased opencl.cl_int := opencl.cl_int(if context.nn_activator = NeuralNet.RELU then 0 else 1);
bias_offset_arg: aliased opencl.cl_int := opencl.cl_int(bias_offset);
begin
cl_code := context.reduce_sum_kernel.Set_Arg(0, opencl.Raw_Address'Size / 8, input);
cl_code := context.reduce_sum_kernel.Set_Arg(1, opencl.Raw_Address'Size / 8, output);
cl_code := context.reduce_sum_kernel.Set_Arg(2, opencl.Raw_Address'Size / 8, context.nn_biases.Get_Address);
cl_code := context.reduce_sum_kernel.Set_Arg(3, 4, bias_offset_arg'Address);
cl_code := context.reduce_sum_kernel.Set_Arg(4, 4, layer_size_arg'Address);
cl_code := context.reduce_sum_kernel.Set_Arg(5, 4, activator_arg'Address);
return context.processing_queue.Enqueue_Kernel(kern => context.reduce_sum_kernel.all,
glob_ws => (1 => output_size),
loc_ws => (1 => Get_Local_Group_Size(output_size)),
events_to_wait_for => events_to_wait,
code => cl_code);
end Reduce_Activate;
function Reduce_Activate(context: NNData; input, output: in out cl_objects.Buffer; bias_offset: in Natural; layer_size, output_size: in Positive; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event is
begin
return Reduce_Activate(context, input.Get_Address, output.Get_Address, bias_offset, layer_size, output_size, events_to_wait, cl_code);
end Reduce_Activate;
function Forward(context: NNData; input, output: in out cl_objects.Buffer; events_to_wait: in opencl.Events; cl_code: out opencl.Status) return cl_objects.Event is
curr_weight_off: Natural := 0;
curr_bias_off: Natural := 0;
curr_layer_size: Positive := 1;
next_layer_size: Positive := 1;
curr_output_size: Positive := 1;
previous_ev: opencl.Events := (1 => 0);
final_event: opencl.Event_ID := 0;
begin
for i in 1 .. context.nn_shape.Length - 1 loop
curr_layer_size := context.nn_shape(Positive(i));
next_layer_size := context.nn_shape(Positive(i + 1));
curr_output_size := curr_layer_size * next_layer_size;
declare
mult_w_ev: constant cl_objects.Event := Multiply_Weights(context => context,
input => (if i=1 then input.Get_Address else context.temp_input_buffer.Get_Address),
output => context.temp_buffer.Get_Address,
weight_offset => curr_weight_off,
layer_size => curr_layer_size,
output_size => curr_output_size,
events_to_wait => (if i=1 then events_to_wait else previous_ev),
cl_code => cl_code);
reduce_ev: constant cl_objects.Event := Reduce_Activate(context => context,
input => context.temp_buffer.Get_Address,
output => (if i=context.nn_shape.Length - 1 then output.Get_Address else context.temp_input_buffer.Get_Address),
bias_offset => curr_bias_off,
layer_size => curr_layer_size,
output_size => next_layer_size,
events_to_wait => (1 => mult_w_ev.Get_Handle),
cl_code => cl_code);
begin
if cl_code /= opencl.SUCCESS then
return cl_objects.Create_Empty;
end if;
final_event := reduce_ev.Get_Handle;
if i > 1 then
cl_code := opencl.Release_Event(previous_ev(1));
end if;
if i /= context.nn_shape.Length - 1 then
cl_code := opencl.Retain_Event(final_event);
else
return cl_objects.Create_Event(final_event);
end if;
if cl_code /= opencl.SUCCESS then
return cl_objects.Create_Empty;
end if;
previous_ev(1) := final_event;
end;
curr_bias_off := curr_bias_off + next_layer_size;
curr_weight_off := curr_weight_off + curr_output_size;
end loop;
return cl_objects.Create_Empty;
end Forward;
end GpuInference;
|
with Ada.Numerics.Generic_Elementary_Functions;
package body Mathutil with SPARK_Mode => Off is
package FloatingMath is
new Ada.Numerics.Generic_Elementary_Functions(FloatingNumber);
function ArcTan(Y : FloatingNumber; X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.ArcTan(Y / X, 1.0, 360.0);
end ArcTan;
function Sin(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Sin(X, 360.0);
end;
function Cos(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Cos(X, 360.0);
end;
function Tan(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Tan(X, 360.0);
end;
function Sin_r(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Sin(X);
end;
function Cos_r(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Cos(X);
end;
function Tan_r(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Tan(X);
end;
function Sqrt(X : FloatingNumber) return FloatingNumber
is
begin
return FloatingMath.Sqrt(X);
end Sqrt;
end;
|
package body raise_from_pure is
function Raise_CE_If_0 (P : Integer) return Integer is
begin
if P = 0 then
raise Constraint_error;
end if;
return 1;
end;
end;
|
with Tkmrpc.Types;
with Tkmrpc.Operations.Ike;
package Tkmrpc.Request.Ike.Tkm_Limits is
Data_Size : constant := 0;
Padding_Size : constant := Request.Body_Size - Data_Size;
subtype Padding_Range is Natural range 1 .. Padding_Size;
subtype Padding_Type is Types.Byte_Sequence (Padding_Range);
type Request_Type is record
Header : Request.Header_Type;
Padding : Padding_Type;
end record;
for Request_Type use record
Header at 0 range 0 .. (Request.Header_Size * 8) - 1;
Padding at Request.Header_Size + Data_Size range
0 .. (Padding_Size * 8) - 1;
end record;
for Request_Type'Size use Request.Request_Size * 8;
Null_Request : constant Request_Type :=
Request_Type'
(Header =>
Request.Header_Type'(Operation => Operations.Ike.Tkm_Limits,
Request_Id => 0),
Padding => Padding_Type'(others => 0));
end Tkmrpc.Request.Ike.Tkm_Limits;
|
-- This spec has been automatically generated from STM32F103.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.ETHERNET is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype DMABMR_SR_Field is STM32_SVD.Bit;
subtype DMABMR_DA_Field is STM32_SVD.Bit;
subtype DMABMR_DSL_Field is STM32_SVD.UInt5;
subtype DMABMR_PBL_Field is STM32_SVD.UInt6;
subtype DMABMR_RTPR_Field is STM32_SVD.UInt2;
subtype DMABMR_FB_Field is STM32_SVD.Bit;
subtype DMABMR_RDP_Field is STM32_SVD.UInt6;
subtype DMABMR_USP_Field is STM32_SVD.Bit;
subtype DMABMR_FPM_Field is STM32_SVD.Bit;
subtype DMABMR_AAB_Field is STM32_SVD.Bit;
-- Ethernet DMA bus mode register
type DMABMR_Register is record
-- Software reset
SR : DMABMR_SR_Field := 16#1#;
-- DMA Arbitration
DA : DMABMR_DA_Field := 16#0#;
-- Descriptor skip length
DSL : DMABMR_DSL_Field := 16#0#;
-- unspecified
Reserved_7_7 : STM32_SVD.Bit := 16#0#;
-- Programmable burst length
PBL : DMABMR_PBL_Field := 16#1#;
-- Rx Tx priority ratio
RTPR : DMABMR_RTPR_Field := 16#0#;
-- Fixed burst
FB : DMABMR_FB_Field := 16#0#;
-- Rx DMA PBL
RDP : DMABMR_RDP_Field := 16#1#;
-- Use separate PBL
USP : DMABMR_USP_Field := 16#0#;
-- 4xPBL mode
FPM : DMABMR_FPM_Field := 16#0#;
-- Address-aligned beats
AAB : DMABMR_AAB_Field := 16#0#;
-- unspecified
Reserved_26_31 : STM32_SVD.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMABMR_Register use record
SR at 0 range 0 .. 0;
DA at 0 range 1 .. 1;
DSL at 0 range 2 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
PBL at 0 range 8 .. 13;
RTPR at 0 range 14 .. 15;
FB at 0 range 16 .. 16;
RDP at 0 range 17 .. 22;
USP at 0 range 23 .. 23;
FPM at 0 range 24 .. 24;
AAB at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype DMASR_TS_Field is STM32_SVD.Bit;
subtype DMASR_TPSS_Field is STM32_SVD.Bit;
subtype DMASR_TBUS_Field is STM32_SVD.Bit;
subtype DMASR_TJTS_Field is STM32_SVD.Bit;
subtype DMASR_ROS_Field is STM32_SVD.Bit;
subtype DMASR_TUS_Field is STM32_SVD.Bit;
subtype DMASR_RS_Field is STM32_SVD.Bit;
subtype DMASR_RBUS_Field is STM32_SVD.Bit;
subtype DMASR_RPSS_Field is STM32_SVD.Bit;
subtype DMASR_PWTS_Field is STM32_SVD.Bit;
subtype DMASR_ETS_Field is STM32_SVD.Bit;
subtype DMASR_FBES_Field is STM32_SVD.Bit;
subtype DMASR_ERS_Field is STM32_SVD.Bit;
subtype DMASR_AIS_Field is STM32_SVD.Bit;
subtype DMASR_NIS_Field is STM32_SVD.Bit;
subtype DMASR_RPS_Field is STM32_SVD.UInt3;
subtype DMASR_TPS_Field is STM32_SVD.UInt3;
subtype DMASR_EBS_Field is STM32_SVD.UInt3;
subtype DMASR_MMCS_Field is STM32_SVD.Bit;
subtype DMASR_PMTS_Field is STM32_SVD.Bit;
subtype DMASR_TSTS_Field is STM32_SVD.Bit;
-- Ethernet DMA status register
type DMASR_Register is record
-- Transmit status
TS : DMASR_TS_Field := 16#0#;
-- Transmit process stopped status
TPSS : DMASR_TPSS_Field := 16#0#;
-- Transmit buffer unavailable status
TBUS : DMASR_TBUS_Field := 16#0#;
-- Transmit jabber timeout status
TJTS : DMASR_TJTS_Field := 16#0#;
-- Receive overflow status
ROS : DMASR_ROS_Field := 16#0#;
-- Transmit underflow status
TUS : DMASR_TUS_Field := 16#0#;
-- Receive status
RS : DMASR_RS_Field := 16#0#;
-- Receive buffer unavailable status
RBUS : DMASR_RBUS_Field := 16#0#;
-- Receive process stopped status
RPSS : DMASR_RPSS_Field := 16#0#;
-- Receive watchdog timeout status
PWTS : DMASR_PWTS_Field := 16#0#;
-- Early transmit status
ETS : DMASR_ETS_Field := 16#0#;
-- unspecified
Reserved_11_12 : STM32_SVD.UInt2 := 16#0#;
-- Fatal bus error status
FBES : DMASR_FBES_Field := 16#0#;
-- Early receive status
ERS : DMASR_ERS_Field := 16#0#;
-- Abnormal interrupt summary
AIS : DMASR_AIS_Field := 16#0#;
-- Normal interrupt summary
NIS : DMASR_NIS_Field := 16#0#;
-- Read-only. Receive process state
RPS : DMASR_RPS_Field := 16#0#;
-- Read-only. Transmit process state
TPS : DMASR_TPS_Field := 16#0#;
-- Read-only. Error bits status
EBS : DMASR_EBS_Field := 16#0#;
-- unspecified
Reserved_26_26 : STM32_SVD.Bit := 16#0#;
-- Read-only. MMC status
MMCS : DMASR_MMCS_Field := 16#0#;
-- Read-only. PMT status
PMTS : DMASR_PMTS_Field := 16#0#;
-- Read-only. Time stamp trigger status
TSTS : DMASR_TSTS_Field := 16#0#;
-- unspecified
Reserved_30_31 : STM32_SVD.UInt2 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMASR_Register use record
TS at 0 range 0 .. 0;
TPSS at 0 range 1 .. 1;
TBUS at 0 range 2 .. 2;
TJTS at 0 range 3 .. 3;
ROS at 0 range 4 .. 4;
TUS at 0 range 5 .. 5;
RS at 0 range 6 .. 6;
RBUS at 0 range 7 .. 7;
RPSS at 0 range 8 .. 8;
PWTS at 0 range 9 .. 9;
ETS at 0 range 10 .. 10;
Reserved_11_12 at 0 range 11 .. 12;
FBES at 0 range 13 .. 13;
ERS at 0 range 14 .. 14;
AIS at 0 range 15 .. 15;
NIS at 0 range 16 .. 16;
RPS at 0 range 17 .. 19;
TPS at 0 range 20 .. 22;
EBS at 0 range 23 .. 25;
Reserved_26_26 at 0 range 26 .. 26;
MMCS at 0 range 27 .. 27;
PMTS at 0 range 28 .. 28;
TSTS at 0 range 29 .. 29;
Reserved_30_31 at 0 range 30 .. 31;
end record;
subtype DMAOMR_SR_Field is STM32_SVD.Bit;
subtype DMAOMR_OSF_Field is STM32_SVD.Bit;
subtype DMAOMR_RTC_Field is STM32_SVD.UInt2;
subtype DMAOMR_FUGF_Field is STM32_SVD.Bit;
subtype DMAOMR_FEF_Field is STM32_SVD.Bit;
subtype DMAOMR_ST_Field is STM32_SVD.Bit;
subtype DMAOMR_TTC_Field is STM32_SVD.UInt3;
subtype DMAOMR_FTF_Field is STM32_SVD.Bit;
subtype DMAOMR_TSF_Field is STM32_SVD.Bit;
subtype DMAOMR_DFRF_Field is STM32_SVD.Bit;
subtype DMAOMR_RSF_Field is STM32_SVD.Bit;
subtype DMAOMR_DTCEFD_Field is STM32_SVD.Bit;
-- Ethernet DMA operation mode register
type DMAOMR_Register is record
-- unspecified
Reserved_0_0 : STM32_SVD.Bit := 16#0#;
-- SR
SR : DMAOMR_SR_Field := 16#0#;
-- OSF
OSF : DMAOMR_OSF_Field := 16#0#;
-- RTC
RTC : DMAOMR_RTC_Field := 16#0#;
-- unspecified
Reserved_5_5 : STM32_SVD.Bit := 16#0#;
-- FUGF
FUGF : DMAOMR_FUGF_Field := 16#0#;
-- FEF
FEF : DMAOMR_FEF_Field := 16#0#;
-- unspecified
Reserved_8_12 : STM32_SVD.UInt5 := 16#0#;
-- ST
ST : DMAOMR_ST_Field := 16#0#;
-- TTC
TTC : DMAOMR_TTC_Field := 16#0#;
-- unspecified
Reserved_17_19 : STM32_SVD.UInt3 := 16#0#;
-- FTF
FTF : DMAOMR_FTF_Field := 16#0#;
-- TSF
TSF : DMAOMR_TSF_Field := 16#0#;
-- unspecified
Reserved_22_23 : STM32_SVD.UInt2 := 16#0#;
-- DFRF
DFRF : DMAOMR_DFRF_Field := 16#0#;
-- RSF
RSF : DMAOMR_RSF_Field := 16#0#;
-- DTCEFD
DTCEFD : DMAOMR_DTCEFD_Field := 16#0#;
-- unspecified
Reserved_27_31 : STM32_SVD.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAOMR_Register use record
Reserved_0_0 at 0 range 0 .. 0;
SR at 0 range 1 .. 1;
OSF at 0 range 2 .. 2;
RTC at 0 range 3 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
FUGF at 0 range 6 .. 6;
FEF at 0 range 7 .. 7;
Reserved_8_12 at 0 range 8 .. 12;
ST at 0 range 13 .. 13;
TTC at 0 range 14 .. 16;
Reserved_17_19 at 0 range 17 .. 19;
FTF at 0 range 20 .. 20;
TSF at 0 range 21 .. 21;
Reserved_22_23 at 0 range 22 .. 23;
DFRF at 0 range 24 .. 24;
RSF at 0 range 25 .. 25;
DTCEFD at 0 range 26 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
subtype DMAIER_TIE_Field is STM32_SVD.Bit;
subtype DMAIER_TPSIE_Field is STM32_SVD.Bit;
subtype DMAIER_TBUIE_Field is STM32_SVD.Bit;
subtype DMAIER_TJTIE_Field is STM32_SVD.Bit;
subtype DMAIER_ROIE_Field is STM32_SVD.Bit;
subtype DMAIER_TUIE_Field is STM32_SVD.Bit;
subtype DMAIER_RIE_Field is STM32_SVD.Bit;
subtype DMAIER_RBUIE_Field is STM32_SVD.Bit;
subtype DMAIER_RPSIE_Field is STM32_SVD.Bit;
subtype DMAIER_RWTIE_Field is STM32_SVD.Bit;
subtype DMAIER_ETIE_Field is STM32_SVD.Bit;
subtype DMAIER_FBEIE_Field is STM32_SVD.Bit;
subtype DMAIER_ERIE_Field is STM32_SVD.Bit;
subtype DMAIER_AISE_Field is STM32_SVD.Bit;
subtype DMAIER_NISE_Field is STM32_SVD.Bit;
-- Ethernet DMA interrupt enable register
type DMAIER_Register is record
-- Transmit interrupt enable
TIE : DMAIER_TIE_Field := 16#0#;
-- Transmit process stopped interrupt enable
TPSIE : DMAIER_TPSIE_Field := 16#0#;
-- Transmit buffer unavailable interrupt enable
TBUIE : DMAIER_TBUIE_Field := 16#0#;
-- Transmit jabber timeout interrupt enable
TJTIE : DMAIER_TJTIE_Field := 16#0#;
-- Overflow interrupt enable
ROIE : DMAIER_ROIE_Field := 16#0#;
-- Underflow interrupt enable
TUIE : DMAIER_TUIE_Field := 16#0#;
-- Receive interrupt enable
RIE : DMAIER_RIE_Field := 16#0#;
-- Receive buffer unavailable interrupt enable
RBUIE : DMAIER_RBUIE_Field := 16#0#;
-- Receive process stopped interrupt enable
RPSIE : DMAIER_RPSIE_Field := 16#0#;
-- receive watchdog timeout interrupt enable
RWTIE : DMAIER_RWTIE_Field := 16#0#;
-- Early transmit interrupt enable
ETIE : DMAIER_ETIE_Field := 16#0#;
-- unspecified
Reserved_11_12 : STM32_SVD.UInt2 := 16#0#;
-- Fatal bus error interrupt enable
FBEIE : DMAIER_FBEIE_Field := 16#0#;
-- Early receive interrupt enable
ERIE : DMAIER_ERIE_Field := 16#0#;
-- Abnormal interrupt summary enable
AISE : DMAIER_AISE_Field := 16#0#;
-- Normal interrupt summary enable
NISE : DMAIER_NISE_Field := 16#0#;
-- unspecified
Reserved_17_31 : STM32_SVD.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAIER_Register use record
TIE at 0 range 0 .. 0;
TPSIE at 0 range 1 .. 1;
TBUIE at 0 range 2 .. 2;
TJTIE at 0 range 3 .. 3;
ROIE at 0 range 4 .. 4;
TUIE at 0 range 5 .. 5;
RIE at 0 range 6 .. 6;
RBUIE at 0 range 7 .. 7;
RPSIE at 0 range 8 .. 8;
RWTIE at 0 range 9 .. 9;
ETIE at 0 range 10 .. 10;
Reserved_11_12 at 0 range 11 .. 12;
FBEIE at 0 range 13 .. 13;
ERIE at 0 range 14 .. 14;
AISE at 0 range 15 .. 15;
NISE at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype DMAMFBOCR_MFC_Field is STM32_SVD.UInt16;
subtype DMAMFBOCR_OMFC_Field is STM32_SVD.Bit;
subtype DMAMFBOCR_MFA_Field is STM32_SVD.UInt11;
subtype DMAMFBOCR_OFOC_Field is STM32_SVD.Bit;
-- Ethernet DMA missed frame and buffer overflow counter register
type DMAMFBOCR_Register is record
-- Read-only. Missed frames by the controller
MFC : DMAMFBOCR_MFC_Field;
-- Read-only. Overflow bit for missed frame counter
OMFC : DMAMFBOCR_OMFC_Field;
-- Read-only. Missed frames by the application
MFA : DMAMFBOCR_MFA_Field;
-- Read-only. Overflow bit for FIFO overflow counter
OFOC : DMAMFBOCR_OFOC_Field;
-- unspecified
Reserved_29_31 : STM32_SVD.UInt3;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DMAMFBOCR_Register use record
MFC at 0 range 0 .. 15;
OMFC at 0 range 16 .. 16;
MFA at 0 range 17 .. 27;
OFOC at 0 range 28 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype MACCR_RE_Field is STM32_SVD.Bit;
subtype MACCR_TE_Field is STM32_SVD.Bit;
subtype MACCR_DC_Field is STM32_SVD.Bit;
subtype MACCR_BL_Field is STM32_SVD.UInt2;
subtype MACCR_APCS_Field is STM32_SVD.Bit;
subtype MACCR_RD_Field is STM32_SVD.Bit;
subtype MACCR_IPCO_Field is STM32_SVD.Bit;
subtype MACCR_DM_Field is STM32_SVD.Bit;
subtype MACCR_LM_Field is STM32_SVD.Bit;
subtype MACCR_ROD_Field is STM32_SVD.Bit;
subtype MACCR_FES_Field is STM32_SVD.Bit;
subtype MACCR_CSD_Field is STM32_SVD.Bit;
subtype MACCR_IFG_Field is STM32_SVD.UInt3;
subtype MACCR_JD_Field is STM32_SVD.Bit;
subtype MACCR_WD_Field is STM32_SVD.Bit;
-- Ethernet MAC configuration register (ETH_MACCR)
type MACCR_Register is record
-- unspecified
Reserved_0_1 : STM32_SVD.UInt2 := 16#0#;
-- Receiver enable
RE : MACCR_RE_Field := 16#0#;
-- Transmitter enable
TE : MACCR_TE_Field := 16#0#;
-- Deferral check
DC : MACCR_DC_Field := 16#0#;
-- Back-off limit
BL : MACCR_BL_Field := 16#0#;
-- Automatic pad/CRC stripping
APCS : MACCR_APCS_Field := 16#0#;
-- unspecified
Reserved_8_8 : STM32_SVD.Bit := 16#0#;
-- Retry disable
RD : MACCR_RD_Field := 16#0#;
-- IPv4 checksum offload
IPCO : MACCR_IPCO_Field := 16#0#;
-- Duplex mode
DM : MACCR_DM_Field := 16#0#;
-- Loopback mode
LM : MACCR_LM_Field := 16#0#;
-- Receive own disable
ROD : MACCR_ROD_Field := 16#0#;
-- Fast Ethernet speed
FES : MACCR_FES_Field := 16#0#;
-- unspecified
Reserved_15_15 : STM32_SVD.Bit := 16#1#;
-- Carrier sense disable
CSD : MACCR_CSD_Field := 16#0#;
-- Interframe gap
IFG : MACCR_IFG_Field := 16#0#;
-- unspecified
Reserved_20_21 : STM32_SVD.UInt2 := 16#0#;
-- Jabber disable
JD : MACCR_JD_Field := 16#0#;
-- Watchdog disable
WD : MACCR_WD_Field := 16#0#;
-- unspecified
Reserved_24_31 : STM32_SVD.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACCR_Register use record
Reserved_0_1 at 0 range 0 .. 1;
RE at 0 range 2 .. 2;
TE at 0 range 3 .. 3;
DC at 0 range 4 .. 4;
BL at 0 range 5 .. 6;
APCS at 0 range 7 .. 7;
Reserved_8_8 at 0 range 8 .. 8;
RD at 0 range 9 .. 9;
IPCO at 0 range 10 .. 10;
DM at 0 range 11 .. 11;
LM at 0 range 12 .. 12;
ROD at 0 range 13 .. 13;
FES at 0 range 14 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
CSD at 0 range 16 .. 16;
IFG at 0 range 17 .. 19;
Reserved_20_21 at 0 range 20 .. 21;
JD at 0 range 22 .. 22;
WD at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
subtype MACFFR_PM_Field is STM32_SVD.Bit;
subtype MACFFR_HU_Field is STM32_SVD.Bit;
subtype MACFFR_HM_Field is STM32_SVD.Bit;
subtype MACFFR_DAIF_Field is STM32_SVD.Bit;
subtype MACFFR_PAM_Field is STM32_SVD.Bit;
subtype MACFFR_BFD_Field is STM32_SVD.Bit;
subtype MACFFR_PCF_Field is STM32_SVD.UInt2;
subtype MACFFR_SAIF_Field is STM32_SVD.Bit;
subtype MACFFR_SAF_Field is STM32_SVD.Bit;
subtype MACFFR_HPF_Field is STM32_SVD.Bit;
subtype MACFFR_RA_Field is STM32_SVD.Bit;
-- Ethernet MAC frame filter register (ETH_MACCFFR)
type MACFFR_Register is record
-- Promiscuous mode
PM : MACFFR_PM_Field := 16#0#;
-- Hash unicast
HU : MACFFR_HU_Field := 16#0#;
-- Hash multicast
HM : MACFFR_HM_Field := 16#0#;
-- Destination address inverse filtering
DAIF : MACFFR_DAIF_Field := 16#0#;
-- Pass all multicast
PAM : MACFFR_PAM_Field := 16#0#;
-- Broadcast frames disable
BFD : MACFFR_BFD_Field := 16#0#;
-- Pass control frames
PCF : MACFFR_PCF_Field := 16#0#;
-- Source address inverse filtering
SAIF : MACFFR_SAIF_Field := 16#0#;
-- Source address filter
SAF : MACFFR_SAF_Field := 16#0#;
-- Hash or perfect filter
HPF : MACFFR_HPF_Field := 16#0#;
-- unspecified
Reserved_11_30 : STM32_SVD.UInt20 := 16#0#;
-- Receive all
RA : MACFFR_RA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACFFR_Register use record
PM at 0 range 0 .. 0;
HU at 0 range 1 .. 1;
HM at 0 range 2 .. 2;
DAIF at 0 range 3 .. 3;
PAM at 0 range 4 .. 4;
BFD at 0 range 5 .. 5;
PCF at 0 range 6 .. 7;
SAIF at 0 range 8 .. 8;
SAF at 0 range 9 .. 9;
HPF at 0 range 10 .. 10;
Reserved_11_30 at 0 range 11 .. 30;
RA at 0 range 31 .. 31;
end record;
subtype MACMIIAR_MB_Field is STM32_SVD.Bit;
subtype MACMIIAR_MW_Field is STM32_SVD.Bit;
subtype MACMIIAR_CR_Field is STM32_SVD.UInt3;
subtype MACMIIAR_MR_Field is STM32_SVD.UInt5;
subtype MACMIIAR_PA_Field is STM32_SVD.UInt5;
-- Ethernet MAC MII address register (ETH_MACMIIAR)
type MACMIIAR_Register is record
-- MII busy
MB : MACMIIAR_MB_Field := 16#0#;
-- MII write
MW : MACMIIAR_MW_Field := 16#0#;
-- Clock range
CR : MACMIIAR_CR_Field := 16#0#;
-- unspecified
Reserved_5_5 : STM32_SVD.Bit := 16#0#;
-- MII register
MR : MACMIIAR_MR_Field := 16#0#;
-- PHY address
PA : MACMIIAR_PA_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACMIIAR_Register use record
MB at 0 range 0 .. 0;
MW at 0 range 1 .. 1;
CR at 0 range 2 .. 4;
Reserved_5_5 at 0 range 5 .. 5;
MR at 0 range 6 .. 10;
PA at 0 range 11 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MACMIIDR_MD_Field is STM32_SVD.UInt16;
-- Ethernet MAC MII data register (ETH_MACMIIDR)
type MACMIIDR_Register is record
-- MII data
MD : MACMIIDR_MD_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACMIIDR_Register use record
MD at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype MACFCR_FCB_BPA_Field is STM32_SVD.Bit;
subtype MACFCR_TFCE_Field is STM32_SVD.Bit;
subtype MACFCR_RFCE_Field is STM32_SVD.Bit;
subtype MACFCR_UPFD_Field is STM32_SVD.Bit;
subtype MACFCR_PLT_Field is STM32_SVD.UInt2;
subtype MACFCR_ZQPD_Field is STM32_SVD.Bit;
subtype MACFCR_PT_Field is STM32_SVD.UInt16;
-- Ethernet MAC flow control register (ETH_MACFCR)
type MACFCR_Register is record
-- Flow control busy/back pressure activate
FCB_BPA : MACFCR_FCB_BPA_Field := 16#0#;
-- Transmit flow control enable
TFCE : MACFCR_TFCE_Field := 16#0#;
-- Receive flow control enable
RFCE : MACFCR_RFCE_Field := 16#0#;
-- Unicast pause frame detect
UPFD : MACFCR_UPFD_Field := 16#0#;
-- Pause low threshold
PLT : MACFCR_PLT_Field := 16#0#;
-- unspecified
Reserved_6_6 : STM32_SVD.Bit := 16#0#;
-- Zero-quanta pause disable
ZQPD : MACFCR_ZQPD_Field := 16#0#;
-- unspecified
Reserved_8_15 : STM32_SVD.Byte := 16#0#;
-- Pass control frames
PT : MACFCR_PT_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACFCR_Register use record
FCB_BPA at 0 range 0 .. 0;
TFCE at 0 range 1 .. 1;
RFCE at 0 range 2 .. 2;
UPFD at 0 range 3 .. 3;
PLT at 0 range 4 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
ZQPD at 0 range 7 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
PT at 0 range 16 .. 31;
end record;
subtype MACVLANTR_VLANTI_Field is STM32_SVD.UInt16;
subtype MACVLANTR_VLANTC_Field is STM32_SVD.Bit;
-- Ethernet MAC VLAN tag register (ETH_MACVLANTR)
type MACVLANTR_Register is record
-- VLAN tag identifier (for receive frames)
VLANTI : MACVLANTR_VLANTI_Field := 16#0#;
-- 12-bit VLAN tag comparison
VLANTC : MACVLANTR_VLANTC_Field := 16#0#;
-- unspecified
Reserved_17_31 : STM32_SVD.UInt15 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACVLANTR_Register use record
VLANTI at 0 range 0 .. 15;
VLANTC at 0 range 16 .. 16;
Reserved_17_31 at 0 range 17 .. 31;
end record;
subtype MACPMTCSR_PD_Field is STM32_SVD.Bit;
subtype MACPMTCSR_MPE_Field is STM32_SVD.Bit;
subtype MACPMTCSR_WFE_Field is STM32_SVD.Bit;
subtype MACPMTCSR_MPR_Field is STM32_SVD.Bit;
subtype MACPMTCSR_WFR_Field is STM32_SVD.Bit;
subtype MACPMTCSR_GU_Field is STM32_SVD.Bit;
subtype MACPMTCSR_WFFRPR_Field is STM32_SVD.Bit;
-- Ethernet MAC PMT control and status register (ETH_MACPMTCSR)
type MACPMTCSR_Register is record
-- Power down
PD : MACPMTCSR_PD_Field := 16#0#;
-- Magic Packet enable
MPE : MACPMTCSR_MPE_Field := 16#0#;
-- Wakeup frame enable
WFE : MACPMTCSR_WFE_Field := 16#0#;
-- unspecified
Reserved_3_4 : STM32_SVD.UInt2 := 16#0#;
-- Magic packet received
MPR : MACPMTCSR_MPR_Field := 16#0#;
-- Wakeup frame received
WFR : MACPMTCSR_WFR_Field := 16#0#;
-- unspecified
Reserved_7_8 : STM32_SVD.UInt2 := 16#0#;
-- Global unicast
GU : MACPMTCSR_GU_Field := 16#0#;
-- unspecified
Reserved_10_30 : STM32_SVD.UInt21 := 16#0#;
-- Wakeup frame filter register pointer reset
WFFRPR : MACPMTCSR_WFFRPR_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACPMTCSR_Register use record
PD at 0 range 0 .. 0;
MPE at 0 range 1 .. 1;
WFE at 0 range 2 .. 2;
Reserved_3_4 at 0 range 3 .. 4;
MPR at 0 range 5 .. 5;
WFR at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
GU at 0 range 9 .. 9;
Reserved_10_30 at 0 range 10 .. 30;
WFFRPR at 0 range 31 .. 31;
end record;
subtype MACSR_PMTS_Field is STM32_SVD.Bit;
subtype MACSR_MMCS_Field is STM32_SVD.Bit;
subtype MACSR_MMCRS_Field is STM32_SVD.Bit;
subtype MACSR_MMCTS_Field is STM32_SVD.Bit;
subtype MACSR_TSTS_Field is STM32_SVD.Bit;
-- Ethernet MAC interrupt status register (ETH_MACSR)
type MACSR_Register is record
-- unspecified
Reserved_0_2 : STM32_SVD.UInt3 := 16#0#;
-- PMT status
PMTS : MACSR_PMTS_Field := 16#0#;
-- MMC status
MMCS : MACSR_MMCS_Field := 16#0#;
-- MMC receive status
MMCRS : MACSR_MMCRS_Field := 16#0#;
-- MMC transmit status
MMCTS : MACSR_MMCTS_Field := 16#0#;
-- unspecified
Reserved_7_8 : STM32_SVD.UInt2 := 16#0#;
-- Time stamp trigger status
TSTS : MACSR_TSTS_Field := 16#0#;
-- unspecified
Reserved_10_31 : STM32_SVD.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACSR_Register use record
Reserved_0_2 at 0 range 0 .. 2;
PMTS at 0 range 3 .. 3;
MMCS at 0 range 4 .. 4;
MMCRS at 0 range 5 .. 5;
MMCTS at 0 range 6 .. 6;
Reserved_7_8 at 0 range 7 .. 8;
TSTS at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype MACIMR_PMTIM_Field is STM32_SVD.Bit;
subtype MACIMR_TSTIM_Field is STM32_SVD.Bit;
-- Ethernet MAC interrupt mask register (ETH_MACIMR)
type MACIMR_Register is record
-- unspecified
Reserved_0_2 : STM32_SVD.UInt3 := 16#0#;
-- PMT interrupt mask
PMTIM : MACIMR_PMTIM_Field := 16#0#;
-- unspecified
Reserved_4_8 : STM32_SVD.UInt5 := 16#0#;
-- Time stamp trigger interrupt mask
TSTIM : MACIMR_TSTIM_Field := 16#0#;
-- unspecified
Reserved_10_31 : STM32_SVD.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACIMR_Register use record
Reserved_0_2 at 0 range 0 .. 2;
PMTIM at 0 range 3 .. 3;
Reserved_4_8 at 0 range 4 .. 8;
TSTIM at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
subtype MACA0HR_MACA0H_Field is STM32_SVD.UInt16;
subtype MACA0HR_MO_Field is STM32_SVD.Bit;
-- Ethernet MAC address 0 high register (ETH_MACA0HR)
type MACA0HR_Register is record
-- MAC address0 high
MACA0H : MACA0HR_MACA0H_Field := 16#FFFF#;
-- unspecified
Reserved_16_30 : STM32_SVD.UInt15 := 16#10#;
-- Read-only. Always 1
MO : MACA0HR_MO_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACA0HR_Register use record
MACA0H at 0 range 0 .. 15;
Reserved_16_30 at 0 range 16 .. 30;
MO at 0 range 31 .. 31;
end record;
subtype MACA1HR_MACA1H_Field is STM32_SVD.UInt16;
subtype MACA1HR_MBC_Field is STM32_SVD.UInt6;
subtype MACA1HR_SA_Field is STM32_SVD.Bit;
subtype MACA1HR_AE_Field is STM32_SVD.Bit;
-- Ethernet MAC address 1 high register (ETH_MACA1HR)
type MACA1HR_Register is record
-- MAC address1 high
MACA1H : MACA1HR_MACA1H_Field := 16#FFFF#;
-- unspecified
Reserved_16_23 : STM32_SVD.Byte := 16#0#;
-- Mask byte control
MBC : MACA1HR_MBC_Field := 16#0#;
-- Source address
SA : MACA1HR_SA_Field := 16#0#;
-- Address enable
AE : MACA1HR_AE_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACA1HR_Register use record
MACA1H at 0 range 0 .. 15;
Reserved_16_23 at 0 range 16 .. 23;
MBC at 0 range 24 .. 29;
SA at 0 range 30 .. 30;
AE at 0 range 31 .. 31;
end record;
subtype MACA2HR_ETH_MACA2HR_Field is STM32_SVD.UInt16;
subtype MACA2HR_MBC_Field is STM32_SVD.UInt6;
subtype MACA2HR_SA_Field is STM32_SVD.Bit;
subtype MACA2HR_AE_Field is STM32_SVD.Bit;
-- Ethernet MAC address 2 high register (ETH_MACA2HR)
type MACA2HR_Register is record
-- Ethernet MAC address 2 high register
ETH_MACA2HR : MACA2HR_ETH_MACA2HR_Field := 16#50#;
-- unspecified
Reserved_16_23 : STM32_SVD.Byte := 16#0#;
-- Mask byte control
MBC : MACA2HR_MBC_Field := 16#0#;
-- Source address
SA : MACA2HR_SA_Field := 16#0#;
-- Address enable
AE : MACA2HR_AE_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACA2HR_Register use record
ETH_MACA2HR at 0 range 0 .. 15;
Reserved_16_23 at 0 range 16 .. 23;
MBC at 0 range 24 .. 29;
SA at 0 range 30 .. 30;
AE at 0 range 31 .. 31;
end record;
subtype MACA2LR_MACA2L_Field is STM32_SVD.UInt31;
-- Ethernet MAC address 2 low register
type MACA2LR_Register is record
-- MAC address2 low
MACA2L : MACA2LR_MACA2L_Field := 16#7FFFFFFF#;
-- unspecified
Reserved_31_31 : STM32_SVD.Bit := 16#1#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACA2LR_Register use record
MACA2L at 0 range 0 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype MACA3HR_MACA3H_Field is STM32_SVD.UInt16;
subtype MACA3HR_MBC_Field is STM32_SVD.UInt6;
subtype MACA3HR_SA_Field is STM32_SVD.Bit;
subtype MACA3HR_AE_Field is STM32_SVD.Bit;
-- Ethernet MAC address 3 high register (ETH_MACA3HR)
type MACA3HR_Register is record
-- MAC address3 high
MACA3H : MACA3HR_MACA3H_Field := 16#FFFF#;
-- unspecified
Reserved_16_23 : STM32_SVD.Byte := 16#0#;
-- Mask byte control
MBC : MACA3HR_MBC_Field := 16#0#;
-- Source address
SA : MACA3HR_SA_Field := 16#0#;
-- Address enable
AE : MACA3HR_AE_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MACA3HR_Register use record
MACA3H at 0 range 0 .. 15;
Reserved_16_23 at 0 range 16 .. 23;
MBC at 0 range 24 .. 29;
SA at 0 range 30 .. 30;
AE at 0 range 31 .. 31;
end record;
subtype MMCCR_CR_Field is STM32_SVD.Bit;
subtype MMCCR_CSR_Field is STM32_SVD.Bit;
subtype MMCCR_ROR_Field is STM32_SVD.Bit;
subtype MMCCR_MCF_Field is STM32_SVD.Bit;
-- Ethernet MMC control register (ETH_MMCCR)
type MMCCR_Register is record
-- Counter reset
CR : MMCCR_CR_Field := 16#0#;
-- Counter stop rollover
CSR : MMCCR_CSR_Field := 16#0#;
-- Reset on read
ROR : MMCCR_ROR_Field := 16#0#;
-- unspecified
Reserved_3_30 : STM32_SVD.UInt28 := 16#0#;
-- MMC counter freeze
MCF : MMCCR_MCF_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MMCCR_Register use record
CR at 0 range 0 .. 0;
CSR at 0 range 1 .. 1;
ROR at 0 range 2 .. 2;
Reserved_3_30 at 0 range 3 .. 30;
MCF at 0 range 31 .. 31;
end record;
subtype MMCRIR_RFCES_Field is STM32_SVD.Bit;
subtype MMCRIR_RFAES_Field is STM32_SVD.Bit;
subtype MMCRIR_RGUFS_Field is STM32_SVD.Bit;
-- Ethernet MMC receive interrupt register (ETH_MMCRIR)
type MMCRIR_Register is record
-- unspecified
Reserved_0_4 : STM32_SVD.UInt5 := 16#0#;
-- Received frames CRC error status
RFCES : MMCRIR_RFCES_Field := 16#0#;
-- Received frames alignment error status
RFAES : MMCRIR_RFAES_Field := 16#0#;
-- unspecified
Reserved_7_16 : STM32_SVD.UInt10 := 16#0#;
-- Received Good Unicast Frames Status
RGUFS : MMCRIR_RGUFS_Field := 16#0#;
-- unspecified
Reserved_18_31 : STM32_SVD.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MMCRIR_Register use record
Reserved_0_4 at 0 range 0 .. 4;
RFCES at 0 range 5 .. 5;
RFAES at 0 range 6 .. 6;
Reserved_7_16 at 0 range 7 .. 16;
RGUFS at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype MMCTIR_TGFSCS_Field is STM32_SVD.Bit;
subtype MMCTIR_TGFMSCS_Field is STM32_SVD.Bit;
subtype MMCTIR_TGFS_Field is STM32_SVD.Bit;
-- Ethernet MMC transmit interrupt register (ETH_MMCTIR)
type MMCTIR_Register is record
-- unspecified
Reserved_0_13 : STM32_SVD.UInt14 := 16#0#;
-- Transmitted good frames single collision status
TGFSCS : MMCTIR_TGFSCS_Field := 16#0#;
-- Transmitted good frames more single collision status
TGFMSCS : MMCTIR_TGFMSCS_Field := 16#0#;
-- unspecified
Reserved_16_20 : STM32_SVD.UInt5 := 16#0#;
-- Transmitted good frames status
TGFS : MMCTIR_TGFS_Field := 16#0#;
-- unspecified
Reserved_22_31 : STM32_SVD.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MMCTIR_Register use record
Reserved_0_13 at 0 range 0 .. 13;
TGFSCS at 0 range 14 .. 14;
TGFMSCS at 0 range 15 .. 15;
Reserved_16_20 at 0 range 16 .. 20;
TGFS at 0 range 21 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype MMCRIMR_RFCEM_Field is STM32_SVD.Bit;
subtype MMCRIMR_RFAEM_Field is STM32_SVD.Bit;
subtype MMCRIMR_RGUFM_Field is STM32_SVD.Bit;
-- Ethernet MMC receive interrupt mask register (ETH_MMCRIMR)
type MMCRIMR_Register is record
-- unspecified
Reserved_0_4 : STM32_SVD.UInt5 := 16#0#;
-- Received frame CRC error mask
RFCEM : MMCRIMR_RFCEM_Field := 16#0#;
-- Received frames alignment error mask
RFAEM : MMCRIMR_RFAEM_Field := 16#0#;
-- unspecified
Reserved_7_16 : STM32_SVD.UInt10 := 16#0#;
-- Received good unicast frames mask
RGUFM : MMCRIMR_RGUFM_Field := 16#0#;
-- unspecified
Reserved_18_31 : STM32_SVD.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MMCRIMR_Register use record
Reserved_0_4 at 0 range 0 .. 4;
RFCEM at 0 range 5 .. 5;
RFAEM at 0 range 6 .. 6;
Reserved_7_16 at 0 range 7 .. 16;
RGUFM at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
subtype MMCTIMR_TGFSCM_Field is STM32_SVD.Bit;
subtype MMCTIMR_TGFMSCM_Field is STM32_SVD.Bit;
subtype MMCTIMR_TGFM_Field is STM32_SVD.Bit;
-- Ethernet MMC transmit interrupt mask register (ETH_MMCTIMR)
type MMCTIMR_Register is record
-- unspecified
Reserved_0_13 : STM32_SVD.UInt14 := 16#0#;
-- Transmitted good frames single collision mask
TGFSCM : MMCTIMR_TGFSCM_Field := 16#0#;
-- Transmitted good frames more single collision mask
TGFMSCM : MMCTIMR_TGFMSCM_Field := 16#0#;
-- unspecified
Reserved_16_20 : STM32_SVD.UInt5 := 16#0#;
-- Transmitted good frames mask
TGFM : MMCTIMR_TGFM_Field := 16#0#;
-- unspecified
Reserved_22_31 : STM32_SVD.UInt10 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for MMCTIMR_Register use record
Reserved_0_13 at 0 range 0 .. 13;
TGFSCM at 0 range 14 .. 14;
TGFMSCM at 0 range 15 .. 15;
Reserved_16_20 at 0 range 16 .. 20;
TGFM at 0 range 21 .. 21;
Reserved_22_31 at 0 range 22 .. 31;
end record;
subtype PTPTSCR_TSE_Field is STM32_SVD.Bit;
subtype PTPTSCR_TSFCU_Field is STM32_SVD.Bit;
subtype PTPTSCR_TSSTI_Field is STM32_SVD.Bit;
subtype PTPTSCR_TSSTU_Field is STM32_SVD.Bit;
subtype PTPTSCR_TSITE_Field is STM32_SVD.Bit;
subtype PTPTSCR_TSARU_Field is STM32_SVD.Bit;
-- Ethernet PTP time stamp control register (ETH_PTPTSCR)
type PTPTSCR_Register is record
-- Time stamp enable
TSE : PTPTSCR_TSE_Field := 16#0#;
-- Time stamp fine or coarse update
TSFCU : PTPTSCR_TSFCU_Field := 16#0#;
-- Time stamp system time initialize
TSSTI : PTPTSCR_TSSTI_Field := 16#0#;
-- Time stamp system time update
TSSTU : PTPTSCR_TSSTU_Field := 16#0#;
-- Time stamp interrupt trigger enable
TSITE : PTPTSCR_TSITE_Field := 16#0#;
-- Time stamp addend register update
TSARU : PTPTSCR_TSARU_Field := 16#0#;
-- unspecified
Reserved_6_31 : STM32_SVD.UInt26 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PTPTSCR_Register use record
TSE at 0 range 0 .. 0;
TSFCU at 0 range 1 .. 1;
TSSTI at 0 range 2 .. 2;
TSSTU at 0 range 3 .. 3;
TSITE at 0 range 4 .. 4;
TSARU at 0 range 5 .. 5;
Reserved_6_31 at 0 range 6 .. 31;
end record;
subtype PTPSSIR_STSSI_Field is STM32_SVD.Byte;
-- Ethernet PTP subsecond increment register
type PTPSSIR_Register is record
-- System time subsecond increment
STSSI : PTPSSIR_STSSI_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PTPSSIR_Register use record
STSSI at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype PTPTSLR_STSS_Field is STM32_SVD.UInt31;
subtype PTPTSLR_STPNS_Field is STM32_SVD.Bit;
-- Ethernet PTP time stamp low register (ETH_PTPTSLR)
type PTPTSLR_Register is record
-- Read-only. System time subseconds
STSS : PTPTSLR_STSS_Field;
-- Read-only. System time positive or negative sign
STPNS : PTPTSLR_STPNS_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PTPTSLR_Register use record
STSS at 0 range 0 .. 30;
STPNS at 0 range 31 .. 31;
end record;
subtype PTPTSLUR_TSUSS_Field is STM32_SVD.UInt31;
subtype PTPTSLUR_TSUPNS_Field is STM32_SVD.Bit;
-- Ethernet PTP time stamp low update register (ETH_PTPTSLUR)
type PTPTSLUR_Register is record
-- Time stamp update subseconds
TSUSS : PTPTSLUR_TSUSS_Field := 16#0#;
-- Time stamp update positive or negative sign
TSUPNS : PTPTSLUR_TSUPNS_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PTPTSLUR_Register use record
TSUSS at 0 range 0 .. 30;
TSUPNS at 0 range 31 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Ethernet: DMA controller operation
type ETHERNET_DMA_Peripheral is record
-- Ethernet DMA bus mode register
DMABMR : aliased DMABMR_Register;
-- Ethernet DMA transmit poll demand register
DMATPDR : aliased STM32_SVD.UInt32;
-- EHERNET DMA receive poll demand register
DMARPDR : aliased STM32_SVD.UInt32;
-- Ethernet DMA receive descriptor list address register
DMARDLAR : aliased STM32_SVD.UInt32;
-- Ethernet DMA transmit descriptor list address register
DMATDLAR : aliased STM32_SVD.UInt32;
-- Ethernet DMA status register
DMASR : aliased DMASR_Register;
-- Ethernet DMA operation mode register
DMAOMR : aliased DMAOMR_Register;
-- Ethernet DMA interrupt enable register
DMAIER : aliased DMAIER_Register;
-- Ethernet DMA missed frame and buffer overflow counter register
DMAMFBOCR : aliased DMAMFBOCR_Register;
-- Ethernet DMA current host transmit descriptor register
DMACHTDR : aliased STM32_SVD.UInt32;
-- Ethernet DMA current host receive descriptor register
DMACHRDR : aliased STM32_SVD.UInt32;
-- Ethernet DMA current host transmit buffer address register
DMACHTBAR : aliased STM32_SVD.UInt32;
-- Ethernet DMA current host receive buffer address register
DMACHRBAR : aliased STM32_SVD.UInt32;
end record
with Volatile;
for ETHERNET_DMA_Peripheral use record
DMABMR at 16#0# range 0 .. 31;
DMATPDR at 16#4# range 0 .. 31;
DMARPDR at 16#8# range 0 .. 31;
DMARDLAR at 16#C# range 0 .. 31;
DMATDLAR at 16#10# range 0 .. 31;
DMASR at 16#14# range 0 .. 31;
DMAOMR at 16#18# range 0 .. 31;
DMAIER at 16#1C# range 0 .. 31;
DMAMFBOCR at 16#20# range 0 .. 31;
DMACHTDR at 16#48# range 0 .. 31;
DMACHRDR at 16#4C# range 0 .. 31;
DMACHTBAR at 16#50# range 0 .. 31;
DMACHRBAR at 16#54# range 0 .. 31;
end record;
-- Ethernet: DMA controller operation
ETHERNET_DMA_Periph : aliased ETHERNET_DMA_Peripheral
with Import, Address => System'To_Address (16#40029000#);
-- Ethernet: media access control
type ETHERNET_MAC_Peripheral is record
-- Ethernet MAC configuration register (ETH_MACCR)
MACCR : aliased MACCR_Register;
-- Ethernet MAC frame filter register (ETH_MACCFFR)
MACFFR : aliased MACFFR_Register;
-- Ethernet MAC hash table high register
MACHTHR : aliased STM32_SVD.UInt32;
-- Ethernet MAC hash table low register
MACHTLR : aliased STM32_SVD.UInt32;
-- Ethernet MAC MII address register (ETH_MACMIIAR)
MACMIIAR : aliased MACMIIAR_Register;
-- Ethernet MAC MII data register (ETH_MACMIIDR)
MACMIIDR : aliased MACMIIDR_Register;
-- Ethernet MAC flow control register (ETH_MACFCR)
MACFCR : aliased MACFCR_Register;
-- Ethernet MAC VLAN tag register (ETH_MACVLANTR)
MACVLANTR : aliased MACVLANTR_Register;
-- Ethernet MAC remote wakeup frame filter register (ETH_MACRWUFFR)
MACRWUFFR : aliased STM32_SVD.UInt32;
-- Ethernet MAC PMT control and status register (ETH_MACPMTCSR)
MACPMTCSR : aliased MACPMTCSR_Register;
-- Ethernet MAC interrupt status register (ETH_MACSR)
MACSR : aliased MACSR_Register;
-- Ethernet MAC interrupt mask register (ETH_MACIMR)
MACIMR : aliased MACIMR_Register;
-- Ethernet MAC address 0 high register (ETH_MACA0HR)
MACA0HR : aliased MACA0HR_Register;
-- Ethernet MAC address 0 low register
MACA0LR : aliased STM32_SVD.UInt32;
-- Ethernet MAC address 1 high register (ETH_MACA1HR)
MACA1HR : aliased MACA1HR_Register;
-- Ethernet MAC address1 low register
MACA1LR : aliased STM32_SVD.UInt32;
-- Ethernet MAC address 2 high register (ETH_MACA2HR)
MACA2HR : aliased MACA2HR_Register;
-- Ethernet MAC address 2 low register
MACA2LR : aliased MACA2LR_Register;
-- Ethernet MAC address 3 high register (ETH_MACA3HR)
MACA3HR : aliased MACA3HR_Register;
-- Ethernet MAC address 3 low register
MACA3LR : aliased STM32_SVD.UInt32;
end record
with Volatile;
for ETHERNET_MAC_Peripheral use record
MACCR at 16#0# range 0 .. 31;
MACFFR at 16#4# range 0 .. 31;
MACHTHR at 16#8# range 0 .. 31;
MACHTLR at 16#C# range 0 .. 31;
MACMIIAR at 16#10# range 0 .. 31;
MACMIIDR at 16#14# range 0 .. 31;
MACFCR at 16#18# range 0 .. 31;
MACVLANTR at 16#1C# range 0 .. 31;
MACRWUFFR at 16#28# range 0 .. 31;
MACPMTCSR at 16#2C# range 0 .. 31;
MACSR at 16#38# range 0 .. 31;
MACIMR at 16#3C# range 0 .. 31;
MACA0HR at 16#40# range 0 .. 31;
MACA0LR at 16#44# range 0 .. 31;
MACA1HR at 16#48# range 0 .. 31;
MACA1LR at 16#4C# range 0 .. 31;
MACA2HR at 16#50# range 0 .. 31;
MACA2LR at 16#54# range 0 .. 31;
MACA3HR at 16#58# range 0 .. 31;
MACA3LR at 16#5C# range 0 .. 31;
end record;
-- Ethernet: media access control
ETHERNET_MAC_Periph : aliased ETHERNET_MAC_Peripheral
with Import, Address => System'To_Address (16#40028000#);
-- Ethernet: MAC management counters
type ETHERNET_MMC_Peripheral is record
-- Ethernet MMC control register (ETH_MMCCR)
MMCCR : aliased MMCCR_Register;
-- Ethernet MMC receive interrupt register (ETH_MMCRIR)
MMCRIR : aliased MMCRIR_Register;
-- Ethernet MMC transmit interrupt register (ETH_MMCTIR)
MMCTIR : aliased MMCTIR_Register;
-- Ethernet MMC receive interrupt mask register (ETH_MMCRIMR)
MMCRIMR : aliased MMCRIMR_Register;
-- Ethernet MMC transmit interrupt mask register (ETH_MMCTIMR)
MMCTIMR : aliased MMCTIMR_Register;
-- Ethernet MMC transmitted good frames after a single collision counter
MMCTGFSCCR : aliased STM32_SVD.UInt32;
-- Ethernet MMC transmitted good frames after more than a single
-- collision
MMCTGFMSCCR : aliased STM32_SVD.UInt32;
-- Ethernet MMC transmitted good frames counter register
MMCTGFCR : aliased STM32_SVD.UInt32;
-- Ethernet MMC received frames with CRC error counter register
MMCRFCECR : aliased STM32_SVD.UInt32;
-- Ethernet MMC received frames with alignment error counter register
MMCRFAECR : aliased STM32_SVD.UInt32;
-- MMC received good unicast frames counter register
MMCRGUFCR : aliased STM32_SVD.UInt32;
end record
with Volatile;
for ETHERNET_MMC_Peripheral use record
MMCCR at 16#0# range 0 .. 31;
MMCRIR at 16#4# range 0 .. 31;
MMCTIR at 16#8# range 0 .. 31;
MMCRIMR at 16#C# range 0 .. 31;
MMCTIMR at 16#10# range 0 .. 31;
MMCTGFSCCR at 16#4C# range 0 .. 31;
MMCTGFMSCCR at 16#50# range 0 .. 31;
MMCTGFCR at 16#68# range 0 .. 31;
MMCRFCECR at 16#94# range 0 .. 31;
MMCRFAECR at 16#98# range 0 .. 31;
MMCRGUFCR at 16#C4# range 0 .. 31;
end record;
-- Ethernet: MAC management counters
ETHERNET_MMC_Periph : aliased ETHERNET_MMC_Peripheral
with Import, Address => System'To_Address (16#40028100#);
-- Ethernet: Precision time protocol
type ETHERNET_PTP_Peripheral is record
-- Ethernet PTP time stamp control register (ETH_PTPTSCR)
PTPTSCR : aliased PTPTSCR_Register;
-- Ethernet PTP subsecond increment register
PTPSSIR : aliased PTPSSIR_Register;
-- Ethernet PTP time stamp high register
PTPTSHR : aliased STM32_SVD.UInt32;
-- Ethernet PTP time stamp low register (ETH_PTPTSLR)
PTPTSLR : aliased PTPTSLR_Register;
-- Ethernet PTP time stamp high update register
PTPTSHUR : aliased STM32_SVD.UInt32;
-- Ethernet PTP time stamp low update register (ETH_PTPTSLUR)
PTPTSLUR : aliased PTPTSLUR_Register;
-- Ethernet PTP time stamp addend register
PTPTSAR : aliased STM32_SVD.UInt32;
-- Ethernet PTP target time high register
PTPTTHR : aliased STM32_SVD.UInt32;
-- Ethernet PTP target time low register
PTPTTLR : aliased STM32_SVD.UInt32;
end record
with Volatile;
for ETHERNET_PTP_Peripheral use record
PTPTSCR at 16#0# range 0 .. 31;
PTPSSIR at 16#4# range 0 .. 31;
PTPTSHR at 16#8# range 0 .. 31;
PTPTSLR at 16#C# range 0 .. 31;
PTPTSHUR at 16#10# range 0 .. 31;
PTPTSLUR at 16#14# range 0 .. 31;
PTPTSAR at 16#18# range 0 .. 31;
PTPTTHR at 16#1C# range 0 .. 31;
PTPTTLR at 16#20# range 0 .. 31;
end record;
-- Ethernet: Precision time protocol
ETHERNET_PTP_Periph : aliased ETHERNET_PTP_Peripheral
with Import, Address => System'To_Address (16#40028700#);
end STM32_SVD.ETHERNET;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M G _ R E A L --
-- --
-- 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. --
-- --
-- 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.Img_LLU; use System.Img_LLU;
with System.Img_Uns; use System.Img_Uns;
with System.Powten_Table; use System.Powten_Table;
with System.Unsigned_Types; use System.Unsigned_Types;
with System.Float_Control;
package body System.Img_Real is
-- The following defines the maximum number of digits that we can convert
-- accurately. This is limited by the precision of Long_Long_Float, and
-- also by the number of digits we can hold in Long_Long_Unsigned, which
-- is the integer type we use as an intermediate for the result.
-- We assume that in practice, the limitation will come from the digits
-- value, rather than the integer value. This is true for typical IEEE
-- implementations, and at worst, the only loss is for some precision
-- in very high precision floating-point output.
-- Note that in the following, the "-2" accounts for the sign and one
-- extra digits, since we need the maximum number of 9's that can be
-- supported, e.g. for the normal 64 bit case, Long_Long_Integer'Width
-- is 21, since the maximum value (approx 1.6 * 10**19) has 20 digits,
-- but the maximum number of 9's that can be supported is 19.
Maxdigs : constant :=
Natural'Min
(Long_Long_Unsigned'Width - 2, Long_Long_Float'Digits);
Unsdigs : constant := Unsigned'Width - 2;
-- Number of digits that can be converted using type Unsigned
-- See above for the explanation of the -2.
Maxscaling : constant := 5000;
-- Max decimal scaling required during conversion of floating-point
-- numbers to decimal. This is used to defend against infinite
-- looping in the conversion, as can be caused by erroneous executions.
-- The largest exponent used on any current system is 2**16383, which
-- is approximately 10**4932, and the highest number of decimal digits
-- is about 35 for 128-bit floating-point formats, so 5000 leaves
-- enough room for scaling such values
function Is_Negative (V : Long_Long_Float) return Boolean;
pragma Import (Intrinsic, Is_Negative);
--------------------------
-- Image_Floating_Point --
--------------------------
procedure Image_Floating_Point
(V : Long_Long_Float;
S : in out String;
P : out Natural;
Digs : Natural)
is
pragma Assert (S'First = 1);
begin
-- Decide whether a blank should be prepended before the call to
-- Set_Image_Real. We generate a blank for positive values, and
-- also for positive zeroes. For negative zeroes, we generate a
-- space only if Signed_Zeroes is True (the RM only permits the
-- output of -0.0 on targets where this is the case). We can of
-- course still see a -0.0 on a target where Signed_Zeroes is
-- False (since this attribute refers to the proper handling of
-- negative zeroes, not to their existence). We do not generate
-- a blank for positive infinity, since we output an explicit +.
if (not Is_Negative (V) and then V <= Long_Long_Float'Last)
or else (not Long_Long_Float'Signed_Zeros and then V = -0.0)
then
S (1) := ' ';
P := 1;
else
P := 0;
end if;
Set_Image_Real (V, S, P, 1, Digs - 1, 3);
end Image_Floating_Point;
--------------------------------
-- Image_Ordinary_Fixed_Point --
--------------------------------
procedure Image_Ordinary_Fixed_Point
(V : Long_Long_Float;
S : in out String;
P : out Natural;
Aft : Natural)
is
pragma Assert (S'First = 1);
begin
-- Output space at start if non-negative
if V >= 0.0 then
S (1) := ' ';
P := 1;
else
P := 0;
end if;
Set_Image_Real (V, S, P, 1, Aft, 0);
end Image_Ordinary_Fixed_Point;
--------------------
-- Set_Image_Real --
--------------------
procedure Set_Image_Real
(V : Long_Long_Float;
S : out String;
P : in out Natural;
Fore : Natural;
Aft : Natural;
Exp : Natural)
is
NFrac : constant Natural := Natural'Max (Aft, 1);
Sign : Character;
X : Long_Long_Float;
Scale : Integer;
Expon : Integer;
Field_Max : constant := 255;
-- This should be the same value as Ada.[Wide_]Text_IO.Field'Last.
-- It is not worth dragging in Ada.Text_IO to pick up this value,
-- since it really should never be necessary to change it.
Digs : String (1 .. 2 * Field_Max + 16);
-- Array used to hold digits of converted integer value. This is a
-- large enough buffer to accommodate ludicrous values of Fore and Aft.
Ndigs : Natural;
-- Number of digits stored in Digs (and also subscript of last digit)
procedure Adjust_Scale (S : Natural);
-- Adjusts the value in X by multiplying or dividing by a power of
-- ten so that it is in the range 10**(S-1) <= X < 10**S. Includes
-- adding 0.5 to round the result, readjusting if the rounding causes
-- the result to wander out of the range. Scale is adjusted to reflect
-- the power of ten used to divide the result (i.e. one is added to
-- the scale value for each division by 10.0, or one is subtracted
-- for each multiplication by 10.0).
procedure Convert_Integer;
-- Takes the value in X, outputs integer digits into Digs. On return,
-- Ndigs is set to the number of digits stored. The digits are stored
-- in Digs (1 .. Ndigs),
procedure Set (C : Character);
-- Sets character C in output buffer
procedure Set_Blanks_And_Sign (N : Integer);
-- Sets leading blanks and minus sign if needed. N is the number of
-- positions to be filled (a minus sign is output even if N is zero
-- or negative, but for a positive value, if N is non-positive, then
-- the call has no effect).
procedure Set_Digs (S, E : Natural);
-- Set digits S through E from Digs buffer. No effect if S > E
procedure Set_Special_Fill (N : Natural);
-- After outputting +Inf, -Inf or NaN, this routine fills out the
-- rest of the field with * characters. The argument is the number
-- of characters output so far (either 3 or 4)
procedure Set_Zeros (N : Integer);
-- Set N zeros, no effect if N is negative
pragma Inline (Set);
pragma Inline (Set_Digs);
pragma Inline (Set_Zeros);
------------------
-- Adjust_Scale --
------------------
procedure Adjust_Scale (S : Natural) is
Lo : Natural;
Hi : Natural;
Mid : Natural;
XP : Long_Long_Float;
begin
-- Cases where scaling up is required
if X < Powten (S - 1) then
-- What we are looking for is a power of ten to multiply X by
-- so that the result lies within the required range.
loop
XP := X * Powten (Maxpow);
exit when XP >= Powten (S - 1) or else Scale < -Maxscaling;
X := XP;
Scale := Scale - Maxpow;
end loop;
-- The following exception is only raised in case of erroneous
-- execution, where a number was considered valid but still
-- fails to scale up. One situation where this can happen is
-- when a system which is supposed to be IEEE-compliant, but
-- has been reconfigured to flush denormals to zero.
if Scale < -Maxscaling then
raise Constraint_Error;
end if;
-- Here we know that we must multiply by at least 10**1 and that
-- 10**Maxpow takes us too far: binary search to find right one.
-- Because of roundoff errors, it is possible for the value
-- of XP to be just outside of the interval when Lo >= Hi. In
-- that case we adjust explicitly by a factor of 10. This
-- can only happen with a value that is very close to an
-- exact power of 10.
Lo := 1;
Hi := Maxpow;
loop
Mid := (Lo + Hi) / 2;
XP := X * Powten (Mid);
if XP < Powten (S - 1) then
if Lo >= Hi then
Mid := Mid + 1;
XP := XP * 10.0;
exit;
else
Lo := Mid + 1;
end if;
elsif XP >= Powten (S) then
if Lo >= Hi then
Mid := Mid - 1;
XP := XP / 10.0;
exit;
else
Hi := Mid - 1;
end if;
else
exit;
end if;
end loop;
X := XP;
Scale := Scale - Mid;
-- Cases where scaling down is required
elsif X >= Powten (S) then
-- What we are looking for is a power of ten to divide X by
-- so that the result lies within the required range.
loop
XP := X / Powten (Maxpow);
exit when XP < Powten (S) or else Scale > Maxscaling;
X := XP;
Scale := Scale + Maxpow;
end loop;
-- The following exception is only raised in case of erroneous
-- execution, where a number was considered valid but still
-- fails to scale up. One situation where this can happen is
-- when a system which is supposed to be IEEE-compliant, but
-- has been reconfigured to flush denormals to zero.
if Scale > Maxscaling then
raise Constraint_Error;
end if;
-- Here we know that we must divide by at least 10**1 and that
-- 10**Maxpow takes us too far, binary search to find right one.
Lo := 1;
Hi := Maxpow;
loop
Mid := (Lo + Hi) / 2;
XP := X / Powten (Mid);
if XP < Powten (S - 1) then
if Lo >= Hi then
XP := XP * 10.0;
Mid := Mid - 1;
exit;
else
Hi := Mid - 1;
end if;
elsif XP >= Powten (S) then
if Lo >= Hi then
XP := XP / 10.0;
Mid := Mid + 1;
exit;
else
Lo := Mid + 1;
end if;
else
exit;
end if;
end loop;
X := XP;
Scale := Scale + Mid;
-- Here we are already scaled right
else
null;
end if;
-- Round, readjusting scale if needed. Note that if a readjustment
-- occurs, then it is never necessary to round again, because there
-- is no possibility of such a second rounding causing a change.
X := X + 0.5;
if X >= Powten (S) then
X := X / 10.0;
Scale := Scale + 1;
end if;
end Adjust_Scale;
---------------------
-- Convert_Integer --
---------------------
procedure Convert_Integer is
begin
-- Use Unsigned routine if possible, since on many machines it will
-- be significantly more efficient than the Long_Long_Unsigned one.
if X < Powten (Unsdigs) then
Ndigs := 0;
Set_Image_Unsigned
(Unsigned (Long_Long_Float'Truncation (X)),
Digs, Ndigs);
-- But if we want more digits than fit in Unsigned, we have to use
-- the Long_Long_Unsigned routine after all.
else
Ndigs := 0;
Set_Image_Long_Long_Unsigned
(Long_Long_Unsigned (Long_Long_Float'Truncation (X)),
Digs, Ndigs);
end if;
end Convert_Integer;
---------
-- Set --
---------
procedure Set (C : Character) is
begin
P := P + 1;
S (P) := C;
end Set;
-------------------------
-- Set_Blanks_And_Sign --
-------------------------
procedure Set_Blanks_And_Sign (N : Integer) is
begin
if Sign = '-' then
for J in 1 .. N - 1 loop
Set (' ');
end loop;
Set ('-');
else
for J in 1 .. N loop
Set (' ');
end loop;
end if;
end Set_Blanks_And_Sign;
--------------
-- Set_Digs --
--------------
procedure Set_Digs (S, E : Natural) is
begin
for J in S .. E loop
Set (Digs (J));
end loop;
end Set_Digs;
----------------------
-- Set_Special_Fill --
----------------------
procedure Set_Special_Fill (N : Natural) is
F : Natural;
begin
F := Fore + 1 + Aft - N;
if Exp /= 0 then
F := F + Exp + 1;
end if;
for J in 1 .. F loop
Set ('*');
end loop;
end Set_Special_Fill;
---------------
-- Set_Zeros --
---------------
procedure Set_Zeros (N : Integer) is
begin
for J in 1 .. N loop
Set ('0');
end loop;
end Set_Zeros;
-- Start of processing for Set_Image_Real
begin
-- We call the floating-point processor reset routine so that we can
-- be sure the floating-point processor is properly set for conversion
-- calls. This is notably need on Windows, where calls to the operating
-- system randomly reset the processor into 64-bit mode.
System.Float_Control.Reset;
Scale := 0;
-- Deal with invalid values first,
if not V'Valid then
-- Note that we're taking our chances here, as V might be
-- an invalid bit pattern resulting from erroneous execution
-- (caused by using uninitialized variables for example).
-- No matter what, we'll at least get reasonable behavior,
-- converting to infinity or some other value, or causing an
-- exception to be raised is fine.
-- If the following test succeeds, then we definitely have
-- an infinite value, so we print Inf.
if V > Long_Long_Float'Last then
Set ('+');
Set ('I');
Set ('n');
Set ('f');
Set_Special_Fill (4);
-- In all other cases we print NaN
elsif V < Long_Long_Float'First then
Set ('-');
Set ('I');
Set ('n');
Set ('f');
Set_Special_Fill (4);
else
Set ('N');
Set ('a');
Set ('N');
Set_Special_Fill (3);
end if;
return;
end if;
-- Positive values
if V > 0.0 then
X := V;
Sign := '+';
-- Negative values
elsif V < 0.0 then
X := -V;
Sign := '-';
-- Zero values
elsif V = 0.0 then
if Long_Long_Float'Signed_Zeros and then Is_Negative (V) then
Sign := '-';
else
Sign := '+';
end if;
Set_Blanks_And_Sign (Fore - 1);
Set ('0');
Set ('.');
Set_Zeros (NFrac);
if Exp /= 0 then
Set ('E');
Set ('+');
Set_Zeros (Natural'Max (1, Exp - 1));
end if;
return;
else
-- It should not be possible for a NaN to end up here.
-- Either the 'Valid test has failed, or we have some form
-- of erroneous execution. Raise Constraint_Error instead of
-- attempting to go ahead printing the value.
raise Constraint_Error;
end if;
-- X and Sign are set here, and X is known to be a valid,
-- non-zero floating-point number.
-- Case of non-zero value with Exp = 0
if Exp = 0 then
-- First step is to multiply by 10 ** Nfrac to get an integer
-- value to be output, an then add 0.5 to round the result.
declare
NF : Natural := NFrac;
begin
loop
-- If we are larger than Powten (Maxdigs) now, then
-- we have too many significant digits, and we have
-- not even finished multiplying by NFrac (NF shows
-- the number of unaccounted-for digits).
if X >= Powten (Maxdigs) then
-- In this situation, we only to generate a reasonable
-- number of significant digits, and then zeroes after.
-- So first we rescale to get:
-- 10 ** (Maxdigs - 1) <= X < 10 ** Maxdigs
-- and then convert the resulting integer
Adjust_Scale (Maxdigs);
Convert_Integer;
-- If that caused rescaling, then add zeros to the end
-- of the number to account for this scaling. Also add
-- zeroes to account for the undone multiplications
for J in 1 .. Scale + NF loop
Ndigs := Ndigs + 1;
Digs (Ndigs) := '0';
end loop;
exit;
-- If multiplication is complete, then convert the resulting
-- integer after rounding (note that X is non-negative)
elsif NF = 0 then
X := X + 0.5;
Convert_Integer;
exit;
-- Otherwise we can go ahead with the multiplication. If it
-- can be done in one step, then do it in one step.
elsif NF < Maxpow then
X := X * Powten (NF);
NF := 0;
-- If it cannot be done in one step, then do partial scaling
else
X := X * Powten (Maxpow);
NF := NF - Maxpow;
end if;
end loop;
end;
-- If number of available digits is less or equal to NFrac,
-- then we need an extra zero before the decimal point.
if Ndigs <= NFrac then
Set_Blanks_And_Sign (Fore - 1);
Set ('0');
Set ('.');
Set_Zeros (NFrac - Ndigs);
Set_Digs (1, Ndigs);
-- Normal case with some digits before the decimal point
else
Set_Blanks_And_Sign (Fore - (Ndigs - NFrac));
Set_Digs (1, Ndigs - NFrac);
Set ('.');
Set_Digs (Ndigs - NFrac + 1, Ndigs);
end if;
-- Case of non-zero value with non-zero Exp value
else
-- If NFrac is less than Maxdigs, then all the fraction digits are
-- significant, so we can scale the resulting integer accordingly.
if NFrac < Maxdigs then
Adjust_Scale (NFrac + 1);
Convert_Integer;
-- Otherwise, we get the maximum number of digits available
else
Adjust_Scale (Maxdigs);
Convert_Integer;
for J in 1 .. NFrac - Maxdigs + 1 loop
Ndigs := Ndigs + 1;
Digs (Ndigs) := '0';
Scale := Scale - 1;
end loop;
end if;
Set_Blanks_And_Sign (Fore - 1);
Set (Digs (1));
Set ('.');
Set_Digs (2, Ndigs);
-- The exponent is the scaling factor adjusted for the digits
-- that we output after the decimal point, since these were
-- included in the scaled digits that we output.
Expon := Scale + NFrac;
Set ('E');
Ndigs := 0;
if Expon >= 0 then
Set ('+');
Set_Image_Unsigned (Unsigned (Expon), Digs, Ndigs);
else
Set ('-');
Set_Image_Unsigned (Unsigned (-Expon), Digs, Ndigs);
end if;
Set_Zeros (Exp - Ndigs - 1);
Set_Digs (1, Ndigs);
end if;
end Set_Image_Real;
end System.Img_Real;
|
with Ada.Containers.Ordered_Sets, Ada.Text_IO;
use Ada.Text_IO;
procedure Duplicate is
package Int_Sets is new Ada.Containers.Ordered_Sets (Integer);
Nums : constant array (Natural range <>) of Integer := (1,2,3,4,5,5,6,7,1);
Unique : Int_Sets.Set;
begin
for n of Nums loop
Unique.Include (n);
end loop;
for e of Unique loop
Put (e'img);
end loop;
end Duplicate;
|
-------------------------------------------------------------------------------
-- This file is part of libsparkcrypto.
--
-- Copyright (C) 2010, Alexander Senier
-- Copyright (C) 2010, secunet Security Networks AG
-- 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 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 LSC.Internal.Types;
with LSC.Internal.AES;
with LSC.Internal.AES.CBC;
with AUnit.Assertions; use AUnit.Assertions;
with Util; use Util;
pragma Elaborate_All (Util);
pragma Style_Checks ("-s");
pragma Warnings (Off, "formal parameter ""T"" is not referenced");
use type LSC.Internal.Types.Word32_Array_Type;
package body LSC_Internal_Test_AES_CBC
is
subtype Msg_Index is Natural range 1 .. 10;
subtype Msg_Type is LSC.Internal.AES.Message_Type (Msg_Index);
Plaintext : constant Msg_Type := Msg_Type'
(LSC.Internal.AES.Block_Type'(M (16#6bc1bee2#), M (16#2e409f96#), M (16#e93d7e11#), M (16#7393172a#)),
LSC.Internal.AES.Block_Type'(M (16#ae2d8a57#), M (16#1e03ac9c#), M (16#9eb76fac#), M (16#45af8e51#)),
LSC.Internal.AES.Block_Type'(M (16#30c81c46#), M (16#a35ce411#), M (16#e5fbc119#), M (16#1a0a52ef#)),
LSC.Internal.AES.Block_Type'(M (16#f69f2445#), M (16#df4f9b17#), M (16#ad2b417b#), M (16#e66c3710#)),
others => LSC.Internal.AES.Null_Block);
IV : constant LSC.Internal.AES.Block_Type := LSC.Internal.AES.Block_Type'
(M (16#00010203#), M (16#04050607#), M (16#08090a0b#), M (16#0c0d0e0f#));
---------------------------------------------------------------------------
function Equal
(Left : Msg_Type;
Right : Msg_Type;
Length : Msg_Index) return Boolean
is
Result : Boolean := True;
begin
for I in Msg_Index range Left'First .. Length
loop
if Left (I) /= Right (I)
then
Result := False;
exit;
end if;
end loop;
return Result;
end Equal;
---------------------------------------------------------------------------
procedure Test_AES128_CBC (T : in out Test_Cases.Test_Case'Class)
is
Key : LSC.Internal.AES.AES128_Key_Type;
Ciphertext : Msg_Type;
Enc_Context : LSC.Internal.AES.AES_Enc_Context;
Dec_Context : LSC.Internal.AES.AES_Dec_Context;
Result : Msg_Type;
begin
Key := LSC.Internal.AES.AES128_Key_Type'
(M (16#2b7e1516#), M (16#28aed2a6#), M (16#abf71588#), M (16#09cf4f3c#));
Ciphertext := Msg_Type'
(LSC.Internal.AES.Block_Type'(M (16#7649abac#), M (16#8119b246#), M (16#cee98e9b#), M (16#12e9197d#)),
(LSC.Internal.AES.Block_Type'(M (16#5086cb9b#), M (16#507219ee#), M (16#95db113a#), M (16#917678b2#))),
(LSC.Internal.AES.Block_Type'(M (16#73bed6b8#), M (16#e3c1743b#), M (16#7116e69e#), M (16#22229516#))),
(LSC.Internal.AES.Block_Type'(M (16#3ff1caa1#), M (16#681fac09#), M (16#120eca30#), M (16#7586e1a7#))),
others => LSC.Internal.AES.Null_Block);
-- Encryption
Enc_Context := LSC.Internal.AES.Create_AES128_Enc_Context (Key);
LSC.Internal.AES.CBC.Encrypt (Enc_Context, IV, Plaintext, 4, Result);
Assert (Equal (Result, Ciphertext, 4), "Invalid ciphertext");
-- Decryption
Dec_Context := LSC.Internal.AES.Create_AES128_Dec_Context (Key);
LSC.Internal.AES.CBC.Decrypt (Dec_Context, IV, Ciphertext, 4, Result);
Assert (Equal (Result, Plaintext, 4), "Invalid plaintext");
end Test_AES128_CBC;
---------------------------------------------------------------------------
procedure Test_AES192_CBC (T : in out Test_Cases.Test_Case'Class)
is
Key : LSC.Internal.AES.AES192_Key_Type;
Ciphertext : Msg_Type;
Enc_Context : LSC.Internal.AES.AES_Enc_Context;
Dec_Context : LSC.Internal.AES.AES_Dec_Context;
Result : Msg_Type;
begin
Key := LSC.Internal.AES.AES192_Key_Type'
(M (16#8e73b0f7#), M (16#da0e6452#), M (16#c810f32b#),
M (16#809079e5#), M (16#62f8ead2#), M (16#522c6b7b#));
Ciphertext := Msg_Type'
(LSC.Internal.AES.Block_Type'(M (16#4f021db2#), M (16#43bc633d#), M (16#7178183a#), M (16#9fa071e8#)),
LSC.Internal.AES.Block_Type'(M (16#b4d9ada9#), M (16#ad7dedf4#), M (16#e5e73876#), M (16#3f69145a#)),
LSC.Internal.AES.Block_Type'(M (16#571b2420#), M (16#12fb7ae0#), M (16#7fa9baac#), M (16#3df102e0#)),
LSC.Internal.AES.Block_Type'(M (16#08b0e279#), M (16#88598881#), M (16#d920a9e6#), M (16#4f5615cd#)),
others => LSC.Internal.AES.Null_Block);
-- Encryption
Enc_Context := LSC.Internal.AES.Create_AES192_Enc_Context (Key);
LSC.Internal.AES.CBC.Encrypt (Enc_Context, IV, Plaintext, 4, Result);
Assert (Equal (Result, Ciphertext, 4), "Invalid ciphertext");
-- Decryption
Dec_Context := LSC.Internal.AES.Create_AES192_Dec_Context (Key);
LSC.Internal.AES.CBC.Decrypt (Dec_Context, IV, Ciphertext, 4, Result);
Assert (Equal (Result, Plaintext, 4), "Invalid plaintext");
end Test_AES192_CBC;
---------------------------------------------------------------------------
procedure Test_AES256_CBC (T : in out Test_Cases.Test_Case'Class)
is
Key : LSC.Internal.AES.AES256_Key_Type;
Ciphertext : Msg_Type;
Enc_Context : LSC.Internal.AES.AES_Enc_Context;
Dec_Context : LSC.Internal.AES.AES_Dec_Context;
Result : Msg_Type;
begin
Key := LSC.Internal.AES.AES256_Key_Type'
(M (16#603deb10#), M (16#15ca71be#), M (16#2b73aef0#), M (16#857d7781#),
M (16#1f352c07#), M (16#3b6108d7#), M (16#2d9810a3#), M (16#0914dff4#));
Ciphertext := Msg_Type'
(LSC.Internal.AES.Block_Type'(M (16#f58c4c04#), M (16#d6e5f1ba#), M (16#779eabfb#), M (16#5f7bfbd6#)),
LSC.Internal.AES.Block_Type'(M (16#9cfc4e96#), M (16#7edb808d#), M (16#679f777b#), M (16#c6702c7d#)),
LSC.Internal.AES.Block_Type'(M (16#39f23369#), M (16#a9d9bacf#), M (16#a530e263#), M (16#04231461#)),
LSC.Internal.AES.Block_Type'(M (16#b2eb05e2#), M (16#c39be9fc#), M (16#da6c1907#), M (16#8c6a9d1b#)),
others => LSC.Internal.AES.Null_Block);
-- Encryption
Enc_Context := LSC.Internal.AES.Create_AES256_Enc_Context (Key);
LSC.Internal.AES.CBC.Encrypt (Enc_Context, IV, Plaintext, 4, Result);
Assert (Equal (Result, Ciphertext, 4), "Invalid ciphertext");
-- Decryption
Dec_Context := LSC.Internal.AES.Create_AES256_Dec_Context (Key);
LSC.Internal.AES.CBC.Decrypt (Dec_Context, IV, Ciphertext, 4, Result);
Assert (Equal (Result, Plaintext, 4), "Invalid plaintext");
end Test_AES256_CBC;
---------------------------------------------------------------------------
procedure Register_Tests (T : in out Test_Case) is
use AUnit.Test_Cases.Registration;
begin
Register_Routine (T, Test_AES128_CBC'Access, "128 (F.2.1/F.2.2)");
Register_Routine (T, Test_AES192_CBC'Access, "192 (F.2.3/F.2.4)");
Register_Routine (T, Test_AES256_CBC'Access, "256 (F.2.5/F.2.6)");
end Register_Tests;
---------------------------------------------------------------------------
function Name (T : Test_Case) return Test_String is
begin
return Format ("AES-CBC");
end Name;
end LSC_Internal_Test_AES_CBC;
|
pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with ftimage;
with fttypes;
with System;
with ftsystem;
with Interfaces.C.Strings;
with freetype_config_integer_types;
package freetype is
-- arg-macro: procedure FT_ENC_TAG (value, a, b, c, d)
-- value := ( ( (FT_UInt32)(a) << 24 ) or ( (FT_UInt32)(b) << 16 ) or ( (FT_UInt32)(c) << 8 ) or (FT_UInt32)(d) )
-- unsupported macro: ft_encoding_none FT_ENCODING_NONE
-- unsupported macro: ft_encoding_unicode FT_ENCODING_UNICODE
-- unsupported macro: ft_encoding_symbol FT_ENCODING_MS_SYMBOL
-- unsupported macro: ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
-- unsupported macro: ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
-- unsupported macro: ft_encoding_sjis FT_ENCODING_SJIS
-- unsupported macro: ft_encoding_gb2312 FT_ENCODING_PRC
-- unsupported macro: ft_encoding_big5 FT_ENCODING_BIG5
-- unsupported macro: ft_encoding_wansung FT_ENCODING_WANSUNG
-- unsupported macro: ft_encoding_johab FT_ENCODING_JOHAB
-- unsupported macro: ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
-- unsupported macro: ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
-- unsupported macro: ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
-- unsupported macro: ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
FT_FACE_FLAG_SCALABLE : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:1197
FT_FACE_FLAG_FIXED_SIZES : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:1198
FT_FACE_FLAG_FIXED_WIDTH : constant := ( 2 ** 2 ); -- /usr/include/freetype2/freetype/freetype.h:1199
FT_FACE_FLAG_SFNT : constant := ( 2 ** 3 ); -- /usr/include/freetype2/freetype/freetype.h:1200
FT_FACE_FLAG_HORIZONTAL : constant := ( 2 ** 4 ); -- /usr/include/freetype2/freetype/freetype.h:1201
FT_FACE_FLAG_VERTICAL : constant := ( 2 ** 5 ); -- /usr/include/freetype2/freetype/freetype.h:1202
FT_FACE_FLAG_KERNING : constant := ( 2 ** 6 ); -- /usr/include/freetype2/freetype/freetype.h:1203
FT_FACE_FLAG_FAST_GLYPHS : constant := ( 2 ** 7 ); -- /usr/include/freetype2/freetype/freetype.h:1204
FT_FACE_FLAG_MULTIPLE_MASTERS : constant := ( 2 ** 8 ); -- /usr/include/freetype2/freetype/freetype.h:1205
FT_FACE_FLAG_GLYPH_NAMES : constant := ( 2 ** 9 ); -- /usr/include/freetype2/freetype/freetype.h:1206
FT_FACE_FLAG_EXTERNAL_STREAM : constant := ( 2 ** 10 ); -- /usr/include/freetype2/freetype/freetype.h:1207
FT_FACE_FLAG_HINTER : constant := ( 2 ** 11 ); -- /usr/include/freetype2/freetype/freetype.h:1208
FT_FACE_FLAG_CID_KEYED : constant := ( 2 ** 12 ); -- /usr/include/freetype2/freetype/freetype.h:1209
FT_FACE_FLAG_TRICKY : constant := ( 2 ** 13 ); -- /usr/include/freetype2/freetype/freetype.h:1210
FT_FACE_FLAG_COLOR : constant := ( 2 ** 14 ); -- /usr/include/freetype2/freetype/freetype.h:1211
FT_FACE_FLAG_VARIATION : constant := ( 2 ** 15 ); -- /usr/include/freetype2/freetype/freetype.h:1212
-- arg-macro: function FT_HAS_HORIZONTAL (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_HORIZONTAL ) ;
-- arg-macro: function FT_HAS_VERTICAL (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_VERTICAL ) ;
-- arg-macro: function FT_HAS_KERNING (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_KERNING ) ;
-- arg-macro: function FT_IS_SCALABLE (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_SCALABLE ) ;
-- arg-macro: function FT_IS_SFNT (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_SFNT ) ;
-- arg-macro: function FT_IS_FIXED_WIDTH (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_FIXED_WIDTH ) ;
-- arg-macro: function FT_HAS_FIXED_SIZES (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_FIXED_SIZES ) ;
-- arg-macro: procedure FT_HAS_FAST_GLYPHS (face)
-- 0
-- arg-macro: function FT_HAS_GLYPH_NAMES (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_GLYPH_NAMES ) ;
-- arg-macro: function FT_HAS_MULTIPLE_MASTERS (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_MULTIPLE_MASTERS ) ;
-- arg-macro: function FT_IS_NAMED_INSTANCE (face)
-- return notnot( (face).face_index and 16#7FFF0000# ) ;
-- arg-macro: function FT_IS_VARIATION (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_VARIATION ) ;
-- arg-macro: function FT_IS_CID_KEYED (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_CID_KEYED ) ;
-- arg-macro: function FT_IS_TRICKY (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_TRICKY ) ;
-- arg-macro: function FT_HAS_COLOR (face)
-- return notnot( (face).face_flags and FT_FACE_FLAG_COLOR ) ;
FT_STYLE_FLAG_ITALIC : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:1475
FT_STYLE_FLAG_BOLD : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:1476
FT_OPEN_MEMORY : constant := 16#1#; -- /usr/include/freetype2/freetype/freetype.h:2003
FT_OPEN_STREAM : constant := 16#2#; -- /usr/include/freetype2/freetype/freetype.h:2004
FT_OPEN_PATHNAME : constant := 16#4#; -- /usr/include/freetype2/freetype/freetype.h:2005
FT_OPEN_DRIVER : constant := 16#8#; -- /usr/include/freetype2/freetype/freetype.h:2006
FT_OPEN_PARAMS : constant := 16#10#; -- /usr/include/freetype2/freetype/freetype.h:2007
-- unsupported macro: ft_open_memory FT_OPEN_MEMORY
-- unsupported macro: ft_open_stream FT_OPEN_STREAM
-- unsupported macro: ft_open_pathname FT_OPEN_PATHNAME
-- unsupported macro: ft_open_driver FT_OPEN_DRIVER
-- unsupported macro: ft_open_params FT_OPEN_PARAMS
FT_LOAD_DEFAULT : constant := 16#0#; -- /usr/include/freetype2/freetype/freetype.h:3021
FT_LOAD_NO_SCALE : constant := ( 2 ** 0 ); -- /usr/include/freetype2/freetype/freetype.h:3022
FT_LOAD_NO_HINTING : constant := ( 2 ** 1 ); -- /usr/include/freetype2/freetype/freetype.h:3023
FT_LOAD_RENDER : constant := ( 2 ** 2 ); -- /usr/include/freetype2/freetype/freetype.h:3024
FT_LOAD_NO_BITMAP : constant := ( 2 ** 3 ); -- /usr/include/freetype2/freetype/freetype.h:3025
FT_LOAD_VERTICAL_LAYOUT : constant := ( 2 ** 4 ); -- /usr/include/freetype2/freetype/freetype.h:3026
FT_LOAD_FORCE_AUTOHINT : constant := ( 2 ** 5 ); -- /usr/include/freetype2/freetype/freetype.h:3027
FT_LOAD_CROP_BITMAP : constant := ( 2 ** 6 ); -- /usr/include/freetype2/freetype/freetype.h:3028
FT_LOAD_PEDANTIC : constant := ( 2 ** 7 ); -- /usr/include/freetype2/freetype/freetype.h:3029
FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH : constant := ( 2 ** 9 ); -- /usr/include/freetype2/freetype/freetype.h:3030
FT_LOAD_NO_RECURSE : constant := ( 2 ** 10 ); -- /usr/include/freetype2/freetype/freetype.h:3031
FT_LOAD_IGNORE_TRANSFORM : constant := ( 2 ** 11 ); -- /usr/include/freetype2/freetype/freetype.h:3032
FT_LOAD_MONOCHROME : constant := ( 2 ** 12 ); -- /usr/include/freetype2/freetype/freetype.h:3033
FT_LOAD_LINEAR_DESIGN : constant := ( 2 ** 13 ); -- /usr/include/freetype2/freetype/freetype.h:3034
FT_LOAD_NO_AUTOHINT : constant := ( 2 ** 15 ); -- /usr/include/freetype2/freetype/freetype.h:3035
FT_LOAD_COLOR : constant := ( 2 ** 20 ); -- /usr/include/freetype2/freetype/freetype.h:3037
FT_LOAD_COMPUTE_METRICS : constant := ( 2 ** 21 ); -- /usr/include/freetype2/freetype/freetype.h:3038
FT_LOAD_BITMAP_METRICS_ONLY : constant := ( 2 ** 22 ); -- /usr/include/freetype2/freetype/freetype.h:3039
FT_LOAD_ADVANCE_ONLY : constant := ( 2 ** 8 ); -- /usr/include/freetype2/freetype/freetype.h:3044
FT_LOAD_SBITS_ONLY : constant := ( 2 ** 14 ); -- /usr/include/freetype2/freetype/freetype.h:3045
-- arg-macro: function FT_LOAD_TARGET_ (x)
-- return (FT_Int32)( (x) and 15 ) << 16 ;
-- unsupported macro: FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL )
-- unsupported macro: FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT )
-- unsupported macro: FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO )
-- unsupported macro: FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
-- unsupported macro: FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
-- arg-macro: function FT_LOAD_TARGET_MODE (x)
-- return (FT_Render_Mode)( ( (x) >> 16 ) and 15 ) ;
-- unsupported macro: ft_render_mode_normal FT_RENDER_MODE_NORMAL
-- unsupported macro: ft_render_mode_mono FT_RENDER_MODE_MONO
-- unsupported macro: ft_kerning_default FT_KERNING_DEFAULT
-- unsupported macro: ft_kerning_unfitted FT_KERNING_UNFITTED
-- unsupported macro: ft_kerning_unscaled FT_KERNING_UNSCALED
FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS : constant := 1; -- /usr/include/freetype2/freetype/freetype.h:3954
FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES : constant := 2; -- /usr/include/freetype2/freetype/freetype.h:3955
FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID : constant := 4; -- /usr/include/freetype2/freetype/freetype.h:3956
FT_SUBGLYPH_FLAG_SCALE : constant := 8; -- /usr/include/freetype2/freetype/freetype.h:3957
FT_SUBGLYPH_FLAG_XY_SCALE : constant := 16#40#; -- /usr/include/freetype2/freetype/freetype.h:3958
FT_SUBGLYPH_FLAG_2X2 : constant := 16#80#; -- /usr/include/freetype2/freetype/freetype.h:3959
FT_SUBGLYPH_FLAG_USE_MY_METRICS : constant := 16#200#; -- /usr/include/freetype2/freetype/freetype.h:3960
FT_FSTYPE_INSTALLABLE_EMBEDDING : constant := 16#0000#; -- /usr/include/freetype2/freetype/freetype.h:4240
FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING : constant := 16#0002#; -- /usr/include/freetype2/freetype/freetype.h:4241
FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING : constant := 16#0004#; -- /usr/include/freetype2/freetype/freetype.h:4242
FT_FSTYPE_EDITABLE_EMBEDDING : constant := 16#0008#; -- /usr/include/freetype2/freetype/freetype.h:4243
FT_FSTYPE_NO_SUBSETTING : constant := 16#0100#; -- /usr/include/freetype2/freetype/freetype.h:4244
FT_FSTYPE_BITMAP_EMBEDDING_ONLY : constant := 16#0200#; -- /usr/include/freetype2/freetype/freetype.h:4245
FREETYPE_MAJOR : constant := 2; -- /usr/include/freetype2/freetype/freetype.h:4768
FREETYPE_MINOR : constant := 10; -- /usr/include/freetype2/freetype/freetype.h:4769
FREETYPE_PATCH : constant := 4; -- /usr/include/freetype2/freetype/freetype.h:4770
--***************************************************************************
-- *
-- * freetype.h
-- *
-- * FreeType high-level API and common types (specification only).
-- *
-- * Copyright (C) 1996-2020 by
-- * David Turner, Robert Wilhelm, and Werner Lemberg.
-- *
-- * This file is part of the FreeType project, and may only be used,
-- * modified, and distributed under the terms of the FreeType project
-- * license, LICENSE.TXT. By continuing to use, modify, or distribute
-- * this file you indicate that you have read the license and
-- * understand and accept it fully.
-- *
--
--*************************************************************************
-- *
-- * @section:
-- * header_inclusion
-- *
-- * @title:
-- * FreeType's header inclusion scheme
-- *
-- * @abstract:
-- * How client applications should include FreeType header files.
-- *
-- * @description:
-- * To be as flexible as possible (and for historical reasons), you must
-- * load file `ft2build.h` first before other header files, for example
-- *
-- * ```
-- * #include <ft2build.h>
-- *
-- * #include <freetype/freetype.h>
-- * #include <freetype/ftoutln.h>
-- * ```
--
--*************************************************************************
-- *
-- * @section:
-- * user_allocation
-- *
-- * @title:
-- * User allocation
-- *
-- * @abstract:
-- * How client applications should allocate FreeType data structures.
-- *
-- * @description:
-- * FreeType assumes that structures allocated by the user and passed as
-- * arguments are zeroed out except for the actual data. In other words,
-- * it is recommended to use `calloc` (or variants of it) instead of
-- * `malloc` for allocation.
-- *
--
--***********************************************************************
--***********************************************************************
--
-- B A S I C T Y P E S
--
--***********************************************************************
--***********************************************************************
--*************************************************************************
-- *
-- * @section:
-- * base_interface
-- *
-- * @title:
-- * Base Interface
-- *
-- * @abstract:
-- * The FreeType~2 base font interface.
-- *
-- * @description:
-- * This section describes the most important public high-level API
-- * functions of FreeType~2.
-- *
-- * @order:
-- * FT_Library
-- * FT_Face
-- * FT_Size
-- * FT_GlyphSlot
-- * FT_CharMap
-- * FT_Encoding
-- * FT_ENC_TAG
-- *
-- * FT_FaceRec
-- *
-- * FT_FACE_FLAG_SCALABLE
-- * FT_FACE_FLAG_FIXED_SIZES
-- * FT_FACE_FLAG_FIXED_WIDTH
-- * FT_FACE_FLAG_HORIZONTAL
-- * FT_FACE_FLAG_VERTICAL
-- * FT_FACE_FLAG_COLOR
-- * FT_FACE_FLAG_SFNT
-- * FT_FACE_FLAG_CID_KEYED
-- * FT_FACE_FLAG_TRICKY
-- * FT_FACE_FLAG_KERNING
-- * FT_FACE_FLAG_MULTIPLE_MASTERS
-- * FT_FACE_FLAG_VARIATION
-- * FT_FACE_FLAG_GLYPH_NAMES
-- * FT_FACE_FLAG_EXTERNAL_STREAM
-- * FT_FACE_FLAG_HINTER
-- *
-- * FT_HAS_HORIZONTAL
-- * FT_HAS_VERTICAL
-- * FT_HAS_KERNING
-- * FT_HAS_FIXED_SIZES
-- * FT_HAS_GLYPH_NAMES
-- * FT_HAS_COLOR
-- * FT_HAS_MULTIPLE_MASTERS
-- *
-- * FT_IS_SFNT
-- * FT_IS_SCALABLE
-- * FT_IS_FIXED_WIDTH
-- * FT_IS_CID_KEYED
-- * FT_IS_TRICKY
-- * FT_IS_NAMED_INSTANCE
-- * FT_IS_VARIATION
-- *
-- * FT_STYLE_FLAG_BOLD
-- * FT_STYLE_FLAG_ITALIC
-- *
-- * FT_SizeRec
-- * FT_Size_Metrics
-- *
-- * FT_GlyphSlotRec
-- * FT_Glyph_Metrics
-- * FT_SubGlyph
-- *
-- * FT_Bitmap_Size
-- *
-- * FT_Init_FreeType
-- * FT_Done_FreeType
-- *
-- * FT_New_Face
-- * FT_Done_Face
-- * FT_Reference_Face
-- * FT_New_Memory_Face
-- * FT_Face_Properties
-- * FT_Open_Face
-- * FT_Open_Args
-- * FT_Parameter
-- * FT_Attach_File
-- * FT_Attach_Stream
-- *
-- * FT_Set_Char_Size
-- * FT_Set_Pixel_Sizes
-- * FT_Request_Size
-- * FT_Select_Size
-- * FT_Size_Request_Type
-- * FT_Size_RequestRec
-- * FT_Size_Request
-- * FT_Set_Transform
-- * FT_Load_Glyph
-- * FT_Get_Char_Index
-- * FT_Get_First_Char
-- * FT_Get_Next_Char
-- * FT_Get_Name_Index
-- * FT_Load_Char
-- *
-- * FT_OPEN_MEMORY
-- * FT_OPEN_STREAM
-- * FT_OPEN_PATHNAME
-- * FT_OPEN_DRIVER
-- * FT_OPEN_PARAMS
-- *
-- * FT_LOAD_DEFAULT
-- * FT_LOAD_RENDER
-- * FT_LOAD_MONOCHROME
-- * FT_LOAD_LINEAR_DESIGN
-- * FT_LOAD_NO_SCALE
-- * FT_LOAD_NO_HINTING
-- * FT_LOAD_NO_BITMAP
-- * FT_LOAD_NO_AUTOHINT
-- * FT_LOAD_COLOR
-- *
-- * FT_LOAD_VERTICAL_LAYOUT
-- * FT_LOAD_IGNORE_TRANSFORM
-- * FT_LOAD_FORCE_AUTOHINT
-- * FT_LOAD_NO_RECURSE
-- * FT_LOAD_PEDANTIC
-- *
-- * FT_LOAD_TARGET_NORMAL
-- * FT_LOAD_TARGET_LIGHT
-- * FT_LOAD_TARGET_MONO
-- * FT_LOAD_TARGET_LCD
-- * FT_LOAD_TARGET_LCD_V
-- *
-- * FT_LOAD_TARGET_MODE
-- *
-- * FT_Render_Glyph
-- * FT_Render_Mode
-- * FT_Get_Kerning
-- * FT_Kerning_Mode
-- * FT_Get_Track_Kerning
-- * FT_Get_Glyph_Name
-- * FT_Get_Postscript_Name
-- *
-- * FT_CharMapRec
-- * FT_Select_Charmap
-- * FT_Set_Charmap
-- * FT_Get_Charmap_Index
-- *
-- * FT_Get_FSType_Flags
-- * FT_Get_SubGlyph_Info
-- *
-- * FT_Face_Internal
-- * FT_Size_Internal
-- * FT_Slot_Internal
-- *
-- * FT_FACE_FLAG_XXX
-- * FT_STYLE_FLAG_XXX
-- * FT_OPEN_XXX
-- * FT_LOAD_XXX
-- * FT_LOAD_TARGET_XXX
-- * FT_SUBGLYPH_FLAG_XXX
-- * FT_FSTYPE_XXX
-- *
-- * FT_HAS_FAST_GLYPHS
-- *
--
--*************************************************************************
-- *
-- * @struct:
-- * FT_Glyph_Metrics
-- *
-- * @description:
-- * A structure to model the metrics of a single glyph. The values are
-- * expressed in 26.6 fractional pixel format; if the flag
-- * @FT_LOAD_NO_SCALE has been used while loading the glyph, values are
-- * expressed in font units instead.
-- *
-- * @fields:
-- * width ::
-- * The glyph's width.
-- *
-- * height ::
-- * The glyph's height.
-- *
-- * horiBearingX ::
-- * Left side bearing for horizontal layout.
-- *
-- * horiBearingY ::
-- * Top side bearing for horizontal layout.
-- *
-- * horiAdvance ::
-- * Advance width for horizontal layout.
-- *
-- * vertBearingX ::
-- * Left side bearing for vertical layout.
-- *
-- * vertBearingY ::
-- * Top side bearing for vertical layout. Larger positive values mean
-- * further below the vertical glyph origin.
-- *
-- * vertAdvance ::
-- * Advance height for vertical layout. Positive values mean the glyph
-- * has a positive advance downward.
-- *
-- * @note:
-- * If not disabled with @FT_LOAD_NO_HINTING, the values represent
-- * dimensions of the hinted glyph (in case hinting is applicable).
-- *
-- * Stroking a glyph with an outside border does not increase
-- * `horiAdvance` or `vertAdvance`; you have to manually adjust these
-- * values to account for the added width and height.
-- *
-- * FreeType doesn't use the 'VORG' table data for CFF fonts because it
-- * doesn't have an interface to quickly retrieve the glyph height. The
-- * y~coordinate of the vertical origin can be simply computed as
-- * `vertBearingY + height` after loading a glyph.
--
type FT_Glyph_Metrics_u is record
width : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:302
height : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:303
horiBearingX : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:305
horiBearingY : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:306
horiAdvance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:307
vertBearingX : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:309
vertBearingY : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:310
vertAdvance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:311
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:300
subtype FT_Glyph_Metrics is FT_Glyph_Metrics_u; -- /usr/include/freetype2/freetype/freetype.h:313
--*************************************************************************
-- *
-- * @struct:
-- * FT_Bitmap_Size
-- *
-- * @description:
-- * This structure models the metrics of a bitmap strike (i.e., a set of
-- * glyphs for a given point size and resolution) in a bitmap font. It is
-- * used for the `available_sizes` field of @FT_Face.
-- *
-- * @fields:
-- * height ::
-- * The vertical distance, in pixels, between two consecutive baselines.
-- * It is always positive.
-- *
-- * width ::
-- * The average width, in pixels, of all glyphs in the strike.
-- *
-- * size ::
-- * The nominal size of the strike in 26.6 fractional points. This
-- * field is not very useful.
-- *
-- * x_ppem ::
-- * The horizontal ppem (nominal width) in 26.6 fractional pixels.
-- *
-- * y_ppem ::
-- * The vertical ppem (nominal height) in 26.6 fractional pixels.
-- *
-- * @note:
-- * Windows FNT:
-- * The nominal size given in a FNT font is not reliable. If the driver
-- * finds it incorrect, it sets `size` to some calculated values, and
-- * `x_ppem` and `y_ppem` to the pixel width and height given in the
-- * font, respectively.
-- *
-- * TrueType embedded bitmaps:
-- * `size`, `width`, and `height` values are not contained in the bitmap
-- * strike itself. They are computed from the global font parameters.
--
type FT_Bitmap_Size_u is record
height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:357
width : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:358
size : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:360
x_ppem : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:362
y_ppem : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:363
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:355
subtype FT_Bitmap_Size is FT_Bitmap_Size_u; -- /usr/include/freetype2/freetype/freetype.h:365
--***********************************************************************
--***********************************************************************
--
-- O B J E C T C L A S S E S
--
--***********************************************************************
--***********************************************************************
--*************************************************************************
-- *
-- * @type:
-- * FT_Library
-- *
-- * @description:
-- * A handle to a FreeType library instance. Each 'library' is completely
-- * independent from the others; it is the 'root' of a set of objects like
-- * fonts, faces, sizes, etc.
-- *
-- * It also embeds a memory manager (see @FT_Memory), as well as a
-- * scan-line converter object (see @FT_Raster).
-- *
-- * [Since 2.5.6] In multi-threaded applications it is easiest to use one
-- * `FT_Library` object per thread. In case this is too cumbersome, a
-- * single `FT_Library` object across threads is possible also, as long as
-- * a mutex lock is used around @FT_New_Face and @FT_Done_Face.
-- *
-- * @note:
-- * Library objects are normally created by @FT_Init_FreeType, and
-- * destroyed with @FT_Done_FreeType. If you need reference-counting
-- * (cf. @FT_Reference_Library), use @FT_New_Library and @FT_Done_Library.
--
type FT_LibraryRec_u is null record; -- incomplete struct
type FT_Library is access all FT_LibraryRec_u; -- /usr/include/freetype2/freetype/freetype.h:399
--*************************************************************************
-- *
-- * @section:
-- * module_management
-- *
--
--*************************************************************************
-- *
-- * @type:
-- * FT_Module
-- *
-- * @description:
-- * A handle to a given FreeType module object. A module can be a font
-- * driver, a renderer, or anything else that provides services to the
-- * former.
--
type FT_ModuleRec_u is null record; -- incomplete struct
type FT_Module is access all FT_ModuleRec_u; -- /usr/include/freetype2/freetype/freetype.h:419
--*************************************************************************
-- *
-- * @type:
-- * FT_Driver
-- *
-- * @description:
-- * A handle to a given FreeType font driver object. A font driver is a
-- * module capable of creating faces from font files.
--
type FT_DriverRec_u is null record; -- incomplete struct
type FT_Driver is access all FT_DriverRec_u; -- /usr/include/freetype2/freetype/freetype.h:431
--*************************************************************************
-- *
-- * @type:
-- * FT_Renderer
-- *
-- * @description:
-- * A handle to a given FreeType renderer. A renderer is a module in
-- * charge of converting a glyph's outline image to a bitmap. It supports
-- * a single glyph image format, and one or more target surface depths.
--
type FT_RendererRec_u is null record; -- incomplete struct
type FT_Renderer is access all FT_RendererRec_u; -- /usr/include/freetype2/freetype/freetype.h:444
--*************************************************************************
-- *
-- * @section:
-- * base_interface
-- *
--
--*************************************************************************
-- *
-- * @type:
-- * FT_Face
-- *
-- * @description:
-- * A handle to a typographic face object. A face object models a given
-- * typeface, in a given style.
-- *
-- * @note:
-- * A face object also owns a single @FT_GlyphSlot object, as well as one
-- * or more @FT_Size objects.
-- *
-- * Use @FT_New_Face or @FT_Open_Face to create a new face object from a
-- * given filepath or a custom input stream.
-- *
-- * Use @FT_Done_Face to destroy it (along with its slot and sizes).
-- *
-- * An `FT_Face` object can only be safely used from one thread at a time.
-- * Similarly, creation and destruction of `FT_Face` with the same
-- * @FT_Library object can only be done from one thread at a time. On the
-- * other hand, functions like @FT_Load_Glyph and its siblings are
-- * thread-safe and do not need the lock to be held as long as the same
-- * `FT_Face` object is not used from multiple threads at the same time.
-- *
-- * @also:
-- * See @FT_FaceRec for the publicly accessible fields of a given face
-- * object.
--
type FT_FaceRec_u;
type FT_Face is access all FT_FaceRec_u; -- /usr/include/freetype2/freetype/freetype.h:483
--*************************************************************************
-- *
-- * @type:
-- * FT_Size
-- *
-- * @description:
-- * A handle to an object that models a face scaled to a given character
-- * size.
-- *
-- * @note:
-- * An @FT_Face has one _active_ @FT_Size object that is used by functions
-- * like @FT_Load_Glyph to determine the scaling transformation that in
-- * turn is used to load and hint glyphs and metrics.
-- *
-- * You can use @FT_Set_Char_Size, @FT_Set_Pixel_Sizes, @FT_Request_Size
-- * or even @FT_Select_Size to change the content (i.e., the scaling
-- * values) of the active @FT_Size.
-- *
-- * You can use @FT_New_Size to create additional size objects for a given
-- * @FT_Face, but they won't be used by other functions until you activate
-- * it through @FT_Activate_Size. Only one size can be activated at any
-- * given time per face.
-- *
-- * @also:
-- * See @FT_SizeRec for the publicly accessible fields of a given size
-- * object.
--
type FT_SizeRec_u;
type FT_Size is access all FT_SizeRec_u; -- /usr/include/freetype2/freetype/freetype.h:513
--*************************************************************************
-- *
-- * @type:
-- * FT_GlyphSlot
-- *
-- * @description:
-- * A handle to a given 'glyph slot'. A slot is a container that can hold
-- * any of the glyphs contained in its parent face.
-- *
-- * In other words, each time you call @FT_Load_Glyph or @FT_Load_Char,
-- * the slot's content is erased by the new glyph data, i.e., the glyph's
-- * metrics, its image (bitmap or outline), and other control information.
-- *
-- * @also:
-- * See @FT_GlyphSlotRec for the publicly accessible glyph fields.
--
type FT_GlyphSlotRec_u;
type FT_GlyphSlot is access all FT_GlyphSlotRec_u; -- /usr/include/freetype2/freetype/freetype.h:532
--*************************************************************************
-- *
-- * @type:
-- * FT_CharMap
-- *
-- * @description:
-- * A handle to a character map (usually abbreviated to 'charmap'). A
-- * charmap is used to translate character codes in a given encoding into
-- * glyph indexes for its parent's face. Some font formats may provide
-- * several charmaps per font.
-- *
-- * Each face object owns zero or more charmaps, but only one of them can
-- * be 'active', providing the data used by @FT_Get_Char_Index or
-- * @FT_Load_Char.
-- *
-- * The list of available charmaps in a face is available through the
-- * `face->num_charmaps` and `face->charmaps` fields of @FT_FaceRec.
-- *
-- * The currently active charmap is available as `face->charmap`. You
-- * should call @FT_Set_Charmap to change it.
-- *
-- * @note:
-- * When a new face is created (either through @FT_New_Face or
-- * @FT_Open_Face), the library looks for a Unicode charmap within the
-- * list and automatically activates it. If there is no Unicode charmap,
-- * FreeType doesn't set an 'active' charmap.
-- *
-- * @also:
-- * See @FT_CharMapRec for the publicly accessible fields of a given
-- * character map.
--
type FT_CharMapRec_u;
type FT_CharMap is access all FT_CharMapRec_u; -- /usr/include/freetype2/freetype/freetype.h:566
--*************************************************************************
-- *
-- * @macro:
-- * FT_ENC_TAG
-- *
-- * @description:
-- * This macro converts four-letter tags into an unsigned long. It is
-- * used to define 'encoding' identifiers (see @FT_Encoding).
-- *
-- * @note:
-- * Since many 16-bit compilers don't like 32-bit enumerations, you should
-- * redefine this macro in case of problems to something like this:
-- *
-- * ```
-- * #define FT_ENC_TAG( value, a, b, c, d ) value
-- * ```
-- *
-- * to get a simple enumeration without assigning special numbers.
--
--*************************************************************************
-- *
-- * @enum:
-- * FT_Encoding
-- *
-- * @description:
-- * An enumeration to specify character sets supported by charmaps. Used
-- * in the @FT_Select_Charmap API function.
-- *
-- * @note:
-- * Despite the name, this enumeration lists specific character
-- * repertories (i.e., charsets), and not text encoding methods (e.g.,
-- * UTF-8, UTF-16, etc.).
-- *
-- * Other encodings might be defined in the future.
-- *
-- * @values:
-- * FT_ENCODING_NONE ::
-- * The encoding value~0 is reserved for all formats except BDF, PCF,
-- * and Windows FNT; see below for more information.
-- *
-- * FT_ENCODING_UNICODE ::
-- * The Unicode character set. This value covers all versions of the
-- * Unicode repertoire, including ASCII and Latin-1. Most fonts include
-- * a Unicode charmap, but not all of them.
-- *
-- * For example, if you want to access Unicode value U+1F028 (and the
-- * font contains it), use value 0x1F028 as the input value for
-- * @FT_Get_Char_Index.
-- *
-- * FT_ENCODING_MS_SYMBOL ::
-- * Microsoft Symbol encoding, used to encode mathematical symbols and
-- * wingdings. For more information, see
-- * 'https://www.microsoft.com/typography/otspec/recom.htm#non-standard-symbol-fonts',
-- * 'http://www.kostis.net/charsets/symbol.htm', and
-- * 'http://www.kostis.net/charsets/wingding.htm'.
-- *
-- * This encoding uses character codes from the PUA (Private Unicode
-- * Area) in the range U+F020-U+F0FF.
-- *
-- * FT_ENCODING_SJIS ::
-- * Shift JIS encoding for Japanese. More info at
-- * 'https://en.wikipedia.org/wiki/Shift_JIS'. See note on multi-byte
-- * encodings below.
-- *
-- * FT_ENCODING_PRC ::
-- * Corresponds to encoding systems mainly for Simplified Chinese as
-- * used in People's Republic of China (PRC). The encoding layout is
-- * based on GB~2312 and its supersets GBK and GB~18030.
-- *
-- * FT_ENCODING_BIG5 ::
-- * Corresponds to an encoding system for Traditional Chinese as used in
-- * Taiwan and Hong Kong.
-- *
-- * FT_ENCODING_WANSUNG ::
-- * Corresponds to the Korean encoding system known as Extended Wansung
-- * (MS Windows code page 949). For more information see
-- * 'https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit949.txt'.
-- *
-- * FT_ENCODING_JOHAB ::
-- * The Korean standard character set (KS~C 5601-1992), which
-- * corresponds to MS Windows code page 1361. This character set
-- * includes all possible Hangul character combinations.
-- *
-- * FT_ENCODING_ADOBE_LATIN_1 ::
-- * Corresponds to a Latin-1 encoding as defined in a Type~1 PostScript
-- * font. It is limited to 256 character codes.
-- *
-- * FT_ENCODING_ADOBE_STANDARD ::
-- * Adobe Standard encoding, as found in Type~1, CFF, and OpenType/CFF
-- * fonts. It is limited to 256 character codes.
-- *
-- * FT_ENCODING_ADOBE_EXPERT ::
-- * Adobe Expert encoding, as found in Type~1, CFF, and OpenType/CFF
-- * fonts. It is limited to 256 character codes.
-- *
-- * FT_ENCODING_ADOBE_CUSTOM ::
-- * Corresponds to a custom encoding, as found in Type~1, CFF, and
-- * OpenType/CFF fonts. It is limited to 256 character codes.
-- *
-- * FT_ENCODING_APPLE_ROMAN ::
-- * Apple roman encoding. Many TrueType and OpenType fonts contain a
-- * charmap for this 8-bit encoding, since older versions of Mac OS are
-- * able to use it.
-- *
-- * FT_ENCODING_OLD_LATIN_2 ::
-- * This value is deprecated and was neither used nor reported by
-- * FreeType. Don't use or test for it.
-- *
-- * FT_ENCODING_MS_SJIS ::
-- * Same as FT_ENCODING_SJIS. Deprecated.
-- *
-- * FT_ENCODING_MS_GB2312 ::
-- * Same as FT_ENCODING_PRC. Deprecated.
-- *
-- * FT_ENCODING_MS_BIG5 ::
-- * Same as FT_ENCODING_BIG5. Deprecated.
-- *
-- * FT_ENCODING_MS_WANSUNG ::
-- * Same as FT_ENCODING_WANSUNG. Deprecated.
-- *
-- * FT_ENCODING_MS_JOHAB ::
-- * Same as FT_ENCODING_JOHAB. Deprecated.
-- *
-- * @note:
-- * By default, FreeType enables a Unicode charmap and tags it with
-- * `FT_ENCODING_UNICODE` when it is either provided or can be generated
-- * from PostScript glyph name dictionaries in the font file. All other
-- * encodings are considered legacy and tagged only if explicitly defined
-- * in the font file. Otherwise, `FT_ENCODING_NONE` is used.
-- *
-- * `FT_ENCODING_NONE` is set by the BDF and PCF drivers if the charmap is
-- * neither Unicode nor ISO-8859-1 (otherwise it is set to
-- * `FT_ENCODING_UNICODE`). Use @FT_Get_BDF_Charset_ID to find out which
-- * encoding is really present. If, for example, the `cs_registry` field
-- * is 'KOI8' and the `cs_encoding` field is 'R', the font is encoded in
-- * KOI8-R.
-- *
-- * `FT_ENCODING_NONE` is always set (with a single exception) by the
-- * winfonts driver. Use @FT_Get_WinFNT_Header and examine the `charset`
-- * field of the @FT_WinFNT_HeaderRec structure to find out which encoding
-- * is really present. For example, @FT_WinFNT_ID_CP1251 (204) means
-- * Windows code page 1251 (for Russian).
-- *
-- * `FT_ENCODING_NONE` is set if `platform_id` is @TT_PLATFORM_MACINTOSH
-- * and `encoding_id` is not `TT_MAC_ID_ROMAN` (otherwise it is set to
-- * `FT_ENCODING_APPLE_ROMAN`).
-- *
-- * If `platform_id` is @TT_PLATFORM_MACINTOSH, use the function
-- * @FT_Get_CMap_Language_ID to query the Mac language ID that may be
-- * needed to be able to distinguish Apple encoding variants. See
-- *
-- * https://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt
-- *
-- * to get an idea how to do that. Basically, if the language ID is~0,
-- * don't use it, otherwise subtract 1 from the language ID. Then examine
-- * `encoding_id`. If, for example, `encoding_id` is `TT_MAC_ID_ROMAN`
-- * and the language ID (minus~1) is `TT_MAC_LANGID_GREEK`, it is the
-- * Greek encoding, not Roman. `TT_MAC_ID_ARABIC` with
-- * `TT_MAC_LANGID_FARSI` means the Farsi variant the Arabic encoding.
--
subtype FT_Encoding_u is unsigned;
FT_ENCODING_NONE : constant unsigned := 0;
FT_ENCODING_MS_SYMBOL : constant unsigned := 1937337698;
FT_ENCODING_UNICODE : constant unsigned := 1970170211;
FT_ENCODING_SJIS : constant unsigned := 1936353651;
FT_ENCODING_PRC : constant unsigned := 1734484000;
FT_ENCODING_BIG5 : constant unsigned := 1651074869;
FT_ENCODING_WANSUNG : constant unsigned := 2002873971;
FT_ENCODING_JOHAB : constant unsigned := 1785686113;
FT_ENCODING_GB2312 : constant unsigned := 1734484000;
FT_ENCODING_MS_SJIS : constant unsigned := 1936353651;
FT_ENCODING_MS_GB2312 : constant unsigned := 1734484000;
FT_ENCODING_MS_BIG5 : constant unsigned := 1651074869;
FT_ENCODING_MS_WANSUNG : constant unsigned := 2002873971;
FT_ENCODING_MS_JOHAB : constant unsigned := 1785686113;
FT_ENCODING_ADOBE_STANDARD : constant unsigned := 1094995778;
FT_ENCODING_ADOBE_EXPERT : constant unsigned := 1094992453;
FT_ENCODING_ADOBE_CUSTOM : constant unsigned := 1094992451;
FT_ENCODING_ADOBE_LATIN_1 : constant unsigned := 1818326065;
FT_ENCODING_OLD_LATIN_2 : constant unsigned := 1818326066;
FT_ENCODING_APPLE_ROMAN : constant unsigned := 1634889070; -- /usr/include/freetype2/freetype/freetype.h:740
-- for backward compatibility
subtype FT_Encoding is FT_Encoding_u; -- /usr/include/freetype2/freetype/freetype.h:770
-- these constants are deprecated; use the corresponding `FT_Encoding`
-- values instead
--*************************************************************************
-- *
-- * @struct:
-- * FT_CharMapRec
-- *
-- * @description:
-- * The base charmap structure.
-- *
-- * @fields:
-- * face ::
-- * A handle to the parent face object.
-- *
-- * encoding ::
-- * An @FT_Encoding tag identifying the charmap. Use this with
-- * @FT_Select_Charmap.
-- *
-- * platform_id ::
-- * An ID number describing the platform for the following encoding ID.
-- * This comes directly from the TrueType specification and gets
-- * emulated for other formats.
-- *
-- * encoding_id ::
-- * A platform-specific encoding number. This also comes from the
-- * TrueType specification and gets emulated similarly.
--
type FT_CharMapRec_u is record
face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:819
encoding : aliased FT_Encoding; -- /usr/include/freetype2/freetype/freetype.h:820
platform_id : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:821
encoding_id : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:822
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:817
subtype FT_CharMapRec is FT_CharMapRec_u; -- /usr/include/freetype2/freetype/freetype.h:824
--***********************************************************************
--***********************************************************************
--
-- B A S E O B J E C T C L A S S E S
--
--***********************************************************************
--***********************************************************************
--*************************************************************************
-- *
-- * @type:
-- * FT_Face_Internal
-- *
-- * @description:
-- * An opaque handle to an `FT_Face_InternalRec` structure that models the
-- * private data of a given @FT_Face object.
-- *
-- * This structure might change between releases of FreeType~2 and is not
-- * generally available to client applications.
--
type FT_Face_InternalRec_u is null record; -- incomplete struct
type FT_Face_Internal is access all FT_Face_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:848
--*************************************************************************
-- *
-- * @struct:
-- * FT_FaceRec
-- *
-- * @description:
-- * FreeType root face class structure. A face object models a typeface
-- * in a font file.
-- *
-- * @fields:
-- * num_faces ::
-- * The number of faces in the font file. Some font formats can have
-- * multiple faces in a single font file.
-- *
-- * face_index ::
-- * This field holds two different values. Bits 0-15 are the index of
-- * the face in the font file (starting with value~0). They are set
-- * to~0 if there is only one face in the font file.
-- *
-- * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation
-- * fonts only, holding the named instance index for the current face
-- * index (starting with value~1; value~0 indicates font access without
-- * a named instance). For non-variation fonts, bits 16-30 are ignored.
-- * If we have the third named instance of face~4, say, `face_index` is
-- * set to 0x00030004.
-- *
-- * Bit 31 is always zero (this is, `face_index` is always a positive
-- * value).
-- *
-- * [Since 2.9] Changing the design coordinates with
-- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
-- * not influence the named instance index value (only
-- * @FT_Set_Named_Instance does that).
-- *
-- * face_flags ::
-- * A set of bit flags that give important information about the face;
-- * see @FT_FACE_FLAG_XXX for the details.
-- *
-- * style_flags ::
-- * The lower 16~bits contain a set of bit flags indicating the style of
-- * the face; see @FT_STYLE_FLAG_XXX for the details.
-- *
-- * [Since 2.6.1] Bits 16-30 hold the number of named instances
-- * available for the current face if we have a GX or OpenType variation
-- * (sub)font. Bit 31 is always zero (this is, `style_flags` is always
-- * a positive value). Note that a variation font has always at least
-- * one named instance, namely the default instance.
-- *
-- * num_glyphs ::
-- * The number of glyphs in the face. If the face is scalable and has
-- * sbits (see `num_fixed_sizes`), it is set to the number of outline
-- * glyphs.
-- *
-- * For CID-keyed fonts (not in an SFNT wrapper) this value gives the
-- * highest CID used in the font.
-- *
-- * family_name ::
-- * The face's family name. This is an ASCII string, usually in
-- * English, that describes the typeface's family (like 'Times New
-- * Roman', 'Bodoni', 'Garamond', etc). This is a least common
-- * denominator used to list fonts. Some formats (TrueType & OpenType)
-- * provide localized and Unicode versions of this string. Applications
-- * should use the format-specific interface to access them. Can be
-- * `NULL` (e.g., in fonts embedded in a PDF file).
-- *
-- * In case the font doesn't provide a specific family name entry,
-- * FreeType tries to synthesize one, deriving it from other name
-- * entries.
-- *
-- * style_name ::
-- * The face's style name. This is an ASCII string, usually in English,
-- * that describes the typeface's style (like 'Italic', 'Bold',
-- * 'Condensed', etc). Not all font formats provide a style name, so
-- * this field is optional, and can be set to `NULL`. As for
-- * `family_name`, some formats provide localized and Unicode versions
-- * of this string. Applications should use the format-specific
-- * interface to access them.
-- *
-- * num_fixed_sizes ::
-- * The number of bitmap strikes in the face. Even if the face is
-- * scalable, there might still be bitmap strikes, which are called
-- * 'sbits' in that case.
-- *
-- * available_sizes ::
-- * An array of @FT_Bitmap_Size for all bitmap strikes in the face. It
-- * is set to `NULL` if there is no bitmap strike.
-- *
-- * Note that FreeType tries to sanitize the strike data since they are
-- * sometimes sloppy or incorrect, but this can easily fail.
-- *
-- * num_charmaps ::
-- * The number of charmaps in the face.
-- *
-- * charmaps ::
-- * An array of the charmaps of the face.
-- *
-- * generic ::
-- * A field reserved for client uses. See the @FT_Generic type
-- * description.
-- *
-- * bbox ::
-- * The font bounding box. Coordinates are expressed in font units (see
-- * `units_per_EM`). The box is large enough to contain any glyph from
-- * the font. Thus, `bbox.yMax` can be seen as the 'maximum ascender',
-- * and `bbox.yMin` as the 'minimum descender'. Only relevant for
-- * scalable formats.
-- *
-- * Note that the bounding box might be off by (at least) one pixel for
-- * hinted fonts. See @FT_Size_Metrics for further discussion.
-- *
-- * Note that the bounding box does not vary in OpenType variable fonts
-- * and should only be used in relation to the default instance.
-- *
-- * units_per_EM ::
-- * The number of font units per EM square for this face. This is
-- * typically 2048 for TrueType fonts, and 1000 for Type~1 fonts. Only
-- * relevant for scalable formats.
-- *
-- * ascender ::
-- * The typographic ascender of the face, expressed in font units. For
-- * font formats not having this information, it is set to `bbox.yMax`.
-- * Only relevant for scalable formats.
-- *
-- * descender ::
-- * The typographic descender of the face, expressed in font units. For
-- * font formats not having this information, it is set to `bbox.yMin`.
-- * Note that this field is negative for values below the baseline.
-- * Only relevant for scalable formats.
-- *
-- * height ::
-- * This value is the vertical distance between two consecutive
-- * baselines, expressed in font units. It is always positive. Only
-- * relevant for scalable formats.
-- *
-- * If you want the global glyph height, use `ascender - descender`.
-- *
-- * max_advance_width ::
-- * The maximum advance width, in font units, for all glyphs in this
-- * face. This can be used to make word wrapping computations faster.
-- * Only relevant for scalable formats.
-- *
-- * max_advance_height ::
-- * The maximum advance height, in font units, for all glyphs in this
-- * face. This is only relevant for vertical layouts, and is set to
-- * `height` for fonts that do not provide vertical metrics. Only
-- * relevant for scalable formats.
-- *
-- * underline_position ::
-- * The position, in font units, of the underline line for this face.
-- * It is the center of the underlining stem. Only relevant for
-- * scalable formats.
-- *
-- * underline_thickness ::
-- * The thickness, in font units, of the underline for this face. Only
-- * relevant for scalable formats.
-- *
-- * glyph ::
-- * The face's associated glyph slot(s).
-- *
-- * size ::
-- * The current active size for this face.
-- *
-- * charmap ::
-- * The current active charmap for this face.
-- *
-- * @note:
-- * Fields may be changed after a call to @FT_Attach_File or
-- * @FT_Attach_Stream.
-- *
-- * For an OpenType variation font, the values of the following fields can
-- * change after a call to @FT_Set_Var_Design_Coordinates (and friends) if
-- * the font contains an 'MVAR' table: `ascender`, `descender`, `height`,
-- * `underline_position`, and `underline_thickness`.
-- *
-- * Especially for TrueType fonts see also the documentation for
-- * @FT_Size_Metrics.
--
-- Troodon: change type of available_sizes to Address for easier use
type FT_FaceRec_u is record
num_faces : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1030
face_index : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1031
face_flags : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1033
style_flags : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1034
num_glyphs : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:1036
family_name : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:1038
style_name : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:1039
num_fixed_sizes : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1041
available_sizes : System.Address; --access FT_Bitmap_Size; -- /usr/include/freetype2/freetype/freetype.h:1042
num_charmaps : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1044
charmaps : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1045
c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1047
bbox : aliased ftimage.FT_BBox; -- /usr/include/freetype2/freetype/freetype.h:1052
units_per_EM : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1054
ascender : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1055
descender : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1056
height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1057
max_advance_width : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1059
max_advance_height : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1060
underline_position : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1062
underline_thickness : aliased fttypes.FT_Short; -- /usr/include/freetype2/freetype/freetype.h:1063
glyph : FT_GlyphSlot; -- /usr/include/freetype2/freetype/freetype.h:1065
size : FT_Size; -- /usr/include/freetype2/freetype/freetype.h:1066
charmap : FT_CharMap; -- /usr/include/freetype2/freetype/freetype.h:1067
driver : FT_Driver; -- /usr/include/freetype2/freetype/freetype.h:1071
memory : ftsystem.FT_Memory; -- /usr/include/freetype2/freetype/freetype.h:1072
stream : ftsystem.FT_Stream; -- /usr/include/freetype2/freetype/freetype.h:1073
sizes_list : aliased fttypes.FT_ListRec; -- /usr/include/freetype2/freetype/freetype.h:1075
autohint : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1077
extensions : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1078
internal : FT_Face_Internal; -- /usr/include/freetype2/freetype/freetype.h:1080
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1028
--# The following member variables (down to `underline_thickness`)
--# are only relevant to scalable outlines; cf. @FT_Bitmap_Size
--# for bitmap fonts.
--@private begin
-- face-specific auto-hinter data
-- unused
--@private end
subtype FT_FaceRec is FT_FaceRec_u; -- /usr/include/freetype2/freetype/freetype.h:1084
--*************************************************************************
-- *
-- * @enum:
-- * FT_FACE_FLAG_XXX
-- *
-- * @description:
-- * A list of bit flags used in the `face_flags` field of the @FT_FaceRec
-- * structure. They inform client applications of properties of the
-- * corresponding face.
-- *
-- * @values:
-- * FT_FACE_FLAG_SCALABLE ::
-- * The face contains outline glyphs. Note that a face can contain
-- * bitmap strikes also, i.e., a face can have both this flag and
-- * @FT_FACE_FLAG_FIXED_SIZES set.
-- *
-- * FT_FACE_FLAG_FIXED_SIZES ::
-- * The face contains bitmap strikes. See also the `num_fixed_sizes`
-- * and `available_sizes` fields of @FT_FaceRec.
-- *
-- * FT_FACE_FLAG_FIXED_WIDTH ::
-- * The face contains fixed-width characters (like Courier, Lucida,
-- * MonoType, etc.).
-- *
-- * FT_FACE_FLAG_SFNT ::
-- * The face uses the SFNT storage scheme. For now, this means TrueType
-- * and OpenType.
-- *
-- * FT_FACE_FLAG_HORIZONTAL ::
-- * The face contains horizontal glyph metrics. This should be set for
-- * all common formats.
-- *
-- * FT_FACE_FLAG_VERTICAL ::
-- * The face contains vertical glyph metrics. This is only available in
-- * some formats, not all of them.
-- *
-- * FT_FACE_FLAG_KERNING ::
-- * The face contains kerning information. If set, the kerning distance
-- * can be retrieved using the function @FT_Get_Kerning. Otherwise the
-- * function always return the vector (0,0). Note that FreeType doesn't
-- * handle kerning data from the SFNT 'GPOS' table (as present in many
-- * OpenType fonts).
-- *
-- * FT_FACE_FLAG_FAST_GLYPHS ::
-- * THIS FLAG IS DEPRECATED. DO NOT USE OR TEST IT.
-- *
-- * FT_FACE_FLAG_MULTIPLE_MASTERS ::
-- * The face contains multiple masters and is capable of interpolating
-- * between them. Supported formats are Adobe MM, TrueType GX, and
-- * OpenType variation fonts.
-- *
-- * See section @multiple_masters for API details.
-- *
-- * FT_FACE_FLAG_GLYPH_NAMES ::
-- * The face contains glyph names, which can be retrieved using
-- * @FT_Get_Glyph_Name. Note that some TrueType fonts contain broken
-- * glyph name tables. Use the function @FT_Has_PS_Glyph_Names when
-- * needed.
-- *
-- * FT_FACE_FLAG_EXTERNAL_STREAM ::
-- * Used internally by FreeType to indicate that a face's stream was
-- * provided by the client application and should not be destroyed when
-- * @FT_Done_Face is called. Don't read or test this flag.
-- *
-- * FT_FACE_FLAG_HINTER ::
-- * The font driver has a hinting machine of its own. For example, with
-- * TrueType fonts, it makes sense to use data from the SFNT 'gasp'
-- * table only if the native TrueType hinting engine (with the bytecode
-- * interpreter) is available and active.
-- *
-- * FT_FACE_FLAG_CID_KEYED ::
-- * The face is CID-keyed. In that case, the face is not accessed by
-- * glyph indices but by CID values. For subsetted CID-keyed fonts this
-- * has the consequence that not all index values are a valid argument
-- * to @FT_Load_Glyph. Only the CID values for which corresponding
-- * glyphs in the subsetted font exist make `FT_Load_Glyph` return
-- * successfully; in all other cases you get an
-- * `FT_Err_Invalid_Argument` error.
-- *
-- * Note that CID-keyed fonts that are in an SFNT wrapper (this is, all
-- * OpenType/CFF fonts) don't have this flag set since the glyphs are
-- * accessed in the normal way (using contiguous indices); the
-- * 'CID-ness' isn't visible to the application.
-- *
-- * FT_FACE_FLAG_TRICKY ::
-- * The face is 'tricky', this is, it always needs the font format's
-- * native hinting engine to get a reasonable result. A typical example
-- * is the old Chinese font `mingli.ttf` (but not `mingliu.ttc`) that
-- * uses TrueType bytecode instructions to move and scale all of its
-- * subglyphs.
-- *
-- * It is not possible to auto-hint such fonts using
-- * @FT_LOAD_FORCE_AUTOHINT; it will also ignore @FT_LOAD_NO_HINTING.
-- * You have to set both @FT_LOAD_NO_HINTING and @FT_LOAD_NO_AUTOHINT to
-- * really disable hinting; however, you probably never want this except
-- * for demonstration purposes.
-- *
-- * Currently, there are about a dozen TrueType fonts in the list of
-- * tricky fonts; they are hard-coded in file `ttobjs.c`.
-- *
-- * FT_FACE_FLAG_COLOR ::
-- * [Since 2.5.1] The face has color glyph tables. See @FT_LOAD_COLOR
-- * for more information.
-- *
-- * FT_FACE_FLAG_VARIATION ::
-- * [Since 2.9] Set if the current face (or named instance) has been
-- * altered with @FT_Set_MM_Design_Coordinates,
-- * @FT_Set_Var_Design_Coordinates, or @FT_Set_Var_Blend_Coordinates.
-- * This flag is unset by a call to @FT_Set_Named_Instance.
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_HORIZONTAL
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains horizontal
-- * metrics (this is true for all font formats though).
-- *
-- * @also:
-- * @FT_HAS_VERTICAL can be used to check for vertical metrics.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_VERTICAL
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains real
-- * vertical metrics (and not only synthesized ones).
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_KERNING
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains kerning data
-- * that can be accessed with @FT_Get_Kerning.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_SCALABLE
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains a scalable
-- * font face (true for TrueType, Type~1, Type~42, CID, OpenType/CFF, and
-- * PFR font formats).
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_SFNT
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains a font whose
-- * format is based on the SFNT storage scheme. This usually means:
-- * TrueType fonts, OpenType fonts, as well as SFNT-based embedded bitmap
-- * fonts.
-- *
-- * If this macro is true, all functions defined in @FT_SFNT_NAMES_H and
-- * @FT_TRUETYPE_TABLES_H are available.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_FIXED_WIDTH
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains a font face
-- * that contains fixed-width (or 'monospace', 'fixed-pitch', etc.)
-- * glyphs.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_FIXED_SIZES
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains some
-- * embedded bitmaps. See the `available_sizes` field of the @FT_FaceRec
-- * structure.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_FAST_GLYPHS
-- *
-- * @description:
-- * Deprecated.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_GLYPH_NAMES
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains some glyph
-- * names that can be accessed through @FT_Get_Glyph_Name.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_MULTIPLE_MASTERS
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains some
-- * multiple masters. The functions provided by @FT_MULTIPLE_MASTERS_H
-- * are then available to choose the exact design you want.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_NAMED_INSTANCE
-- *
-- * @description:
-- * A macro that returns true whenever a face object is a named instance
-- * of a GX or OpenType variation font.
-- *
-- * [Since 2.9] Changing the design coordinates with
-- * @FT_Set_Var_Design_Coordinates or @FT_Set_Var_Blend_Coordinates does
-- * not influence the return value of this macro (only
-- * @FT_Set_Named_Instance does that).
-- *
-- * @since:
-- * 2.7
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_VARIATION
-- *
-- * @description:
-- * A macro that returns true whenever a face object has been altered by
-- * @FT_Set_MM_Design_Coordinates, @FT_Set_Var_Design_Coordinates, or
-- * @FT_Set_Var_Blend_Coordinates.
-- *
-- * @since:
-- * 2.9
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_CID_KEYED
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains a CID-keyed
-- * font. See the discussion of @FT_FACE_FLAG_CID_KEYED for more details.
-- *
-- * If this macro is true, all functions defined in @FT_CID_H are
-- * available.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_IS_TRICKY
-- *
-- * @description:
-- * A macro that returns true whenever a face represents a 'tricky' font.
-- * See the discussion of @FT_FACE_FLAG_TRICKY for more details.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_HAS_COLOR
-- *
-- * @description:
-- * A macro that returns true whenever a face object contains tables for
-- * color glyphs.
-- *
-- * @since:
-- * 2.5.1
-- *
--
--*************************************************************************
-- *
-- * @enum:
-- * FT_STYLE_FLAG_XXX
-- *
-- * @description:
-- * A list of bit flags to indicate the style of a given face. These are
-- * used in the `style_flags` field of @FT_FaceRec.
-- *
-- * @values:
-- * FT_STYLE_FLAG_ITALIC ::
-- * The face style is italic or oblique.
-- *
-- * FT_STYLE_FLAG_BOLD ::
-- * The face is bold.
-- *
-- * @note:
-- * The style information as provided by FreeType is very basic. More
-- * details are beyond the scope and should be done on a higher level (for
-- * example, by analyzing various fields of the 'OS/2' table in SFNT based
-- * fonts).
--
--*************************************************************************
-- *
-- * @type:
-- * FT_Size_Internal
-- *
-- * @description:
-- * An opaque handle to an `FT_Size_InternalRec` structure, used to model
-- * private data of a given @FT_Size object.
--
type FT_Size_InternalRec_u is null record; -- incomplete struct
type FT_Size_Internal is access all FT_Size_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:1488
--*************************************************************************
-- *
-- * @struct:
-- * FT_Size_Metrics
-- *
-- * @description:
-- * The size metrics structure gives the metrics of a size object.
-- *
-- * @fields:
-- * x_ppem ::
-- * The width of the scaled EM square in pixels, hence the term 'ppem'
-- * (pixels per EM). It is also referred to as 'nominal width'.
-- *
-- * y_ppem ::
-- * The height of the scaled EM square in pixels, hence the term 'ppem'
-- * (pixels per EM). It is also referred to as 'nominal height'.
-- *
-- * x_scale ::
-- * A 16.16 fractional scaling value to convert horizontal metrics from
-- * font units to 26.6 fractional pixels. Only relevant for scalable
-- * font formats.
-- *
-- * y_scale ::
-- * A 16.16 fractional scaling value to convert vertical metrics from
-- * font units to 26.6 fractional pixels. Only relevant for scalable
-- * font formats.
-- *
-- * ascender ::
-- * The ascender in 26.6 fractional pixels, rounded up to an integer
-- * value. See @FT_FaceRec for the details.
-- *
-- * descender ::
-- * The descender in 26.6 fractional pixels, rounded down to an integer
-- * value. See @FT_FaceRec for the details.
-- *
-- * height ::
-- * The height in 26.6 fractional pixels, rounded to an integer value.
-- * See @FT_FaceRec for the details.
-- *
-- * max_advance ::
-- * The maximum advance width in 26.6 fractional pixels, rounded to an
-- * integer value. See @FT_FaceRec for the details.
-- *
-- * @note:
-- * The scaling values, if relevant, are determined first during a size
-- * changing operation. The remaining fields are then set by the driver.
-- * For scalable formats, they are usually set to scaled values of the
-- * corresponding fields in @FT_FaceRec. Some values like ascender or
-- * descender are rounded for historical reasons; more precise values (for
-- * outline fonts) can be derived by scaling the corresponding @FT_FaceRec
-- * values manually, with code similar to the following.
-- *
-- * ```
-- * scaled_ascender = FT_MulFix( face->ascender,
-- * size_metrics->y_scale );
-- * ```
-- *
-- * Note that due to glyph hinting and the selected rendering mode these
-- * values are usually not exact; consequently, they must be treated as
-- * unreliable with an error margin of at least one pixel!
-- *
-- * Indeed, the only way to get the exact metrics is to render _all_
-- * glyphs. As this would be a definite performance hit, it is up to
-- * client applications to perform such computations.
-- *
-- * The `FT_Size_Metrics` structure is valid for bitmap fonts also.
-- *
-- *
-- * **TrueType fonts with native bytecode hinting**
-- *
-- * All applications that handle TrueType fonts with native hinting must
-- * be aware that TTFs expect different rounding of vertical font
-- * dimensions. The application has to cater for this, especially if it
-- * wants to rely on a TTF's vertical data (for example, to properly align
-- * box characters vertically).
-- *
-- * Only the application knows _in advance_ that it is going to use native
-- * hinting for TTFs! FreeType, on the other hand, selects the hinting
-- * mode not at the time of creating an @FT_Size object but much later,
-- * namely while calling @FT_Load_Glyph.
-- *
-- * Here is some pseudo code that illustrates a possible solution.
-- *
-- * ```
-- * font_format = FT_Get_Font_Format( face );
-- *
-- * if ( !strcmp( font_format, "TrueType" ) &&
-- * do_native_bytecode_hinting )
-- * {
-- * ascender = ROUND( FT_MulFix( face->ascender,
-- * size_metrics->y_scale ) );
-- * descender = ROUND( FT_MulFix( face->descender,
-- * size_metrics->y_scale ) );
-- * }
-- * else
-- * {
-- * ascender = size_metrics->ascender;
-- * descender = size_metrics->descender;
-- * }
-- *
-- * height = size_metrics->height;
-- * max_advance = size_metrics->max_advance;
-- * ```
--
-- horizontal pixels per EM
type FT_Size_Metrics_u is record
x_ppem : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1597
y_ppem : aliased fttypes.FT_UShort; -- /usr/include/freetype2/freetype/freetype.h:1598
x_scale : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1600
y_scale : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1601
ascender : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1603
descender : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1604
height : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1605
max_advance : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1606
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1595
-- vertical pixels per EM
-- scaling values used to convert font
-- units to 26.6 fractional pixels
-- ascender in 26.6 frac. pixels
-- descender in 26.6 frac. pixels
-- text height in 26.6 frac. pixels
-- max horizontal advance, in 26.6 pixels
subtype FT_Size_Metrics is FT_Size_Metrics_u; -- /usr/include/freetype2/freetype/freetype.h:1608
--*************************************************************************
-- *
-- * @struct:
-- * FT_SizeRec
-- *
-- * @description:
-- * FreeType root size class structure. A size object models a face
-- * object at a given size.
-- *
-- * @fields:
-- * face ::
-- * Handle to the parent face object.
-- *
-- * generic ::
-- * A typeless pointer, unused by the FreeType library or any of its
-- * drivers. It can be used by client applications to link their own
-- * data to each size object.
-- *
-- * metrics ::
-- * Metrics for this size object. This field is read-only.
--
-- parent face object
type FT_SizeRec_u is record
face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:1634
c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1635
metrics : aliased FT_Size_Metrics; -- /usr/include/freetype2/freetype/freetype.h:1636
internal : FT_Size_Internal; -- /usr/include/freetype2/freetype/freetype.h:1637
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1632
-- generic pointer for client uses
-- size metrics
subtype FT_SizeRec is FT_SizeRec_u; -- /usr/include/freetype2/freetype/freetype.h:1639
--*************************************************************************
-- *
-- * @struct:
-- * FT_SubGlyph
-- *
-- * @description:
-- * The subglyph structure is an internal object used to describe
-- * subglyphs (for example, in the case of composites).
-- *
-- * @note:
-- * The subglyph implementation is not part of the high-level API, hence
-- * the forward structure declaration.
-- *
-- * You can however retrieve subglyph information with
-- * @FT_Get_SubGlyph_Info.
--
type FT_SubGlyphRec_u is null record; -- incomplete struct
type FT_SubGlyph is access all FT_SubGlyphRec_u; -- /usr/include/freetype2/freetype/freetype.h:1658
--*************************************************************************
-- *
-- * @type:
-- * FT_Slot_Internal
-- *
-- * @description:
-- * An opaque handle to an `FT_Slot_InternalRec` structure, used to model
-- * private data of a given @FT_GlyphSlot object.
--
type FT_Slot_InternalRec_u is null record; -- incomplete struct
type FT_Slot_Internal is access all FT_Slot_InternalRec_u; -- /usr/include/freetype2/freetype/freetype.h:1670
--*************************************************************************
-- *
-- * @struct:
-- * FT_GlyphSlotRec
-- *
-- * @description:
-- * FreeType root glyph slot class structure. A glyph slot is a container
-- * where individual glyphs can be loaded, be they in outline or bitmap
-- * format.
-- *
-- * @fields:
-- * library ::
-- * A handle to the FreeType library instance this slot belongs to.
-- *
-- * face ::
-- * A handle to the parent face object.
-- *
-- * next ::
-- * In some cases (like some font tools), several glyph slots per face
-- * object can be a good thing. As this is rare, the glyph slots are
-- * listed through a direct, single-linked list using its `next` field.
-- *
-- * glyph_index ::
-- * [Since 2.10] The glyph index passed as an argument to @FT_Load_Glyph
-- * while initializing the glyph slot.
-- *
-- * generic ::
-- * A typeless pointer unused by the FreeType library or any of its
-- * drivers. It can be used by client applications to link their own
-- * data to each glyph slot object.
-- *
-- * metrics ::
-- * The metrics of the last loaded glyph in the slot. The returned
-- * values depend on the last load flags (see the @FT_Load_Glyph API
-- * function) and can be expressed either in 26.6 fractional pixels or
-- * font units.
-- *
-- * Note that even when the glyph image is transformed, the metrics are
-- * not.
-- *
-- * linearHoriAdvance ::
-- * The advance width of the unhinted glyph. Its value is expressed in
-- * 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when
-- * loading the glyph. This field can be important to perform correct
-- * WYSIWYG layout. Only relevant for outline glyphs.
-- *
-- * linearVertAdvance ::
-- * The advance height of the unhinted glyph. Its value is expressed in
-- * 16.16 fractional pixels, unless @FT_LOAD_LINEAR_DESIGN is set when
-- * loading the glyph. This field can be important to perform correct
-- * WYSIWYG layout. Only relevant for outline glyphs.
-- *
-- * advance ::
-- * This shorthand is, depending on @FT_LOAD_IGNORE_TRANSFORM, the
-- * transformed (hinted) advance width for the glyph, in 26.6 fractional
-- * pixel format. As specified with @FT_LOAD_VERTICAL_LAYOUT, it uses
-- * either the `horiAdvance` or the `vertAdvance` value of `metrics`
-- * field.
-- *
-- * format ::
-- * This field indicates the format of the image contained in the glyph
-- * slot. Typically @FT_GLYPH_FORMAT_BITMAP, @FT_GLYPH_FORMAT_OUTLINE,
-- * or @FT_GLYPH_FORMAT_COMPOSITE, but other values are possible.
-- *
-- * bitmap ::
-- * This field is used as a bitmap descriptor. Note that the address
-- * and content of the bitmap buffer can change between calls of
-- * @FT_Load_Glyph and a few other functions.
-- *
-- * bitmap_left ::
-- * The bitmap's left bearing expressed in integer pixels.
-- *
-- * bitmap_top ::
-- * The bitmap's top bearing expressed in integer pixels. This is the
-- * distance from the baseline to the top-most glyph scanline, upwards
-- * y~coordinates being **positive**.
-- *
-- * outline ::
-- * The outline descriptor for the current glyph image if its format is
-- * @FT_GLYPH_FORMAT_OUTLINE. Once a glyph is loaded, `outline` can be
-- * transformed, distorted, emboldened, etc. However, it must not be
-- * freed.
-- *
-- * [Since 2.10.1] If @FT_LOAD_NO_SCALE is set, outline coordinates of
-- * OpenType variation fonts for a selected instance are internally
-- * handled as 26.6 fractional font units but returned as (rounded)
-- * integers, as expected. To get unrounded font units, don't use
-- * @FT_LOAD_NO_SCALE but load the glyph with @FT_LOAD_NO_HINTING and
-- * scale it, using the font's `units_per_EM` value as the ppem.
-- *
-- * num_subglyphs ::
-- * The number of subglyphs in a composite glyph. This field is only
-- * valid for the composite glyph format that should normally only be
-- * loaded with the @FT_LOAD_NO_RECURSE flag.
-- *
-- * subglyphs ::
-- * An array of subglyph descriptors for composite glyphs. There are
-- * `num_subglyphs` elements in there. Currently internal to FreeType.
-- *
-- * control_data ::
-- * Certain font drivers can also return the control data for a given
-- * glyph image (e.g. TrueType bytecode, Type~1 charstrings, etc.).
-- * This field is a pointer to such data; it is currently internal to
-- * FreeType.
-- *
-- * control_len ::
-- * This is the length in bytes of the control data. Currently internal
-- * to FreeType.
-- *
-- * other ::
-- * Reserved.
-- *
-- * lsb_delta ::
-- * The difference between hinted and unhinted left side bearing while
-- * auto-hinting is active. Zero otherwise.
-- *
-- * rsb_delta ::
-- * The difference between hinted and unhinted right side bearing while
-- * auto-hinting is active. Zero otherwise.
-- *
-- * @note:
-- * If @FT_Load_Glyph is called with default flags (see @FT_LOAD_DEFAULT)
-- * the glyph image is loaded in the glyph slot in its native format
-- * (e.g., an outline glyph for TrueType and Type~1 formats). [Since 2.9]
-- * The prospective bitmap metrics are calculated according to
-- * @FT_LOAD_TARGET_XXX and other flags even for the outline glyph, even
-- * if @FT_LOAD_RENDER is not set.
-- *
-- * This image can later be converted into a bitmap by calling
-- * @FT_Render_Glyph. This function searches the current renderer for the
-- * native image's format, then invokes it.
-- *
-- * The renderer is in charge of transforming the native image through the
-- * slot's face transformation fields, then converting it into a bitmap
-- * that is returned in `slot->bitmap`.
-- *
-- * Note that `slot->bitmap_left` and `slot->bitmap_top` are also used to
-- * specify the position of the bitmap relative to the current pen
-- * position (e.g., coordinates (0,0) on the baseline). Of course,
-- * `slot->format` is also changed to @FT_GLYPH_FORMAT_BITMAP.
-- *
-- * Here is a small pseudo code fragment that shows how to use `lsb_delta`
-- * and `rsb_delta` to do fractional positioning of glyphs:
-- *
-- * ```
-- * FT_GlyphSlot slot = face->glyph;
-- * FT_Pos origin_x = 0;
-- *
-- *
-- * for all glyphs do
-- * <load glyph with `FT_Load_Glyph'>
-- *
-- * FT_Outline_Translate( slot->outline, origin_x & 63, 0 );
-- *
-- * <save glyph image, or render glyph, or ...>
-- *
-- * <compute kern between current and next glyph
-- * and add it to `origin_x'>
-- *
-- * origin_x += slot->advance.x;
-- * origin_x += slot->lsb_delta - slot->rsb_delta;
-- * endfor
-- * ```
-- *
-- * Here is another small pseudo code fragment that shows how to use
-- * `lsb_delta` and `rsb_delta` to improve integer positioning of glyphs:
-- *
-- * ```
-- * FT_GlyphSlot slot = face->glyph;
-- * FT_Pos origin_x = 0;
-- * FT_Pos prev_rsb_delta = 0;
-- *
-- *
-- * for all glyphs do
-- * <compute kern between current and previous glyph
-- * and add it to `origin_x'>
-- *
-- * <load glyph with `FT_Load_Glyph'>
-- *
-- * if ( prev_rsb_delta - slot->lsb_delta > 32 )
-- * origin_x -= 64;
-- * else if ( prev_rsb_delta - slot->lsb_delta < -31 )
-- * origin_x += 64;
-- *
-- * prev_rsb_delta = slot->rsb_delta;
-- *
-- * <save glyph image, or render glyph, or ...>
-- *
-- * origin_x += slot->advance.x;
-- * endfor
-- * ```
-- *
-- * If you use strong auto-hinting, you **must** apply these delta values!
-- * Otherwise you will experience far too large inter-glyph spacing at
-- * small rendering sizes in most cases. Note that it doesn't harm to use
-- * the above code for other hinting modes also, since the delta values
-- * are zero then.
--
type FT_GlyphSlotRec_u is record
library : FT_Library; -- /usr/include/freetype2/freetype/freetype.h:1873
face : FT_Face; -- /usr/include/freetype2/freetype/freetype.h:1874
next : FT_GlyphSlot; -- /usr/include/freetype2/freetype/freetype.h:1875
glyph_index : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:1876
c_generic : aliased fttypes.FT_Generic; -- /usr/include/freetype2/freetype/freetype.h:1877
metrics : aliased FT_Glyph_Metrics; -- /usr/include/freetype2/freetype/freetype.h:1879
linearHoriAdvance : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1880
linearVertAdvance : aliased fttypes.FT_Fixed; -- /usr/include/freetype2/freetype/freetype.h:1881
advance : aliased ftimage.FT_Vector; -- /usr/include/freetype2/freetype/freetype.h:1882
format : aliased ftimage.FT_Glyph_Format; -- /usr/include/freetype2/freetype/freetype.h:1884
bitmap : aliased ftimage.FT_Bitmap; -- /usr/include/freetype2/freetype/freetype.h:1886
bitmap_left : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1887
bitmap_top : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:1888
outline : aliased ftimage.FT_Outline; -- /usr/include/freetype2/freetype/freetype.h:1890
num_subglyphs : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:1892
subglyphs : FT_SubGlyph; -- /usr/include/freetype2/freetype/freetype.h:1893
control_data : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1895
control_len : aliased long; -- /usr/include/freetype2/freetype/freetype.h:1896
lsb_delta : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1898
rsb_delta : aliased ftimage.FT_Pos; -- /usr/include/freetype2/freetype/freetype.h:1899
other : System.Address; -- /usr/include/freetype2/freetype/freetype.h:1901
internal : FT_Slot_Internal; -- /usr/include/freetype2/freetype/freetype.h:1903
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:1871
-- new in 2.10; was reserved previously
subtype FT_GlyphSlotRec is FT_GlyphSlotRec_u; -- /usr/include/freetype2/freetype/freetype.h:1905
--***********************************************************************
--***********************************************************************
--
-- F U N C T I O N S
--
--***********************************************************************
--***********************************************************************
--*************************************************************************
-- *
-- * @function:
-- * FT_Init_FreeType
-- *
-- * @description:
-- * Initialize a new FreeType library object. The set of modules that are
-- * registered by this function is determined at build time.
-- *
-- * @output:
-- * alibrary ::
-- * A handle to a new library object.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * In case you want to provide your own memory allocating routines, use
-- * @FT_New_Library instead, followed by a call to @FT_Add_Default_Modules
-- * (or a series of calls to @FT_Add_Module) and
-- * @FT_Set_Default_Properties.
-- *
-- * See the documentation of @FT_Library and @FT_Face for multi-threading
-- * issues.
-- *
-- * If you need reference-counting (cf. @FT_Reference_Library), use
-- * @FT_New_Library and @FT_Done_Library.
-- *
-- * If compilation option `FT_CONFIG_OPTION_ENVIRONMENT_PROPERTIES` is
-- * set, this function reads the `FREETYPE_PROPERTIES` environment
-- * variable to control driver properties. See section @properties for
-- * more.
--
function FT_Init_FreeType (alibrary : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:1951
with Import => True,
Convention => C,
External_Name => "FT_Init_FreeType";
--*************************************************************************
-- *
-- * @function:
-- * FT_Done_FreeType
-- *
-- * @description:
-- * Destroy a given FreeType library object and all of its children,
-- * including resources, drivers, faces, sizes, etc.
-- *
-- * @input:
-- * library ::
-- * A handle to the target library object.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
--
function FT_Done_FreeType (library : FT_Library) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:1971
with Import => True,
Convention => C,
External_Name => "FT_Done_FreeType";
--*************************************************************************
-- *
-- * @enum:
-- * FT_OPEN_XXX
-- *
-- * @description:
-- * A list of bit field constants used within the `flags` field of the
-- * @FT_Open_Args structure.
-- *
-- * @values:
-- * FT_OPEN_MEMORY ::
-- * This is a memory-based stream.
-- *
-- * FT_OPEN_STREAM ::
-- * Copy the stream from the `stream` field.
-- *
-- * FT_OPEN_PATHNAME ::
-- * Create a new input stream from a C~path name.
-- *
-- * FT_OPEN_DRIVER ::
-- * Use the `driver` field.
-- *
-- * FT_OPEN_PARAMS ::
-- * Use the `num_params` and `params` fields.
-- *
-- * @note:
-- * The `FT_OPEN_MEMORY`, `FT_OPEN_STREAM`, and `FT_OPEN_PATHNAME` flags
-- * are mutually exclusive.
--
-- these constants are deprecated; use the corresponding `FT_OPEN_XXX`
-- values instead
--*************************************************************************
-- *
-- * @struct:
-- * FT_Parameter
-- *
-- * @description:
-- * A simple structure to pass more or less generic parameters to
-- * @FT_Open_Face and @FT_Face_Properties.
-- *
-- * @fields:
-- * tag ::
-- * A four-byte identification tag.
-- *
-- * data ::
-- * A pointer to the parameter data.
-- *
-- * @note:
-- * The ID and function of parameters are driver-specific. See section
-- * @parameter_tags for more information.
--
type FT_Parameter_u is record
tag : aliased fttypes.FT_ULong; -- /usr/include/freetype2/freetype/freetype.h:2041
data : fttypes.FT_Pointer; -- /usr/include/freetype2/freetype/freetype.h:2042
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2039
subtype FT_Parameter is FT_Parameter_u; -- /usr/include/freetype2/freetype/freetype.h:2044
--*************************************************************************
-- *
-- * @struct:
-- * FT_Open_Args
-- *
-- * @description:
-- * A structure to indicate how to open a new font file or stream. A
-- * pointer to such a structure can be used as a parameter for the
-- * functions @FT_Open_Face and @FT_Attach_Stream.
-- *
-- * @fields:
-- * flags ::
-- * A set of bit flags indicating how to use the structure.
-- *
-- * memory_base ::
-- * The first byte of the file in memory.
-- *
-- * memory_size ::
-- * The size in bytes of the file in memory.
-- *
-- * pathname ::
-- * A pointer to an 8-bit file pathname. The pointer is not owned by
-- * FreeType.
-- *
-- * stream ::
-- * A handle to a source stream object.
-- *
-- * driver ::
-- * This field is exclusively used by @FT_Open_Face; it simply specifies
-- * the font driver to use for opening the face. If set to `NULL`,
-- * FreeType tries to load the face with each one of the drivers in its
-- * list.
-- *
-- * num_params ::
-- * The number of extra parameters.
-- *
-- * params ::
-- * Extra parameters passed to the font driver when opening a new face.
-- *
-- * @note:
-- * The stream type is determined by the contents of `flags` that are
-- * tested in the following order by @FT_Open_Face:
-- *
-- * If the @FT_OPEN_MEMORY bit is set, assume that this is a memory file
-- * of `memory_size` bytes, located at `memory_address`. The data are not
-- * copied, and the client is responsible for releasing and destroying
-- * them _after_ the corresponding call to @FT_Done_Face.
-- *
-- * Otherwise, if the @FT_OPEN_STREAM bit is set, assume that a custom
-- * input stream `stream` is used.
-- *
-- * Otherwise, if the @FT_OPEN_PATHNAME bit is set, assume that this is a
-- * normal file and use `pathname` to open it.
-- *
-- * If the @FT_OPEN_DRIVER bit is set, @FT_Open_Face only tries to open
-- * the file with the driver whose handler is in `driver`.
-- *
-- * If the @FT_OPEN_PARAMS bit is set, the parameters given by
-- * `num_params` and `params` is used. They are ignored otherwise.
-- *
-- * Ideally, both the `pathname` and `params` fields should be tagged as
-- * 'const'; this is missing for API backward compatibility. In other
-- * words, applications should treat them as read-only.
--
type FT_Open_Args_u is record
flags : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2113
memory_base : access fttypes.FT_Byte; -- /usr/include/freetype2/freetype/freetype.h:2114
memory_size : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2115
pathname : access fttypes.FT_String; -- /usr/include/freetype2/freetype/freetype.h:2116
stream : ftsystem.FT_Stream; -- /usr/include/freetype2/freetype/freetype.h:2117
driver : FT_Module; -- /usr/include/freetype2/freetype/freetype.h:2118
num_params : aliased fttypes.FT_Int; -- /usr/include/freetype2/freetype/freetype.h:2119
params : access FT_Parameter; -- /usr/include/freetype2/freetype/freetype.h:2120
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2111
subtype FT_Open_Args is FT_Open_Args_u; -- /usr/include/freetype2/freetype/freetype.h:2122
--*************************************************************************
-- *
-- * @function:
-- * FT_New_Face
-- *
-- * @description:
-- * Call @FT_Open_Face to open a font by its pathname.
-- *
-- * @inout:
-- * library ::
-- * A handle to the library resource.
-- *
-- * @input:
-- * pathname ::
-- * A path to the font file.
-- *
-- * face_index ::
-- * See @FT_Open_Face for a detailed description of this parameter.
-- *
-- * @output:
-- * aface ::
-- * A handle to a new face object. If `face_index` is greater than or
-- * equal to zero, it must be non-`NULL`.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * Use @FT_Done_Face to destroy the created @FT_Face object (along with
-- * its slot and sizes).
--
function FT_New_Face
(library : FT_Library;
filepathname : Interfaces.C.Strings.chars_ptr;
face_index : fttypes.FT_Long;
aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2157
with Import => True,
Convention => C,
External_Name => "FT_New_Face";
--*************************************************************************
-- *
-- * @function:
-- * FT_New_Memory_Face
-- *
-- * @description:
-- * Call @FT_Open_Face to open a font that has been loaded into memory.
-- *
-- * @inout:
-- * library ::
-- * A handle to the library resource.
-- *
-- * @input:
-- * file_base ::
-- * A pointer to the beginning of the font data.
-- *
-- * file_size ::
-- * The size of the memory chunk used by the font data.
-- *
-- * face_index ::
-- * See @FT_Open_Face for a detailed description of this parameter.
-- *
-- * @output:
-- * aface ::
-- * A handle to a new face object. If `face_index` is greater than or
-- * equal to zero, it must be non-`NULL`.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * You must not deallocate the memory before calling @FT_Done_Face.
--
function FT_New_Memory_Face
(library : FT_Library;
file_base : access fttypes.FT_Byte;
file_size : fttypes.FT_Long;
face_index : fttypes.FT_Long;
aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2197
with Import => True,
Convention => C,
External_Name => "FT_New_Memory_Face";
--*************************************************************************
-- *
-- * @function:
-- * FT_Open_Face
-- *
-- * @description:
-- * Create a face object from a given resource described by @FT_Open_Args.
-- *
-- * @inout:
-- * library ::
-- * A handle to the library resource.
-- *
-- * @input:
-- * args ::
-- * A pointer to an `FT_Open_Args` structure that must be filled by the
-- * caller.
-- *
-- * face_index ::
-- * This field holds two different values. Bits 0-15 are the index of
-- * the face in the font file (starting with value~0). Set it to~0 if
-- * there is only one face in the font file.
-- *
-- * [Since 2.6.1] Bits 16-30 are relevant to GX and OpenType variation
-- * fonts only, specifying the named instance index for the current face
-- * index (starting with value~1; value~0 makes FreeType ignore named
-- * instances). For non-variation fonts, bits 16-30 are ignored.
-- * Assuming that you want to access the third named instance in face~4,
-- * `face_index` should be set to 0x00030004. If you want to access
-- * face~4 without variation handling, simply set `face_index` to
-- * value~4.
-- *
-- * `FT_Open_Face` and its siblings can be used to quickly check whether
-- * the font format of a given font resource is supported by FreeType.
-- * In general, if the `face_index` argument is negative, the function's
-- * return value is~0 if the font format is recognized, or non-zero
-- * otherwise. The function allocates a more or less empty face handle
-- * in `*aface` (if `aface` isn't `NULL`); the only two useful fields in
-- * this special case are `face->num_faces` and `face->style_flags`.
-- * For any negative value of `face_index`, `face->num_faces` gives the
-- * number of faces within the font file. For the negative value
-- * '-(N+1)' (with 'N' a non-negative 16-bit value), bits 16-30 in
-- * `face->style_flags` give the number of named instances in face 'N'
-- * if we have a variation font (or zero otherwise). After examination,
-- * the returned @FT_Face structure should be deallocated with a call to
-- * @FT_Done_Face.
-- *
-- * @output:
-- * aface ::
-- * A handle to a new face object. If `face_index` is greater than or
-- * equal to zero, it must be non-`NULL`.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * Unlike FreeType 1.x, this function automatically creates a glyph slot
-- * for the face object that can be accessed directly through
-- * `face->glyph`.
-- *
-- * Each new face object created with this function also owns a default
-- * @FT_Size object, accessible as `face->size`.
-- *
-- * One @FT_Library instance can have multiple face objects, this is,
-- * @FT_Open_Face and its siblings can be called multiple times using the
-- * same `library` argument.
-- *
-- * See the discussion of reference counters in the description of
-- * @FT_Reference_Face.
-- *
-- * @example:
-- * To loop over all faces, use code similar to the following snippet
-- * (omitting the error handling).
-- *
-- * ```
-- * ...
-- * FT_Face face;
-- * FT_Long i, num_faces;
-- *
-- *
-- * error = FT_Open_Face( library, args, -1, &face );
-- * if ( error ) { ... }
-- *
-- * num_faces = face->num_faces;
-- * FT_Done_Face( face );
-- *
-- * for ( i = 0; i < num_faces; i++ )
-- * {
-- * ...
-- * error = FT_Open_Face( library, args, i, &face );
-- * ...
-- * FT_Done_Face( face );
-- * ...
-- * }
-- * ```
-- *
-- * To loop over all valid values for `face_index`, use something similar
-- * to the following snippet, again without error handling. The code
-- * accesses all faces immediately (thus only a single call of
-- * `FT_Open_Face` within the do-loop), with and without named instances.
-- *
-- * ```
-- * ...
-- * FT_Face face;
-- *
-- * FT_Long num_faces = 0;
-- * FT_Long num_instances = 0;
-- *
-- * FT_Long face_idx = 0;
-- * FT_Long instance_idx = 0;
-- *
-- *
-- * do
-- * {
-- * FT_Long id = ( instance_idx << 16 ) + face_idx;
-- *
-- *
-- * error = FT_Open_Face( library, args, id, &face );
-- * if ( error ) { ... }
-- *
-- * num_faces = face->num_faces;
-- * num_instances = face->style_flags >> 16;
-- *
-- * ...
-- *
-- * FT_Done_Face( face );
-- *
-- * if ( instance_idx < num_instances )
-- * instance_idx++;
-- * else
-- * {
-- * face_idx++;
-- * instance_idx = 0;
-- * }
-- *
-- * } while ( face_idx < num_faces )
-- * ```
--
function FT_Open_Face
(library : FT_Library;
args : access constant FT_Open_Args;
face_index : fttypes.FT_Long;
aface : System.Address) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2342
with Import => True,
Convention => C,
External_Name => "FT_Open_Face";
--*************************************************************************
-- *
-- * @function:
-- * FT_Attach_File
-- *
-- * @description:
-- * Call @FT_Attach_Stream to attach a file.
-- *
-- * @inout:
-- * face ::
-- * The target face object.
-- *
-- * @input:
-- * filepathname ::
-- * The pathname.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
--
function FT_Attach_File (face : FT_Face; filepathname : Interfaces.C.Strings.chars_ptr) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2368
with Import => True,
Convention => C,
External_Name => "FT_Attach_File";
--*************************************************************************
-- *
-- * @function:
-- * FT_Attach_Stream
-- *
-- * @description:
-- * 'Attach' data to a face object. Normally, this is used to read
-- * additional information for the face object. For example, you can
-- * attach an AFM file that comes with a Type~1 font to get the kerning
-- * values and other metrics.
-- *
-- * @inout:
-- * face ::
-- * The target face object.
-- *
-- * @input:
-- * parameters ::
-- * A pointer to @FT_Open_Args that must be filled by the caller.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * The meaning of the 'attach' (i.e., what really happens when the new
-- * file is read) is not fixed by FreeType itself. It really depends on
-- * the font format (and thus the font driver).
-- *
-- * Client applications are expected to know what they are doing when
-- * invoking this function. Most drivers simply do not implement file or
-- * stream attachments.
--
function FT_Attach_Stream (face : FT_Face; parameters : access FT_Open_Args) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2404
with Import => True,
Convention => C,
External_Name => "FT_Attach_Stream";
--*************************************************************************
-- *
-- * @function:
-- * FT_Reference_Face
-- *
-- * @description:
-- * A counter gets initialized to~1 at the time an @FT_Face structure is
-- * created. This function increments the counter. @FT_Done_Face then
-- * only destroys a face if the counter is~1, otherwise it simply
-- * decrements the counter.
-- *
-- * This function helps in managing life-cycles of structures that
-- * reference @FT_Face objects.
-- *
-- * @input:
-- * face ::
-- * A handle to a target face object.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @since:
-- * 2.4.2
--
function FT_Reference_Face (face : FT_Face) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2433
with Import => True,
Convention => C,
External_Name => "FT_Reference_Face";
--*************************************************************************
-- *
-- * @function:
-- * FT_Done_Face
-- *
-- * @description:
-- * Discard a given face object, as well as all of its child slots and
-- * sizes.
-- *
-- * @input:
-- * face ::
-- * A handle to a target face object.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * See the discussion of reference counters in the description of
-- * @FT_Reference_Face.
--
function FT_Done_Face (face : FT_Face) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2457
with Import => True,
Convention => C,
External_Name => "FT_Done_Face";
--*************************************************************************
-- *
-- * @function:
-- * FT_Select_Size
-- *
-- * @description:
-- * Select a bitmap strike. To be more precise, this function sets the
-- * scaling factors of the active @FT_Size object in a face so that
-- * bitmaps from this particular strike are taken by @FT_Load_Glyph and
-- * friends.
-- *
-- * @inout:
-- * face ::
-- * A handle to a target face object.
-- *
-- * @input:
-- * strike_index ::
-- * The index of the bitmap strike in the `available_sizes` field of
-- * @FT_FaceRec structure.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * For bitmaps embedded in outline fonts it is common that only a subset
-- * of the available glyphs at a given ppem value is available. FreeType
-- * silently uses outlines if there is no bitmap for a given glyph index.
-- *
-- * For GX and OpenType variation fonts, a bitmap strike makes sense only
-- * if the default instance is active (this is, no glyph variation takes
-- * place); otherwise, FreeType simply ignores bitmap strikes. The same
-- * is true for all named instances that are different from the default
-- * instance.
-- *
-- * Don't use this function if you are using the FreeType cache API.
--
function FT_Select_Size (face : FT_Face; strike_index : fttypes.FT_Int) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2497
with Import => True,
Convention => C,
External_Name => "FT_Select_Size";
--*************************************************************************
-- *
-- * @enum:
-- * FT_Size_Request_Type
-- *
-- * @description:
-- * An enumeration type that lists the supported size request types, i.e.,
-- * what input size (in font units) maps to the requested output size (in
-- * pixels, as computed from the arguments of @FT_Size_Request).
-- *
-- * @values:
-- * FT_SIZE_REQUEST_TYPE_NOMINAL ::
-- * The nominal size. The `units_per_EM` field of @FT_FaceRec is used
-- * to determine both scaling values.
-- *
-- * This is the standard scaling found in most applications. In
-- * particular, use this size request type for TrueType fonts if they
-- * provide optical scaling or something similar. Note, however, that
-- * `units_per_EM` is a rather abstract value which bears no relation to
-- * the actual size of the glyphs in a font.
-- *
-- * FT_SIZE_REQUEST_TYPE_REAL_DIM ::
-- * The real dimension. The sum of the `ascender` and (minus of) the
-- * `descender` fields of @FT_FaceRec is used to determine both scaling
-- * values.
-- *
-- * FT_SIZE_REQUEST_TYPE_BBOX ::
-- * The font bounding box. The width and height of the `bbox` field of
-- * @FT_FaceRec are used to determine the horizontal and vertical
-- * scaling value, respectively.
-- *
-- * FT_SIZE_REQUEST_TYPE_CELL ::
-- * The `max_advance_width` field of @FT_FaceRec is used to determine
-- * the horizontal scaling value; the vertical scaling value is
-- * determined the same way as @FT_SIZE_REQUEST_TYPE_REAL_DIM does.
-- * Finally, both scaling values are set to the smaller one. This type
-- * is useful if you want to specify the font size for, say, a window of
-- * a given dimension and 80x24 cells.
-- *
-- * FT_SIZE_REQUEST_TYPE_SCALES ::
-- * Specify the scaling values directly.
-- *
-- * @note:
-- * The above descriptions only apply to scalable formats. For bitmap
-- * formats, the behaviour is up to the driver.
-- *
-- * See the note section of @FT_Size_Metrics if you wonder how size
-- * requesting relates to scaling values.
--
type FT_Size_Request_Type_u is
(FT_SIZE_REQUEST_TYPE_NOMINAL,
FT_SIZE_REQUEST_TYPE_REAL_DIM,
FT_SIZE_REQUEST_TYPE_BBOX,
FT_SIZE_REQUEST_TYPE_CELL,
FT_SIZE_REQUEST_TYPE_SCALES,
FT_SIZE_REQUEST_TYPE_MAX)
with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:2550
subtype FT_Size_Request_Type is FT_Size_Request_Type_u; -- /usr/include/freetype2/freetype/freetype.h:2560
--*************************************************************************
-- *
-- * @struct:
-- * FT_Size_RequestRec
-- *
-- * @description:
-- * A structure to model a size request.
-- *
-- * @fields:
-- * type ::
-- * See @FT_Size_Request_Type.
-- *
-- * width ::
-- * The desired width, given as a 26.6 fractional point value (with 72pt
-- * = 1in).
-- *
-- * height ::
-- * The desired height, given as a 26.6 fractional point value (with
-- * 72pt = 1in).
-- *
-- * horiResolution ::
-- * The horizontal resolution (dpi, i.e., pixels per inch). If set to
-- * zero, `width` is treated as a 26.6 fractional **pixel** value, which
-- * gets internally rounded to an integer.
-- *
-- * vertResolution ::
-- * The vertical resolution (dpi, i.e., pixels per inch). If set to
-- * zero, `height` is treated as a 26.6 fractional **pixel** value,
-- * which gets internally rounded to an integer.
-- *
-- * @note:
-- * If `width` is zero, the horizontal scaling value is set equal to the
-- * vertical scaling value, and vice versa.
-- *
-- * If `type` is `FT_SIZE_REQUEST_TYPE_SCALES`, `width` and `height` are
-- * interpreted directly as 16.16 fractional scaling values, without any
-- * further modification, and both `horiResolution` and `vertResolution`
-- * are ignored.
--
type FT_Size_RequestRec_u is record
c_type : aliased FT_Size_Request_Type; -- /usr/include/freetype2/freetype/freetype.h:2604
width : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2605
height : aliased fttypes.FT_Long; -- /usr/include/freetype2/freetype/freetype.h:2606
horiResolution : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2607
vertResolution : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:2608
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:2602
subtype FT_Size_RequestRec is FT_Size_RequestRec_u; -- /usr/include/freetype2/freetype/freetype.h:2610
--*************************************************************************
-- *
-- * @struct:
-- * FT_Size_Request
-- *
-- * @description:
-- * A handle to a size request structure.
--
type FT_Size_Request is access all FT_Size_RequestRec_u; -- /usr/include/freetype2/freetype/freetype.h:2621
--*************************************************************************
-- *
-- * @function:
-- * FT_Request_Size
-- *
-- * @description:
-- * Resize the scale of the active @FT_Size object in a face.
-- *
-- * @inout:
-- * face ::
-- * A handle to a target face object.
-- *
-- * @input:
-- * req ::
-- * A pointer to a @FT_Size_RequestRec.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * Although drivers may select the bitmap strike matching the request,
-- * you should not rely on this if you intend to select a particular
-- * bitmap strike. Use @FT_Select_Size instead in that case.
-- *
-- * The relation between the requested size and the resulting glyph size
-- * is dependent entirely on how the size is defined in the source face.
-- * The font designer chooses the final size of each glyph relative to
-- * this size. For more information refer to
-- * 'https://www.freetype.org/freetype2/docs/glyphs/glyphs-2.html'.
-- *
-- * Contrary to @FT_Set_Char_Size, this function doesn't have special code
-- * to normalize zero-valued widths, heights, or resolutions (which lead
-- * to errors in most cases).
-- *
-- * Don't use this function if you are using the FreeType cache API.
--
function FT_Request_Size (face : FT_Face; req : FT_Size_Request) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2661
with Import => True,
Convention => C,
External_Name => "FT_Request_Size";
--*************************************************************************
-- *
-- * @function:
-- * FT_Set_Char_Size
-- *
-- * @description:
-- * Call @FT_Request_Size to request the nominal size (in points).
-- *
-- * @inout:
-- * face ::
-- * A handle to a target face object.
-- *
-- * @input:
-- * char_width ::
-- * The nominal width, in 26.6 fractional points.
-- *
-- * char_height ::
-- * The nominal height, in 26.6 fractional points.
-- *
-- * horz_resolution ::
-- * The horizontal resolution in dpi.
-- *
-- * vert_resolution ::
-- * The vertical resolution in dpi.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * While this function allows fractional points as input values, the
-- * resulting ppem value for the given resolution is always rounded to the
-- * nearest integer.
-- *
-- * If either the character width or height is zero, it is set equal to
-- * the other value.
-- *
-- * If either the horizontal or vertical resolution is zero, it is set
-- * equal to the other value.
-- *
-- * A character width or height smaller than 1pt is set to 1pt; if both
-- * resolution values are zero, they are set to 72dpi.
-- *
-- * Don't use this function if you are using the FreeType cache API.
--
function FT_Set_Char_Size
(face : FT_Face;
char_width : fttypes.FT_F26Dot6;
char_height : fttypes.FT_F26Dot6;
horz_resolution : fttypes.FT_UInt;
vert_resolution : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2710
with Import => True,
Convention => C,
External_Name => "FT_Set_Char_Size";
--*************************************************************************
-- *
-- * @function:
-- * FT_Set_Pixel_Sizes
-- *
-- * @description:
-- * Call @FT_Request_Size to request the nominal size (in pixels).
-- *
-- * @inout:
-- * face ::
-- * A handle to the target face object.
-- *
-- * @input:
-- * pixel_width ::
-- * The nominal width, in pixels.
-- *
-- * pixel_height ::
-- * The nominal height, in pixels.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * You should not rely on the resulting glyphs matching or being
-- * constrained to this pixel size. Refer to @FT_Request_Size to
-- * understand how requested sizes relate to actual sizes.
-- *
-- * Don't use this function if you are using the FreeType cache API.
--
function FT_Set_Pixel_Sizes
(face : FT_Face;
pixel_width : fttypes.FT_UInt;
pixel_height : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2747
with Import => True,
Convention => C,
External_Name => "FT_Set_Pixel_Sizes";
--*************************************************************************
-- *
-- * @function:
-- * FT_Load_Glyph
-- *
-- * @description:
-- * Load a glyph into the glyph slot of a face object.
-- *
-- * @inout:
-- * face ::
-- * A handle to the target face object where the glyph is loaded.
-- *
-- * @input:
-- * glyph_index ::
-- * The index of the glyph in the font file. For CID-keyed fonts
-- * (either in PS or in CFF format) this argument specifies the CID
-- * value.
-- *
-- * load_flags ::
-- * A flag indicating what to load for this glyph. The @FT_LOAD_XXX
-- * constants can be used to control the glyph loading process (e.g.,
-- * whether the outline should be scaled, whether to load bitmaps or
-- * not, whether to hint the outline, etc).
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * The loaded glyph may be transformed. See @FT_Set_Transform for the
-- * details.
-- *
-- * For subsetted CID-keyed fonts, `FT_Err_Invalid_Argument` is returned
-- * for invalid CID values (this is, for CID values that don't have a
-- * corresponding glyph in the font). See the discussion of the
-- * @FT_FACE_FLAG_CID_KEYED flag for more details.
-- *
-- * If you receive `FT_Err_Glyph_Too_Big`, try getting the glyph outline
-- * at EM size, then scale it manually and fill it as a graphics
-- * operation.
--
function FT_Load_Glyph
(face : FT_Face;
glyph_index : fttypes.FT_UInt;
load_flags : freetype_config_integer_types.FT_Int32) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2793
with Import => True,
Convention => C,
External_Name => "FT_Load_Glyph";
--*************************************************************************
-- *
-- * @function:
-- * FT_Load_Char
-- *
-- * @description:
-- * Load a glyph into the glyph slot of a face object, accessed by its
-- * character code.
-- *
-- * @inout:
-- * face ::
-- * A handle to a target face object where the glyph is loaded.
-- *
-- * @input:
-- * char_code ::
-- * The glyph's character code, according to the current charmap used in
-- * the face.
-- *
-- * load_flags ::
-- * A flag indicating what to load for this glyph. The @FT_LOAD_XXX
-- * constants can be used to control the glyph loading process (e.g.,
-- * whether the outline should be scaled, whether to load bitmaps or
-- * not, whether to hint the outline, etc).
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * This function simply calls @FT_Get_Char_Index and @FT_Load_Glyph.
-- *
-- * Many fonts contain glyphs that can't be loaded by this function since
-- * its glyph indices are not listed in any of the font's charmaps.
-- *
-- * If no active cmap is set up (i.e., `face->charmap` is zero), the call
-- * to @FT_Get_Char_Index is omitted, and the function behaves identically
-- * to @FT_Load_Glyph.
--
function FT_Load_Char
(face : FT_Face;
char_code : fttypes.FT_ULong;
load_flags : freetype_config_integer_types.FT_Int32) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:2836
with Import => True,
Convention => C,
External_Name => "FT_Load_Char";
--*************************************************************************
-- *
-- * @enum:
-- * FT_LOAD_XXX
-- *
-- * @description:
-- * A list of bit field constants for @FT_Load_Glyph to indicate what kind
-- * of operations to perform during glyph loading.
-- *
-- * @values:
-- * FT_LOAD_DEFAULT ::
-- * Corresponding to~0, this value is used as the default glyph load
-- * operation. In this case, the following happens:
-- *
-- * 1. FreeType looks for a bitmap for the glyph corresponding to the
-- * face's current size. If one is found, the function returns. The
-- * bitmap data can be accessed from the glyph slot (see note below).
-- *
-- * 2. If no embedded bitmap is searched for or found, FreeType looks
-- * for a scalable outline. If one is found, it is loaded from the font
-- * file, scaled to device pixels, then 'hinted' to the pixel grid in
-- * order to optimize it. The outline data can be accessed from the
-- * glyph slot (see note below).
-- *
-- * Note that by default the glyph loader doesn't render outlines into
-- * bitmaps. The following flags are used to modify this default
-- * behaviour to more specific and useful cases.
-- *
-- * FT_LOAD_NO_SCALE ::
-- * Don't scale the loaded outline glyph but keep it in font units.
-- *
-- * This flag implies @FT_LOAD_NO_HINTING and @FT_LOAD_NO_BITMAP, and
-- * unsets @FT_LOAD_RENDER.
-- *
-- * If the font is 'tricky' (see @FT_FACE_FLAG_TRICKY for more), using
-- * `FT_LOAD_NO_SCALE` usually yields meaningless outlines because the
-- * subglyphs must be scaled and positioned with hinting instructions.
-- * This can be solved by loading the font without `FT_LOAD_NO_SCALE`
-- * and setting the character size to `font->units_per_EM`.
-- *
-- * FT_LOAD_NO_HINTING ::
-- * Disable hinting. This generally generates 'blurrier' bitmap glyphs
-- * when the glyph are rendered in any of the anti-aliased modes. See
-- * also the note below.
-- *
-- * This flag is implied by @FT_LOAD_NO_SCALE.
-- *
-- * FT_LOAD_RENDER ::
-- * Call @FT_Render_Glyph after the glyph is loaded. By default, the
-- * glyph is rendered in @FT_RENDER_MODE_NORMAL mode. This can be
-- * overridden by @FT_LOAD_TARGET_XXX or @FT_LOAD_MONOCHROME.
-- *
-- * This flag is unset by @FT_LOAD_NO_SCALE.
-- *
-- * FT_LOAD_NO_BITMAP ::
-- * Ignore bitmap strikes when loading. Bitmap-only fonts ignore this
-- * flag.
-- *
-- * @FT_LOAD_NO_SCALE always sets this flag.
-- *
-- * FT_LOAD_VERTICAL_LAYOUT ::
-- * Load the glyph for vertical text layout. In particular, the
-- * `advance` value in the @FT_GlyphSlotRec structure is set to the
-- * `vertAdvance` value of the `metrics` field.
-- *
-- * In case @FT_HAS_VERTICAL doesn't return true, you shouldn't use this
-- * flag currently. Reason is that in this case vertical metrics get
-- * synthesized, and those values are not always consistent across
-- * various font formats.
-- *
-- * FT_LOAD_FORCE_AUTOHINT ::
-- * Prefer the auto-hinter over the font's native hinter. See also the
-- * note below.
-- *
-- * FT_LOAD_PEDANTIC ::
-- * Make the font driver perform pedantic verifications during glyph
-- * loading and hinting. This is mostly used to detect broken glyphs in
-- * fonts. By default, FreeType tries to handle broken fonts also.
-- *
-- * In particular, errors from the TrueType bytecode engine are not
-- * passed to the application if this flag is not set; this might result
-- * in partially hinted or distorted glyphs in case a glyph's bytecode
-- * is buggy.
-- *
-- * FT_LOAD_NO_RECURSE ::
-- * Don't load composite glyphs recursively. Instead, the font driver
-- * fills the `num_subglyph` and `subglyphs` values of the glyph slot;
-- * it also sets `glyph->format` to @FT_GLYPH_FORMAT_COMPOSITE. The
-- * description of subglyphs can then be accessed with
-- * @FT_Get_SubGlyph_Info.
-- *
-- * Don't use this flag for retrieving metrics information since some
-- * font drivers only return rudimentary data.
-- *
-- * This flag implies @FT_LOAD_NO_SCALE and @FT_LOAD_IGNORE_TRANSFORM.
-- *
-- * FT_LOAD_IGNORE_TRANSFORM ::
-- * Ignore the transform matrix set by @FT_Set_Transform.
-- *
-- * FT_LOAD_MONOCHROME ::
-- * This flag is used with @FT_LOAD_RENDER to indicate that you want to
-- * render an outline glyph to a 1-bit monochrome bitmap glyph, with
-- * 8~pixels packed into each byte of the bitmap data.
-- *
-- * Note that this has no effect on the hinting algorithm used. You
-- * should rather use @FT_LOAD_TARGET_MONO so that the
-- * monochrome-optimized hinting algorithm is used.
-- *
-- * FT_LOAD_LINEAR_DESIGN ::
-- * Keep `linearHoriAdvance` and `linearVertAdvance` fields of
-- * @FT_GlyphSlotRec in font units. See @FT_GlyphSlotRec for details.
-- *
-- * FT_LOAD_NO_AUTOHINT ::
-- * Disable the auto-hinter. See also the note below.
-- *
-- * FT_LOAD_COLOR ::
-- * Load colored glyphs. There are slight differences depending on the
-- * font format.
-- *
-- * [Since 2.5] Load embedded color bitmap images. The resulting color
-- * bitmaps, if available, will have the @FT_PIXEL_MODE_BGRA format,
-- * with pre-multiplied color channels. If the flag is not set and
-- * color bitmaps are found, they are converted to 256-level gray
-- * bitmaps, using the @FT_PIXEL_MODE_GRAY format.
-- *
-- * [Since 2.10, experimental] If the glyph index contains an entry in
-- * the face's 'COLR' table with a 'CPAL' palette table (as defined in
-- * the OpenType specification), make @FT_Render_Glyph provide a default
-- * blending of the color glyph layers associated with the glyph index,
-- * using the same bitmap format as embedded color bitmap images. This
-- * is mainly for convenience; for full control of color layers use
-- * @FT_Get_Color_Glyph_Layer and FreeType's color functions like
-- * @FT_Palette_Select instead of setting @FT_LOAD_COLOR for rendering
-- * so that the client application can handle blending by itself.
-- *
-- * FT_LOAD_COMPUTE_METRICS ::
-- * [Since 2.6.1] Compute glyph metrics from the glyph data, without the
-- * use of bundled metrics tables (for example, the 'hdmx' table in
-- * TrueType fonts). This flag is mainly used by font validating or
-- * font editing applications, which need to ignore, verify, or edit
-- * those tables.
-- *
-- * Currently, this flag is only implemented for TrueType fonts.
-- *
-- * FT_LOAD_BITMAP_METRICS_ONLY ::
-- * [Since 2.7.1] Request loading of the metrics and bitmap image
-- * information of a (possibly embedded) bitmap glyph without allocating
-- * or copying the bitmap image data itself. No effect if the target
-- * glyph is not a bitmap image.
-- *
-- * This flag unsets @FT_LOAD_RENDER.
-- *
-- * FT_LOAD_CROP_BITMAP ::
-- * Ignored. Deprecated.
-- *
-- * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ::
-- * Ignored. Deprecated.
-- *
-- * @note:
-- * By default, hinting is enabled and the font's native hinter (see
-- * @FT_FACE_FLAG_HINTER) is preferred over the auto-hinter. You can
-- * disable hinting by setting @FT_LOAD_NO_HINTING or change the
-- * precedence by setting @FT_LOAD_FORCE_AUTOHINT. You can also set
-- * @FT_LOAD_NO_AUTOHINT in case you don't want the auto-hinter to be used
-- * at all.
-- *
-- * See the description of @FT_FACE_FLAG_TRICKY for a special exception
-- * (affecting only a handful of Asian fonts).
-- *
-- * Besides deciding which hinter to use, you can also decide which
-- * hinting algorithm to use. See @FT_LOAD_TARGET_XXX for details.
-- *
-- * Note that the auto-hinter needs a valid Unicode cmap (either a native
-- * one or synthesized by FreeType) for producing correct results. If a
-- * font provides an incorrect mapping (for example, assigning the
-- * character code U+005A, LATIN CAPITAL LETTER~Z, to a glyph depicting a
-- * mathematical integral sign), the auto-hinter might produce useless
-- * results.
-- *
--
-- Bits 16-19 are used by `FT_LOAD_TARGET_`
--
-- used internally only by certain font drivers
--*************************************************************************
-- *
-- * @enum:
-- * FT_LOAD_TARGET_XXX
-- *
-- * @description:
-- * A list of values to select a specific hinting algorithm for the
-- * hinter. You should OR one of these values to your `load_flags` when
-- * calling @FT_Load_Glyph.
-- *
-- * Note that a font's native hinters may ignore the hinting algorithm you
-- * have specified (e.g., the TrueType bytecode interpreter). You can set
-- * @FT_LOAD_FORCE_AUTOHINT to ensure that the auto-hinter is used.
-- *
-- * @values:
-- * FT_LOAD_TARGET_NORMAL ::
-- * The default hinting algorithm, optimized for standard gray-level
-- * rendering. For monochrome output, use @FT_LOAD_TARGET_MONO instead.
-- *
-- * FT_LOAD_TARGET_LIGHT ::
-- * A lighter hinting algorithm for gray-level modes. Many generated
-- * glyphs are fuzzier but better resemble their original shape. This
-- * is achieved by snapping glyphs to the pixel grid only vertically
-- * (Y-axis), as is done by FreeType's new CFF engine or Microsoft's
-- * ClearType font renderer. This preserves inter-glyph spacing in
-- * horizontal text. The snapping is done either by the native font
-- * driver, if the driver itself and the font support it, or by the
-- * auto-hinter.
-- *
-- * Advance widths are rounded to integer values; however, using the
-- * `lsb_delta` and `rsb_delta` fields of @FT_GlyphSlotRec, it is
-- * possible to get fractional advance widths for subpixel positioning
-- * (which is recommended to use).
-- *
-- * If configuration option `AF_CONFIG_OPTION_TT_SIZE_METRICS` is
-- * active, TrueType-like metrics are used to make this mode behave
-- * similarly as in unpatched FreeType versions between 2.4.6 and 2.7.1
-- * (inclusive).
-- *
-- * FT_LOAD_TARGET_MONO ::
-- * Strong hinting algorithm that should only be used for monochrome
-- * output. The result is probably unpleasant if the glyph is rendered
-- * in non-monochrome modes.
-- *
-- * Note that for outline fonts only the TrueType font driver has proper
-- * monochrome hinting support, provided the TTFs contain hints for B/W
-- * rendering (which most fonts no longer provide). If these conditions
-- * are not met it is very likely that you get ugly results at smaller
-- * sizes.
-- *
-- * FT_LOAD_TARGET_LCD ::
-- * A variant of @FT_LOAD_TARGET_LIGHT optimized for horizontally
-- * decimated LCD displays.
-- *
-- * FT_LOAD_TARGET_LCD_V ::
-- * A variant of @FT_LOAD_TARGET_NORMAL optimized for vertically
-- * decimated LCD displays.
-- *
-- * @note:
-- * You should use only _one_ of the `FT_LOAD_TARGET_XXX` values in your
-- * `load_flags`. They can't be ORed.
-- *
-- * If @FT_LOAD_RENDER is also set, the glyph is rendered in the
-- * corresponding mode (i.e., the mode that matches the used algorithm
-- * best). An exception is `FT_LOAD_TARGET_MONO` since it implies
-- * @FT_LOAD_MONOCHROME.
-- *
-- * You can use a hinting algorithm that doesn't correspond to the same
-- * rendering mode. As an example, it is possible to use the 'light'
-- * hinting algorithm and have the results rendered in horizontal LCD
-- * pixel mode, with code like
-- *
-- * ```
-- * FT_Load_Glyph( face, glyph_index,
-- * load_flags | FT_LOAD_TARGET_LIGHT );
-- *
-- * FT_Render_Glyph( face->glyph, FT_RENDER_MODE_LCD );
-- * ```
-- *
-- * In general, you should stick with one rendering mode. For example,
-- * switching between @FT_LOAD_TARGET_NORMAL and @FT_LOAD_TARGET_MONO
-- * enforces a lot of recomputation for TrueType fonts, which is slow.
-- * Another reason is caching: Selecting a different mode usually causes
-- * changes in both the outlines and the rasterized bitmaps; it is thus
-- * necessary to empty the cache after a mode switch to avoid false hits.
-- *
--
--*************************************************************************
-- *
-- * @macro:
-- * FT_LOAD_TARGET_MODE
-- *
-- * @description:
-- * Return the @FT_Render_Mode corresponding to a given
-- * @FT_LOAD_TARGET_XXX value.
-- *
--
--*************************************************************************
-- *
-- * @function:
-- * FT_Set_Transform
-- *
-- * @description:
-- * Set the transformation that is applied to glyph images when they are
-- * loaded into a glyph slot through @FT_Load_Glyph.
-- *
-- * @inout:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @input:
-- * matrix ::
-- * A pointer to the transformation's 2x2 matrix. Use `NULL` for the
-- * identity matrix.
-- * delta ::
-- * A pointer to the translation vector. Use `NULL` for the null vector.
-- *
-- * @note:
-- * This function is provided as a convenience, but keep in mind that
-- * @FT_Matrix coefficients are only 16.16 fixed point values, which can
-- * limit the accuracy of the results. Using floating-point computations
-- * to perform the transform directly in client code instead will always
-- * yield better numbers.
-- *
-- * The transformation is only applied to scalable image formats after the
-- * glyph has been loaded. It means that hinting is unaltered by the
-- * transformation and is performed on the character size given in the
-- * last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes.
-- *
-- * Note that this also transforms the `face.glyph.advance` field, but
-- * **not** the values in `face.glyph.metrics`.
--
procedure FT_Set_Transform
(face : FT_Face;
matrix : access fttypes.FT_Matrix;
c_delta : access ftimage.FT_Vector) -- /usr/include/freetype2/freetype/freetype.h:3193
with Import => True,
Convention => C,
External_Name => "FT_Set_Transform";
--*************************************************************************
-- *
-- * @enum:
-- * FT_Render_Mode
-- *
-- * @description:
-- * Render modes supported by FreeType~2. Each mode corresponds to a
-- * specific type of scanline conversion performed on the outline.
-- *
-- * For bitmap fonts and embedded bitmaps the `bitmap->pixel_mode` field
-- * in the @FT_GlyphSlotRec structure gives the format of the returned
-- * bitmap.
-- *
-- * All modes except @FT_RENDER_MODE_MONO use 256 levels of opacity,
-- * indicating pixel coverage. Use linear alpha blending and gamma
-- * correction to correctly render non-monochrome glyph bitmaps onto a
-- * surface; see @FT_Render_Glyph.
-- *
-- * @values:
-- * FT_RENDER_MODE_NORMAL ::
-- * Default render mode; it corresponds to 8-bit anti-aliased bitmaps.
-- *
-- * FT_RENDER_MODE_LIGHT ::
-- * This is equivalent to @FT_RENDER_MODE_NORMAL. It is only defined as
-- * a separate value because render modes are also used indirectly to
-- * define hinting algorithm selectors. See @FT_LOAD_TARGET_XXX for
-- * details.
-- *
-- * FT_RENDER_MODE_MONO ::
-- * This mode corresponds to 1-bit bitmaps (with 2~levels of opacity).
-- *
-- * FT_RENDER_MODE_LCD ::
-- * This mode corresponds to horizontal RGB and BGR subpixel displays
-- * like LCD screens. It produces 8-bit bitmaps that are 3~times the
-- * width of the original glyph outline in pixels, and which use the
-- * @FT_PIXEL_MODE_LCD mode.
-- *
-- * FT_RENDER_MODE_LCD_V ::
-- * This mode corresponds to vertical RGB and BGR subpixel displays
-- * (like PDA screens, rotated LCD displays, etc.). It produces 8-bit
-- * bitmaps that are 3~times the height of the original glyph outline in
-- * pixels and use the @FT_PIXEL_MODE_LCD_V mode.
-- *
-- * @note:
-- * The selected render mode only affects vector glyphs of a font.
-- * Embedded bitmaps often have a different pixel mode like
-- * @FT_PIXEL_MODE_MONO. You can use @FT_Bitmap_Convert to transform them
-- * into 8-bit pixmaps.
--
type FT_Render_Mode_u is
(FT_RENDER_MODE_NORMAL,
FT_RENDER_MODE_LIGHT,
FT_RENDER_MODE_MONO,
FT_RENDER_MODE_LCD,
FT_RENDER_MODE_LCD_V,
FT_RENDER_MODE_MAX)
with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:3247
subtype FT_Render_Mode is FT_Render_Mode_u; -- /usr/include/freetype2/freetype/freetype.h:3257
-- these constants are deprecated; use the corresponding
-- `FT_Render_Mode` values instead
--*************************************************************************
-- *
-- * @function:
-- * FT_Render_Glyph
-- *
-- * @description:
-- * Convert a given glyph image to a bitmap. It does so by inspecting the
-- * glyph image format, finding the relevant renderer, and invoking it.
-- *
-- * @inout:
-- * slot ::
-- * A handle to the glyph slot containing the image to convert.
-- *
-- * @input:
-- * render_mode ::
-- * The render mode used to render the glyph image into a bitmap. See
-- * @FT_Render_Mode for a list of possible values.
-- *
-- * If @FT_RENDER_MODE_NORMAL is used, a previous call of @FT_Load_Glyph
-- * with flag @FT_LOAD_COLOR makes FT_Render_Glyph provide a default
-- * blending of colored glyph layers associated with the current glyph
-- * slot (provided the font contains such layers) instead of rendering
-- * the glyph slot's outline. This is an experimental feature; see
-- * @FT_LOAD_COLOR for more information.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * To get meaningful results, font scaling values must be set with
-- * functions like @FT_Set_Char_Size before calling `FT_Render_Glyph`.
-- *
-- * When FreeType outputs a bitmap of a glyph, it really outputs an alpha
-- * coverage map. If a pixel is completely covered by a filled-in
-- * outline, the bitmap contains 0xFF at that pixel, meaning that
-- * 0xFF/0xFF fraction of that pixel is covered, meaning the pixel is 100%
-- * black (or 0% bright). If a pixel is only 50% covered (value 0x80),
-- * the pixel is made 50% black (50% bright or a middle shade of grey).
-- * 0% covered means 0% black (100% bright or white).
-- *
-- * On high-DPI screens like on smartphones and tablets, the pixels are so
-- * small that their chance of being completely covered and therefore
-- * completely black are fairly good. On the low-DPI screens, however,
-- * the situation is different. The pixels are too large for most of the
-- * details of a glyph and shades of gray are the norm rather than the
-- * exception.
-- *
-- * This is relevant because all our screens have a second problem: they
-- * are not linear. 1~+~1 is not~2. Twice the value does not result in
-- * twice the brightness. When a pixel is only 50% covered, the coverage
-- * map says 50% black, and this translates to a pixel value of 128 when
-- * you use 8~bits per channel (0-255). However, this does not translate
-- * to 50% brightness for that pixel on our sRGB and gamma~2.2 screens.
-- * Due to their non-linearity, they dwell longer in the darks and only a
-- * pixel value of about 186 results in 50% brightness -- 128 ends up too
-- * dark on both bright and dark backgrounds. The net result is that dark
-- * text looks burnt-out, pixely and blotchy on bright background, bright
-- * text too frail on dark backgrounds, and colored text on colored
-- * background (for example, red on green) seems to have dark halos or
-- * 'dirt' around it. The situation is especially ugly for diagonal stems
-- * like in 'w' glyph shapes where the quality of FreeType's anti-aliasing
-- * depends on the correct display of grays. On high-DPI screens where
-- * smaller, fully black pixels reign supreme, this doesn't matter, but on
-- * our low-DPI screens with all the gray shades, it does. 0% and 100%
-- * brightness are the same things in linear and non-linear space, just
-- * all the shades in-between aren't.
-- *
-- * The blending function for placing text over a background is
-- *
-- * ```
-- * dst = alpha * src + (1 - alpha) * dst ,
-- * ```
-- *
-- * which is known as the OVER operator.
-- *
-- * To correctly composite an antialiased pixel of a glyph onto a surface,
-- *
-- * 1. take the foreground and background colors (e.g., in sRGB space)
-- * and apply gamma to get them in a linear space,
-- *
-- * 2. use OVER to blend the two linear colors using the glyph pixel
-- * as the alpha value (remember, the glyph bitmap is an alpha coverage
-- * bitmap), and
-- *
-- * 3. apply inverse gamma to the blended pixel and write it back to
-- * the image.
-- *
-- * Internal testing at Adobe found that a target inverse gamma of~1.8 for
-- * step~3 gives good results across a wide range of displays with an sRGB
-- * gamma curve or a similar one.
-- *
-- * This process can cost performance. There is an approximation that
-- * does not need to know about the background color; see
-- * https://bel.fi/alankila/lcd/ and
-- * https://bel.fi/alankila/lcd/alpcor.html for details.
-- *
-- * **ATTENTION**: Linear blending is even more important when dealing
-- * with subpixel-rendered glyphs to prevent color-fringing! A
-- * subpixel-rendered glyph must first be filtered with a filter that
-- * gives equal weight to the three color primaries and does not exceed a
-- * sum of 0x100, see section @lcd_rendering. Then the only difference to
-- * gray linear blending is that subpixel-rendered linear blending is done
-- * 3~times per pixel: red foreground subpixel to red background subpixel
-- * and so on for green and blue.
--
function FT_Render_Glyph (slot : FT_GlyphSlot; render_mode : FT_Render_Mode) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3372
with Import => True,
Convention => C,
External_Name => "FT_Render_Glyph";
--*************************************************************************
-- *
-- * @enum:
-- * FT_Kerning_Mode
-- *
-- * @description:
-- * An enumeration to specify the format of kerning values returned by
-- * @FT_Get_Kerning.
-- *
-- * @values:
-- * FT_KERNING_DEFAULT ::
-- * Return grid-fitted kerning distances in 26.6 fractional pixels.
-- *
-- * FT_KERNING_UNFITTED ::
-- * Return un-grid-fitted kerning distances in 26.6 fractional pixels.
-- *
-- * FT_KERNING_UNSCALED ::
-- * Return the kerning vector in original font units.
-- *
-- * @note:
-- * `FT_KERNING_DEFAULT` returns full pixel values; it also makes FreeType
-- * heuristically scale down kerning distances at small ppem values so
-- * that they don't become too big.
-- *
-- * Both `FT_KERNING_DEFAULT` and `FT_KERNING_UNFITTED` use the current
-- * horizontal scaling factor (as set e.g. with @FT_Set_Char_Size) to
-- * convert font units to pixels.
--
type FT_Kerning_Mode_u is
(FT_KERNING_DEFAULT,
FT_KERNING_UNFITTED,
FT_KERNING_UNSCALED)
with Convention => C; -- /usr/include/freetype2/freetype/freetype.h:3404
subtype FT_Kerning_Mode is FT_Kerning_Mode_u; -- /usr/include/freetype2/freetype/freetype.h:3410
-- these constants are deprecated; use the corresponding
-- `FT_Kerning_Mode` values instead
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Kerning
-- *
-- * @description:
-- * Return the kerning vector between two glyphs of the same face.
-- *
-- * @input:
-- * face ::
-- * A handle to a source face object.
-- *
-- * left_glyph ::
-- * The index of the left glyph in the kern pair.
-- *
-- * right_glyph ::
-- * The index of the right glyph in the kern pair.
-- *
-- * kern_mode ::
-- * See @FT_Kerning_Mode for more information. Determines the scale and
-- * dimension of the returned kerning vector.
-- *
-- * @output:
-- * akerning ::
-- * The kerning vector. This is either in font units, fractional pixels
-- * (26.6 format), or pixels for scalable formats, and in pixels for
-- * fixed-sizes formats.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * Only horizontal layouts (left-to-right & right-to-left) are supported
-- * by this method. Other layouts, or more sophisticated kernings, are
-- * out of the scope of this API function -- they can be implemented
-- * through format-specific interfaces.
-- *
-- * Kerning for OpenType fonts implemented in a 'GPOS' table is not
-- * supported; use @FT_HAS_KERNING to find out whether a font has data
-- * that can be extracted with `FT_Get_Kerning`.
--
function FT_Get_Kerning
(face : FT_Face;
left_glyph : fttypes.FT_UInt;
right_glyph : fttypes.FT_UInt;
kern_mode : fttypes.FT_UInt;
akerning : access ftimage.FT_Vector) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3462
with Import => True,
Convention => C,
External_Name => "FT_Get_Kerning";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Track_Kerning
-- *
-- * @description:
-- * Return the track kerning for a given face object at a given size.
-- *
-- * @input:
-- * face ::
-- * A handle to a source face object.
-- *
-- * point_size ::
-- * The point size in 16.16 fractional points.
-- *
-- * degree ::
-- * The degree of tightness. Increasingly negative values represent
-- * tighter track kerning, while increasingly positive values represent
-- * looser track kerning. Value zero means no track kerning.
-- *
-- * @output:
-- * akerning ::
-- * The kerning in 16.16 fractional points, to be uniformly applied
-- * between all glyphs.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * Currently, only the Type~1 font driver supports track kerning, using
-- * data from AFM files (if attached with @FT_Attach_File or
-- * @FT_Attach_Stream).
-- *
-- * Only very few AFM files come with track kerning data; please refer to
-- * Adobe's AFM specification for more details.
--
function FT_Get_Track_Kerning
(face : FT_Face;
point_size : fttypes.FT_Fixed;
degree : fttypes.FT_Int;
akerning : access fttypes.FT_Fixed) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3506
with Import => True,
Convention => C,
External_Name => "FT_Get_Track_Kerning";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Glyph_Name
-- *
-- * @description:
-- * Retrieve the ASCII name of a given glyph in a face. This only works
-- * for those faces where @FT_HAS_GLYPH_NAMES(face) returns~1.
-- *
-- * @input:
-- * face ::
-- * A handle to a source face object.
-- *
-- * glyph_index ::
-- * The glyph index.
-- *
-- * buffer_max ::
-- * The maximum number of bytes available in the buffer.
-- *
-- * @output:
-- * buffer ::
-- * A pointer to a target buffer where the name is copied to.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * An error is returned if the face doesn't provide glyph names or if the
-- * glyph index is invalid. In all cases of failure, the first byte of
-- * `buffer` is set to~0 to indicate an empty name.
-- *
-- * The glyph name is truncated to fit within the buffer if it is too
-- * long. The returned string is always zero-terminated.
-- *
-- * Be aware that FreeType reorders glyph indices internally so that glyph
-- * index~0 always corresponds to the 'missing glyph' (called '.notdef').
-- *
-- * This function always returns an error if the config macro
-- * `FT_CONFIG_OPTION_NO_GLYPH_NAMES` is not defined in `ftoption.h`.
--
function FT_Get_Glyph_Name
(face : FT_Face;
glyph_index : fttypes.FT_UInt;
buffer : fttypes.FT_Pointer;
buffer_max : fttypes.FT_UInt) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3553
with Import => True,
Convention => C,
External_Name => "FT_Get_Glyph_Name";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Postscript_Name
-- *
-- * @description:
-- * Retrieve the ASCII PostScript name of a given face, if available.
-- * This only works with PostScript, TrueType, and OpenType fonts.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @return:
-- * A pointer to the face's PostScript name. `NULL` if unavailable.
-- *
-- * @note:
-- * The returned pointer is owned by the face and is destroyed with it.
-- *
-- * For variation fonts, this string changes if you select a different
-- * instance, and you have to call `FT_Get_PostScript_Name` again to
-- * retrieve it. FreeType follows Adobe TechNote #5902, 'Generating
-- * PostScript Names for Fonts Using OpenType Font Variations'.
-- *
-- * https://download.macromedia.com/pub/developer/opentype/tech-notes/5902.AdobePSNameGeneration.html
-- *
-- * [Since 2.9] Special PostScript names for named instances are only
-- * returned if the named instance is set with @FT_Set_Named_Instance (and
-- * the font has corresponding entries in its 'fvar' table). If
-- * @FT_IS_VARIATION returns true, the algorithmically derived PostScript
-- * name is provided, not looking up special entries for named instances.
--
function FT_Get_Postscript_Name (face : FT_Face) return Interfaces.C.Strings.chars_ptr -- /usr/include/freetype2/freetype/freetype.h:3592
with Import => True,
Convention => C,
External_Name => "FT_Get_Postscript_Name";
--*************************************************************************
-- *
-- * @function:
-- * FT_Select_Charmap
-- *
-- * @description:
-- * Select a given charmap by its encoding tag (as listed in
-- * `freetype.h`).
-- *
-- * @inout:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @input:
-- * encoding ::
-- * A handle to the selected encoding.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * This function returns an error if no charmap in the face corresponds
-- * to the encoding queried here.
-- *
-- * Because many fonts contain more than a single cmap for Unicode
-- * encoding, this function has some special code to select the one that
-- * covers Unicode best ('best' in the sense that a UCS-4 cmap is
-- * preferred to a UCS-2 cmap). It is thus preferable to @FT_Set_Charmap
-- * in this case.
--
function FT_Select_Charmap (face : FT_Face; encoding : FT_Encoding) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3626
with Import => True,
Convention => C,
External_Name => "FT_Select_Charmap";
--*************************************************************************
-- *
-- * @function:
-- * FT_Set_Charmap
-- *
-- * @description:
-- * Select a given charmap for character code to glyph index mapping.
-- *
-- * @inout:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @input:
-- * charmap ::
-- * A handle to the selected charmap.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * This function returns an error if the charmap is not part of the face
-- * (i.e., if it is not listed in the `face->charmaps` table).
-- *
-- * It also fails if an OpenType type~14 charmap is selected (which
-- * doesn't map character codes to glyph indices at all).
--
function FT_Set_Charmap (face : FT_Face; charmap : FT_CharMap) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3657
with Import => True,
Convention => C,
External_Name => "FT_Set_Charmap";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Charmap_Index
-- *
-- * @description:
-- * Retrieve index of a given charmap.
-- *
-- * @input:
-- * charmap ::
-- * A handle to a charmap.
-- *
-- * @return:
-- * The index into the array of character maps within the face to which
-- * `charmap` belongs. If an error occurs, -1 is returned.
-- *
--
function FT_Get_Charmap_Index (charmap : FT_CharMap) return fttypes.FT_Int -- /usr/include/freetype2/freetype/freetype.h:3679
with Import => True,
Convention => C,
External_Name => "FT_Get_Charmap_Index";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Char_Index
-- *
-- * @description:
-- * Return the glyph index of a given character code. This function uses
-- * the currently selected charmap to do the mapping.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * charcode ::
-- * The character code.
-- *
-- * @return:
-- * The glyph index. 0~means 'undefined character code'.
-- *
-- * @note:
-- * If you use FreeType to manipulate the contents of font files directly,
-- * be aware that the glyph index returned by this function doesn't always
-- * correspond to the internal indices used within the file. This is done
-- * to ensure that value~0 always corresponds to the 'missing glyph'. If
-- * the first glyph is not named '.notdef', then for Type~1 and Type~42
-- * fonts, '.notdef' will be moved into the glyph ID~0 position, and
-- * whatever was there will be moved to the position '.notdef' had. For
-- * Type~1 fonts, if there is no '.notdef' glyph at all, then one will be
-- * created at index~0 and whatever was there will be moved to the last
-- * index -- Type~42 fonts are considered invalid under this condition.
--
function FT_Get_Char_Index (face : FT_Face; charcode : fttypes.FT_ULong) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:3714
with Import => True,
Convention => C,
External_Name => "FT_Get_Char_Index";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_First_Char
-- *
-- * @description:
-- * Return the first character code in the current charmap of a given
-- * face, together with its corresponding glyph index.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @output:
-- * agindex ::
-- * Glyph index of first character code. 0~if charmap is empty.
-- *
-- * @return:
-- * The charmap's first character code.
-- *
-- * @note:
-- * You should use this function together with @FT_Get_Next_Char to parse
-- * all character codes available in a given charmap. The code should
-- * look like this:
-- *
-- * ```
-- * FT_ULong charcode;
-- * FT_UInt gindex;
-- *
-- *
-- * charcode = FT_Get_First_Char( face, &gindex );
-- * while ( gindex != 0 )
-- * {
-- * ... do something with (charcode,gindex) pair ...
-- *
-- * charcode = FT_Get_Next_Char( face, charcode, &gindex );
-- * }
-- * ```
-- *
-- * Be aware that character codes can have values up to 0xFFFFFFFF; this
-- * might happen for non-Unicode or malformed cmaps. However, even with
-- * regular Unicode encoding, so-called 'last resort fonts' (using SFNT
-- * cmap format 13, see function @FT_Get_CMap_Format) normally have
-- * entries for all Unicode characters up to 0x1FFFFF, which can cause *a
-- * lot* of iterations.
-- *
-- * Note that `*agindex` is set to~0 if the charmap is empty. The result
-- * itself can be~0 in two cases: if the charmap is empty or if the
-- * value~0 is the first valid character code.
--
function FT_Get_First_Char (face : FT_Face; agindex : access fttypes.FT_UInt) return fttypes.FT_ULong -- /usr/include/freetype2/freetype/freetype.h:3769
with Import => True,
Convention => C,
External_Name => "FT_Get_First_Char";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Next_Char
-- *
-- * @description:
-- * Return the next character code in the current charmap of a given face
-- * following the value `char_code`, as well as the corresponding glyph
-- * index.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * char_code ::
-- * The starting character code.
-- *
-- * @output:
-- * agindex ::
-- * Glyph index of next character code. 0~if charmap is empty.
-- *
-- * @return:
-- * The charmap's next character code.
-- *
-- * @note:
-- * You should use this function with @FT_Get_First_Char to walk over all
-- * character codes available in a given charmap. See the note for that
-- * function for a simple code example.
-- *
-- * Note that `*agindex` is set to~0 when there are no more codes in the
-- * charmap.
--
function FT_Get_Next_Char
(face : FT_Face;
char_code : fttypes.FT_ULong;
agindex : access fttypes.FT_UInt) return fttypes.FT_ULong -- /usr/include/freetype2/freetype/freetype.h:3806
with Import => True,
Convention => C,
External_Name => "FT_Get_Next_Char";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_Properties
-- *
-- * @description:
-- * Set or override certain (library or module-wide) properties on a
-- * face-by-face basis. Useful for finer-grained control and avoiding
-- * locks on shared structures (threads can modify their own faces as they
-- * see fit).
-- *
-- * Contrary to @FT_Property_Set, this function uses @FT_Parameter so that
-- * you can pass multiple properties to the target face in one call. Note
-- * that only a subset of the available properties can be controlled.
-- *
-- * * @FT_PARAM_TAG_STEM_DARKENING (stem darkening, corresponding to the
-- * property `no-stem-darkening` provided by the 'autofit', 'cff',
-- * 'type1', and 't1cid' modules; see @no-stem-darkening).
-- *
-- * * @FT_PARAM_TAG_LCD_FILTER_WEIGHTS (LCD filter weights, corresponding
-- * to function @FT_Library_SetLcdFilterWeights).
-- *
-- * * @FT_PARAM_TAG_RANDOM_SEED (seed value for the CFF, Type~1, and CID
-- * 'random' operator, corresponding to the `random-seed` property
-- * provided by the 'cff', 'type1', and 't1cid' modules; see
-- * @random-seed).
-- *
-- * Pass `NULL` as `data` in @FT_Parameter for a given tag to reset the
-- * option and use the library or module default again.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * num_properties ::
-- * The number of properties that follow.
-- *
-- * properties ::
-- * A handle to an @FT_Parameter array with `num_properties` elements.
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @example:
-- * Here is an example that sets three properties. You must define
-- * `FT_CONFIG_OPTION_SUBPIXEL_RENDERING` to make the LCD filter examples
-- * work.
-- *
-- * ```
-- * FT_Parameter property1;
-- * FT_Bool darken_stems = 1;
-- *
-- * FT_Parameter property2;
-- * FT_LcdFiveTapFilter custom_weight =
-- * { 0x11, 0x44, 0x56, 0x44, 0x11 };
-- *
-- * FT_Parameter property3;
-- * FT_Int32 random_seed = 314159265;
-- *
-- * FT_Parameter properties[3] = { property1,
-- * property2,
-- * property3 };
-- *
-- *
-- * property1.tag = FT_PARAM_TAG_STEM_DARKENING;
-- * property1.data = &darken_stems;
-- *
-- * property2.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
-- * property2.data = custom_weight;
-- *
-- * property3.tag = FT_PARAM_TAG_RANDOM_SEED;
-- * property3.data = &random_seed;
-- *
-- * FT_Face_Properties( face, 3, properties );
-- * ```
-- *
-- * The next example resets a single property to its default value.
-- *
-- * ```
-- * FT_Parameter property;
-- *
-- *
-- * property.tag = FT_PARAM_TAG_LCD_FILTER_WEIGHTS;
-- * property.data = NULL;
-- *
-- * FT_Face_Properties( face, 1, &property );
-- * ```
-- *
-- * @since:
-- * 2.8
-- *
--
function FT_Face_Properties
(face : FT_Face;
num_properties : fttypes.FT_UInt;
properties : access FT_Parameter) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:3904
with Import => True,
Convention => C,
External_Name => "FT_Face_Properties";
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Name_Index
-- *
-- * @description:
-- * Return the glyph index of a given glyph name.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * glyph_name ::
-- * The glyph name.
-- *
-- * @return:
-- * The glyph index. 0~means 'undefined character code'.
--
function FT_Get_Name_Index (face : FT_Face; glyph_name : access fttypes.FT_String) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:3928
with Import => True,
Convention => C,
External_Name => "FT_Get_Name_Index";
--*************************************************************************
-- *
-- * @enum:
-- * FT_SUBGLYPH_FLAG_XXX
-- *
-- * @description:
-- * A list of constants describing subglyphs. Please refer to the 'glyf'
-- * table description in the OpenType specification for the meaning of the
-- * various flags (which get synthesized for non-OpenType subglyphs).
-- *
-- * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description
-- *
-- * @values:
-- * FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS ::
-- * FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ::
-- * FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID ::
-- * FT_SUBGLYPH_FLAG_SCALE ::
-- * FT_SUBGLYPH_FLAG_XY_SCALE ::
-- * FT_SUBGLYPH_FLAG_2X2 ::
-- * FT_SUBGLYPH_FLAG_USE_MY_METRICS ::
-- *
--
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_SubGlyph_Info
-- *
-- * @description:
-- * Retrieve a description of a given subglyph. Only use it if
-- * `glyph->format` is @FT_GLYPH_FORMAT_COMPOSITE; an error is returned
-- * otherwise.
-- *
-- * @input:
-- * glyph ::
-- * The source glyph slot.
-- *
-- * sub_index ::
-- * The index of the subglyph. Must be less than
-- * `glyph->num_subglyphs`.
-- *
-- * @output:
-- * p_index ::
-- * The glyph index of the subglyph.
-- *
-- * p_flags ::
-- * The subglyph flags, see @FT_SUBGLYPH_FLAG_XXX.
-- *
-- * p_arg1 ::
-- * The subglyph's first argument (if any).
-- *
-- * p_arg2 ::
-- * The subglyph's second argument (if any).
-- *
-- * p_transform ::
-- * The subglyph transformation (if any).
-- *
-- * @return:
-- * FreeType error code. 0~means success.
-- *
-- * @note:
-- * The values of `*p_arg1`, `*p_arg2`, and `*p_transform` must be
-- * interpreted depending on the flags returned in `*p_flags`. See the
-- * OpenType specification for details.
-- *
-- * https://docs.microsoft.com/en-us/typography/opentype/spec/glyf#composite-glyph-description
-- *
--
function FT_Get_SubGlyph_Info
(glyph : FT_GlyphSlot;
sub_index : fttypes.FT_UInt;
p_index : access fttypes.FT_Int;
p_flags : access fttypes.FT_UInt;
p_arg1 : access fttypes.FT_Int;
p_arg2 : access fttypes.FT_Int;
p_transform : access fttypes.FT_Matrix) return fttypes.FT_Error -- /usr/include/freetype2/freetype/freetype.h:4009
with Import => True,
Convention => C,
External_Name => "FT_Get_SubGlyph_Info";
--*************************************************************************
-- *
-- * @section:
-- * layer_management
-- *
-- * @title:
-- * Glyph Layer Management
-- *
-- * @abstract:
-- * Retrieving and manipulating OpenType's 'COLR' table data.
-- *
-- * @description:
-- * The functions described here allow access of colored glyph layer data
-- * in OpenType's 'COLR' tables.
--
--*************************************************************************
-- *
-- * @struct:
-- * FT_LayerIterator
-- *
-- * @description:
-- * This iterator object is needed for @FT_Get_Color_Glyph_Layer.
-- *
-- * @fields:
-- * num_layers ::
-- * The number of glyph layers for the requested glyph index. Will be
-- * set by @FT_Get_Color_Glyph_Layer.
-- *
-- * layer ::
-- * The current layer. Will be set by @FT_Get_Color_Glyph_Layer.
-- *
-- * p ::
-- * An opaque pointer into 'COLR' table data. The caller must set this
-- * to `NULL` before the first call of @FT_Get_Color_Glyph_Layer.
--
type FT_LayerIterator_u is record
num_layers : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:4057
layer : aliased fttypes.FT_UInt; -- /usr/include/freetype2/freetype/freetype.h:4058
p : access fttypes.FT_Byte; -- /usr/include/freetype2/freetype/freetype.h:4059
end record
with Convention => C_Pass_By_Copy; -- /usr/include/freetype2/freetype/freetype.h:4055
subtype FT_LayerIterator is FT_LayerIterator_u; -- /usr/include/freetype2/freetype/freetype.h:4061
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_Color_Glyph_Layer
-- *
-- * @description:
-- * This is an interface to the 'COLR' table in OpenType fonts to
-- * iteratively retrieve the colored glyph layers associated with the
-- * current glyph slot.
-- *
-- * https://docs.microsoft.com/en-us/typography/opentype/spec/colr
-- *
-- * The glyph layer data for a given glyph index, if present, provides an
-- * alternative, multi-color glyph representation: Instead of rendering
-- * the outline or bitmap with the given glyph index, glyphs with the
-- * indices and colors returned by this function are rendered layer by
-- * layer.
-- *
-- * The returned elements are ordered in the z~direction from bottom to
-- * top; the 'n'th element should be rendered with the associated palette
-- * color and blended on top of the already rendered layers (elements 0,
-- * 1, ..., n-1).
-- *
-- * @input:
-- * face ::
-- * A handle to the parent face object.
-- *
-- * base_glyph ::
-- * The glyph index the colored glyph layers are associated with.
-- *
-- * @inout:
-- * iterator ::
-- * An @FT_LayerIterator object. For the first call you should set
-- * `iterator->p` to `NULL`. For all following calls, simply use the
-- * same object again.
-- *
-- * @output:
-- * aglyph_index ::
-- * The glyph index of the current layer.
-- *
-- * acolor_index ::
-- * The color index into the font face's color palette of the current
-- * layer. The value 0xFFFF is special; it doesn't reference a palette
-- * entry but indicates that the text foreground color should be used
-- * instead (to be set up by the application outside of FreeType).
-- *
-- * The color palette can be retrieved with @FT_Palette_Select.
-- *
-- * @return:
-- * Value~1 if everything is OK. If there are no more layers (or if there
-- * are no layers at all), value~0 gets returned. In case of an error,
-- * value~0 is returned also.
-- *
-- * @note:
-- * This function is necessary if you want to handle glyph layers by
-- * yourself. In particular, functions that operate with @FT_GlyphRec
-- * objects (like @FT_Get_Glyph or @FT_Glyph_To_Bitmap) don't have access
-- * to this information.
-- *
-- * Note that @FT_Render_Glyph is able to handle colored glyph layers
-- * automatically if the @FT_LOAD_COLOR flag is passed to a previous call
-- * to @FT_Load_Glyph. [This is an experimental feature.]
-- *
-- * @example:
-- * ```
-- * FT_Color* palette;
-- * FT_LayerIterator iterator;
-- *
-- * FT_Bool have_layers;
-- * FT_UInt layer_glyph_index;
-- * FT_UInt layer_color_index;
-- *
-- *
-- * error = FT_Palette_Select( face, palette_index, &palette );
-- * if ( error )
-- * palette = NULL;
-- *
-- * iterator.p = NULL;
-- * have_layers = FT_Get_Color_Glyph_Layer( face,
-- * glyph_index,
-- * &layer_glyph_index,
-- * &layer_color_index,
-- * &iterator );
-- *
-- * if ( palette && have_layers )
-- * {
-- * do
-- * {
-- * FT_Color layer_color;
-- *
-- *
-- * if ( layer_color_index == 0xFFFF )
-- * layer_color = text_foreground_color;
-- * else
-- * layer_color = palette[layer_color_index];
-- *
-- * // Load and render glyph `layer_glyph_index', then
-- * // blend resulting pixmap (using color `layer_color')
-- * // with previously created pixmaps.
-- *
-- * } while ( FT_Get_Color_Glyph_Layer( face,
-- * glyph_index,
-- * &layer_glyph_index,
-- * &layer_color_index,
-- * &iterator ) );
-- * }
-- * ```
--
function FT_Get_Color_Glyph_Layer
(face : FT_Face;
base_glyph : fttypes.FT_UInt;
aglyph_index : access fttypes.FT_UInt;
acolor_index : access fttypes.FT_UInt;
iterator : access FT_LayerIterator) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4173
with Import => True,
Convention => C,
External_Name => "FT_Get_Color_Glyph_Layer";
--*************************************************************************
-- *
-- * @section:
-- * base_interface
-- *
--
--*************************************************************************
-- *
-- * @enum:
-- * FT_FSTYPE_XXX
-- *
-- * @description:
-- * A list of bit flags used in the `fsType` field of the OS/2 table in a
-- * TrueType or OpenType font and the `FSType` entry in a PostScript font.
-- * These bit flags are returned by @FT_Get_FSType_Flags; they inform
-- * client applications of embedding and subsetting restrictions
-- * associated with a font.
-- *
-- * See
-- * https://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/FontPolicies.pdf
-- * for more details.
-- *
-- * @values:
-- * FT_FSTYPE_INSTALLABLE_EMBEDDING ::
-- * Fonts with no fsType bit set may be embedded and permanently
-- * installed on the remote system by an application.
-- *
-- * FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING ::
-- * Fonts that have only this bit set must not be modified, embedded or
-- * exchanged in any manner without first obtaining permission of the
-- * font software copyright owner.
-- *
-- * FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING ::
-- * The font may be embedded and temporarily loaded on the remote
-- * system. Documents containing Preview & Print fonts must be opened
-- * 'read-only'; no edits can be applied to the document.
-- *
-- * FT_FSTYPE_EDITABLE_EMBEDDING ::
-- * The font may be embedded but must only be installed temporarily on
-- * other systems. In contrast to Preview & Print fonts, documents
-- * containing editable fonts may be opened for reading, editing is
-- * permitted, and changes may be saved.
-- *
-- * FT_FSTYPE_NO_SUBSETTING ::
-- * The font may not be subsetted prior to embedding.
-- *
-- * FT_FSTYPE_BITMAP_EMBEDDING_ONLY ::
-- * Only bitmaps contained in the font may be embedded; no outline data
-- * may be embedded. If there are no bitmaps available in the font,
-- * then the font is unembeddable.
-- *
-- * @note:
-- * The flags are ORed together, thus more than a single value can be
-- * returned.
-- *
-- * While the `fsType` flags can indicate that a font may be embedded, a
-- * license with the font vendor may be separately required to use the
-- * font in this way.
--
--*************************************************************************
-- *
-- * @function:
-- * FT_Get_FSType_Flags
-- *
-- * @description:
-- * Return the `fsType` flags for a font.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @return:
-- * The `fsType` flags, see @FT_FSTYPE_XXX.
-- *
-- * @note:
-- * Use this function rather than directly reading the `fs_type` field in
-- * the @PS_FontInfoRec structure, which is only guaranteed to return the
-- * correct results for Type~1 fonts.
-- *
-- * @since:
-- * 2.3.8
--
function FT_Get_FSType_Flags (face : FT_Face) return fttypes.FT_UShort -- /usr/include/freetype2/freetype/freetype.h:4272
with Import => True,
Convention => C,
External_Name => "FT_Get_FSType_Flags";
--*************************************************************************
-- *
-- * @section:
-- * glyph_variants
-- *
-- * @title:
-- * Unicode Variation Sequences
-- *
-- * @abstract:
-- * The FreeType~2 interface to Unicode Variation Sequences (UVS), using
-- * the SFNT cmap format~14.
-- *
-- * @description:
-- * Many characters, especially for CJK scripts, have variant forms. They
-- * are a sort of grey area somewhere between being totally irrelevant and
-- * semantically distinct; for this reason, the Unicode consortium decided
-- * to introduce Variation Sequences (VS), consisting of a Unicode base
-- * character and a variation selector instead of further extending the
-- * already huge number of characters.
-- *
-- * Unicode maintains two different sets, namely 'Standardized Variation
-- * Sequences' and registered 'Ideographic Variation Sequences' (IVS),
-- * collected in the 'Ideographic Variation Database' (IVD).
-- *
-- * https://unicode.org/Public/UCD/latest/ucd/StandardizedVariants.txt
-- * https://unicode.org/reports/tr37/ https://unicode.org/ivd/
-- *
-- * To date (January 2017), the character with the most ideographic
-- * variations is U+9089, having 32 such IVS.
-- *
-- * Three Mongolian Variation Selectors have the values U+180B-U+180D; 256
-- * generic Variation Selectors are encoded in the ranges U+FE00-U+FE0F
-- * and U+E0100-U+E01EF. IVS currently use Variation Selectors from the
-- * range U+E0100-U+E01EF only.
-- *
-- * A VS consists of the base character value followed by a single
-- * Variation Selector. For example, to get the first variation of
-- * U+9089, you have to write the character sequence `U+9089 U+E0100`.
-- *
-- * Adobe and MS decided to support both standardized and ideographic VS
-- * with a new cmap subtable (format~14). It is an odd subtable because
-- * it is not a mapping of input code points to glyphs, but contains lists
-- * of all variations supported by the font.
-- *
-- * A variation may be either 'default' or 'non-default' for a given font.
-- * A default variation is the one you will get for that code point if you
-- * look it up in the standard Unicode cmap. A non-default variation is a
-- * different glyph.
-- *
--
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_GetCharVariantIndex
-- *
-- * @description:
-- * Return the glyph index of a given character code as modified by the
-- * variation selector.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * charcode ::
-- * The character code point in Unicode.
-- *
-- * variantSelector ::
-- * The Unicode code point of the variation selector.
-- *
-- * @return:
-- * The glyph index. 0~means either 'undefined character code', or
-- * 'undefined selector code', or 'no variation selector cmap subtable',
-- * or 'current CharMap is not Unicode'.
-- *
-- * @note:
-- * If you use FreeType to manipulate the contents of font files directly,
-- * be aware that the glyph index returned by this function doesn't always
-- * correspond to the internal indices used within the file. This is done
-- * to ensure that value~0 always corresponds to the 'missing glyph'.
-- *
-- * This function is only meaningful if
-- * a) the font has a variation selector cmap sub table, and
-- * b) the current charmap has a Unicode encoding.
-- *
-- * @since:
-- * 2.3.6
--
function FT_Face_GetCharVariantIndex
(face : FT_Face;
charcode : fttypes.FT_ULong;
variantSelector : fttypes.FT_ULong) return fttypes.FT_UInt -- /usr/include/freetype2/freetype/freetype.h:4365
with Import => True,
Convention => C,
External_Name => "FT_Face_GetCharVariantIndex";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_GetCharVariantIsDefault
-- *
-- * @description:
-- * Check whether this variation of this Unicode character is the one to
-- * be found in the charmap.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * charcode ::
-- * The character codepoint in Unicode.
-- *
-- * variantSelector ::
-- * The Unicode codepoint of the variation selector.
-- *
-- * @return:
-- * 1~if found in the standard (Unicode) cmap, 0~if found in the variation
-- * selector cmap, or -1 if it is not a variation.
-- *
-- * @note:
-- * This function is only meaningful if the font has a variation selector
-- * cmap subtable.
-- *
-- * @since:
-- * 2.3.6
--
function FT_Face_GetCharVariantIsDefault
(face : FT_Face;
charcode : fttypes.FT_ULong;
variantSelector : fttypes.FT_ULong) return fttypes.FT_Int -- /usr/include/freetype2/freetype/freetype.h:4401
with Import => True,
Convention => C,
External_Name => "FT_Face_GetCharVariantIsDefault";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_GetVariantSelectors
-- *
-- * @description:
-- * Return a zero-terminated list of Unicode variation selectors found in
-- * the font.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * @return:
-- * A pointer to an array of selector code points, or `NULL` if there is
-- * no valid variation selector cmap subtable.
-- *
-- * @note:
-- * The last item in the array is~0; the array is owned by the @FT_Face
-- * object but can be overwritten or released on the next call to a
-- * FreeType function.
-- *
-- * @since:
-- * 2.3.6
--
function FT_Face_GetVariantSelectors (face : FT_Face) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4432
with Import => True,
Convention => C,
External_Name => "FT_Face_GetVariantSelectors";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_GetVariantsOfChar
-- *
-- * @description:
-- * Return a zero-terminated list of Unicode variation selectors found for
-- * the specified character code.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * charcode ::
-- * The character codepoint in Unicode.
-- *
-- * @return:
-- * A pointer to an array of variation selector code points that are
-- * active for the given character, or `NULL` if the corresponding list is
-- * empty.
-- *
-- * @note:
-- * The last item in the array is~0; the array is owned by the @FT_Face
-- * object but can be overwritten or released on the next call to a
-- * FreeType function.
-- *
-- * @since:
-- * 2.3.6
--
function FT_Face_GetVariantsOfChar (face : FT_Face; charcode : fttypes.FT_ULong) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4465
with Import => True,
Convention => C,
External_Name => "FT_Face_GetVariantsOfChar";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_GetCharsOfVariant
-- *
-- * @description:
-- * Return a zero-terminated list of Unicode character codes found for the
-- * specified variation selector.
-- *
-- * @input:
-- * face ::
-- * A handle to the source face object.
-- *
-- * variantSelector ::
-- * The variation selector code point in Unicode.
-- *
-- * @return:
-- * A list of all the code points that are specified by this selector
-- * (both default and non-default codes are returned) or `NULL` if there
-- * is no valid cmap or the variation selector is invalid.
-- *
-- * @note:
-- * The last item in the array is~0; the array is owned by the @FT_Face
-- * object but can be overwritten or released on the next call to a
-- * FreeType function.
-- *
-- * @since:
-- * 2.3.6
--
function FT_Face_GetCharsOfVariant (face : FT_Face; variantSelector : fttypes.FT_ULong) return access freetype_config_integer_types.FT_UInt32 -- /usr/include/freetype2/freetype/freetype.h:4499
with Import => True,
Convention => C,
External_Name => "FT_Face_GetCharsOfVariant";
--*************************************************************************
-- *
-- * @section:
-- * computations
-- *
-- * @title:
-- * Computations
-- *
-- * @abstract:
-- * Crunching fixed numbers and vectors.
-- *
-- * @description:
-- * This section contains various functions used to perform computations
-- * on 16.16 fixed-float numbers or 2d vectors.
-- *
-- * **Attention**: Most arithmetic functions take `FT_Long` as arguments.
-- * For historical reasons, FreeType was designed under the assumption
-- * that `FT_Long` is a 32-bit integer; results can thus be undefined if
-- * the arguments don't fit into 32 bits.
-- *
-- * @order:
-- * FT_MulDiv
-- * FT_MulFix
-- * FT_DivFix
-- * FT_RoundFix
-- * FT_CeilFix
-- * FT_FloorFix
-- * FT_Vector_Transform
-- * FT_Matrix_Multiply
-- * FT_Matrix_Invert
-- *
--
--*************************************************************************
-- *
-- * @function:
-- * FT_MulDiv
-- *
-- * @description:
-- * Compute `(a*b)/c` with maximum accuracy, using a 64-bit intermediate
-- * integer whenever necessary.
-- *
-- * This function isn't necessarily as fast as some processor-specific
-- * operations, but is at least completely portable.
-- *
-- * @input:
-- * a ::
-- * The first multiplier.
-- *
-- * b ::
-- * The second multiplier.
-- *
-- * c ::
-- * The divisor.
-- *
-- * @return:
-- * The result of `(a*b)/c`. This function never traps when trying to
-- * divide by zero; it simply returns 'MaxInt' or 'MinInt' depending on
-- * the signs of `a` and `b`.
--
function FT_MulDiv
(a : fttypes.FT_Long;
b : fttypes.FT_Long;
c : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4565
with Import => True,
Convention => C,
External_Name => "FT_MulDiv";
--*************************************************************************
-- *
-- * @function:
-- * FT_MulFix
-- *
-- * @description:
-- * Compute `(a*b)/0x10000` with maximum accuracy. Its main use is to
-- * multiply a given value by a 16.16 fixed-point factor.
-- *
-- * @input:
-- * a ::
-- * The first multiplier.
-- *
-- * b ::
-- * The second multiplier. Use a 16.16 factor here whenever possible
-- * (see note below).
-- *
-- * @return:
-- * The result of `(a*b)/0x10000`.
-- *
-- * @note:
-- * This function has been optimized for the case where the absolute value
-- * of `a` is less than 2048, and `b` is a 16.16 scaling factor. As this
-- * happens mainly when scaling from notional units to fractional pixels
-- * in FreeType, it resulted in noticeable speed improvements between
-- * versions 2.x and 1.x.
-- *
-- * As a conclusion, always try to place a 16.16 factor as the _second_
-- * argument of this function; this can make a great difference.
--
function FT_MulFix (a : fttypes.FT_Long; b : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4601
with Import => True,
Convention => C,
External_Name => "FT_MulFix";
--*************************************************************************
-- *
-- * @function:
-- * FT_DivFix
-- *
-- * @description:
-- * Compute `(a*0x10000)/b` with maximum accuracy. Its main use is to
-- * divide a given value by a 16.16 fixed-point factor.
-- *
-- * @input:
-- * a ::
-- * The numerator.
-- *
-- * b ::
-- * The denominator. Use a 16.16 factor here.
-- *
-- * @return:
-- * The result of `(a*0x10000)/b`.
--
function FT_DivFix (a : fttypes.FT_Long; b : fttypes.FT_Long) return fttypes.FT_Long -- /usr/include/freetype2/freetype/freetype.h:4625
with Import => True,
Convention => C,
External_Name => "FT_DivFix";
--*************************************************************************
-- *
-- * @function:
-- * FT_RoundFix
-- *
-- * @description:
-- * Round a 16.16 fixed number.
-- *
-- * @input:
-- * a ::
-- * The number to be rounded.
-- *
-- * @return:
-- * `a` rounded to the nearest 16.16 fixed integer, halfway cases away
-- * from zero.
-- *
-- * @note:
-- * The function uses wrap-around arithmetic.
--
function FT_RoundFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4649
with Import => True,
Convention => C,
External_Name => "FT_RoundFix";
--*************************************************************************
-- *
-- * @function:
-- * FT_CeilFix
-- *
-- * @description:
-- * Compute the smallest following integer of a 16.16 fixed number.
-- *
-- * @input:
-- * a ::
-- * The number for which the ceiling function is to be computed.
-- *
-- * @return:
-- * `a` rounded towards plus infinity.
-- *
-- * @note:
-- * The function uses wrap-around arithmetic.
--
function FT_CeilFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4671
with Import => True,
Convention => C,
External_Name => "FT_CeilFix";
--*************************************************************************
-- *
-- * @function:
-- * FT_FloorFix
-- *
-- * @description:
-- * Compute the largest previous integer of a 16.16 fixed number.
-- *
-- * @input:
-- * a ::
-- * The number for which the floor function is to be computed.
-- *
-- * @return:
-- * `a` rounded towards minus infinity.
--
function FT_FloorFix (a : fttypes.FT_Fixed) return fttypes.FT_Fixed -- /usr/include/freetype2/freetype/freetype.h:4690
with Import => True,
Convention => C,
External_Name => "FT_FloorFix";
--*************************************************************************
-- *
-- * @function:
-- * FT_Vector_Transform
-- *
-- * @description:
-- * Transform a single vector through a 2x2 matrix.
-- *
-- * @inout:
-- * vector ::
-- * The target vector to transform.
-- *
-- * @input:
-- * matrix ::
-- * A pointer to the source 2x2 matrix.
-- *
-- * @note:
-- * The result is undefined if either `vector` or `matrix` is invalid.
--
procedure FT_Vector_Transform (vector : access ftimage.FT_Vector; matrix : access constant fttypes.FT_Matrix) -- /usr/include/freetype2/freetype/freetype.h:4713
with Import => True,
Convention => C,
External_Name => "FT_Vector_Transform";
--*************************************************************************
-- *
-- * @section:
-- * version
-- *
-- * @title:
-- * FreeType Version
-- *
-- * @abstract:
-- * Functions and macros related to FreeType versions.
-- *
-- * @description:
-- * Note that those functions and macros are of limited use because even a
-- * new release of FreeType with only documentation changes increases the
-- * version number.
-- *
-- * @order:
-- * FT_Library_Version
-- *
-- * FREETYPE_MAJOR
-- * FREETYPE_MINOR
-- * FREETYPE_PATCH
-- *
-- * FT_Face_CheckTrueTypePatents
-- * FT_Face_SetUnpatentedHinting
-- *
--
--*************************************************************************
-- *
-- * @enum:
-- * FREETYPE_XXX
-- *
-- * @description:
-- * These three macros identify the FreeType source code version. Use
-- * @FT_Library_Version to access them at runtime.
-- *
-- * @values:
-- * FREETYPE_MAJOR ::
-- * The major version number.
-- * FREETYPE_MINOR ::
-- * The minor version number.
-- * FREETYPE_PATCH ::
-- * The patch level.
-- *
-- * @note:
-- * The version number of FreeType if built as a dynamic link library with
-- * the 'libtool' package is _not_ controlled by these three macros.
-- *
--
--*************************************************************************
-- *
-- * @function:
-- * FT_Library_Version
-- *
-- * @description:
-- * Return the version of the FreeType library being used. This is useful
-- * when dynamically linking to the library, since one cannot use the
-- * macros @FREETYPE_MAJOR, @FREETYPE_MINOR, and @FREETYPE_PATCH.
-- *
-- * @input:
-- * library ::
-- * A source library handle.
-- *
-- * @output:
-- * amajor ::
-- * The major version number.
-- *
-- * aminor ::
-- * The minor version number.
-- *
-- * apatch ::
-- * The patch version number.
-- *
-- * @note:
-- * The reason why this function takes a `library` argument is because
-- * certain programs implement library initialization in a custom way that
-- * doesn't use @FT_Init_FreeType.
-- *
-- * In such cases, the library version might not be available before the
-- * library object has been created.
--
procedure FT_Library_Version
(library : FT_Library;
amajor : access fttypes.FT_Int;
aminor : access fttypes.FT_Int;
apatch : access fttypes.FT_Int) -- /usr/include/freetype2/freetype/freetype.h:4806
with Import => True,
Convention => C,
External_Name => "FT_Library_Version";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_CheckTrueTypePatents
-- *
-- * @description:
-- * Deprecated, does nothing.
-- *
-- * @input:
-- * face ::
-- * A face handle.
-- *
-- * @return:
-- * Always returns false.
-- *
-- * @note:
-- * Since May 2010, TrueType hinting is no longer patented.
-- *
-- * @since:
-- * 2.3.5
--
function FT_Face_CheckTrueTypePatents (face : FT_Face) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4834
with Import => True,
Convention => C,
External_Name => "FT_Face_CheckTrueTypePatents";
--*************************************************************************
-- *
-- * @function:
-- * FT_Face_SetUnpatentedHinting
-- *
-- * @description:
-- * Deprecated, does nothing.
-- *
-- * @input:
-- * face ::
-- * A face handle.
-- *
-- * value ::
-- * New boolean setting.
-- *
-- * @return:
-- * Always returns false.
-- *
-- * @note:
-- * Since May 2010, TrueType hinting is no longer patented.
-- *
-- * @since:
-- * 2.3.5
--
function FT_Face_SetUnpatentedHinting (face : FT_Face; value : fttypes.FT_Bool) return fttypes.FT_Bool -- /usr/include/freetype2/freetype/freetype.h:4862
with Import => True,
Convention => C,
External_Name => "FT_Face_SetUnpatentedHinting";
--
-- END
end freetype;
|
-- DECLS-DTSIMBOLS.adb
-- Procediments de la taula de simbols
package body Decls.Dtsimbols is
procedure printts
(ts : in tsimbols;
tn : in taula_de_noms) is
begin
New_Line;
Put_Line("");
Put_Line("tdesc ------------");
for i in 1 .. (id_nom'Last-970) loop
Put("tdesc["&i'img&"] := (");
Put(ts.tdesc(i).np'img&", ");
case ts.tdesc(i).d.td is
when dnula => Put("dnula, ");
when dtipus => Put("dtipus, ");
when dvar => Put("dvar, ");
when dproc => Put("dproc, ");
when dconst => Put("dconst, ");
when dargc => Put("dargc, ");
when dcamp => Put("dcamp, ");
end case;
Put(ts.tdesc(i).s'img&") "&cons_nom(tn,i));
New_Line;
end loop;
Put_Line("PROFUNDITAT: "&ts.prof'img);
end printts;
-- VERSIO 1: llenguatge simple sense estructura
-- de blocs estil Fortran.
procedure tbuida
(ts : out tsimbols) is
nul_desc : descrip(dnula);
begin
ts.prof := 1;
ts.tambit(ts.prof) := nul_despl;
for i in 1 .. id_nom'Last loop
ts.tdesc(i) := (nul_nprof, nul_desc,
nul_despl);
end loop;
end tbuida;
procedure posa
(ts : in out tsimbols;
id : in id_nom;
d : in descrip;
e : out boolean) is
idespl : rang_despl;
begin
e := (ts.tdesc(id).np = ts.prof);
if not e then
ts.tambit(ts.prof) := ts.tambit(ts.prof) + 1;
idespl := ts.tambit(ts.prof);
while ts.texp(idespl).np = no_prof loop
idespl:= idespl +1;
ts.tambit(ts.prof) := 1 + ts.tambit(ts.prof);
end loop;
ts.texp(idespl) := (ts.tdesc(id).np,
ts.tdesc(id).d, id, 0);
ts.tdesc(id) := (ts.prof, d, 0);
end if;
end posa;
function cons
(ts : in tsimbols;
id : in id_nom)
return descrip is
begin
return ts.tdesc(id).d;
end cons;
-- VERSIO 2: Normal, llenguatge amb blocs estil
-- Pascal.
procedure Entrabloc
(Ts : in out Tsimbols) is
begin
Ts.Prof := Ts.Prof + 1;
Ts.Tambit(Ts.Prof) := Ts.Tambit(Ts.Prof - 1);
end Entrabloc;
procedure surtbloc
(ts : in out tsimbols;
tn : in taula_de_noms) is
idespl1 : rang_despl;
idespl2 : rang_despl;
id : id_nom;
begin
idespl1 := ts.tambit(ts.prof);
ts.prof := ts.prof - 1;
idespl2 := ts.tambit(ts.prof)+1;
for idespl in reverse idespl2 .. idespl1 loop
if ts.texp(idespl).np > no_prof then
id := ts.texp(idespl).id;
ts.tdesc(id).d := ts.texp(idespl).d;
ts.tdesc(id).np := ts.texp(idespl).np;
ts.tdesc(id).s := ts.texp(idespl).s;
end if;
end loop;
end surtbloc;
-- VERSIO 3: Blocs mes records.
procedure posacamp
(ts : in out tsimbols;
idr : in id_nom;
idc : in id_nom;
d : in descrip;
e : out boolean) is
des : descrip;
td : descriptipus;
p : rang_despl;
itdespl : rang_despl;
begin
des := ts.tdesc(idr).d;
if des.td /= dtipus then e := TRUE; end if;
td := des.dt;
if td.tt /= tsrec then e := TRUE; end if;
p := ts.tdesc(idr).s;
while p /= 0 and then ts.texp(p).id /= idc loop
p := ts.texp(p).s;
end loop;
e := (p /= 0);
if not e then
ts.tambit(ts.prof) := ts.tambit(ts.prof) + 1;
itdespl := ts.tambit(ts.prof);
ts.texp(itdespl) := (no_prof, d, idc,
ts.tdesc(idr).s);
ts.tdesc(idr).s := itdespl;
end if;
end posacamp;
function conscamp
(ts : in tsimbols;
idr : in id_nom;
idc : in id_nom) return descrip is
d : descrip;
td : tdescrip;
p : rang_despl;
descnula : descrip(dnula);
begin
d := ts.tdesc(idr).d;
td := d.td;
p := ts.tdesc(idr).s;
while p /= 0 and then ts.texp(p).id /= idc loop
p := ts.texp(p).s;
end loop;
if p = 0 then
return descnula;
else
return ts.texp(p).d;
end if;
end conscamp;
-- VERSIO 4: Arrays.
procedure posa_idx
(ts : in out tsimbols;
ida : in id_nom;
idi : in id_nom;
e : out boolean) is
d : descrip;
dt : descriptipus;
p : rang_despl;
pp : rang_despl;
idespl : rang_despl;
begin
E := False;
d := ts.tdesc(ida).d;
if d.td /= dtipus then e := TRUE; end if;
dt := d.dt;
if dt.tt /= tsarr then e := TRUE; end if;
p := ts.tdesc(ida).s;
pp := 0;
while p /= 0 loop
pp := p;
p := ts.texp(p).s;
end loop;
ts.tambit(ts.prof) := ts.tambit(ts.prof) + 1;
idespl := ts.tambit(ts.prof);
ts.texp(idespl) := (no_prof, (td => dnula),
idi, 0);
if pp /= 0 then
ts.texp(pp).s := idespl;
else
ts.tdesc(ida).s := idespl;
end if;
end posa_idx;
function primer_idx
(ts : in tsimbols;
ida : in id_nom) return cursor_idx is
begin
return cursor_idx(ts.tdesc(ida).s);
end primer_idx;
function idx_valid
(ci : in cursor_idx) return boolean is
begin
return ci > 0;
end idx_valid;
function succ_idx
(ts : in tsimbols;
ci : in cursor_idx) return cursor_idx is
begin
if idx_valid(ci) then
return cursor_idx(ts.texp(rang_despl(ci)).s);
else
return 0; --Excepcio
end if;
end succ_idx;
function cons_idx
(ts : in tsimbols;
ci : in cursor_idx) return id_nom is
begin
return ts.texp(rang_despl(ci)).id;
end cons_idx;
-- PROCEDIMENTS
procedure posa_arg
(ts : in out tsimbols;
idp : in id_nom;
ida : in id_nom;
da : in descrip;
e : out boolean) is
d : descrip;
p : rang_despl;
pp : rang_despl;
idespl : rang_despl;
begin
e:= false;
d := ts.tdesc(idp).d;
if d.td /= dproc then e := TRUE; end if;
p := ts.tdesc(idp).s;
pp := 0;
while p /= 0 loop
pp := p;
p := ts.texp(p).s;
end loop;
ts.tambit(ts.prof) := ts.tambit(ts.prof) + 1;
idespl := ts.tambit(ts.prof);
ts.texp(idespl) := (no_prof, da, ida, 0);
if pp /= 0 then
ts.texp(pp).s := idespl;
else
ts.tdesc(idp).s := idespl;
end if;
end Posa_Arg;
function Primer_Arg
(Ts : in Tsimbols;
Idp : in Id_Nom) return Cursor_Arg is
begin
return cursor_arg(ts.tdesc(idp).s);
end Primer_Arg;
function Succ_Arg
(ts : in tsimbols;
ca : in cursor_arg) return cursor_arg is
begin
if arg_valid(ca) then
return cursor_arg(ts.texp(rang_despl(ca)).s);
else
return 0; --Excepcio
end if;
end Succ_Arg;
function Arg_Valid
(Ca : in Cursor_Arg) return Boolean is
begin
return Ca > 0;
end Arg_Valid;
procedure cons_arg
(ts : in tsimbols;
ca : in cursor_arg;
ida : out id_nom;
Dn : out Descrip) is
begin
Ida := ts.texp(rang_despl(ca)).id;
Dn := Ts.Texp(Rang_Despl(Ca)).D;
end Cons_Arg;
procedure Actualitza
(Ts : in out Tsimbols;
Id : in Id_Nom;
D : in Descrip) is
begin
Ts.Tdesc(id).D := D;
end Actualitza;
end Decls.Dtsimbols;
|
with
GL;
package openGL.Variable
--
-- Models a shader variable.
--
is
type Item is abstract tagged private;
---------
-- Forge
--
procedure define (Self : in out Item);
procedure destroy (Self : in out Item);
private
type Item is abstract tagged
record
gl_Variable : gl.GLint;
end record;
end openGL.Variable;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . S P E L L I N G _ C H E C K E R _ G E N E R I C --
-- --
-- B o d y --
-- --
-- Copyright (C) 1998-2020, 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. --
-- --
------------------------------------------------------------------------------
pragma Compiler_Unit_Warning;
package body GNAT.Spelling_Checker_Generic is
------------------------
-- Is_Bad_Spelling_Of --
------------------------
function Is_Bad_Spelling_Of
(Found : String_Type;
Expect : String_Type) return Boolean
is
FN : constant Natural := Found'Length;
FF : constant Natural := Found'First;
FL : constant Natural := Found'Last;
EN : constant Natural := Expect'Length;
EF : constant Natural := Expect'First;
EL : constant Natural := Expect'Last;
Letter_o : constant Char_Type := Char_Type'Val (Character'Pos ('o'));
Digit_0 : constant Char_Type := Char_Type'Val (Character'Pos ('0'));
Digit_9 : constant Char_Type := Char_Type'Val (Character'Pos ('9'));
begin
-- If both strings null, then we consider this a match, but if one
-- is null and the other is not, then we definitely do not match
if FN = 0 then
return (EN = 0);
elsif EN = 0 then
return False;
-- If first character does not match, then we consider that this is
-- definitely not a misspelling. An exception is when we expect a
-- letter O and found a zero.
elsif Found (FF) /= Expect (EF)
and then (Found (FF) /= Digit_0 or else Expect (EF) /= Letter_o)
then
return False;
-- Not a bad spelling if both strings are 1-2 characters long
elsif FN < 3 and then EN < 3 then
return False;
-- Lengths match. Execute loop to check for a single error, single
-- transposition or exact match (we only fall through this loop if
-- one of these three conditions is found).
elsif FN = EN then
for J in 1 .. FN - 2 loop
if Expect (EF + J) /= Found (FF + J) then
-- If both mismatched characters are digits, then we do
-- not consider it a misspelling (e.g. B345 is not a
-- misspelling of B346, it is something quite different)
if Expect (EF + J) in Digit_0 .. Digit_9
and then Found (FF + J) in Digit_0 .. Digit_9
then
return False;
elsif Expect (EF + J + 1) = Found (FF + J + 1)
and then Expect (EF + J + 2 .. EL) = Found (FF + J + 2 .. FL)
then
return True;
elsif Expect (EF + J) = Found (FF + J + 1)
and then Expect (EF + J + 1) = Found (FF + J)
and then Expect (EF + J + 2 .. EL) = Found (FF + J + 2 .. FL)
then
return True;
else
return False;
end if;
end if;
end loop;
-- At last character. Test digit case as above, otherwise we
-- have a match since at most this last character fails to match.
if Expect (EL) in Digit_0 .. Digit_9
and then Found (FL) in Digit_0 .. Digit_9
and then Expect (EL) /= Found (FL)
then
return False;
else
return True;
end if;
-- Length is 1 too short. Execute loop to check for single deletion
elsif FN = EN - 1 then
for J in 1 .. FN - 1 loop
if Found (FF + J) /= Expect (EF + J) then
return Found (FF + J .. FL) = Expect (EF + J + 1 .. EL);
end if;
end loop;
-- If we fall through then the last character was missing, which
-- we consider to be a match (e.g. found xyz, expected xyza).
return True;
-- Length is 1 too long. Execute loop to check for single insertion
elsif FN = EN + 1 then
for J in 1 .. EN - 1 loop
if Found (FF + J) /= Expect (EF + J) then
return Found (FF + J + 1 .. FL) = Expect (EF + J .. EL);
end if;
end loop;
-- If we fall through then the last character was an additional
-- character, which is a match (e.g. found xyza, expected xyz).
return True;
-- Length is completely wrong
else
return False;
end if;
end Is_Bad_Spelling_Of;
end GNAT.Spelling_Checker_Generic;
|
-- Taken from #2933 submitted by @koenmeersman
procedure Go is
begin
Loop_Label :
while True loop
declare
procedure Not_Tagged is
begin
null;
end Step_T;
begin
null;
end;
end loop Loop_Label;
end Go;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- A D A . S T R I N G S . W I D E _ F I X E D --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1992,1993,1994 NYU, All Rights Reserved --
-- --
-- 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, 675 Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Wide_Maps;
with Ada.Strings.Wide_Search;
package Ada.Strings.Wide_Fixed is
pragma Preelaborate (Wide_Fixed);
-------------------------------------------------------------------
-- Copy Procedure for Wide_Strings of Possibly Different Lengths --
-------------------------------------------------------------------
procedure Move
(Source : in Wide_String;
Target : out Wide_String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Wide_Character := Ada.Strings.Wide_Space);
------------------------
-- Search Subprograms --
------------------------
-- Note: in this implementation, these search subprograms are in a
-- separate package Ada.Strings.Wide_Search. The declarations are
-- thus replaced by renamings of these routines (which is perfectly valid
-- since it is semantically undetectable that we have renamings here
-- rather than "real" subprogram declarations).
function Index
(Source : in Wide_String;
Pattern : in Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural
renames Ada.Strings.Wide_Search.Index;
function Index
(Source : in Wide_String;
Pattern : in Wide_String;
Going : in Direction := Forward;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function)
return Natural
renames Ada.Strings.Wide_Search.Index;
function Index
(Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward)
return Natural
renames Ada.Strings.Wide_Search.Index;
function Index_Non_Blank
(Source : in Wide_String;
Going : in Direction := Forward)
return Natural
renames Ada.Strings.Wide_Search.Index_Non_Blank;
function Count
(Source : in Wide_String;
Pattern : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping := Wide_Maps.Identity)
return Natural
renames Ada.Strings.Wide_Search.Count;
function Count
(Source : in Wide_String;
Pattern : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function)
return Natural
renames Ada.Strings.Wide_Search.Count;
function Count
(Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set)
return Natural
renames Ada.Strings.Wide_Search.Count;
procedure Find_Token
(Source : in Wide_String;
Set : in Wide_Maps.Wide_Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural)
renames Ada.Strings.Wide_Search.Find_Token;
-----------------------------------------
-- Wide_String Translation Subprograms --
-----------------------------------------
function Translate
(Source : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping)
return Wide_String;
procedure Translate
(Source : in out Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping);
function Translate
(Source : in Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function)
return Wide_String;
procedure Translate
(Source : in out Wide_String;
Mapping : in Wide_Maps.Wide_Character_Mapping_Function);
--------------------------------------------
-- Wide_String Transformation Subprograms --
--------------------------------------------
function Replace_Slice
(Source : in Wide_String;
Low : in Positive;
High : in Natural;
By : in Wide_String)
return Wide_String;
procedure Replace_Slice
(Source : in out Wide_String;
Low : in Positive;
High : in Natural;
By : in Wide_String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Wide_Character := Ada.Strings.Wide_Space);
function Insert
(Source : in Wide_String;
Before : in Positive;
New_Item : in Wide_String)
return Wide_String;
procedure Insert
(Source : in out Wide_String;
Before : in Positive;
New_Item : in Wide_String;
Drop : in Truncation := Error);
function Overwrite
(Source : in Wide_String;
Position : in Positive;
New_Item : in Wide_String)
return Wide_String;
procedure Overwrite
(Source : in out Wide_String;
Position : in Positive;
New_Item : in Wide_String;
Drop : in Truncation := Right);
function Delete
(Source : in Wide_String;
From : in Positive;
Through : in Natural)
return Wide_String;
procedure Delete
(Source : in out Wide_String;
From : in Positive;
Through : in Natural;
Justify : in Alignment := Left;
Pad : in Wide_Character := Ada.Strings.Wide_Space);
--------------------------------------
-- Wide_String Selector Subprograms --
--------------------------------------
function Trim
(Source : in Wide_String;
Side : in Trim_End)
return Wide_String;
procedure Trim
(Source : in out Wide_String;
Side : in Trim_End;
Justify : in Alignment := Left;
Pad : in Wide_Character := Wide_Space);
function Trim
(Source : in Wide_String;
Left : in Wide_Maps.Wide_Character_Set;
Right : in Wide_Maps.Wide_Character_Set)
return Wide_String;
procedure Trim
(Source : in out Wide_String;
Left : in Wide_Maps.Wide_Character_Set;
Right : in Wide_Maps.Wide_Character_Set;
Justify : in Alignment := Ada.Strings.Left;
Pad : in Wide_Character := Ada.Strings.Wide_Space);
function Head
(Source : in Wide_String;
Count : in Natural;
Pad : in Wide_Character := Ada.Strings.Wide_Space)
return Wide_String;
function Tail
(Source : in Wide_String;
Count : in Natural;
Pad : in Wide_Character := Ada.Strings.Wide_Space)
return Wide_String;
---------------------------------------
-- Wide_String Constructor Functions --
---------------------------------------
function "*"
(Left : in Natural;
Right : in Wide_Character)
return Wide_String;
function "*"
(Left : in Natural;
Right : in Wide_String)
return Wide_String;
end Ada.Strings.Wide_Fixed;
|
with Person;
with Ada.Text_IO; use Ada.Text_IO;
package body B is
procedure Print_Modify is
package I is new Ada.Text_IO.Integer_IO (Integer);
begin
I.Put (Person.Unit_Age); New_Line;
Person.Unit_Age := 20;
end Print_Modify;
end B;
|
--
-- Uwe R. Zimmer, Australia, July 2015
--
with Real_Type; use Real_Type;
with Swarm_Structures_Base; use Swarm_Structures_Base;
with Vectors_3D; use Vectors_3D;
with Vehicle_Message_Type; use Vehicle_Message_Type;
package Vehicle_Interface is
-----------
-- State --
-----------
function Position return Positions;
function Velocity return Velocities;
function Acceleration return Accelerations;
--------------
-- Steering --
--------------
procedure Set_Destination (V : Vector_3D);
--------------
-- Throttle --
--------------
procedure Set_Throttle (T : Throttle_T);
-- Throttle automatically switched to Idle_Throttle when the destination has been reached.
function Throttle_Is_On_Idle return Boolean;
---------------
-- Messaging --
---------------
procedure Send (Message : Inter_Vehicle_Messages);
procedure Receive (Message : out Inter_Vehicle_Messages); -- blocking if no messages
function Messages_Waiting return Boolean;
function Current_Charge return Vehicle_Charges;
function Current_Discharge_Per_Sec return Real;
function Energy_Globes_Around return Energy_Globes;
procedure Wait_For_Next_Physics_Update;
-- blocking until the underlying physics engine updated swarm and globe positions.
-------------------------
-- Intended swarm size --
-------------------------
Target_No_of_Elements : constant Positive := 42;
-----------------
-- Termination --
-----------------
protected Flight_Termination is
entry Stop; -- this entry will open iff the task is requested to terminate.
end Flight_Termination;
end Vehicle_Interface;
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2018, 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 HAL.Touch_Panel;
with HAL.Framebuffer;
private with FT6x06;
private with STM32.Device;
private with STM32.I2C.DMA;
private with STM32.DMA;
private with STM32.DMA.Interrupts;
private with STM32.GPIO;
private with Ada.Interrupts.Names;
private with System;
package Touch_Panel_FT6x06 is
type Touch_Panel is limited new HAL.Touch_Panel.Touch_Panel_Device
with private;
function Initialize
(This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation :=
HAL.Framebuffer.Default) return Boolean;
procedure Initialize
(This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation :=
HAL.Framebuffer.Default);
procedure Set_Orientation
(This : in out Touch_Panel;
Orientation : HAL.Framebuffer.Display_Orientation);
private
TP_I2C : STM32.I2C.DMA.I2C_Port_DMA renames STM32.Device.I2C_1_DMA;
TP_I2C_SCL : STM32.GPIO.GPIO_Point renames STM32.Device.PB8;
TP_I2C_SDA : STM32.GPIO.GPIO_Point renames STM32.Device.PB9;
TP_I2C_AF : STM32.GPIO_Alternate_Function renames STM32.Device.GPIO_AF_I2C1_4;
I2C_TX_RX_DMA : STM32.DMA.DMA_Controller renames STM32.Device.DMA_1;
I2C_TX_DMA_Chan : STM32.DMA.DMA_Channel_Selector renames STM32.DMA.Channel_1;
I2C_TX_DMA_Stream : STM32.DMA.DMA_Stream_Selector renames STM32.DMA.Stream_6;
I2C_TX_DMA_Int : aliased STM32.DMA.Interrupts.DMA_Interrupt_Controller
(I2C_TX_RX_DMA'Access,
I2C_TX_DMA_Stream,
Ada.Interrupts.Names.DMA1_Stream6_Interrupt,
System.Interrupt_Priority'Last);
I2C_RX_DMA_Chan : STM32.DMA.DMA_Channel_Selector renames STM32.DMA.Channel_1;
I2C_RX_DMA_Stream : STM32.DMA.DMA_Stream_Selector renames STM32.DMA.Stream_0;
I2C_RX_DMA_Int : aliased STM32.DMA.Interrupts.DMA_Interrupt_Controller
(I2C_TX_RX_DMA'Access,
I2C_RX_DMA_Stream,
Ada.Interrupts.Names.DMA1_Stream0_Interrupt,
System.Interrupt_Priority'Last);
type Touch_Panel is limited new FT6x06.FT6x06_Device
(Port => TP_I2C'Access,
I2C_Addr => 16#54#) with null record;
end Touch_Panel_FT6x06;
|
with Asis.Elements;
with Asis.Expressions;
package body Asis_Adapter.Element.Associations is
------------
-- EXPORTED:
------------
procedure Do_Pre_Child_Processing
(Element : in Asis.Element;
State : in out Class)
is
Parent_Name : constant String := Module_Name;
Module_Name : constant String := Parent_Name & ".Do_Pre_Child_Processing";
Result : a_nodes_h.Association_Struct :=
a_nodes_h.Support.Default_Association_Struct;
Association_Kind : Asis.Association_Kinds :=
Asis.Elements.Association_Kind (Element);
procedure Add_Formal_Parameter is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Formal_Parameter (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Formal_Parameter", ID);
Result.Formal_Parameter := ID;
end;
procedure Add_Actual_Parameter is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Actual_Parameter (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Actual_Parameter", ID);
Result.Actual_Parameter := ID;
end;
procedure Add_Discriminant_Selector_Names is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Expressions.Discriminant_Selector_Names (Element),
Dot_Label_Name => "Discriminant_Selector_Names",
List_Out => Result.Discriminant_Selector_Names,
Add_Edges => True);
end;
procedure Add_Discriminant_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Discriminant_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Discriminant_Expression", ID);
Result.Discriminant_Expression := ID;
end;
procedure Add_Is_Defaulted_Association is
Value : constant Boolean := Asis.Expressions.Is_Defaulted_Association (Element);
begin
State.Add_To_Dot_Label ("Is_Defaulted_Association", Value);
Result.Is_Defaulted_Association :=
a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Is_Normalized is
Value : constant Boolean := Asis.Expressions.Is_Normalized (Element);
begin
State.Add_To_Dot_Label ("Is_Normalized", Value);
Result.Is_Normalized := a_nodes_h.Support.To_bool (Value);
end;
procedure Add_Record_Component_Choices is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Expressions.Record_Component_Choices (Element),
Dot_Label_Name => "Record_Component_Choices",
List_Out => Result.Record_Component_Choices,
Add_Edges => True);
end;
procedure Add_Component_Expression is
ID : constant a_nodes_h.Element_ID :=
Get_Element_ID (Asis.Expressions.Component_Expression (Element));
begin
State.Add_To_Dot_Label_And_Edge ("Component_Expression", ID);
Result.Component_Expression := ID;
end;
procedure Add_Array_Component_Choices is
begin
Add_Element_List
(This => State,
Elements_In => Asis.Expressions.Array_Component_Choices (Element),
Dot_Label_Name => "Array_Component_Choices",
List_Out => Result.Array_Component_Choices,
Add_Edges => True);
end;
procedure Add_Common_Items is
begin
State.Add_To_Dot_Label ("Association_Kind", Association_Kind'Image);
Result.Association_Kind := To_Association_Kinds (Association_Kind);
end Add_Common_Items;
use all type Asis.Association_Kinds;
begin
If Association_Kind /= Not_An_Association then
Add_Common_Items;
end if;
case Association_Kind is
when Not_An_Association => -- An unexpected element
raise Program_Error with
Module_Name & " called with: " & Association_Kind'Image;
when A_Pragma_Argument_Association =>
Add_Formal_Parameter;
Add_Actual_Parameter;
when A_Discriminant_Association =>
Add_Discriminant_Selector_Names;
Add_Discriminant_Expression;
Add_Is_Normalized;
when A_Record_Component_Association =>
Add_Record_Component_Choices;
Add_Component_Expression;
Add_Is_Normalized;
Add_Is_Defaulted_Association;
when An_Array_Component_Association =>
Add_Array_Component_Choices;
Add_Component_Expression;
when A_Parameter_Association |
A_Generic_Association =>
Add_Formal_Parameter;
Add_Actual_Parameter;
Add_Is_Defaulted_Association;
Add_Is_Normalized;
end case;
State.A_Element.Element_Kind := a_nodes_h.An_Association;
State.A_Element.The_union.association := Result;
end Do_Pre_Child_Processing;
end Asis_Adapter.Element.Associations;
|
with Types; use Types;
with Vecteur;
with TH;
generic
type T_Precision is digits<>;
Taille: Integer;
MaxIterations: Integer;
Alpha: T_Precision;
package Google_Creuse is
type T_Google is limited private;
-- Initialiser la matrice Google.
procedure Initialiser(Google: out T_Google);
procedure Creer(Google: in out T_Google; Liens: in LC_Integer_Integer.T_LC);
procedure Calculer_Rangs(Google: in out T_Google; Rangs: out Vecteur_Poids.T_Vecteur);
private
type T_Matrice_Valeur is record
Indice: T_Indice;
Valeur: T_Precision;
end record;
package Vecteur_Matrice is
new Vecteur (T_Matrice_Valeur);
package Vecteur_Precision is
new Vecteur (T_Precision);
package TH_Matrice is
new TH(T_Indice, T_Precision, Hachage);
type T_Google is record
Matrice_Creuse: Vecteur_Matrice.T_Vecteur;
Addition : T_Precision;
PreVide: T_Precision;
Sortants: Vecteur_Integer.T_Vecteur;
end record;
end Google_Creuse;
|
--//////////////////////////////////////////////////////////
-- SFML - Simple and Fast Multimedia Library
-- Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org)
-- 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.
--//////////////////////////////////////////////////////////
--//////////////////////////////////////////////////////////
--/ @summary
--/ Network module
--/
--/ @description
--/ Socket-based communication, utilities and higher-level
--/ network protocols (HTTP, FTP).
package Sf.Network is
type sfFtpDirectoryResponse is null record;
type sfFtpDirectoryResponse_Ptr is access all sfFtpDirectoryResponse;
type sfFtpListingResponse is null record;
type sfFtpListingResponse_Ptr is access all sfFtpListingResponse;
type sfFtpResponse is null record;
type sfFtpResponse_Ptr is access all sfFtpResponse;
type sfFtp is null record;
type sfFtp_Ptr is access all sfFtp;
type sfHttpRequest is null record;
type sfHttpRequest_Ptr is access all sfHttpRequest;
type sfHttpResponse is null record;
type sfHttpResponse_Ptr is access all sfHttpResponse;
type sfHttp is null record;
type sfHttp_Ptr is access all sfHttp;
type sfPacket is null record;
type sfPacket_Ptr is access all sfPacket;
type sfSocketSelector is null record;
type sfSocketSelector_Ptr is access all sfSocketSelector;
type sfTcpListener is null record;
type sfTcpListener_Ptr is access all sfTcpListener;
type sfTcpSocket is null record;
type sfTcpSocket_Ptr is access all sfTcpSocket;
type sfUdpSocket is null record;
type sfUdpSocket_Ptr is access all sfUdpSocket;
private
pragma Convention (C, sfFtpDirectoryResponse);
pragma Convention (C, sfFtpDirectoryResponse_Ptr);
pragma Convention (C, sfFtpListingResponse);
pragma Convention (C, sfFtpListingResponse_Ptr);
pragma Convention (C, sfFtpResponse);
pragma Convention (C, sfFtpResponse_Ptr);
pragma Convention (C, sfFtp);
pragma Convention (C, sfFtp_Ptr);
pragma Convention (C, sfHttpRequest);
pragma Convention (C, sfHttpRequest_Ptr);
pragma Convention (C, sfHttpResponse);
pragma Convention (C, sfHttpResponse_Ptr);
pragma Convention (C, sfHttp);
pragma Convention (C, sfHttp_Ptr);
pragma Convention (C, sfPacket);
pragma Convention (C, sfPacket_Ptr);
pragma Convention (C, sfSocketSelector);
pragma Convention (C, sfSocketSelector_Ptr);
pragma Convention (C, sfTcpSocket);
pragma Convention (C, sfTcpSocket_Ptr);
pragma Convention (C, sfUdpSocket);
pragma Convention (C, sfUdpSocket_Ptr);
end Sf.Network;
|
with impact.d3.collision.Detector.discrete;
package impact.d3.collision.point_Collector
--
--
--
is
type Item is new impact.d3.collision.Detector.discrete.Result with
record
m_normalOnBInWorld,
m_pointInWorld : math.Vector_3;
m_distance : math.Real := BT_LARGE_FLOAT; -- negative means penetration
m_hasResult : Boolean := False;
end record;
overriding procedure addContactPoint (Self : in out Item; normalOnBInWorld : in math.Vector_3;
pointInWorld : in math.Vector_3;
depth : in math.Real );
overriding procedure setShapeIdentifiersA (Self : in out Item; partId0 : in Integer;
index0 : in Integer) is null;
overriding procedure setShapeIdentifiersB (Self : in out Item; partId1 : in Integer;
index1 : in Integer) is null;
end impact.d3.collision.point_Collector;
-- struct impact.d3.collision.point_Collector : public impact.d3.collision.Detector.discrete::Result
-- {
--
-- virtual void addContactPoint(const impact.d3.Vector& normalOnBInWorld,const impact.d3.Vector& pointInWorld,impact.d3.Scalar depth)
-- {
-- if (depth< m_distance)
-- {
-- m_hasResult = true;
-- m_normalOnBInWorld = normalOnBInWorld;
-- m_pointInWorld = pointInWorld;
-- //negative means penetration
-- m_distance = depth;
-- }
-- }
-- };
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- A D A . S Y N C H R O N O U S _ T A S K _ C O N T R O L --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2010, 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. --
-- --
------------------------------------------------------------------------------
-- This is the generic bare board version of this package
package body Ada.Synchronous_Task_Control is
-------------------
-- Suspension_PO --
-------------------
protected body Suspension_Object is
--------------
-- Get_Open --
--------------
function Get_Open return Boolean is
begin
return Open;
end Get_Open;
---------------
-- Set_False --
---------------
procedure Set_False is
begin
Open := False;
end Set_False;
--------------
-- Set_True --
--------------
procedure Set_True is
begin
Open := True;
end Set_True;
----------
-- Wait --
----------
entry Wait when Open is
begin
Open := False;
end Wait;
end Suspension_Object;
-------------------
-- Current_State --
-------------------
function Current_State (S : Suspension_Object) return Boolean is
begin
return S.Get_Open;
end Current_State;
---------------
-- Set_False --
---------------
procedure Set_False (S : in out Suspension_Object) is
begin
S.Set_False;
end Set_False;
--------------
-- Set_True --
--------------
procedure Set_True (S : in out Suspension_Object) is
begin
S.Set_True;
end Set_True;
------------------------
-- Suspend_Until_True --
------------------------
procedure Suspend_Until_True (S : in out Suspension_Object) is
begin
S.Wait;
end Suspend_Until_True;
end Ada.Synchronous_Task_Control;
|
with Componolit.Runtime.Debug;
procedure Main
is
procedure Delay_Ms(Ms : Natural) with
Import,
Convention => C,
External_Name => "delayMicroseconds";
function Message return String;
function Message return String
is
begin
return "Make with Ada!";
end Message;
begin
Componolit.Runtime.Debug.Log_Debug (Message);
Delay_Ms (500000);
end Main;
|
with AAA.Filesystem;
with AAA.Strings;
with AAA.Text_IO;
package body TOML_Slicer is
----------------------------
-- Remove_Line_From_Array --
----------------------------
procedure Remove_Line_From_Array (File_Name : String;
Array_Name : String;
Entry_Name : String;
Cleanup : Boolean;
Backup : Boolean;
Backup_Dir : String := ".")
is
------------
-- Remove --
------------
procedure Remove (Lines : in out AAA.Strings.Vector)
-- Remove Entry_Name from Lines
is
Enter_Marker : constant String := "[[" & Array_Name & "]]";
-- We must see a line like this before being able to remove a dep.
Target : constant String := Entry_Name & "=";
-- A line starting with Target is a candidate for deletion
Armed : Boolean := False;
-- True when we are inside [[array]]
Found : Boolean := False; -- True when the entry was found
-------------------
-- Remove_Target --
-------------------
procedure Remove_Target is
use AAA.Strings;
begin
for I in Lines.First_Index .. Lines.Last_Index loop
declare
Line : constant String := Replace (Lines (I), " ", "");
begin
if Armed and then Has_Prefix (Line, Target) then
Found := True;
Lines.Delete (I);
exit;
elsif Has_Prefix (Line, "[[") then
-- Detect a plain [[array]] with optional comment
Armed :=
Line = Enter_Marker or else
Has_Prefix (Line, Enter_Marker & '#');
elsif Armed and then Line /= "" and then
Line (Line'First) /= '[' -- not a table or different array
then
-- We are seeing a different entry in the same array
-- entry; we can still remove our target if later found
-- in this entry.
null;
elsif Line = "" or else Has_Prefix (Line, "#") then
-- We still can remove an entry found in this array entry
null;
else
-- Any other sighting complicates matters and we won't
-- touch it.
Armed := False;
-- TODO: be able to remove a table in the array named as
-- Entry, i.e., something like:
-- [[array]]
-- [array.entry] or [array.entry.etc]
-- etc
-- Or, be able to remove something like
-- [[array]]
-- entry.field = ...
end if;
end;
end loop;
if not Found then
raise Slicing_Error with
"Could not find removable entry " & Entry_Name
& " in array " & Array_Name & " in file " & File_Name;
return;
end if;
end Remove_Target;
-------------------------
-- Remove_Empty_Arrays --
-------------------------
procedure Remove_Empty_Arrays is
-- This might probably be done with multiline regular expressions
Deletable : Natural := 0;
-- Tracks how many empty lines we have seen since the last [[
Can_Delete : Boolean := True;
-- We can delete as long as we are only seeing empty lines
use AAA.Strings;
begin
-- Traverse lines backwards
for I in reverse Lines.First_Index .. Lines.Last_Index loop
declare
Line : constant String := Replace (Lines (I), " ", "");
begin
if Can_Delete then
-- Look for empty lines or the opening [[array]]
if Line = "" then
Deletable := Deletable + 1;
elsif
Line = Enter_Marker or else
Has_Prefix (Line, Enter_Marker & '#')
then
-- Now we can delete the empty [[array]] plus any
-- following empty lines.
for J in 0 .. Deletable loop -- 0 for the current line
Lines.Delete (I);
end loop;
-- Restart, we can still delete previous entries
Deletable := 0;
else
-- We found something else, so do not remove entry
Can_Delete := False;
Deletable := 0;
end if;
else
-- Look for a [[ that starts another array entry. We
-- cannot rely on simply [ for tables, these could be
-- nested array tables.
if Has_Prefix (Line, "[[") then
Can_Delete := True;
Deletable := 0;
-- We will look in next iterations for a precedent
-- empty array entry.
end if;
end if;
end;
end loop;
end Remove_Empty_Arrays;
begin
-- First pass, remove a detected entries in the proper location.
-- Note that this only removes the entry line, but not the enclosing
-- [[array]]. It is ok to have such an empty array entry. Empty array
-- entries are cleaned up afterwards.
Remove_Target;
-- Second pass, remove empty [[array]] array entries. This ensures
-- that trivial add/remove of array entries cannot grow the file
-- indefinitely with empty [[]] entries.
if Cleanup then
Remove_Empty_Arrays;
end if;
end Remove;
Replacer : constant AAA.Filesystem.Replacer :=
AAA.Filesystem.New_Replacement
(File_Name,
Backup => Backup,
Backup_Dir => Backup_Dir);
begin
declare
File : constant AAA.Text_IO.File :=
AAA.Text_IO.Load (Replacer.Editable_Name,
Backup => False);
-- Replacer takes care of backup
begin
Remove (File.Lines.all);
end;
Replacer.Replace; -- All went well, keep the changes
end Remove_Line_From_Array;
end TOML_Slicer;
|
-- Copyright 2016-2019 NXP
-- All rights reserved.SPDX-License-Identifier: BSD-3-Clause
-- This spec has been automatically generated from LPC55S6x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package NXP_SVD.ADC is
pragma Preelaborate;
---------------
-- Registers --
---------------
-- Resolution
type VERID_RES_Field is
(
-- Up to 13-bit differential/12-bit single ended resolution supported.
Res_0,
-- Up to 16-bit differential/16-bit single ended resolution supported.
Res_1)
with Size => 1;
for VERID_RES_Field use
(Res_0 => 0,
Res_1 => 1);
-- Differential Supported
type VERID_DIFFEN_Field is
(
-- Differential operation not supported.
Diffen_0,
-- Differential operation supported. CMDLa[CTYPE] controls fields
-- implemented.
Diffen_1)
with Size => 1;
for VERID_DIFFEN_Field use
(Diffen_0 => 0,
Diffen_1 => 1);
-- Multi Vref Implemented
type VERID_MVI_Field is
(
-- Single voltage reference high (VREFH) input supported.
Mvi_0,
-- Multiple voltage reference high (VREFH) inputs supported.
Mvi_1)
with Size => 1;
for VERID_MVI_Field use
(Mvi_0 => 0,
Mvi_1 => 1);
-- Channel Scale Width
type VERID_CSW_Field is
(
-- Channel scaling not supported.
Csw_0,
-- Channel scaling supported. 1-bit CSCALE control field.
Csw_1,
-- Channel scaling supported. 6-bit CSCALE control field.
Csw_6)
with Size => 3;
for VERID_CSW_Field use
(Csw_0 => 0,
Csw_1 => 1,
Csw_6 => 6);
-- Voltage Reference 1 Range Control Bit Implemented
type VERID_VR1RNGI_Field is
(
-- Range control not required. CFG[VREF1RNG] is not implemented.
Vr1Rngi_0,
-- Range control required. CFG[VREF1RNG] is implemented.
Vr1Rngi_1)
with Size => 1;
for VERID_VR1RNGI_Field use
(Vr1Rngi_0 => 0,
Vr1Rngi_1 => 1);
-- Internal ADC Clock implemented
type VERID_IADCKI_Field is
(
-- Internal clock source not implemented.
Iadcki_0,
-- Internal clock source (and CFG[ADCKEN]) implemented.
Iadcki_1)
with Size => 1;
for VERID_IADCKI_Field use
(Iadcki_0 => 0,
Iadcki_1 => 1);
-- Calibration Function Implemented
type VERID_CALOFSI_Field is
(
-- Calibration Not Implemented.
Calofsi_0,
-- Calibration Implemented.
Calofsi_1)
with Size => 1;
for VERID_CALOFSI_Field use
(Calofsi_0 => 0,
Calofsi_1 => 1);
-- Number of Single Ended Outputs Supported
type VERID_NUM_SEC_Field is
(
-- This design supports one single ended conversion at a time.
Num_Sec_0,
-- This design supports two simultanious single ended conversions.
Num_Sec_1)
with Size => 1;
for VERID_NUM_SEC_Field use
(Num_Sec_0 => 0,
Num_Sec_1 => 1);
-- Number of FIFOs
type VERID_NUM_FIFO_Field is
(
-- N/A
Num_Fifo_0,
-- This design supports one result FIFO.
Num_Fifo_1,
-- This design supports two result FIFOs.
Num_Fifo_2,
-- This design supports three result FIFOs.
Num_Fifo_3,
-- This design supports four result FIFOs.
Num_Fifo_4)
with Size => 3;
for VERID_NUM_FIFO_Field use
(Num_Fifo_0 => 0,
Num_Fifo_1 => 1,
Num_Fifo_2 => 2,
Num_Fifo_3 => 3,
Num_Fifo_4 => 4);
subtype VERID_MINOR_Field is HAL.UInt8;
subtype VERID_MAJOR_Field is HAL.UInt8;
-- Version ID Register
type VERID_Register is record
-- Read-only. Resolution
RES : VERID_RES_Field;
-- Read-only. Differential Supported
DIFFEN : VERID_DIFFEN_Field;
-- unspecified
Reserved_2_2 : HAL.Bit;
-- Read-only. Multi Vref Implemented
MVI : VERID_MVI_Field;
-- Read-only. Channel Scale Width
CSW : VERID_CSW_Field;
-- unspecified
Reserved_7_7 : HAL.Bit;
-- Read-only. Voltage Reference 1 Range Control Bit Implemented
VR1RNGI : VERID_VR1RNGI_Field;
-- Read-only. Internal ADC Clock implemented
IADCKI : VERID_IADCKI_Field;
-- Read-only. Calibration Function Implemented
CALOFSI : VERID_CALOFSI_Field;
-- Read-only. Number of Single Ended Outputs Supported
NUM_SEC : VERID_NUM_SEC_Field;
-- Read-only. Number of FIFOs
NUM_FIFO : VERID_NUM_FIFO_Field;
-- unspecified
Reserved_15_15 : HAL.Bit;
-- Read-only. Minor Version Number
MINOR : VERID_MINOR_Field;
-- Read-only. Major Version Number
MAJOR : VERID_MAJOR_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for VERID_Register use record
RES at 0 range 0 .. 0;
DIFFEN at 0 range 1 .. 1;
Reserved_2_2 at 0 range 2 .. 2;
MVI at 0 range 3 .. 3;
CSW at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
VR1RNGI at 0 range 8 .. 8;
IADCKI at 0 range 9 .. 9;
CALOFSI at 0 range 10 .. 10;
NUM_SEC at 0 range 11 .. 11;
NUM_FIFO at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
MINOR at 0 range 16 .. 23;
MAJOR at 0 range 24 .. 31;
end record;
subtype PARAM_TRIG_NUM_Field is HAL.UInt8;
-- Result FIFO Depth
type PARAM_FIFOSIZE_Field is
(
-- Result FIFO depth = 1 dataword.
Fifosize_1,
-- Result FIFO depth = 4 datawords.
Fifosize_4,
-- Result FIFO depth = 8 datawords.
Fifosize_8,
-- Result FIFO depth = 16 datawords.
Fifosize_16,
-- Result FIFO depth = 32 datawords.
Fifosize_32,
-- Result FIFO depth = 64 datawords.
Fifosize_64)
with Size => 8;
for PARAM_FIFOSIZE_Field use
(Fifosize_1 => 1,
Fifosize_4 => 4,
Fifosize_8 => 8,
Fifosize_16 => 16,
Fifosize_32 => 32,
Fifosize_64 => 64);
subtype PARAM_CV_NUM_Field is HAL.UInt8;
subtype PARAM_CMD_NUM_Field is HAL.UInt8;
-- Parameter Register
type PARAM_Register is record
-- Read-only. Trigger Number
TRIG_NUM : PARAM_TRIG_NUM_Field;
-- Read-only. Result FIFO Depth
FIFOSIZE : PARAM_FIFOSIZE_Field;
-- Read-only. Compare Value Number
CV_NUM : PARAM_CV_NUM_Field;
-- Read-only. Command Buffer Number
CMD_NUM : PARAM_CMD_NUM_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PARAM_Register use record
TRIG_NUM at 0 range 0 .. 7;
FIFOSIZE at 0 range 8 .. 15;
CV_NUM at 0 range 16 .. 23;
CMD_NUM at 0 range 24 .. 31;
end record;
-- ADC Enable
type CTRL_ADCEN_Field is
(
-- ADC is disabled.
Adcen_0,
-- ADC is enabled.
Adcen_1)
with Size => 1;
for CTRL_ADCEN_Field use
(Adcen_0 => 0,
Adcen_1 => 1);
-- Software Reset
type CTRL_RST_Field is
(
-- ADC logic is not reset.
Rst_0,
-- ADC logic is reset.
Rst_1)
with Size => 1;
for CTRL_RST_Field use
(Rst_0 => 0,
Rst_1 => 1);
-- Doze Enable
type CTRL_DOZEN_Field is
(
-- ADC is enabled in Doze mode.
Dozen_0,
-- ADC is disabled in Doze mode.
Dozen_1)
with Size => 1;
for CTRL_DOZEN_Field use
(Dozen_0 => 0,
Dozen_1 => 1);
-- Auto-Calibration Request
type CTRL_CAL_REQ_Field is
(
-- No request for auto-calibration has been made.
Cal_Req_0,
-- A request for auto-calibration has been made
Cal_Req_1)
with Size => 1;
for CTRL_CAL_REQ_Field use
(Cal_Req_0 => 0,
Cal_Req_1 => 1);
-- Configure for offset calibration function
type CTRL_CALOFS_Field is
(
-- Calibration function disabled
Calofs_0,
-- Request for offset calibration function
Calofs_1)
with Size => 1;
for CTRL_CALOFS_Field use
(Calofs_0 => 0,
Calofs_1 => 1);
-- Reset FIFO 0
type CTRL_RSTFIFO0_Field is
(
-- No effect.
Rstfifo0_0,
-- FIFO 0 is reset.
Rstfifo0_1)
with Size => 1;
for CTRL_RSTFIFO0_Field use
(Rstfifo0_0 => 0,
Rstfifo0_1 => 1);
-- Reset FIFO 1
type CTRL_RSTFIFO1_Field is
(
-- No effect.
Rstfifo1_0,
-- FIFO 1 is reset.
Rstfifo1_1)
with Size => 1;
for CTRL_RSTFIFO1_Field use
(Rstfifo1_0 => 0,
Rstfifo1_1 => 1);
-- Auto-Calibration Averages
type CTRL_CAL_AVGS_Field is
(
-- Single conversion.
Cal_Avgs_0,
-- 2 conversions averaged.
Cal_Avgs_1,
-- 4 conversions averaged.
Cal_Avgs_2,
-- 8 conversions averaged.
Cal_Avgs_3,
-- 16 conversions averaged.
Cal_Avgs_4,
-- 32 conversions averaged.
Cal_Avgs_5,
-- 64 conversions averaged.
Cal_Avgs_6,
-- 128 conversions averaged.
Cal_Avgs_7)
with Size => 3;
for CTRL_CAL_AVGS_Field use
(Cal_Avgs_0 => 0,
Cal_Avgs_1 => 1,
Cal_Avgs_2 => 2,
Cal_Avgs_3 => 3,
Cal_Avgs_4 => 4,
Cal_Avgs_5 => 5,
Cal_Avgs_6 => 6,
Cal_Avgs_7 => 7);
-- ADC Control Register
type CTRL_Register is record
-- ADC Enable
ADCEN : CTRL_ADCEN_Field := NXP_SVD.ADC.Adcen_0;
-- Software Reset
RST : CTRL_RST_Field := NXP_SVD.ADC.Rst_0;
-- Doze Enable
DOZEN : CTRL_DOZEN_Field := NXP_SVD.ADC.Dozen_0;
-- Auto-Calibration Request
CAL_REQ : CTRL_CAL_REQ_Field := NXP_SVD.ADC.Cal_Req_0;
-- Configure for offset calibration function
CALOFS : CTRL_CALOFS_Field := NXP_SVD.ADC.Calofs_0;
-- unspecified
Reserved_5_7 : HAL.UInt3 := 16#0#;
-- Reset FIFO 0
RSTFIFO0 : CTRL_RSTFIFO0_Field := NXP_SVD.ADC.Rstfifo0_0;
-- Reset FIFO 1
RSTFIFO1 : CTRL_RSTFIFO1_Field := NXP_SVD.ADC.Rstfifo1_0;
-- unspecified
Reserved_10_15 : HAL.UInt6 := 16#0#;
-- Auto-Calibration Averages
CAL_AVGS : CTRL_CAL_AVGS_Field := NXP_SVD.ADC.Cal_Avgs_0;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CTRL_Register use record
ADCEN at 0 range 0 .. 0;
RST at 0 range 1 .. 1;
DOZEN at 0 range 2 .. 2;
CAL_REQ at 0 range 3 .. 3;
CALOFS at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
RSTFIFO0 at 0 range 8 .. 8;
RSTFIFO1 at 0 range 9 .. 9;
Reserved_10_15 at 0 range 10 .. 15;
CAL_AVGS at 0 range 16 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- Result FIFO 0 Ready Flag
type STAT_RDY0_Field is
(
-- Result FIFO 0 data level not above watermark level.
Rdy0_0,
-- Result FIFO 0 holding data above watermark level.
Rdy0_1)
with Size => 1;
for STAT_RDY0_Field use
(Rdy0_0 => 0,
Rdy0_1 => 1);
-- Result FIFO 0 Overflow Flag
type STAT_FOF0_Field is
(
-- No result FIFO 0 overflow has occurred since the last time the flag
-- was cleared.
Fof0_0,
-- At least one result FIFO 0 overflow has occurred since the last time
-- the flag was cleared.
Fof0_1)
with Size => 1;
for STAT_FOF0_Field use
(Fof0_0 => 0,
Fof0_1 => 1);
-- Result FIFO1 Ready Flag
type STAT_RDY1_Field is
(
-- Result FIFO1 data level not above watermark level.
Rdy1_0,
-- Result FIFO1 holding data above watermark level.
Rdy1_1)
with Size => 1;
for STAT_RDY1_Field use
(Rdy1_0 => 0,
Rdy1_1 => 1);
-- Result FIFO1 Overflow Flag
type STAT_FOF1_Field is
(
-- No result FIFO1 overflow has occurred since the last time the flag
-- was cleared.
Fof1_0,
-- At least one result FIFO1 overflow has occurred since the last time
-- the flag was cleared.
Fof1_1)
with Size => 1;
for STAT_FOF1_Field use
(Fof1_0 => 0,
Fof1_1 => 1);
-- Interrupt Flag For High Priority Trigger Exception
type STAT_TEXC_INT_Field is
(
-- No trigger exceptions have occurred.
Texc_Int_0,
-- A trigger exception has occurred and is pending acknowledgement.
Texc_Int_1)
with Size => 1;
for STAT_TEXC_INT_Field use
(Texc_Int_0 => 0,
Texc_Int_1 => 1);
-- Interrupt Flag For Trigger Completion
type STAT_TCOMP_INT_Field is
(
-- Either IE[TCOMP_IE] is set to 0, or no trigger sequences have run to
-- completion.
Tcomp_Int_0,
-- Trigger sequence has been completed and all data is stored in the
-- associated FIFO.
Tcomp_Int_1)
with Size => 1;
for STAT_TCOMP_INT_Field use
(Tcomp_Int_0 => 0,
Tcomp_Int_1 => 1);
-- Calibration Ready
type STAT_CAL_RDY_Field is
(
-- Calibration is incomplete or hasn't been ran.
Cal_Rdy_0,
-- The ADC is calibrated.
Cal_Rdy_1)
with Size => 1;
for STAT_CAL_RDY_Field use
(Cal_Rdy_0 => 0,
Cal_Rdy_1 => 1);
-- ADC Active
type STAT_ADC_ACTIVE_Field is
(
-- The ADC is IDLE. There are no pending triggers to service and no
-- active commands are being processed.
Adc_Active_0,
-- The ADC is processing a conversion, running through the power up
-- delay, or servicing a trigger.
Adc_Active_1)
with Size => 1;
for STAT_ADC_ACTIVE_Field use
(Adc_Active_0 => 0,
Adc_Active_1 => 1);
-- Trigger Active
type STAT_TRGACT_Field is
(
-- Command (sequence) associated with Trigger 0 currently being
-- executed.
Trgact_0,
-- Command (sequence) associated with Trigger 1 currently being
-- executed.
Trgact_1,
-- Command (sequence) associated with Trigger 2 currently being
-- executed.
Trgact_2,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_3,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_4,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_5,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_6,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_7,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_8,
-- Command (sequence) from the associated Trigger number is currently
-- being executed.
Trgact_9)
with Size => 4;
for STAT_TRGACT_Field use
(Trgact_0 => 0,
Trgact_1 => 1,
Trgact_2 => 2,
Trgact_3 => 3,
Trgact_4 => 4,
Trgact_5 => 5,
Trgact_6 => 6,
Trgact_7 => 7,
Trgact_8 => 8,
Trgact_9 => 9);
-- Command Active
type STAT_CMDACT_Field is
(
-- No command is currently in progress.
Cmdact_0,
-- Command 1 currently being executed.
Cmdact_1,
-- Command 2 currently being executed.
Cmdact_2,
-- Associated command number is currently being executed.
Cmdact_3,
-- Associated command number is currently being executed.
Cmdact_4,
-- Associated command number is currently being executed.
Cmdact_5,
-- Associated command number is currently being executed.
Cmdact_6,
-- Associated command number is currently being executed.
Cmdact_7,
-- Associated command number is currently being executed.
Cmdact_8,
-- Associated command number is currently being executed.
Cmdact_9)
with Size => 4;
for STAT_CMDACT_Field use
(Cmdact_0 => 0,
Cmdact_1 => 1,
Cmdact_2 => 2,
Cmdact_3 => 3,
Cmdact_4 => 4,
Cmdact_5 => 5,
Cmdact_6 => 6,
Cmdact_7 => 7,
Cmdact_8 => 8,
Cmdact_9 => 9);
-- ADC Status Register
type STAT_Register is record
-- Read-only. Result FIFO 0 Ready Flag
RDY0 : STAT_RDY0_Field := NXP_SVD.ADC.Rdy0_0;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Result FIFO 0 Overflow Flag
FOF0 : STAT_FOF0_Field := NXP_SVD.ADC.Fof0_0;
-- Read-only. Result FIFO1 Ready Flag
RDY1 : STAT_RDY1_Field := NXP_SVD.ADC.Rdy1_0;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Result FIFO1 Overflow Flag
FOF1 : STAT_FOF1_Field := NXP_SVD.ADC.Fof1_0;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Interrupt Flag For High Priority Trigger Exception
TEXC_INT : STAT_TEXC_INT_Field := NXP_SVD.ADC.Texc_Int_0;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Interrupt Flag For Trigger Completion
TCOMP_INT : STAT_TCOMP_INT_Field := NXP_SVD.ADC.Tcomp_Int_0;
-- Read-only. Calibration Ready
CAL_RDY : STAT_CAL_RDY_Field := NXP_SVD.ADC.Cal_Rdy_0;
-- Read-only. ADC Active
ADC_ACTIVE : STAT_ADC_ACTIVE_Field := NXP_SVD.ADC.Adc_Active_0;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Read-only. Trigger Active
TRGACT : STAT_TRGACT_Field := NXP_SVD.ADC.Trgact_0;
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Read-only. Command Active
CMDACT : STAT_CMDACT_Field := NXP_SVD.ADC.Cmdact_0;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for STAT_Register use record
RDY0 at 0 range 0 .. 0;
FOF0 at 0 range 1 .. 1;
RDY1 at 0 range 2 .. 2;
FOF1 at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
TEXC_INT at 0 range 8 .. 8;
TCOMP_INT at 0 range 9 .. 9;
CAL_RDY at 0 range 10 .. 10;
ADC_ACTIVE at 0 range 11 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
TRGACT at 0 range 16 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
CMDACT at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- FIFO 0 Watermark Interrupt Enable
type IE_FWMIE0_Field is
(
-- FIFO 0 watermark interrupts are not enabled.
Fwmie0_0,
-- FIFO 0 watermark interrupts are enabled.
Fwmie0_1)
with Size => 1;
for IE_FWMIE0_Field use
(Fwmie0_0 => 0,
Fwmie0_1 => 1);
-- Result FIFO 0 Overflow Interrupt Enable
type IE_FOFIE0_Field is
(
-- FIFO 0 overflow interrupts are not enabled.
Fofie0_0,
-- FIFO 0 overflow interrupts are enabled.
Fofie0_1)
with Size => 1;
for IE_FOFIE0_Field use
(Fofie0_0 => 0,
Fofie0_1 => 1);
-- FIFO1 Watermark Interrupt Enable
type IE_FWMIE1_Field is
(
-- FIFO1 watermark interrupts are not enabled.
Fwmie1_0,
-- FIFO1 watermark interrupts are enabled.
Fwmie1_1)
with Size => 1;
for IE_FWMIE1_Field use
(Fwmie1_0 => 0,
Fwmie1_1 => 1);
-- Result FIFO1 Overflow Interrupt Enable
type IE_FOFIE1_Field is
(
-- No result FIFO1 overflow has occurred since the last time the flag
-- was cleared.
Fofie1_0,
-- At least one result FIFO1 overflow has occurred since the last time
-- the flag was cleared.
Fofie1_1)
with Size => 1;
for IE_FOFIE1_Field use
(Fofie1_0 => 0,
Fofie1_1 => 1);
-- Trigger Exception Interrupt Enable
type IE_TEXC_IE_Field is
(
-- Trigger exception interrupts are disabled.
Texc_Ie_0,
-- Trigger exception interrupts are enabled.
Texc_Ie_1)
with Size => 1;
for IE_TEXC_IE_Field use
(Texc_Ie_0 => 0,
Texc_Ie_1 => 1);
-- Trigger Completion Interrupt Enable
type IE_TCOMP_IE_Field is
(
-- Trigger completion interrupts are disabled.
Tcomp_Ie_0,
-- Trigger completion interrupts are enabled for trigger source 0 only.
Tcomp_Ie_1,
-- Trigger completion interrupts are enabled for trigger source 1 only.
Tcomp_Ie_2,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_3,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_4,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_5,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_6,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_7,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_8,
-- Associated trigger completion interrupts are enabled.
Tcomp_Ie_9,
-- Trigger completion interrupts are enabled for every trigger source.
Tcomp_Ie_65535)
with Size => 16;
for IE_TCOMP_IE_Field use
(Tcomp_Ie_0 => 0,
Tcomp_Ie_1 => 1,
Tcomp_Ie_2 => 2,
Tcomp_Ie_3 => 3,
Tcomp_Ie_4 => 4,
Tcomp_Ie_5 => 5,
Tcomp_Ie_6 => 6,
Tcomp_Ie_7 => 7,
Tcomp_Ie_8 => 8,
Tcomp_Ie_9 => 9,
Tcomp_Ie_65535 => 65535);
-- Interrupt Enable Register
type IE_Register is record
-- FIFO 0 Watermark Interrupt Enable
FWMIE0 : IE_FWMIE0_Field := NXP_SVD.ADC.Fwmie0_0;
-- Result FIFO 0 Overflow Interrupt Enable
FOFIE0 : IE_FOFIE0_Field := NXP_SVD.ADC.Fofie0_0;
-- FIFO1 Watermark Interrupt Enable
FWMIE1 : IE_FWMIE1_Field := NXP_SVD.ADC.Fwmie1_0;
-- Result FIFO1 Overflow Interrupt Enable
FOFIE1 : IE_FOFIE1_Field := NXP_SVD.ADC.Fofie1_0;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- Trigger Exception Interrupt Enable
TEXC_IE : IE_TEXC_IE_Field := NXP_SVD.ADC.Texc_Ie_0;
-- unspecified
Reserved_9_15 : HAL.UInt7 := 16#0#;
-- Trigger Completion Interrupt Enable
TCOMP_IE : IE_TCOMP_IE_Field := NXP_SVD.ADC.Tcomp_Ie_0;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IE_Register use record
FWMIE0 at 0 range 0 .. 0;
FOFIE0 at 0 range 1 .. 1;
FWMIE1 at 0 range 2 .. 2;
FOFIE1 at 0 range 3 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
TEXC_IE at 0 range 8 .. 8;
Reserved_9_15 at 0 range 9 .. 15;
TCOMP_IE at 0 range 16 .. 31;
end record;
-- FIFO 0 Watermark DMA Enable
type DE_FWMDE0_Field is
(
-- DMA request disabled.
Fwmde0_0,
-- DMA request enabled.
Fwmde0_1)
with Size => 1;
for DE_FWMDE0_Field use
(Fwmde0_0 => 0,
Fwmde0_1 => 1);
-- FIFO1 Watermark DMA Enable
type DE_FWMDE1_Field is
(
-- DMA request disabled.
Fwmde1_0,
-- DMA request enabled.
Fwmde1_1)
with Size => 1;
for DE_FWMDE1_Field use
(Fwmde1_0 => 0,
Fwmde1_1 => 1);
-- DMA Enable Register
type DE_Register is record
-- FIFO 0 Watermark DMA Enable
FWMDE0 : DE_FWMDE0_Field := NXP_SVD.ADC.Fwmde0_0;
-- FIFO1 Watermark DMA Enable
FWMDE1 : DE_FWMDE1_Field := NXP_SVD.ADC.Fwmde1_0;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DE_Register use record
FWMDE0 at 0 range 0 .. 0;
FWMDE1 at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-- ADC trigger priority control
type CFG_TPRICTRL_Field is
(
-- If a higher priority trigger is detected during command processing,
-- the current conversion is aborted and the new command specified by
-- the trigger is started.
Tprictrl_0,
-- If a higher priority trigger is received during command processing,
-- the current command is stopped after after completing the current
-- conversion. If averaging is enabled, the averaging loop will be
-- completed. However, CMDHa[LOOP] will be ignored and the higher
-- priority trigger will be serviced.
Tprictrl_1,
-- If a higher priority trigger is received during command processing,
-- the current command will be completed (averaging, looping, compare)
-- before servicing the higher priority trigger.
Tprictrl_2)
with Size => 2;
for CFG_TPRICTRL_Field use
(Tprictrl_0 => 0,
Tprictrl_1 => 1,
Tprictrl_2 => 2);
-- Power Configuration Select
type CFG_PWRSEL_Field is
(
-- Lowest power setting.
Pwrsel_0,
-- Higher power setting than 0b0.
Pwrsel_1,
-- Higher power setting than 0b1.
Pwrsel_2,
-- Highest power setting.
Pwrsel_3)
with Size => 2;
for CFG_PWRSEL_Field use
(Pwrsel_0 => 0,
Pwrsel_1 => 1,
Pwrsel_2 => 2,
Pwrsel_3 => 3);
-- Voltage Reference Selection
type CFG_REFSEL_Field is
(
-- (Default) Option 1 setting.
Refsel_0,
-- Option 2 setting.
Refsel_1,
-- Option 3 setting.
Refsel_2)
with Size => 2;
for CFG_REFSEL_Field use
(Refsel_0 => 0,
Refsel_1 => 1,
Refsel_2 => 2);
-- Trigger Resume Enable
type CFG_TRES_Field is
(
-- Trigger sequences interrupted by a high priority trigger exception
-- will not be automatically resumed or restarted.
Tres_0,
-- Trigger sequences interrupted by a high priority trigger exception
-- will be automatically resumed or restarted.
Tres_1)
with Size => 1;
for CFG_TRES_Field use
(Tres_0 => 0,
Tres_1 => 1);
-- Trigger Command Resume
type CFG_TCMDRES_Field is
(
-- Trigger sequences interrupted by a high priority trigger exception
-- will be automatically restarted.
Tcmdres_0,
-- Trigger sequences interrupted by a high priority trigger exception
-- will be resumed from the command executing before the exception.
Tcmdres_1)
with Size => 1;
for CFG_TCMDRES_Field use
(Tcmdres_0 => 0,
Tcmdres_1 => 1);
-- High Priority Trigger Exception Disable
type CFG_HPT_EXDI_Field is
(
-- High priority trigger exceptions are enabled.
Hpt_Exdi_0,
-- High priority trigger exceptions are disabled.
Hpt_Exdi_1)
with Size => 1;
for CFG_HPT_EXDI_Field use
(Hpt_Exdi_0 => 0,
Hpt_Exdi_1 => 1);
subtype CFG_PUDLY_Field is HAL.UInt8;
-- ADC Analog Pre-Enable
type CFG_PWREN_Field is
(
-- ADC analog circuits are only enabled while conversions are active.
-- Performance is affected due to analog startup delays.
Pwren_0,
-- ADC analog circuits are pre-enabled and ready to execute conversions
-- without startup delays (at the cost of higher DC current
-- consumption). A single power up delay (CFG[PUDLY]) is executed
-- immediately once PWREN is set, and any detected trigger does not
-- begin ADC operation until the power up delay time has passed. After
-- this initial delay expires the analog will remain pre-enabled, and no
-- additional delays will be executed.
Pwren_1)
with Size => 1;
for CFG_PWREN_Field use
(Pwren_0 => 0,
Pwren_1 => 1);
-- ADC Configuration Register
type CFG_Register is record
-- ADC trigger priority control
TPRICTRL : CFG_TPRICTRL_Field := NXP_SVD.ADC.Tprictrl_0;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Power Configuration Select
PWRSEL : CFG_PWRSEL_Field := NXP_SVD.ADC.Pwrsel_0;
-- Voltage Reference Selection
REFSEL : CFG_REFSEL_Field := NXP_SVD.ADC.Refsel_0;
-- Trigger Resume Enable
TRES : CFG_TRES_Field := NXP_SVD.ADC.Tres_0;
-- Trigger Command Resume
TCMDRES : CFG_TCMDRES_Field := NXP_SVD.ADC.Tcmdres_0;
-- High Priority Trigger Exception Disable
HPT_EXDI : CFG_HPT_EXDI_Field := NXP_SVD.ADC.Hpt_Exdi_0;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Power Up Delay
PUDLY : CFG_PUDLY_Field := 16#80#;
-- unspecified
Reserved_24_27 : HAL.UInt4 := 16#0#;
-- ADC Analog Pre-Enable
PWREN : CFG_PWREN_Field := NXP_SVD.ADC.Pwren_0;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CFG_Register use record
TPRICTRL at 0 range 0 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
PWRSEL at 0 range 4 .. 5;
REFSEL at 0 range 6 .. 7;
TRES at 0 range 8 .. 8;
TCMDRES at 0 range 9 .. 9;
HPT_EXDI at 0 range 10 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
PUDLY at 0 range 16 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
PWREN at 0 range 28 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
subtype PAUSE_PAUSEDLY_Field is HAL.UInt9;
-- PAUSE Option Enable
type PAUSE_PAUSEEN_Field is
(
-- Pause operation disabled
Pauseen_0,
-- Pause operation enabled
Pauseen_1)
with Size => 1;
for PAUSE_PAUSEEN_Field use
(Pauseen_0 => 0,
Pauseen_1 => 1);
-- ADC Pause Register
type PAUSE_Register is record
-- Pause Delay
PAUSEDLY : PAUSE_PAUSEDLY_Field := 16#0#;
-- unspecified
Reserved_9_30 : HAL.UInt22 := 16#0#;
-- PAUSE Option Enable
PAUSEEN : PAUSE_PAUSEEN_Field := NXP_SVD.ADC.Pauseen_0;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for PAUSE_Register use record
PAUSEDLY at 0 range 0 .. 8;
Reserved_9_30 at 0 range 9 .. 30;
PAUSEEN at 0 range 31 .. 31;
end record;
-- Software trigger 0 event
type SWTRIG_SWT0_Field is
(
-- No trigger 0 event generated.
Swt0_0,
-- Trigger 0 event generated.
Swt0_1)
with Size => 1;
for SWTRIG_SWT0_Field use
(Swt0_0 => 0,
Swt0_1 => 1);
-- Software trigger 1 event
type SWTRIG_SWT1_Field is
(
-- No trigger 1 event generated.
Swt1_0,
-- Trigger 1 event generated.
Swt1_1)
with Size => 1;
for SWTRIG_SWT1_Field use
(Swt1_0 => 0,
Swt1_1 => 1);
-- Software trigger 2 event
type SWTRIG_SWT2_Field is
(
-- No trigger 2 event generated.
Swt2_0,
-- Trigger 2 event generated.
Swt2_1)
with Size => 1;
for SWTRIG_SWT2_Field use
(Swt2_0 => 0,
Swt2_1 => 1);
-- Software trigger 3 event
type SWTRIG_SWT3_Field is
(
-- No trigger 3 event generated.
Swt3_0,
-- Trigger 3 event generated.
Swt3_1)
with Size => 1;
for SWTRIG_SWT3_Field use
(Swt3_0 => 0,
Swt3_1 => 1);
-- Software trigger 4 event
type SWTRIG_SWT4_Field is
(
-- No trigger 4 event generated.
Swt4_0,
-- Trigger 4 event generated.
Swt4_1)
with Size => 1;
for SWTRIG_SWT4_Field use
(Swt4_0 => 0,
Swt4_1 => 1);
-- Software trigger 5 event
type SWTRIG_SWT5_Field is
(
-- No trigger 5 event generated.
Swt5_0,
-- Trigger 5 event generated.
Swt5_1)
with Size => 1;
for SWTRIG_SWT5_Field use
(Swt5_0 => 0,
Swt5_1 => 1);
-- Software trigger 6 event
type SWTRIG_SWT6_Field is
(
-- No trigger 6 event generated.
Swt6_0,
-- Trigger 6 event generated.
Swt6_1)
with Size => 1;
for SWTRIG_SWT6_Field use
(Swt6_0 => 0,
Swt6_1 => 1);
-- Software trigger 7 event
type SWTRIG_SWT7_Field is
(
-- No trigger 7 event generated.
Swt7_0,
-- Trigger 7 event generated.
Swt7_1)
with Size => 1;
for SWTRIG_SWT7_Field use
(Swt7_0 => 0,
Swt7_1 => 1);
-- Software trigger 8 event
type SWTRIG_SWT8_Field is
(
-- No trigger 8 event generated.
Swt8_0,
-- Trigger 8 event generated.
Swt8_1)
with Size => 1;
for SWTRIG_SWT8_Field use
(Swt8_0 => 0,
Swt8_1 => 1);
-- Software trigger 9 event
type SWTRIG_SWT9_Field is
(
-- No trigger 9 event generated.
Swt9_0,
-- Trigger 9 event generated.
Swt9_1)
with Size => 1;
for SWTRIG_SWT9_Field use
(Swt9_0 => 0,
Swt9_1 => 1);
-- Software trigger 10 event
type SWTRIG_SWT10_Field is
(
-- No trigger 10 event generated.
Swt10_0,
-- Trigger 10 event generated.
Swt10_1)
with Size => 1;
for SWTRIG_SWT10_Field use
(Swt10_0 => 0,
Swt10_1 => 1);
-- Software trigger 11 event
type SWTRIG_SWT11_Field is
(
-- No trigger 11 event generated.
Swt11_0,
-- Trigger 11 event generated.
Swt11_1)
with Size => 1;
for SWTRIG_SWT11_Field use
(Swt11_0 => 0,
Swt11_1 => 1);
-- Software trigger 12 event
type SWTRIG_SWT12_Field is
(
-- No trigger 12 event generated.
Swt12_0,
-- Trigger 12 event generated.
Swt12_1)
with Size => 1;
for SWTRIG_SWT12_Field use
(Swt12_0 => 0,
Swt12_1 => 1);
-- Software trigger 13 event
type SWTRIG_SWT13_Field is
(
-- No trigger 13 event generated.
Swt13_0,
-- Trigger 13 event generated.
Swt13_1)
with Size => 1;
for SWTRIG_SWT13_Field use
(Swt13_0 => 0,
Swt13_1 => 1);
-- Software trigger 14 event
type SWTRIG_SWT14_Field is
(
-- No trigger 14 event generated.
Swt14_0,
-- Trigger 14 event generated.
Swt14_1)
with Size => 1;
for SWTRIG_SWT14_Field use
(Swt14_0 => 0,
Swt14_1 => 1);
-- Software trigger 15 event
type SWTRIG_SWT15_Field is
(
-- No trigger 15 event generated.
Swt15_0,
-- Trigger 15 event generated.
Swt15_1)
with Size => 1;
for SWTRIG_SWT15_Field use
(Swt15_0 => 0,
Swt15_1 => 1);
-- Software Trigger Register
type SWTRIG_Register is record
-- Software trigger 0 event
SWT0 : SWTRIG_SWT0_Field := NXP_SVD.ADC.Swt0_0;
-- Software trigger 1 event
SWT1 : SWTRIG_SWT1_Field := NXP_SVD.ADC.Swt1_0;
-- Software trigger 2 event
SWT2 : SWTRIG_SWT2_Field := NXP_SVD.ADC.Swt2_0;
-- Software trigger 3 event
SWT3 : SWTRIG_SWT3_Field := NXP_SVD.ADC.Swt3_0;
-- Software trigger 4 event
SWT4 : SWTRIG_SWT4_Field := NXP_SVD.ADC.Swt4_0;
-- Software trigger 5 event
SWT5 : SWTRIG_SWT5_Field := NXP_SVD.ADC.Swt5_0;
-- Software trigger 6 event
SWT6 : SWTRIG_SWT6_Field := NXP_SVD.ADC.Swt6_0;
-- Software trigger 7 event
SWT7 : SWTRIG_SWT7_Field := NXP_SVD.ADC.Swt7_0;
-- Software trigger 8 event
SWT8 : SWTRIG_SWT8_Field := NXP_SVD.ADC.Swt8_0;
-- Software trigger 9 event
SWT9 : SWTRIG_SWT9_Field := NXP_SVD.ADC.Swt9_0;
-- Software trigger 10 event
SWT10 : SWTRIG_SWT10_Field := NXP_SVD.ADC.Swt10_0;
-- Software trigger 11 event
SWT11 : SWTRIG_SWT11_Field := NXP_SVD.ADC.Swt11_0;
-- Software trigger 12 event
SWT12 : SWTRIG_SWT12_Field := NXP_SVD.ADC.Swt12_0;
-- Software trigger 13 event
SWT13 : SWTRIG_SWT13_Field := NXP_SVD.ADC.Swt13_0;
-- Software trigger 14 event
SWT14 : SWTRIG_SWT14_Field := NXP_SVD.ADC.Swt14_0;
-- Software trigger 15 event
SWT15 : SWTRIG_SWT15_Field := NXP_SVD.ADC.Swt15_0;
-- unspecified
Reserved_16_31 : HAL.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SWTRIG_Register use record
SWT0 at 0 range 0 .. 0;
SWT1 at 0 range 1 .. 1;
SWT2 at 0 range 2 .. 2;
SWT3 at 0 range 3 .. 3;
SWT4 at 0 range 4 .. 4;
SWT5 at 0 range 5 .. 5;
SWT6 at 0 range 6 .. 6;
SWT7 at 0 range 7 .. 7;
SWT8 at 0 range 8 .. 8;
SWT9 at 0 range 9 .. 9;
SWT10 at 0 range 10 .. 10;
SWT11 at 0 range 11 .. 11;
SWT12 at 0 range 12 .. 12;
SWT13 at 0 range 13 .. 13;
SWT14 at 0 range 14 .. 14;
SWT15 at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Trigger Exception Number
type TSTAT_TEXC_NUM_Field is
(
-- No triggers have been interrupted by a high priority exception. Or
-- CFG[TRES] = 1.
Texc_Num_0,
-- Trigger 0 has been interrupted by a high priority exception.
Texc_Num_1,
-- Trigger 1 has been interrupted by a high priority exception.
Texc_Num_2,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_3,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_4,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_5,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_6,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_7,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_8,
-- Associated trigger sequence has interrupted by a high priority
-- exception.
Texc_Num_9,
-- Every trigger sequence has been interrupted by a high priority
-- exception.
Texc_Num_65535)
with Size => 16;
for TSTAT_TEXC_NUM_Field use
(Texc_Num_0 => 0,
Texc_Num_1 => 1,
Texc_Num_2 => 2,
Texc_Num_3 => 3,
Texc_Num_4 => 4,
Texc_Num_5 => 5,
Texc_Num_6 => 6,
Texc_Num_7 => 7,
Texc_Num_8 => 8,
Texc_Num_9 => 9,
Texc_Num_65535 => 65535);
-- Trigger Completion Flag
type TSTAT_TCOMP_FLAG_Field is
(
-- No triggers have been completed. Trigger completion interrupts are
-- disabled.
Tcomp_Flag_0,
-- Trigger 0 has been completed and triger 0 has enabled completion
-- interrupts.
Tcomp_Flag_1,
-- Trigger 1 has been completed and triger 1 has enabled completion
-- interrupts.
Tcomp_Flag_2,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_3,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_4,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_5,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_6,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_7,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_8,
-- Associated trigger sequence has completed and has enabled completion
-- interrupts.
Tcomp_Flag_9,
-- Every trigger sequence has been completed and every trigger has
-- enabled completion interrupts.
Tcomp_Flag_65535)
with Size => 16;
for TSTAT_TCOMP_FLAG_Field use
(Tcomp_Flag_0 => 0,
Tcomp_Flag_1 => 1,
Tcomp_Flag_2 => 2,
Tcomp_Flag_3 => 3,
Tcomp_Flag_4 => 4,
Tcomp_Flag_5 => 5,
Tcomp_Flag_6 => 6,
Tcomp_Flag_7 => 7,
Tcomp_Flag_8 => 8,
Tcomp_Flag_9 => 9,
Tcomp_Flag_65535 => 65535);
-- Trigger Status Register
type TSTAT_Register is record
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Trigger Exception Number
TEXC_NUM : TSTAT_TEXC_NUM_Field := NXP_SVD.ADC.Texc_Num_0;
-- Write data bit of one shall clear (set to zero) the corresponding bit
-- in the field. Trigger Completion Flag
TCOMP_FLAG : TSTAT_TCOMP_FLAG_Field := NXP_SVD.ADC.Tcomp_Flag_0;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TSTAT_Register use record
TEXC_NUM at 0 range 0 .. 15;
TCOMP_FLAG at 0 range 16 .. 31;
end record;
subtype OFSTRIM_OFSTRIM_A_Field is HAL.UInt5;
subtype OFSTRIM_OFSTRIM_B_Field is HAL.UInt5;
-- ADC Offset Trim Register
type OFSTRIM_Register is record
-- Trim for offset
OFSTRIM_A : OFSTRIM_OFSTRIM_A_Field := 16#0#;
-- unspecified
Reserved_5_15 : HAL.UInt11 := 16#0#;
-- Trim for offset
OFSTRIM_B : OFSTRIM_OFSTRIM_B_Field := 16#0#;
-- unspecified
Reserved_21_31 : HAL.UInt11 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for OFSTRIM_Register use record
OFSTRIM_A at 0 range 0 .. 4;
Reserved_5_15 at 0 range 5 .. 15;
OFSTRIM_B at 0 range 16 .. 20;
Reserved_21_31 at 0 range 21 .. 31;
end record;
-- Trigger enable
type TCTRL_HTEN_Field is
(
-- Hardware trigger source disabled
Hten_0,
-- Hardware trigger source enabled
Hten_1)
with Size => 1;
for TCTRL_HTEN_Field use
(Hten_0 => 0,
Hten_1 => 1);
-- SAR Result Destination For Channel A
type TCTRL_FIFO_SEL_A_Field is
(
-- Result written to FIFO 0
Fifo_Sel_A_0,
-- Result written to FIFO 1
Fifo_Sel_A_1)
with Size => 1;
for TCTRL_FIFO_SEL_A_Field use
(Fifo_Sel_A_0 => 0,
Fifo_Sel_A_1 => 1);
-- SAR Result Destination For Channel B
type TCTRL_FIFO_SEL_B_Field is
(
-- Result written to FIFO 0
Fifo_Sel_B_0,
-- Result written to FIFO 1
Fifo_Sel_B_1)
with Size => 1;
for TCTRL_FIFO_SEL_B_Field use
(Fifo_Sel_B_0 => 0,
Fifo_Sel_B_1 => 1);
-- Trigger priority setting
type TCTRL_TPRI_Field is
(
-- Set to highest priority, Level 1
Tpri_0,
-- Set to corresponding priority level
Tpri_1,
-- Set to corresponding priority level
Tpri_2,
-- Set to corresponding priority level
Tpri_3,
-- Set to corresponding priority level
Tpri_4,
-- Set to corresponding priority level
Tpri_5,
-- Set to corresponding priority level
Tpri_6,
-- Set to corresponding priority level
Tpri_7,
-- Set to corresponding priority level
Tpri_8,
-- Set to corresponding priority level
Tpri_9,
-- Set to lowest priority, Level 16
Tpri_15)
with Size => 4;
for TCTRL_TPRI_Field use
(Tpri_0 => 0,
Tpri_1 => 1,
Tpri_2 => 2,
Tpri_3 => 3,
Tpri_4 => 4,
Tpri_5 => 5,
Tpri_6 => 6,
Tpri_7 => 7,
Tpri_8 => 8,
Tpri_9 => 9,
Tpri_15 => 15);
subtype TCTRL_TDLY_Field is HAL.UInt4;
-- Trigger command select
type TCTRL_TCMD_Field is
(
-- Not a valid selection from the command buffer. Trigger event is
-- ignored.
Tcmd_0,
-- CMD1 is executed
Tcmd_1,
-- Corresponding CMD is executed
Tcmd_2,
-- Corresponding CMD is executed
Tcmd_3,
-- Corresponding CMD is executed
Tcmd_4,
-- Corresponding CMD is executed
Tcmd_5,
-- Corresponding CMD is executed
Tcmd_6,
-- Corresponding CMD is executed
Tcmd_7,
-- Corresponding CMD is executed
Tcmd_8,
-- Corresponding CMD is executed
Tcmd_9,
-- CMD15 is executed
Tcmd_15)
with Size => 4;
for TCTRL_TCMD_Field use
(Tcmd_0 => 0,
Tcmd_1 => 1,
Tcmd_2 => 2,
Tcmd_3 => 3,
Tcmd_4 => 4,
Tcmd_5 => 5,
Tcmd_6 => 6,
Tcmd_7 => 7,
Tcmd_8 => 8,
Tcmd_9 => 9,
Tcmd_15 => 15);
-- Trigger Control Register
type TCTRL_Register is record
-- Trigger enable
HTEN : TCTRL_HTEN_Field := NXP_SVD.ADC.Hten_0;
-- SAR Result Destination For Channel A
FIFO_SEL_A : TCTRL_FIFO_SEL_A_Field := NXP_SVD.ADC.Fifo_Sel_A_0;
-- SAR Result Destination For Channel B
FIFO_SEL_B : TCTRL_FIFO_SEL_B_Field := NXP_SVD.ADC.Fifo_Sel_B_0;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Trigger priority setting
TPRI : TCTRL_TPRI_Field := NXP_SVD.ADC.Tpri_0;
-- unspecified
Reserved_12_14 : HAL.UInt3 := 16#0#;
-- Trigger Resync
RSYNC : Boolean := False;
-- Trigger delay select
TDLY : TCTRL_TDLY_Field := 16#0#;
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Trigger command select
TCMD : TCTRL_TCMD_Field := NXP_SVD.ADC.Tcmd_0;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TCTRL_Register use record
HTEN at 0 range 0 .. 0;
FIFO_SEL_A at 0 range 1 .. 1;
FIFO_SEL_B at 0 range 2 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
TPRI at 0 range 8 .. 11;
Reserved_12_14 at 0 range 12 .. 14;
RSYNC at 0 range 15 .. 15;
TDLY at 0 range 16 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
TCMD at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- Trigger Control Register
type TCTRL_Registers is array (0 .. 15) of TCTRL_Register
with Volatile;
subtype FCTRL_FCOUNT_Field is HAL.UInt5;
subtype FCTRL_FWMARK_Field is HAL.UInt4;
-- FIFO Control Register
type FCTRL_Register is record
-- Read-only. Result FIFO counter
FCOUNT : FCTRL_FCOUNT_Field := 16#0#;
-- unspecified
Reserved_5_15 : HAL.UInt11 := 16#0#;
-- Watermark level selection
FWMARK : FCTRL_FWMARK_Field := 16#0#;
-- unspecified
Reserved_20_31 : HAL.UInt12 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for FCTRL_Register use record
FCOUNT at 0 range 0 .. 4;
Reserved_5_15 at 0 range 5 .. 15;
FWMARK at 0 range 16 .. 19;
Reserved_20_31 at 0 range 20 .. 31;
end record;
-- FIFO Control Register
type FCTRL_Registers is array (0 .. 1) of FCTRL_Register
with Volatile;
subtype GCC_GAIN_CAL_Field is HAL.UInt16;
-- Gain Calibration Value Valid
type GCC_RDY_Field is
(
-- The gain calibration value is invalid. Run the auto-calibration
-- routine for this value to be written.
Rdy_0,
-- The gain calibration value is valid. It should be used to update the
-- GCRa[GCALR] register field.
Rdy_1)
with Size => 1;
for GCC_RDY_Field use
(Rdy_0 => 0,
Rdy_1 => 1);
-- Gain Calibration Control
type GCC_Register is record
-- Read-only. Gain Calibration Value
GAIN_CAL : GCC_GAIN_CAL_Field;
-- unspecified
Reserved_16_23 : HAL.UInt8;
-- Read-only. Gain Calibration Value Valid
RDY : GCC_RDY_Field;
-- unspecified
Reserved_25_31 : HAL.UInt7;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GCC_Register use record
GAIN_CAL at 0 range 0 .. 15;
Reserved_16_23 at 0 range 16 .. 23;
RDY at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
-- Gain Calibration Control
type GCC_Registers is array (0 .. 1) of GCC_Register
with Volatile;
subtype GCR_GCALR_Field is HAL.UInt16;
-- Gain Calculation Ready
type GCR_RDY_Field is
(
-- The gain offset calculation value is invalid.
Rdy_0,
-- The gain calibration value is valid.
Rdy_1)
with Size => 1;
for GCR_RDY_Field use
(Rdy_0 => 0,
Rdy_1 => 1);
-- Gain Calculation Result
type GCR_Register is record
-- Gain Calculation Result
GCALR : GCR_GCALR_Field := 16#0#;
-- unspecified
Reserved_16_23 : HAL.UInt8 := 16#0#;
-- Gain Calculation Ready
RDY : GCR_RDY_Field := NXP_SVD.ADC.Rdy_0;
-- unspecified
Reserved_25_31 : HAL.UInt7 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GCR_Register use record
GCALR at 0 range 0 .. 15;
Reserved_16_23 at 0 range 16 .. 23;
RDY at 0 range 24 .. 24;
Reserved_25_31 at 0 range 25 .. 31;
end record;
-- Gain Calculation Result
type GCR_Registers is array (0 .. 1) of GCR_Register
with Volatile;
-- Input channel select
type CMDL1_ADCH_Field is
(
-- Select CH0A or CH0B or CH0A/CH0B pair.
Adch_0,
-- Select CH1A or CH1B or CH1A/CH1B pair.
Adch_1,
-- Select CH2A or CH2B or CH2A/CH2B pair.
Adch_2,
-- Select CH3A or CH3B or CH3A/CH3B pair.
Adch_3,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_4,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_5,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_6,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_7,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_8,
-- Select corresponding channel CHnA or CHnB or CHnA/CHnB pair.
Adch_9,
-- Select CH30A or CH30B or CH30A/CH30B pair.
Adch_30,
-- Select CH31A or CH31B or CH31A/CH31B pair.
Adch_31)
with Size => 5;
for CMDL1_ADCH_Field use
(Adch_0 => 0,
Adch_1 => 1,
Adch_2 => 2,
Adch_3 => 3,
Adch_4 => 4,
Adch_5 => 5,
Adch_6 => 6,
Adch_7 => 7,
Adch_8 => 8,
Adch_9 => 9,
Adch_30 => 30,
Adch_31 => 31);
-- Conversion Type
type CMDL1_CTYPE_Field is
(
-- Single-Ended Mode. Only A side channel is converted.
Ctype_0,
-- Single-Ended Mode. Only B side channel is converted.
Ctype_1,
-- Differential Mode. A-B.
Ctype_2,
-- Dual-Single-Ended Mode. Both A side and B side channels are converted
-- independently.
Ctype_3)
with Size => 2;
for CMDL1_CTYPE_Field use
(Ctype_0 => 0,
Ctype_1 => 1,
Ctype_2 => 2,
Ctype_3 => 3);
-- Select resolution of conversions
type CMDL1_MODE_Field is
(
-- Standard resolution. Single-ended 12-bit conversion; Differential
-- 13-bit conversion with 2's complement output.
Mode_0,
-- High resolution. Single-ended 16-bit conversion; Differential 16-bit
-- conversion with 2's complement output.
Mode_1)
with Size => 1;
for CMDL1_MODE_Field use
(Mode_0 => 0,
Mode_1 => 1);
-- ADC Command Low Buffer Register
type CMDL_Register is record
-- Input channel select
ADCH : CMDL1_ADCH_Field := NXP_SVD.ADC.Adch_0;
-- Conversion Type
CTYPE : CMDL1_CTYPE_Field := NXP_SVD.ADC.Ctype_0;
-- Select resolution of conversions
MODE : CMDL1_MODE_Field := NXP_SVD.ADC.Mode_0;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CMDL_Register use record
ADCH at 0 range 0 .. 4;
CTYPE at 0 range 5 .. 6;
MODE at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- Compare Function Enable
type CMDH1_CMPEN_Field is
(
-- Compare disabled.
Cmpen_0,
-- Compare enabled. Store on true.
Cmpen_2,
-- Compare enabled. Repeat channel acquisition (sample/convert/compare)
-- until true.
Cmpen_3)
with Size => 2;
for CMDH1_CMPEN_Field use
(Cmpen_0 => 0,
Cmpen_2 => 2,
Cmpen_3 => 3);
-- Wait for trigger assertion before execution.
type CMDH1_WAIT_TRIG_Field is
(
-- This command will be automatically executed.
Wait_Trig_0,
-- The active trigger must be asserted again before executing this
-- command.
Wait_Trig_1)
with Size => 1;
for CMDH1_WAIT_TRIG_Field use
(Wait_Trig_0 => 0,
Wait_Trig_1 => 1);
-- Loop with Increment
type CMDH1_LWI_Field is
(
-- Auto channel increment disabled
Lwi_0,
-- Auto channel increment enabled
Lwi_1)
with Size => 1;
for CMDH1_LWI_Field use
(Lwi_0 => 0,
Lwi_1 => 1);
-- Sample Time Select
type CMDH1_STS_Field is
(
-- Minimum sample time of 3 ADCK cycles.
Sts_0,
-- 3 + 21 ADCK cycles; 5 ADCK cycles total sample time.
Sts_1,
-- 3 + 22 ADCK cycles; 7 ADCK cycles total sample time.
Sts_2,
-- 3 + 23 ADCK cycles; 11 ADCK cycles total sample time.
Sts_3,
-- 3 + 24 ADCK cycles; 19 ADCK cycles total sample time.
Sts_4,
-- 3 + 25 ADCK cycles; 35 ADCK cycles total sample time.
Sts_5,
-- 3 + 26 ADCK cycles; 67 ADCK cycles total sample time.
Sts_6,
-- 3 + 27 ADCK cycles; 131 ADCK cycles total sample time.
Sts_7)
with Size => 3;
for CMDH1_STS_Field use
(Sts_0 => 0,
Sts_1 => 1,
Sts_2 => 2,
Sts_3 => 3,
Sts_4 => 4,
Sts_5 => 5,
Sts_6 => 6,
Sts_7 => 7);
-- Hardware Average Select
type CMDH1_AVGS_Field is
(
-- Single conversion.
Avgs_0,
-- 2 conversions averaged.
Avgs_1,
-- 4 conversions averaged.
Avgs_2,
-- 8 conversions averaged.
Avgs_3,
-- 16 conversions averaged.
Avgs_4,
-- 32 conversions averaged.
Avgs_5,
-- 64 conversions averaged.
Avgs_6,
-- 128 conversions averaged.
Avgs_7)
with Size => 3;
for CMDH1_AVGS_Field use
(Avgs_0 => 0,
Avgs_1 => 1,
Avgs_2 => 2,
Avgs_3 => 3,
Avgs_4 => 4,
Avgs_5 => 5,
Avgs_6 => 6,
Avgs_7 => 7);
-- Loop Count Select
type CMDH1_LOOP_Field is
(
-- Looping not enabled. Command executes 1 time.
Loop_0,
-- Loop 1 time. Command executes 2 times.
Loop_1,
-- Loop 2 times. Command executes 3 times.
Loop_2,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_3,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_4,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_5,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_6,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_7,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_8,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_9,
-- Loop 15 times. Command executes 16 times.
Loop_15)
with Size => 4;
for CMDH1_LOOP_Field use
(Loop_0 => 0,
Loop_1 => 1,
Loop_2 => 2,
Loop_3 => 3,
Loop_4 => 4,
Loop_5 => 5,
Loop_6 => 6,
Loop_7 => 7,
Loop_8 => 8,
Loop_9 => 9,
Loop_15 => 15);
-- Next Command Select
type CMDH1_NEXT_Field is
(
-- No next command defined. Terminate conversions at completion of
-- current command. If lower priority trigger pending, begin command
-- associated with lower priority trigger.
Next_0,
-- Select CMD1 command buffer register as next command.
Next_1,
-- Select corresponding CMD command buffer register as next command
Next_2,
-- Select corresponding CMD command buffer register as next command
Next_3,
-- Select corresponding CMD command buffer register as next command
Next_4,
-- Select corresponding CMD command buffer register as next command
Next_5,
-- Select corresponding CMD command buffer register as next command
Next_6,
-- Select corresponding CMD command buffer register as next command
Next_7,
-- Select corresponding CMD command buffer register as next command
Next_8,
-- Select corresponding CMD command buffer register as next command
Next_9,
-- Select CMD15 command buffer register as next command.
Next_15)
with Size => 4;
for CMDH1_NEXT_Field use
(Next_0 => 0,
Next_1 => 1,
Next_2 => 2,
Next_3 => 3,
Next_4 => 4,
Next_5 => 5,
Next_6 => 6,
Next_7 => 7,
Next_8 => 8,
Next_9 => 9,
Next_15 => 15);
-- ADC Command High Buffer Register
type CMDH_Register is record
-- Compare Function Enable
CMPEN : CMDH1_CMPEN_Field := NXP_SVD.ADC.Cmpen_0;
-- Wait for trigger assertion before execution.
WAIT_TRIG : CMDH1_WAIT_TRIG_Field := NXP_SVD.ADC.Wait_Trig_0;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- Loop with Increment
LWI : CMDH1_LWI_Field := NXP_SVD.ADC.Lwi_0;
-- Sample Time Select
STS : CMDH1_STS_Field := NXP_SVD.ADC.Sts_0;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Hardware Average Select
AVGS : CMDH1_AVGS_Field := NXP_SVD.ADC.Avgs_0;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Loop Count Select
LOOP_k : CMDH1_LOOP_Field := NXP_SVD.ADC.Loop_0;
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Next Command Select
NEXT : CMDH1_NEXT_Field := NXP_SVD.ADC.Next_0;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CMDH_Register use record
CMPEN at 0 range 0 .. 1;
WAIT_TRIG at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
LWI at 0 range 7 .. 7;
STS at 0 range 8 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
AVGS at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
LOOP_k at 0 range 16 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
NEXT at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-- Wait for trigger assertion before execution.
type CMDH5_WAIT_TRIG_Field is
(
-- This command will be automatically executed.
Wait_Trig_0,
-- The active trigger must be asserted again before executing this
-- command.
Wait_Trig_1)
with Size => 1;
for CMDH5_WAIT_TRIG_Field use
(Wait_Trig_0 => 0,
Wait_Trig_1 => 1);
-- Loop with Increment
type CMDH5_LWI_Field is
(
-- Auto channel increment disabled
Lwi_0,
-- Auto channel increment enabled
Lwi_1)
with Size => 1;
for CMDH5_LWI_Field use
(Lwi_0 => 0,
Lwi_1 => 1);
-- Sample Time Select
type CMDH5_STS_Field is
(
-- Minimum sample time of 3 ADCK cycles.
Sts_0,
-- 3 + 21 ADCK cycles; 5 ADCK cycles total sample time.
Sts_1,
-- 3 + 22 ADCK cycles; 7 ADCK cycles total sample time.
Sts_2,
-- 3 + 23 ADCK cycles; 11 ADCK cycles total sample time.
Sts_3,
-- 3 + 24 ADCK cycles; 19 ADCK cycles total sample time.
Sts_4,
-- 3 + 25 ADCK cycles; 35 ADCK cycles total sample time.
Sts_5,
-- 3 + 26 ADCK cycles; 67 ADCK cycles total sample time.
Sts_6,
-- 3 + 27 ADCK cycles; 131 ADCK cycles total sample time.
Sts_7)
with Size => 3;
for CMDH5_STS_Field use
(Sts_0 => 0,
Sts_1 => 1,
Sts_2 => 2,
Sts_3 => 3,
Sts_4 => 4,
Sts_5 => 5,
Sts_6 => 6,
Sts_7 => 7);
-- Hardware Average Select
type CMDH5_AVGS_Field is
(
-- Single conversion.
Avgs_0,
-- 2 conversions averaged.
Avgs_1,
-- 4 conversions averaged.
Avgs_2,
-- 8 conversions averaged.
Avgs_3,
-- 16 conversions averaged.
Avgs_4,
-- 32 conversions averaged.
Avgs_5,
-- 64 conversions averaged.
Avgs_6,
-- 128 conversions averaged.
Avgs_7)
with Size => 3;
for CMDH5_AVGS_Field use
(Avgs_0 => 0,
Avgs_1 => 1,
Avgs_2 => 2,
Avgs_3 => 3,
Avgs_4 => 4,
Avgs_5 => 5,
Avgs_6 => 6,
Avgs_7 => 7);
-- Loop Count Select
type CMDH5_LOOP_Field is
(
-- Looping not enabled. Command executes 1 time.
Loop_0,
-- Loop 1 time. Command executes 2 times.
Loop_1,
-- Loop 2 times. Command executes 3 times.
Loop_2,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_3,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_4,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_5,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_6,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_7,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_8,
-- Loop corresponding number of times. Command executes LOOP+1 times.
Loop_9,
-- Loop 15 times. Command executes 16 times.
Loop_15)
with Size => 4;
for CMDH5_LOOP_Field use
(Loop_0 => 0,
Loop_1 => 1,
Loop_2 => 2,
Loop_3 => 3,
Loop_4 => 4,
Loop_5 => 5,
Loop_6 => 6,
Loop_7 => 7,
Loop_8 => 8,
Loop_9 => 9,
Loop_15 => 15);
-- Next Command Select
type CMDH5_NEXT_Field is
(
-- No next command defined. Terminate conversions at completion of
-- current command. If lower priority trigger pending, begin command
-- associated with lower priority trigger.
Next_0,
-- Select CMD1 command buffer register as next command.
Next_1,
-- Select corresponding CMD command buffer register as next command
Next_2,
-- Select corresponding CMD command buffer register as next command
Next_3,
-- Select corresponding CMD command buffer register as next command
Next_4,
-- Select corresponding CMD command buffer register as next command
Next_5,
-- Select corresponding CMD command buffer register as next command
Next_6,
-- Select corresponding CMD command buffer register as next command
Next_7,
-- Select corresponding CMD command buffer register as next command
Next_8,
-- Select corresponding CMD command buffer register as next command
Next_9,
-- Select CMD15 command buffer register as next command.
Next_15)
with Size => 4;
for CMDH5_NEXT_Field use
(Next_0 => 0,
Next_1 => 1,
Next_2 => 2,
Next_3 => 3,
Next_4 => 4,
Next_5 => 5,
Next_6 => 6,
Next_7 => 7,
Next_8 => 8,
Next_9 => 9,
Next_15 => 15);
-- ADC Command High Buffer Register
type CMDH_Register_1 is record
-- unspecified
Reserved_0_1 : HAL.UInt2 := 16#0#;
-- Wait for trigger assertion before execution.
WAIT_TRIG : CMDH5_WAIT_TRIG_Field := NXP_SVD.ADC.Wait_Trig_0;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- Loop with Increment
LWI : CMDH5_LWI_Field := NXP_SVD.ADC.Lwi_0;
-- Sample Time Select
STS : CMDH5_STS_Field := NXP_SVD.ADC.Sts_0;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Hardware Average Select
AVGS : CMDH5_AVGS_Field := NXP_SVD.ADC.Avgs_0;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Loop Count Select
LOOP_k : CMDH5_LOOP_Field := NXP_SVD.ADC.Loop_0;
-- unspecified
Reserved_20_23 : HAL.UInt4 := 16#0#;
-- Next Command Select
NEXT : CMDH5_NEXT_Field := NXP_SVD.ADC.Next_0;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CMDH_Register_1 use record
Reserved_0_1 at 0 range 0 .. 1;
WAIT_TRIG at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
LWI at 0 range 7 .. 7;
STS at 0 range 8 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
AVGS at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
LOOP_k at 0 range 16 .. 19;
Reserved_20_23 at 0 range 20 .. 23;
NEXT at 0 range 24 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
subtype CV_CVL_Field is HAL.UInt16;
subtype CV_CVH_Field is HAL.UInt16;
-- Compare Value Register
type CV_Register is record
-- Compare Value Low.
CVL : CV_CVL_Field := 16#0#;
-- Compare Value High.
CVH : CV_CVH_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CV_Register use record
CVL at 0 range 0 .. 15;
CVH at 0 range 16 .. 31;
end record;
-- Compare Value Register
type CV_Registers is array (0 .. 3) of CV_Register
with Volatile;
subtype RESFIFO_D_Field is HAL.UInt16;
-- Trigger Source
type RESFIFO_TSRC_Field is
(
-- Trigger source 0 initiated this conversion.
Tsrc_0,
-- Trigger source 1 initiated this conversion.
Tsrc_1,
-- Corresponding trigger source initiated this conversion.
Tsrc_2,
-- Corresponding trigger source initiated this conversion.
Tsrc_3,
-- Corresponding trigger source initiated this conversion.
Tsrc_4,
-- Corresponding trigger source initiated this conversion.
Tsrc_5,
-- Corresponding trigger source initiated this conversion.
Tsrc_6,
-- Corresponding trigger source initiated this conversion.
Tsrc_7,
-- Corresponding trigger source initiated this conversion.
Tsrc_8,
-- Corresponding trigger source initiated this conversion.
Tsrc_9,
-- Trigger source 15 initiated this conversion.
Tsrc_15)
with Size => 4;
for RESFIFO_TSRC_Field use
(Tsrc_0 => 0,
Tsrc_1 => 1,
Tsrc_2 => 2,
Tsrc_3 => 3,
Tsrc_4 => 4,
Tsrc_5 => 5,
Tsrc_6 => 6,
Tsrc_7 => 7,
Tsrc_8 => 8,
Tsrc_9 => 9,
Tsrc_15 => 15);
-- Loop count value
type RESFIFO_LOOPCNT_Field is
(
-- Result is from initial conversion in command.
Loopcnt_0,
-- Result is from second conversion in command.
Loopcnt_1,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_2,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_3,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_4,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_5,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_6,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_7,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_8,
-- Result is from LOOPCNT+1 conversion in command.
Loopcnt_9,
-- Result is from 16th conversion in command.
Loopcnt_15)
with Size => 4;
for RESFIFO_LOOPCNT_Field use
(Loopcnt_0 => 0,
Loopcnt_1 => 1,
Loopcnt_2 => 2,
Loopcnt_3 => 3,
Loopcnt_4 => 4,
Loopcnt_5 => 5,
Loopcnt_6 => 6,
Loopcnt_7 => 7,
Loopcnt_8 => 8,
Loopcnt_9 => 9,
Loopcnt_15 => 15);
-- Command Buffer Source
type RESFIFO_CMDSRC_Field is
(
-- Not a valid value CMDSRC value for a dataword in RESFIFO. 0x0 is only
-- found in initial FIFO state prior to an ADC conversion result
-- dataword being stored to a RESFIFO buffer.
Cmdsrc_0,
-- CMD1 buffer used as control settings for this conversion.
Cmdsrc_1,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_2,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_3,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_4,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_5,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_6,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_7,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_8,
-- Corresponding command buffer used as control settings for this
-- conversion.
Cmdsrc_9,
-- CMD15 buffer used as control settings for this conversion.
Cmdsrc_15)
with Size => 4;
for RESFIFO_CMDSRC_Field use
(Cmdsrc_0 => 0,
Cmdsrc_1 => 1,
Cmdsrc_2 => 2,
Cmdsrc_3 => 3,
Cmdsrc_4 => 4,
Cmdsrc_5 => 5,
Cmdsrc_6 => 6,
Cmdsrc_7 => 7,
Cmdsrc_8 => 8,
Cmdsrc_9 => 9,
Cmdsrc_15 => 15);
-- FIFO entry is valid
type RESFIFO_VALID_Field is
(
-- FIFO is empty. Discard any read from RESFIFO.
Valid_0,
-- FIFO record read from RESFIFO is valid.
Valid_1)
with Size => 1;
for RESFIFO_VALID_Field use
(Valid_0 => 0,
Valid_1 => 1);
-- ADC Data Result FIFO Register
type RESFIFO_Register is record
-- Read-only. Data result
D : RESFIFO_D_Field;
-- Read-only. Trigger Source
TSRC : RESFIFO_TSRC_Field;
-- Read-only. Loop count value
LOOPCNT : RESFIFO_LOOPCNT_Field;
-- Read-only. Command Buffer Source
CMDSRC : RESFIFO_CMDSRC_Field;
-- unspecified
Reserved_28_30 : HAL.UInt3;
-- Read-only. FIFO entry is valid
VALID : RESFIFO_VALID_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RESFIFO_Register use record
D at 0 range 0 .. 15;
TSRC at 0 range 16 .. 19;
LOOPCNT at 0 range 20 .. 23;
CMDSRC at 0 range 24 .. 27;
Reserved_28_30 at 0 range 28 .. 30;
VALID at 0 range 31 .. 31;
end record;
-- ADC Data Result FIFO Register
type RESFIFO_Registers is array (0 .. 1) of RESFIFO_Register
with Volatile;
subtype CAL_GAR_CAL_GAR_VAL_Field is HAL.UInt16;
-- Calibration General A-Side Registers
type CAL_GAR_Register is record
-- Calibration General A Side Register Element
CAL_GAR_VAL : CAL_GAR_CAL_GAR_VAL_Field := 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 CAL_GAR_Register use record
CAL_GAR_VAL at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Calibration General A-Side Registers
type CAL_GAR_Registers is array (0 .. 32) of CAL_GAR_Register
with Volatile;
subtype CAL_GBR_CAL_GBR_VAL_Field is HAL.UInt16;
-- Calibration General B-Side Registers
type CAL_GBR_Register is record
-- Calibration General B Side Register Element
CAL_GBR_VAL : CAL_GBR_CAL_GBR_VAL_Field := 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 CAL_GBR_Register use record
CAL_GBR_VAL at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
-- Calibration General B-Side Registers
type CAL_GBR_Registers is array (0 .. 32) of CAL_GBR_Register
with Volatile;
-- Calibration Sample Time Long
type TST_CST_LONG_Field is
(
-- Normal sample time. Minimum sample time of 3 ADCK cycles.
Cst_Long_0,
-- Increased sample time. 67 ADCK cycles total sample time.
Cst_Long_1)
with Size => 1;
for TST_CST_LONG_Field use
(Cst_Long_0 => 0,
Cst_Long_1 => 1);
-- Force M-side positive offset
type TST_FOFFM_Field is
(
-- Normal operation. No forced offset.
Foffm_0,
-- Test configuration. Forced positive offset on MDAC.
Foffm_1)
with Size => 1;
for TST_FOFFM_Field use
(Foffm_0 => 0,
Foffm_1 => 1);
-- Force P-side positive offset
type TST_FOFFP_Field is
(
-- Normal operation. No forced offset.
Foffp_0,
-- Test configuration. Forced positive offset on PDAC.
Foffp_1)
with Size => 1;
for TST_FOFFP_Field use
(Foffp_0 => 0,
Foffp_1 => 1);
-- Force M-side negative offset
type TST_FOFFM2_Field is
(
-- Normal operation. No forced offset.
Foffm2_0,
-- Test configuration. Forced negative offset on MDAC.
Foffm2_1)
with Size => 1;
for TST_FOFFM2_Field use
(Foffm2_0 => 0,
Foffm2_1 => 1);
-- Force P-side negative offset
type TST_FOFFP2_Field is
(
-- Normal operation. No forced offset.
Foffp2_0,
-- Test configuration. Forced negative offset on PDAC.
Foffp2_1)
with Size => 1;
for TST_FOFFP2_Field use
(Foffp2_0 => 0,
Foffp2_1 => 1);
-- Enable test configuration
type TST_TESTEN_Field is
(
-- Normal operation. Test configuration not enabled.
Testen_0,
-- Hardware BIST Test in progress.
Testen_1)
with Size => 1;
for TST_TESTEN_Field use
(Testen_0 => 0,
Testen_1 => 1);
-- ADC Test Register
type TST_Register is record
-- Calibration Sample Time Long
CST_LONG : TST_CST_LONG_Field := NXP_SVD.ADC.Cst_Long_0;
-- unspecified
Reserved_1_7 : HAL.UInt7 := 16#0#;
-- Force M-side positive offset
FOFFM : TST_FOFFM_Field := NXP_SVD.ADC.Foffm_0;
-- Force P-side positive offset
FOFFP : TST_FOFFP_Field := NXP_SVD.ADC.Foffp_0;
-- Force M-side negative offset
FOFFM2 : TST_FOFFM2_Field := NXP_SVD.ADC.Foffm2_0;
-- Force P-side negative offset
FOFFP2 : TST_FOFFP2_Field := NXP_SVD.ADC.Foffp2_0;
-- unspecified
Reserved_12_22 : HAL.UInt11 := 16#0#;
-- Enable test configuration
TESTEN : TST_TESTEN_Field := NXP_SVD.ADC.Testen_0;
-- unspecified
Reserved_24_31 : HAL.UInt8 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TST_Register use record
CST_LONG at 0 range 0 .. 0;
Reserved_1_7 at 0 range 1 .. 7;
FOFFM at 0 range 8 .. 8;
FOFFP at 0 range 9 .. 9;
FOFFM2 at 0 range 10 .. 10;
FOFFP2 at 0 range 11 .. 11;
Reserved_12_22 at 0 range 12 .. 22;
TESTEN at 0 range 23 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- ADC
type ADC0_Peripheral is record
-- Version ID Register
VERID : aliased VERID_Register;
-- Parameter Register
PARAM : aliased PARAM_Register;
-- ADC Control Register
CTRL : aliased CTRL_Register;
-- ADC Status Register
STAT : aliased STAT_Register;
-- Interrupt Enable Register
IE : aliased IE_Register;
-- DMA Enable Register
DE : aliased DE_Register;
-- ADC Configuration Register
CFG : aliased CFG_Register;
-- ADC Pause Register
PAUSE : aliased PAUSE_Register;
-- Software Trigger Register
SWTRIG : aliased SWTRIG_Register;
-- Trigger Status Register
TSTAT : aliased TSTAT_Register;
-- ADC Offset Trim Register
OFSTRIM : aliased OFSTRIM_Register;
-- Trigger Control Register
TCTRL : aliased TCTRL_Registers;
-- FIFO Control Register
FCTRL : aliased FCTRL_Registers;
-- Gain Calibration Control
GCC : aliased GCC_Registers;
-- Gain Calculation Result
GCR : aliased GCR_Registers;
-- ADC Command Low Buffer Register
CMDL1 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH1 : aliased CMDH_Register;
-- ADC Command Low Buffer Register
CMDL2 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH2 : aliased CMDH_Register;
-- ADC Command Low Buffer Register
CMDL3 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH3 : aliased CMDH_Register;
-- ADC Command Low Buffer Register
CMDL4 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH4 : aliased CMDH_Register;
-- ADC Command Low Buffer Register
CMDL5 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH5 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL6 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH6 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL7 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH7 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL8 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH8 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL9 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH9 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL10 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH10 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL11 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH11 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL12 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH12 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL13 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH13 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL14 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH14 : aliased CMDH_Register_1;
-- ADC Command Low Buffer Register
CMDL15 : aliased CMDL_Register;
-- ADC Command High Buffer Register
CMDH15 : aliased CMDH_Register_1;
-- Compare Value Register
CV : aliased CV_Registers;
-- ADC Data Result FIFO Register
RESFIFO : aliased RESFIFO_Registers;
-- Calibration General A-Side Registers
CAL_GAR : aliased CAL_GAR_Registers;
-- Calibration General B-Side Registers
CAL_GBR : aliased CAL_GBR_Registers;
-- ADC Test Register
TST : aliased TST_Register;
end record
with Volatile;
for ADC0_Peripheral use record
VERID at 16#0# range 0 .. 31;
PARAM at 16#4# range 0 .. 31;
CTRL at 16#10# range 0 .. 31;
STAT at 16#14# range 0 .. 31;
IE at 16#18# range 0 .. 31;
DE at 16#1C# range 0 .. 31;
CFG at 16#20# range 0 .. 31;
PAUSE at 16#24# range 0 .. 31;
SWTRIG at 16#34# range 0 .. 31;
TSTAT at 16#38# range 0 .. 31;
OFSTRIM at 16#40# range 0 .. 31;
TCTRL at 16#A0# range 0 .. 511;
FCTRL at 16#E0# range 0 .. 63;
GCC at 16#F0# range 0 .. 63;
GCR at 16#F8# range 0 .. 63;
CMDL1 at 16#100# range 0 .. 31;
CMDH1 at 16#104# range 0 .. 31;
CMDL2 at 16#108# range 0 .. 31;
CMDH2 at 16#10C# range 0 .. 31;
CMDL3 at 16#110# range 0 .. 31;
CMDH3 at 16#114# range 0 .. 31;
CMDL4 at 16#118# range 0 .. 31;
CMDH4 at 16#11C# range 0 .. 31;
CMDL5 at 16#120# range 0 .. 31;
CMDH5 at 16#124# range 0 .. 31;
CMDL6 at 16#128# range 0 .. 31;
CMDH6 at 16#12C# range 0 .. 31;
CMDL7 at 16#130# range 0 .. 31;
CMDH7 at 16#134# range 0 .. 31;
CMDL8 at 16#138# range 0 .. 31;
CMDH8 at 16#13C# range 0 .. 31;
CMDL9 at 16#140# range 0 .. 31;
CMDH9 at 16#144# range 0 .. 31;
CMDL10 at 16#148# range 0 .. 31;
CMDH10 at 16#14C# range 0 .. 31;
CMDL11 at 16#150# range 0 .. 31;
CMDH11 at 16#154# range 0 .. 31;
CMDL12 at 16#158# range 0 .. 31;
CMDH12 at 16#15C# range 0 .. 31;
CMDL13 at 16#160# range 0 .. 31;
CMDH13 at 16#164# range 0 .. 31;
CMDL14 at 16#168# range 0 .. 31;
CMDH14 at 16#16C# range 0 .. 31;
CMDL15 at 16#170# range 0 .. 31;
CMDH15 at 16#174# range 0 .. 31;
CV at 16#200# range 0 .. 127;
RESFIFO at 16#300# range 0 .. 63;
CAL_GAR at 16#400# range 0 .. 1055;
CAL_GBR at 16#500# range 0 .. 1055;
TST at 16#FFC# range 0 .. 31;
end record;
-- ADC
ADC0_Periph : aliased ADC0_Peripheral
with Import, Address => System'To_Address (16#400A0000#);
end NXP_SVD.ADC;
|
with Ada.Strings,
Ada.Strings.UTF_Encoding,
Ada.Strings.UTF_Encoding.Wide_Strings,
Ada.Wide_Text_IO;
use Ada.Strings.UTF_Encoding;
package body Password_Encode is
--
--
package body Base64 is
--
procedure Decode(Source : in String;
Target : out Bytes;
Last : out Natural) is
-- Six-bit value representing a Base64 character's numerical value.
D : Six_Bits;
-- Slot := which chunk of bits in a 24-bit segment is being represented
-- by the current character or value of D. range: 0 .. 3
type Slots is mod 4;
Slot : Slots := 0;
-- Current operation's string index of input string.
begin
Last := Target'first - 1;
for Si in Source'range loop
D := To_ModSix(Source(Si));
if D /= 0 or else Source(Si) = 'A' then
-- source is valid Base64
case Slot is
when 0 =>
Last := Last + 1;
Target(Last) := 4 * D; -- dddddd00 ........ ........
when 1 =>
Target(Last) := Target(Last) + D / 16;
exit when Last = Target'last
and then (Si = Source'last or else Source(Si + 1) = '=')
and then (D mod 16) = 0;
Last := Last + 1;
Target(Last) := (D mod 16) * 16; -- dddddddd dddd0000 ........
when 2 =>
Target(Last) := Target(Last) + D / 4;
exit when Last = Target'last
and then (Si = Source'last or else Source(Si + 1) = '=')
and then (D mod 4) = 0;
Last := Last + 1;
Target(Last) := (D mod 4) * 64; -- dddddddd dddddddd dd000000
when 3 =>
Target(Last) := Target(Last) + D; -- dddddddd dddddddd dddddddd
end case;
Slot := Slot + 1;
elsif Source(Si) = '=' then
exit; -- terminator encountered
end if; -- silently ignore whitespace, lf, garbage, ...
end loop;
end Decode;
function Decode(Source : in String) return Bytes is
Out_Bytes : Bytes(1 .. Source'Length) := (others => 0);
Out_Length : Natural := 0;
begin
Decode(Source, Out_Bytes, Out_Length);
return Out_Bytes(1 .. Out_Length);
end Decode;
-- Encode Bytes into Base64 String.
procedure Encode(Source : in Bytes;
Target : out String;
Last : out Natural) is
-- Target is filled in four character increments, except that
-- a CR-LF pair is inserted after every 76 characters.
-- Target'length must be at least:
-- Output_Quad_Count: constant := (Source'length + 2) / 3;
-- Output_Byte_Count: constant := 4 * Output_Quad_Count;
-- Target'length = Output_Byte_Count + 2 * (Output_Byte_Count / 76)
-- Constraint_Error will be raised if Target isn't long enough.
-- use type Ada.Streams.Stream_Element;
-- use type Ada.Streams.Stream_Element_Offset;
D : Six_Bits;
type Slots is mod 3;
Slot : Slots := 0;
Output_Line_Length: Natural := 0;
begin
Last := Target'first - 1;
for Si in Source'range loop
case Slot is
when 0 =>
Output_Line_Length := Output_Line_Length + 4;
Last := Last + 4;
Target(Last - 3) := To_Char64(Source(Si) / 4);
D := (Source(Si) mod 4) * 16;
Target(Last - 2) := To_Char64(D);
Target(Last - 1) := '=';
Target(Last) := '=';
-- dddddd dd0000 = =
when 1 =>
D := D + Source(Si) / 16;
Target(Last - 2) := To_Char64(D);
D := (Source(Si) mod 16) * 4;
Target(Last - 1) := To_Char64(D);
-- dddddd dddddd dddd00 =
when 2 =>
D := D + Source(Si) / 64;
Target(Last - 1) := To_Char64(D);
Target(Last) := To_Char64(Source(Si) mod 64);
-- dddddd dddddd dddddd dddddd
end case;
Slot := Slot + 1;
end loop;
end Encode;
function Encode(Source : in Bytes) return String is
Out_String : String(1 .. (((Source'Length * 4) / 3) + 4));
Out_Length : Natural := 0;
begin
Encode(Source, Out_String, Out_Length);
return Out_String(1 .. Out_Length);
end Encode;
end Base64;
--
--
--
--
function Standard_Input return IO.File_Type is
begin
return IO.Standard_Input;
end Standard_Input;
function Standard_Output return IO.File_Type is
begin
return IO.Standard_Output;
end Standard_Output;
--
--
function Get_Codec return Password_Codec is
New_Codec : Password_Codec := Codec;
begin
if Codec = Password_Codec'Last
then Codec := Password_Codec'First;
else Codec := Password_Codec'Succ(Codec);
end if;
return New_Codec;
end Get_Codec;
--
--
procedure Report_Wide(Message: Wide_String) is
begin
Ada.Wide_Text_IO.Put_Line(File => Ada.Wide_Text_IO.Current_Error,
Item => Message);
end Report_Wide;
procedure Report(Message : UTF_8_String) is
Converted_String : Wide_String := Wide_Strings.Decode(Item => Message);
begin
Report_Wide(Message => Converted_String);
end Report;
--
--
protected body Encoder_Module is
procedure Get_Next(Target : out Natural) is
begin
Target := Natural(Data(Position));
Position := (Position mod Finish) + 1;
end Get_Next;
procedure Get_Next(Target : out Natural; Increment : Boolean) is
begin
Target := Natural(Data(Position) + Inc);
Inc := (Inc + 1) mod 65536;
Position := (Position mod Finish) + 1;
end Get_Next;
function Codec return Password_Codec is
begin
return Module_Codec;
end Codec;
procedure Set(S : in Wide_String := " ") is
C : Wide_Character;
function Validate(Character_Pos : Natural) return Offset is
Valid_Offset: Offset := 0;
begin
if Character_Pos > 31
then
Valid_Offset := Offset(Character_Pos - 31);
else
Valid_Offset := 0;
end if;
return Valid_Offset;
end Validate;
begin
if S'Length < Size
then
Finish := S'Length;
else
Finish := Size;
Report("Warning: password is as large or larger than allowed by this program.");
Report(" To decrypt later you must use the exact same program or one with exact same");
Report(" internal configuration -- must clip the length of password to the same length");
Report(" as is being done now.");
end if;
Is_Set := True;
for Position in 1 .. Finish loop
C := S(Position);
Data(Position) := Validate(Wide_Character'Pos(C));
end loop;
Module_Codec := Get_Codec;
Position := 1;
end Set;
function Status return Boolean is
begin
return Is_Set;
end Status;
procedure Reset is
begin
Position := 1;
Inc := 0;
end Reset;
end Encoder_Module;
--
-- Make a new encoder for every File Input/Output to be performed within
-- any given time -- only one for One file at a time using the same
-- password set.
protected body Encoder is
function Status return Integer is
Number : Integer := 0;
begin
if Data(Status_Count).Status = True
then
Number := Status_Count;
else
for Module in Data'Range loop
if Data(Module).Status
then
Number := Number + 1;
end if;
end loop;
end if;
return Number;
end Status;
procedure Reset is
begin
for Module in Data'Range loop
Data(Module).Reset;
end loop;
Is_Clean := True;
end Reset;
procedure Set_Wide(S : in Wide_String) is
begin
if Status < Data'Length
then
Data(Status + 1).Set(S);
end if;
end Set_Wide;
--
procedure Set(S : in UTF_8_String) is
NewData : Wide_String := Wide_Strings.Decode(Item=> S);
begin
Set_Wide(S => NewData);
end Set;
--
procedure Set is
NewData : Wide_String(1 .. 1) := (others => Ada.Strings.Wide_Space);
begin
Set_Wide(S => NewData);
end Set;
procedure Encode(Input : in Bytes; Output : out Bytes) is
Input_Data : String := Base64.Encode(Input);
Input_Length : Integer := Input_Mod'Length;
Modules : constant Integer := Status;
Bytes_Length : Integer := Input'Length;
Break_Point : Integer := 1;
Output_Data : String(1 .. Input_Length) := Input_Data;
begin
for Module in Data'Range loop
case Data(Module).Codec is
when Modular =>
if Bytes_Length mod 3 = 0
then
for N in 1 .. Input_Length loop
Output_Mod(N) :=
Base64.To_Char64((Base64.To_ModSix(Input_Data(N))
+ Data(Module).Get_Next) mod 64);
end loop;
else
for N in 1 .. (Input_Length - 4) loop
Output_Mod(N) :=
Base64.To_Char64((Base64.To_ModSix(Input_Mod(N))
+ GetNext) mod 64);
end loop;
for N in (Input_Length - 4) .. (Input_Length - 1) loop
if Input_Mod(N + 1) = '='
then
Output_Mod(N) := Input_Mod(N);
else
Output_Mod(N) :=
Base64.To_Char64((Base64.To_ModSix(Input_Mod(N)) + GetNext) mod 64);
end if;
end loop;
end if;
when Low_Swap =>
null;
when Incrementing =>
null;
when High_Swap =>
null;
end case;
end loop;
if Is_Set2
then
Input_Mod2 := Output_Mod;
if Bytes_Length mod 3 = 0
then
Break_Point := Input_Length / 2;
else
Break_Point := (Input_Length - 4) / 2;
end if;
for N in GetNext2 loop
N := (Data(Module).Get_Next mod Break_Point) + 1;
for M in 1 .. N loop
Output_Mod(M) := Input_Mod2(M + N);
Output_Mod(M + N) := Input_Mod2(M);
end loop;
end loop;
end if;
if Is_Set3
then
null;
end if;
if Bytes_Length < 57
then
Is_Clean := False;
end if;
end Encode;
end Encoder;
end Password_Encode;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- G N A T . E N C O D E _ S T R I N G --
-- --
-- B o d y --
-- --
-- Copyright (C) 2007-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 Interfaces; use Interfaces;
with System.WCh_Con; use System.WCh_Con;
with System.WCh_Cnv; use System.WCh_Cnv;
package body GNAT.Encode_String is
-----------------------
-- Local Subprograms --
-----------------------
procedure Bad;
pragma No_Return (Bad);
-- Raise error for bad character code
procedure Past_End;
pragma No_Return (Past_End);
-- Raise error for off end of string
---------
-- Bad --
---------
procedure Bad is
begin
raise Constraint_Error with
"character cannot be encoded with given Encoding_Method";
end Bad;
------------------------
-- Encode_Wide_String --
------------------------
function Encode_Wide_String (S : Wide_String) return String is
Long : constant Natural := WC_Longest_Sequences (Encoding_Method);
Result : String (1 .. S'Length * Long);
Length : Natural;
begin
Encode_Wide_String (S, Result, Length);
return Result (1 .. Length);
end Encode_Wide_String;
procedure Encode_Wide_String
(S : Wide_String;
Result : out String;
Length : out Natural)
is
Ptr : Natural;
begin
Ptr := Result'First;
for J in S'Range loop
Encode_Wide_Character (S (J), Result, Ptr);
end loop;
Length := Ptr - Result'First;
end Encode_Wide_String;
-----------------------------
-- Encode_Wide_Wide_String --
-----------------------------
function Encode_Wide_Wide_String (S : Wide_Wide_String) return String is
Long : constant Natural := WC_Longest_Sequences (Encoding_Method);
Result : String (1 .. S'Length * Long);
Length : Natural;
begin
Encode_Wide_Wide_String (S, Result, Length);
return Result (1 .. Length);
end Encode_Wide_Wide_String;
procedure Encode_Wide_Wide_String
(S : Wide_Wide_String;
Result : out String;
Length : out Natural)
is
Ptr : Natural;
begin
Ptr := Result'First;
for J in S'Range loop
Encode_Wide_Wide_Character (S (J), Result, Ptr);
end loop;
Length := Ptr - Result'First;
end Encode_Wide_Wide_String;
---------------------------
-- Encode_Wide_Character --
---------------------------
procedure Encode_Wide_Character
(Char : Wide_Character;
Result : in out String;
Ptr : in out Natural)
is
begin
Encode_Wide_Wide_Character
(Wide_Wide_Character'Val (Wide_Character'Pos (Char)), Result, Ptr);
exception
when Constraint_Error =>
Bad;
end Encode_Wide_Character;
--------------------------------
-- Encode_Wide_Wide_Character --
--------------------------------
procedure Encode_Wide_Wide_Character
(Char : Wide_Wide_Character;
Result : in out String;
Ptr : in out Natural)
is
U : Unsigned_32;
procedure Out_Char (C : Character);
pragma Inline (Out_Char);
-- Procedure to store one character for instantiation below
--------------
-- Out_Char --
--------------
procedure Out_Char (C : Character) is
begin
if Ptr > Result'Last then
Past_End;
else
Result (Ptr) := C;
Ptr := Ptr + 1;
end if;
end Out_Char;
-- Start of processing for Encode_Wide_Wide_Character;
begin
-- Efficient code for UTF-8 case
if Encoding_Method = WCEM_UTF8 then
-- Note: for details of UTF8 encoding see RFC 3629
U := Unsigned_32 (Wide_Wide_Character'Pos (Char));
-- 16#00_0000#-16#00_007F#: 0xxxxxxx
if U <= 16#00_007F# then
Out_Char (Character'Val (U));
-- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx
elsif U <= 16#00_07FF# then
Out_Char (Character'Val (2#11000000# or Shift_Right (U, 6)));
Out_Char (Character'Val (2#10000000# or (U and 2#00111111#)));
-- 16#00_0800#-16#00_FFFF#: 1110xxxx 10xxxxxx 10xxxxxx
elsif U <= 16#00_FFFF# then
Out_Char (Character'Val (2#11100000# or Shift_Right (U, 12)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (U and 2#00111111#)));
-- 16#01_0000#-16#10_FFFF#: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
elsif U <= 16#10_FFFF# then
Out_Char (Character'Val (2#11110000# or Shift_Right (U, 18)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (U and 2#00111111#)));
-- 16#0020_0000#-16#03FF_FFFF#: 111110xx 10xxxxxx 10xxxxxx
-- 10xxxxxx 10xxxxxx
elsif U <= 16#03FF_FFFF# then
Out_Char (Character'Val (2#11111000# or Shift_Right (U, 24)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 18)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 12)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (Shift_Right (U, 6)
and 2#00111111#)));
Out_Char (Character'Val (2#10000000# or (U and 2#00111111#)));
-- All other cases are invalid character codes, not this includes:
-- 16#0400_0000#-16#7FFF_FFFF#: 1111110x 10xxxxxx 10xxxxxx
-- 10xxxxxx 10xxxxxx 10xxxxxx
-- since Wide_Wide_Character values cannot exceed 16#3F_FFFF#
else
Bad;
end if;
-- All encoding methods other than UTF-8
else
Non_UTF8 : declare
procedure UTF_32_To_String is
new UTF_32_To_Char_Sequence (Out_Char);
-- Instantiate conversion procedure with above Out_Char routine
begin
UTF_32_To_String
(UTF_32_Code (Wide_Wide_Character'Pos (Char)), Encoding_Method);
exception
when Constraint_Error =>
Bad;
end Non_UTF8;
end if;
end Encode_Wide_Wide_Character;
--------------
-- Past_End --
--------------
procedure Past_End is
begin
raise Constraint_Error with "past end of string";
end Past_End;
end GNAT.Encode_String;
|
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Exceptions;
-- Version simple : exclusion mutuelle pour toutes les opérations
-- fournit une ossature pour l'approche "service"
package body LR.Synchro.serveur is
function Nom_Strategie return String is
begin
return "Exclusion mutuelle simple";
end Nom_Strategie;
task LectRedTask is
entry Demander_Lecture;
entry Demander_Ecriture;
entry Terminer_Lecture;
entry Terminer_Ecriture;
end LectRedTask;
task body LectRedTask is
nbL: Integer := 0;
nbR: Integer := 0;
begin
loop
select
when nbR = 0 =>
accept Demander_Lecture; nbL := nbL +1;
or when nbL = 0 and nbR = 0 =>
accept Demander_Ecriture; nbR := nbR +1;
or when nbR > 0 =>
accept Terminer_Ecriture; nbR := nbR -1;
or when nbL > 0 =>
accept Terminer_Lecture; nbL := nbL -1;
or
terminate;
end select;
-- une fois une opération acceptée, on accepte uniquement sa terminaison
end loop;
end LectRedTask;
procedure Demander_Lecture is
begin
LectRedTask.Demander_Lecture;
end Demander_Lecture;
procedure Demander_Ecriture is
begin
LectRedTask.Demander_Ecriture;
end Demander_Ecriture;
procedure Terminer_Lecture is
begin
LectRedTask.Terminer_Lecture;
end Terminer_Lecture;
procedure Terminer_Ecriture is
begin
LectRedTask.Terminer_Ecriture;
end Terminer_Ecriture;
end LR.Synchro.serveur;
|
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . T R A C E B A C K --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2015, 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 version uses System.Machine_State_Operations routines
with System.Machine_State_Operations;
package body System.Traceback is
use System.Machine_State_Operations;
procedure Call_Chain
(Traceback : System.Address;
Max_Len : Natural;
Len : out Natural;
Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1);
-- Same as the exported version, but takes Traceback as an Address
----------------
-- Call_Chain --
----------------
procedure Call_Chain
(Traceback : System.Address;
Max_Len : Natural;
Len : out Natural;
Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1)
is
type Tracebacks_Array is array (1 .. Max_Len) of Code_Loc;
pragma Suppress_Initialization (Tracebacks_Array);
M : Machine_State;
Code : Code_Loc;
Trace : Tracebacks_Array;
for Trace'Address use Traceback;
N_Skips : Natural := 0;
begin
M := Allocate_Machine_State;
Set_Machine_State (M);
-- Skip the requested number of frames
loop
Code := Get_Code_Loc (M);
exit when Code = Null_Address or else N_Skips = Skip_Frames;
Pop_Frame (M);
N_Skips := N_Skips + 1;
end loop;
-- Now, record the frames outside the exclusion bounds, updating
-- the Len output value along the way.
Len := 0;
loop
Code := Get_Code_Loc (M);
exit when Code = Null_Address or else Len = Max_Len;
if Code < Exclude_Min or else Code > Exclude_Max then
Len := Len + 1;
Trace (Len) := Code;
end if;
Pop_Frame (M);
end loop;
Free_Machine_State (M);
end Call_Chain;
procedure Call_Chain
(Traceback : in out System.Traceback_Entries.Tracebacks_Array;
Max_Len : Natural;
Len : out Natural;
Exclude_Min : System.Address := System.Null_Address;
Exclude_Max : System.Address := System.Null_Address;
Skip_Frames : Natural := 1)
is
begin
Call_Chain
(Traceback'Address, Max_Len, Len,
Exclude_Min, Exclude_Max,
-- Skip one extra frame to skip the other Call_Chain entry as well
Skip_Frames => Skip_Frames + 1);
end Call_Chain;
------------------
-- C_Call_Chain --
------------------
function C_Call_Chain
(Traceback : System.Address;
Max_Len : Natural) return Natural
is
Val : Natural;
begin
Call_Chain (Traceback, Max_Len, Val);
return Val;
end C_Call_Chain;
end System.Traceback;
|
pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
package tmmintrin_h is
-- Copyright (C) 2006-2017 Free Software Foundation, Inc.
-- This file is part of GCC.
-- GCC 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, or (at your option)
-- any later version.
-- GCC 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.
-- 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/>.
-- Implemented from the specification included in the Intel C++ Compiler
-- User Guide and Reference, version 9.1.
-- We need definitions from the SSE3, SSE2 and SSE header files
-- skipped func _mm_hadd_epi16
-- skipped func _mm_hadd_epi32
-- skipped func _mm_hadds_epi16
-- skipped func _mm_hadd_pi16
-- skipped func _mm_hadd_pi32
-- skipped func _mm_hadds_pi16
-- skipped func _mm_hsub_epi16
-- skipped func _mm_hsub_epi32
-- skipped func _mm_hsubs_epi16
-- skipped func _mm_hsub_pi16
-- skipped func _mm_hsub_pi32
-- skipped func _mm_hsubs_pi16
-- skipped func _mm_maddubs_epi16
-- skipped func _mm_maddubs_pi16
-- skipped func _mm_mulhrs_epi16
-- skipped func _mm_mulhrs_pi16
-- skipped func _mm_shuffle_epi8
-- skipped func _mm_shuffle_pi8
-- skipped func _mm_sign_epi8
-- skipped func _mm_sign_epi16
-- skipped func _mm_sign_epi32
-- skipped func _mm_sign_pi8
-- skipped func _mm_sign_pi16
-- skipped func _mm_sign_pi32
-- skipped func _mm_abs_epi8
-- skipped func _mm_abs_epi16
-- skipped func _mm_abs_epi32
-- skipped func _mm_abs_pi8
-- skipped func _mm_abs_pi16
-- skipped func _mm_abs_pi32
end tmmintrin_h;
|
-- { dg-do run }
-- { dg-options "-gnatws" }
with Ada.Unchecked_Conversion;
procedure Unchecked_Convert1 is
type Byte is mod 2**8;
type Stream is array (Natural range <>) of Byte;
type Rec is record
I1, I2 : Integer;
end record;
function Do_Sum (R : Rec) return Integer is
begin
return R.I1 + R.I2;
end;
function Sum (S : Stream) return Integer is
subtype Chunk is Stream (1 .. Rec'Size / 8);
function To_Chunk is new Ada.Unchecked_Conversion (Chunk, Rec);
begin
return Do_Sum (To_Chunk (S(S'First .. S'First + Rec'Size / 8 - 1)));
end;
A : Stream (1..9) := (others => 0);
I : Integer;
begin
A (9) := 1;
I := Sum (A(1..8));
end;
|
-----------------------------------------------------------------------
-- keystore-passwords-files -- File based password provider
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Strings;
with Ada.Directories;
with Ada.Streams.Stream_IO;
with Util.Systems.Types;
with Util.Systems.Os;
with Util.Log.Loggers;
with Keystore.Random;
package body Keystore.Passwords.Files is
subtype Key_Length is Util.Encoders.Key_Length;
use type Ada.Streams.Stream_Element_Offset;
-- GNAT 2019 complains about unused use type but gcc 7.4 fails if it not defined (st_mode).
pragma Warnings (Off);
use type Interfaces.C.int;
use type Interfaces.C.unsigned;
use type Interfaces.C.unsigned_short;
pragma Warnings (On);
function Verify_And_Get_Size (Path : in String) return Ada.Streams.Stream_Element_Count;
type Provider (Len : Key_Length) is limited new Keystore.Passwords.Provider with record
Password : Ada.Streams.Stream_Element_Array (1 .. Len);
end record;
type File_Provider_Access is access all Provider;
-- Get the password through the Getter operation.
overriding
procedure Get_Password (From : in Provider;
Getter : not null access procedure (Password : in Secret_Key));
type Key_Provider (Len : Key_Length) is new Provider (Len)
and Keys.Key_Provider and Internal_Key_Provider with null record;
type Key_Provider_Access is access all Key_Provider'Class;
-- Get the Key, IV and signature.
overriding
procedure Get_Keys (From : in Key_Provider;
Key : out Secret_Key;
IV : out Secret_Key;
Sign : out Secret_Key);
Log : constant Util.Log.Loggers.Logger := Util.Log.Loggers.Create ("Keystore.Passwords.Files");
overriding
procedure Save_Key (Provider : in Key_Provider;
Data : out Ada.Streams.Stream_Element_Array);
function Verify_And_Get_Size (Path : in String) return Ada.Streams.Stream_Element_Count is
P : Interfaces.C.Strings.chars_ptr;
Stat : aliased Util.Systems.Types.Stat_Type;
Res : Integer;
Result : Ada.Streams.Stream_Element_Count;
Dir : constant String := Ada.Directories.Containing_Directory (Path);
begin
-- Verify that the file is readable only by the current user.
P := Interfaces.C.Strings.New_String (Path);
Res := Util.Systems.Os.Sys_Stat (Path => P,
Stat => Stat'Access);
Interfaces.C.Strings.Free (P);
if Res /= 0 then
Log.Info ("Password file {0} does not exist", Path);
raise Keystore.Bad_Password with "Password file does not exist";
end if;
if (Stat.st_mode and 8#0077#) /= 0 and Util.Systems.Os.Directory_Separator = '/' then
Log.Info ("Password file {0} is not safe", Path);
raise Keystore.Bad_Password with "Password file is not safe";
end if;
if Stat.st_size = 0 then
Log.Info ("Password file {0} is empty", Path);
raise Keystore.Bad_Password with "Password file is empty";
end if;
if Stat.st_size > MAX_FILE_SIZE then
Log.Info ("Password file {0} is too big", Path);
raise Keystore.Bad_Password with "Password file is too big";
end if;
Result := Ada.Streams.Stream_Element_Offset (Stat.st_size);
-- Verify that the parent directory is readable only by the current user.
P := Interfaces.C.Strings.New_String (Dir);
Res := Util.Systems.Os.Sys_Stat (Path => P,
Stat => Stat'Access);
Interfaces.C.Strings.Free (P);
if Res /= 0 then
Log.Info ("Directory {0} is not safe for password file", Dir);
raise Keystore.Bad_Password
with "Directory that contains password file cannot be checked";
end if;
if (Stat.st_mode and 8#0077#) /= 0 and Util.Systems.Os.Directory_Separator = '/' then
Log.Info ("Directory {0} is not safe for password file", Dir);
raise Keystore.Bad_Password
with "Directory that contains password file is not safe";
end if;
Log.Info ("Password file {0} passes the security checks", Path);
return Result;
end Verify_And_Get_Size;
-- ------------------------------
-- Create a password provider that reads the file to build the password.
-- The file must have the mode rw------- (600) and its owning directory
-- the mode rwx------ (700). The Bad_Password exception is raised if
-- these rules are not verified.
-- ------------------------------
function Create (Path : in String) return Provider_Access is
Size : Ada.Streams.Stream_Element_Offset;
File : Ada.Streams.Stream_IO.File_Type;
Result : File_Provider_Access;
Last : Ada.Streams.Stream_Element_Offset;
begin
Size := Verify_And_Get_Size (Path);
Ada.Streams.Stream_IO.Open (File => File,
Mode => Ada.Streams.Stream_IO.In_File,
Name => Path);
Result := new Provider '(Len => Size,
others => <>);
Ada.Streams.Stream_IO.Read (File, Result.Password, Last);
Ada.Streams.Stream_IO.Close (File);
return Result.all'Access;
end Create;
-- ------------------------------
-- Get the password through the Getter operation.
-- ------------------------------
overriding
procedure Get_Password (From : in Provider;
Getter : not null access procedure (Password : in Secret_Key)) is
Password : Keystore.Secret_Key (Length => From.Len);
begin
Util.Encoders.Create (From.Password, Password);
Getter (Password);
end Get_Password;
-- ------------------------------
-- Create a key provider that reads the file. The file is split in three parts
-- the key, the IV, the signature which are extracted by using `Get_Keys`.
-- ------------------------------
function Create (Path : in String) return Keys.Key_Provider_Access is
Size : Ada.Streams.Stream_Element_Offset;
File : Ada.Streams.Stream_IO.File_Type;
Result : Key_Provider_Access;
Last : Ada.Streams.Stream_Element_Offset;
begin
Size := Verify_And_Get_Size (Path);
Ada.Streams.Stream_IO.Open (File => File,
Mode => Ada.Streams.Stream_IO.In_File,
Name => Path);
Result := new Key_Provider '(Len => Size,
others => <>);
Ada.Streams.Stream_IO.Read (File, Result.Password, Last);
Ada.Streams.Stream_IO.Close (File);
return Result.all'Access;
end Create;
-- ------------------------------
-- Get the Key, IV and signature.
-- ------------------------------
overriding
procedure Get_Keys (From : in Key_Provider;
Key : out Secret_Key;
IV : out Secret_Key;
Sign : out Secret_Key) is
First : Ada.Streams.Stream_Element_Offset := 1;
Last : Ada.Streams.Stream_Element_Offset := First + Key.Length - 1;
begin
if From.Len /= Key.Length + IV.Length + Sign.Length then
raise Keystore.Bad_Password with "Invalid length for the key file";
end if;
Util.Encoders.Create (From.Password (First .. Last), Key);
First := Last + 1;
Last := First + IV.Length - 1;
Util.Encoders.Create (From.Password (First .. Last), IV);
First := Last + 1;
Last := First + Sign.Length - 1;
Util.Encoders.Create (From.Password (First .. Last), Sign);
end Get_Keys;
overriding
procedure Save_Key (Provider : in Key_Provider;
Data : out Ada.Streams.Stream_Element_Array) is
begin
Data := Provider.Password;
end Save_Key;
-- ------------------------------
-- Generate a file that contains the keys. Keys are generated using a random generator.
-- The file is created with the mode rw------- (600) and the owning directory is forced
-- to the mode rwx------ (700).
-- ------------------------------
function Generate (Path : in String;
Length : in Key_Length := DEFAULT_KEY_FILE_LENGTH)
return Keys.Key_Provider_Access is
Result : Key_Provider_Access;
Random : Keystore.Random.Generator;
Dir : constant String := Ada.Directories.Containing_Directory (Path);
File : Ada.Streams.Stream_IO.File_Type;
P : Interfaces.C.Strings.chars_ptr;
Res : Integer with Unreferenced;
begin
if not Ada.Directories.Exists (Dir) then
Log.Info ("Creating directory {0}", Dir);
Ada.Directories.Create_Path (Dir);
end if;
Log.Info ("Creating password file {0}", Path);
Ada.Streams.Stream_IO.Create (File => File,
Mode => Ada.Streams.Stream_IO.Out_File,
Name => Path);
Result := new Key_Provider '(Len => Length,
others => <>);
Random.Generate (Result.Password);
Ada.Streams.Stream_IO.Write (File, Result.Password);
Ada.Streams.Stream_IO.Close (File);
P := Interfaces.C.Strings.New_String (Path);
Res := Util.Systems.Os.Sys_Chmod (Path => P,
Mode => 8#0600#);
Interfaces.C.Strings.Free (P);
P := Interfaces.C.Strings.New_String (Dir);
Res := Util.Systems.Os.Sys_Chmod (Path => P,
Mode => 8#0700#);
Interfaces.C.Strings.Free (P);
return Result.all'Access;
end Generate;
end Keystore.Passwords.Files;
|
-- Gonzalo Martin Rodriguez
-- Ivan Fernandez Samaniego
with Priorities; use Priorities;
with devices; use devices;
with ada.strings.unbounded; use ada.strings.unbounded;
with ada.strings.unbounded.text_io; use ada.strings.unbounded.text_io;
package Driver is
task Distance is
pragma Priority (Distance_Priority);
end Distance;
task Steering is
pragma Priority (Steering_Priority);
end Steering;
task Head is
pragma Priority (Head_Priority);
end Head;
protected Symptoms is
pragma Priority (Head_Priority);
procedure Write_Head_Symptom (Value: in Boolean);
procedure Read_Head_Symptom (Value: out Boolean);
procedure Write_Distancia_Insegura (Value: in Boolean);
procedure Read_Distancia_Insegura (Value: out Boolean);
procedure Write_Distancia_Imprudente (Value: in Boolean);
procedure Read_Distancia_Imprudente (Value: out Boolean);
procedure Write_Peligro_Colision (Value: in Boolean);
procedure Read_Peligro_Colision (Value: out Boolean);
procedure Write_Steering_Symptom (Value: in Boolean);
procedure Read_Steering_Symptom (Value: out Boolean);
procedure Write_HeadPosition;
procedure Read_HeadPosition (Value: out HeadPosition_Samples_Type);
procedure Write_Steering;
procedure Read_Steering (Value: out Steering_Samples_Type);
procedure Display_Symptom (Symptom: in Unbounded_String);
procedure Show_Symptoms;
private
Head_Symptom: Boolean := False;
Steering_Symptom: Boolean := False;
Distancia_Insegura: Boolean := False;
Distancia_Imprudente: Boolean := False;
Peligro_Colision: Boolean := False;
HeadPosition: HeadPosition_Samples_Type := (+2, -2);
Steering: Steering_Samples_Type := 0;
end Symptoms;
protected Measures is
pragma Priority (Risk_Priority);
procedure Read_Distance (Value: out Distance_Samples_Type);
procedure Write_Distance;
procedure Show_Distance;
procedure Read_Speed (Value: out Speed_Samples_Type);
procedure Write_Speed;
procedure Show_Speed;
private
Distance: Distance_Samples_Type;
Speed: Speed_Samples_Type;
end Measures;
end Driver;
|
package discriminant_specification is
type Buffer(Size : Integer := 100) is
record
Pos : Integer := 0;
Value : String(1 .. Size);
end record;
procedure append_ch(b : in out Buffer; ch : in character);
procedure remove_ch(b : in out Buffer; ch : out character);
function make_buf(size : in integer) return Buffer;
mini : Buffer(10);
end discriminant_specification;
|
with Interfaces;
with Ada.Numerics.Float_Random;
with Ada.Assertions;
with Vector_Math;
with Materials;
with Lights;
with Geometry;
with Scene;
with Ada.Unchecked_Deallocation;
use Interfaces;
use Vector_Math;
use Materials;
use Lights;
use Ada.Assertions;
use Geometry;
package Ray_Tracer is
width : Positive := 1024;
height : Positive := 768;
Threads_Num : Positive := 14*2;
Anti_Aliasing_On : boolean := true;
Max_Trace_Depth : Positive := 8;
Background_Color : float3 := (0.0,0.0,0.0);
G_Epsilon : constant float := 1.0e-5; -- small value for geometry offsets
G_Epsilon_Div : constant float := 1.0e-20; -- small value for bsdf/pdf divisions
g_gamma : constant float := 2.0;
g_scn : Scene.Render_Scene;
type ScreenBufferData is array(integer range <>, integer range <>) of Unsigned_32;
type ScreenBufferDataRef is access ScreenBufferData;
screen_buffer : ScreenBufferDataRef := null;
type Render_Type is (RT_DEBUG, RT_WHITTED, PT_STUPID, PT_SHADOW, PT_MIS); -- render type
procedure Init_Render(a_rendType : Render_Type);
procedure Render_Pass;
procedure Resize_Viewport(size_x,size_y : integer);
function GetSPP return integer;
function Finished return Boolean;
private
--
--
type AccumBuff is array (Integer range <>, integer range <>) of float3;
type AccumBuffRef is access AccumBuff;
-- pragma Atomic_Components(AccumBuff); -- atomic access to component of "AccumBuff" cannot be guaranteed
type FloatBuff is array (Integer range <>, integer range <>) of float;
type FloatBuffRef is access FloatBuff;
type Color is record
Red : float range 0.0..1.0;
Green : float range 0.0..1.0;
Blue : float range 0.0..1.0;
end record;
function ColorToUnsigned_32(c: Color) return Unsigned_32;
function ToneMapping(v : float3) return Color;
pragma Inline (ColorToUnsigned_32);
pragma Inline (ToneMapping);
function EyeRayDirection (x, y : Natural) return float3;
function Compute_Shadow(hit_pos : float3; lpos : float3) return Shadow_Hit;
type RayDirPack is array (0 .. 3) of float3;
procedure Generate4RayDirections (x, y : in Natural; res : out RayDirPack);
type IntRef is access integer;
-- multithreaded rendering stuff
--
task type Path_Trace_Thread(threadId : integer; Acc_Buff : AccumBuffRef) is
entry Resume;
entry Finish(spp : IntRef);
end Path_Trace_Thread;
type Path_Trace_Thread_Ptr is access Path_Trace_Thread;
g_threads : array(0..Threads_Num-1) of Path_Trace_Thread_Ptr;
g_threadsCreated : boolean := false;
---- instantiate deallocation procedures
--
procedure delete is new Ada.Unchecked_Deallocation(Object => ScreenBufferData, Name => ScreenBufferDataRef);
--procedure delete is new Ada.Unchecked_Deallocation(Object => RandomGenerator, Name => RandRef);
procedure delete is new Ada.Unchecked_Deallocation(Object => integer, Name => IntRef);
procedure delete is new Ada.Unchecked_Deallocation(Object => AccumBuff, Name => AccumBuffRef);
procedure delete is new Ada.Unchecked_Deallocation(Object => Path_Trace_Thread, Name => Path_Trace_Thread_Ptr);
function Find_Closest_Hit(r: Ray) return Hit;
pragma Inline(Find_Closest_Hit);
g_accBuff : AccumBuffRef := null;
g_spp : IntRef := null;
g_rend_type : Render_Type := PT_MIS;
g_finish : Boolean := false;
end Ray_Tracer;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- ADA.NUMERICS.GENERIC_ELEMENTARY_FUNCTIONS --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- This specification is adapted from the Ada Reference Manual for use with --
-- GNAT. In accordance with the copyright of that document, you can freely --
-- copy and modify this specification, provided that if you redistribute a --
-- modified version, any changes that you have made are clearly indicated. --
-- --
------------------------------------------------------------------------------
generic
type Float_Type is digits <>;
package Ada.Numerics.Generic_Elementary_Functions is
pragma Pure (Generic_Elementary_Functions);
function Sqrt (X : Float_Type'Base) return Float_Type'Base;
function Log (X : Float_Type'Base) return Float_Type'Base;
function Log (X, Base : Float_Type'Base) return Float_Type'Base;
function Exp (X : Float_Type'Base) return Float_Type'Base;
function "**" (Left, Right : Float_Type'Base) return Float_Type'Base;
function Sin (X : Float_Type'Base) return Float_Type'Base;
function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Cos (X : Float_Type'Base) return Float_Type'Base;
function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Tan (X : Float_Type'Base) return Float_Type'Base;
function Tan (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Cot (X : Float_Type'Base) return Float_Type'Base;
function Cot (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Arcsin (X : Float_Type'Base) return Float_Type'Base;
function Arcsin (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Arccos (X : Float_Type'Base) return Float_Type'Base;
function Arccos (X, Cycle : Float_Type'Base) return Float_Type'Base;
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0)
return Float_Type'Base;
function Arctan
(Y : Float_Type'Base;
X : Float_Type'Base := 1.0;
Cycle : Float_Type'Base)
return Float_Type'Base;
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0)
return Float_Type'Base;
function Arccot
(X : Float_Type'Base;
Y : Float_Type'Base := 1.0;
Cycle : Float_Type'Base)
return Float_Type'Base;
function Sinh (X : Float_Type'Base) return Float_Type'Base;
function Cosh (X : Float_Type'Base) return Float_Type'Base;
function Tanh (X : Float_Type'Base) return Float_Type'Base;
function Coth (X : Float_Type'Base) return Float_Type'Base;
function Arcsinh (X : Float_Type'Base) return Float_Type'Base;
function Arccosh (X : Float_Type'Base) return Float_Type'Base;
function Arctanh (X : Float_Type'Base) return Float_Type'Base;
function Arccoth (X : Float_Type'Base) return Float_Type'Base;
end Ada.Numerics.Generic_Elementary_Functions;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . C A L E N D A R . D E L A Y S --
-- --
-- S p e c --
-- --
-- Copyright (C) 1992-2013, 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 package implements Calendar.Time delays using protected objects
-- Note: the compiler generates direct calls to this interface, in the
-- processing of time types.
package Ada.Calendar.Delays is
procedure Delay_For (D : Duration);
-- Delay until an interval of length (at least) D seconds has passed, or
-- the task is aborted to at least the current ATC nesting level. This is
-- an abort completion point. The body of this procedure must perform all
-- the processing required for an abort point.
procedure Delay_Until (T : Time);
-- Delay until Clock has reached (at least) time T, or the task is aborted
-- to at least the current ATC nesting level. The body of this procedure
-- must perform all the processing required for an abort point.
function To_Duration (T : Time) return Duration;
-- Convert Time to Duration elapsed since UNIX epoch
end Ada.Calendar.Delays;
|
with System;
with Interfaces.C.Strings;
with SDL.Types; use SDL.Types;
with SDL.Video;
with SDL.Error;
package SDL_ttf is
package C renames Interfaces.C;
package CS renames Interfaces.C.Strings;
package V renames SDL.Video;
package Er renames SDL.Error;
-- Reference to an internal structure containing font information.
type Font_ptr is new System.Address;
null_Font_ptr : constant Font_ptr := Font_ptr (System.Null_Address);
-- Initialize the TTF engine - returns 0 if successful, -1 on error
function Init return C.int;
pragma Import (C, Init, "TTF_Init");
-- Open a font file and create a font of the specified point size
function OpenFont (file : CS.chars_ptr; ptsize : C.int) return Font_ptr;
pragma Import (C, OpenFont, "TTF_OpenFont");
function Open_Font (file : String; ptsize : C.int) return Font_ptr;
pragma Inline (Open_Font);
function OpenFontIndex (file : CS.chars_ptr;
ptsize : C.int;
index : C.long)
return Font_ptr;
pragma Import (C, OpenFontIndex, "TTF_OpenFontIndex");
function Open_Font_Index (file : String;
ptsize : C.int;
index : C.long)
return Font_ptr;
pragma Inline (Open_Font_Index);
type TTF_STYLE is mod 2**8;
for TTF_STYLE'Size use C.int'Size;
-- Set and retrieve the font style
-- This font style is implemented by modifying the
-- font glyphs, and doesn't reflect any inherent
-- properties of the truetype font file.
TTF_STYLE_NORMAL : constant TTF_STYLE := 16#00#;
TTF_STYLE_BOLD : constant TTF_STYLE := 16#01#;
TTF_STYLE_ITALIC : constant TTF_STYLE := 16#02#;
TTF_STYLE_UNDERLINE : constant TTF_STYLE := 16#04#;
function GetFontStyle (font : Font_ptr) return TTF_STYLE;
pragma Import (C, GetFontStyle, "TTF_GetFontStyle");
procedure SetFontStyle (font : Font_ptr; style : TTF_STYLE);
pragma Import (C, SetFontStyle, "TTF_SetFontStyle");
procedure Set_Font_Style (font : Font_ptr; style : TTF_STYLE);
pragma Inline (Set_Font_Style);
-- Get the total height of the font - usually equal to
-- point size.
function FontHeight (font : Font_ptr) return C.int;
pragma Import (C, FontHeight, "TTF_FontHeight");
-- Get the offset from the baseline to the top of the
-- font. This is a positive value, relative to the
-- baseline.
function FontAscent (font : Font_ptr) return C.int;
pragma Import (C, FontAscent, "TTF_FontAscent");
-- Get the offset from the baseline to the botton of
-- the font. This is a negative value, relative to the
-- baseline.
function FontDescent (font : Font_ptr) return C.int;
pragma Import (C, FontDescent, "TTF_FontDescent");
-- Get the recommended spacing between lines of text
-- for this font.
function FontLineSkip (font : Font_ptr) return C.int;
pragma Import (C, FontLineSkip, "TTF_FontLineSkip");
-- Get the number of faces of the font.
function FontFaces (font : Font_ptr) return C.long;
pragma Import (C, FontFaces, "TTF_FontFaces");
-- Get the font face attributes, if any.
function FontFaceIsFixedWidth (font : Font_ptr) return C.int;
pragma Import (c, FontFaceIsFixedWidth, "TTF_FontFaceIsFixedWidth");
function FontFaceFamilyName (font : Font_ptr) return CS.chars_ptr;
pragma Import (C, FontFaceFamilyName, "TTF_FontFaceFamilyName");
function Font_Face_Family_Name (font : Font_ptr) return String;
pragma Inline (Font_Face_Family_Name);
function FontFaceStyleName (font : Font_ptr) return CS.chars_ptr;
pragma Import (C, FontFaceStyleName, "TTF_FontFaceStyleName");
function Font_Face_Style_Name (font : Font_ptr) return String;
pragma Inline (Font_Face_Style_Name);
-- Get the metrics (dimensions) of a glyph.
function GlyphMetrics (font : Font_ptr;
ch : Uint16;
minx, maxx : int_ptr;
miny, maxy : int_ptr;
advance : int_ptr)
return C.int;
pragma Import (C, GlyphMetrics, "TTF_GlyphMetrics");
-- Get the dimensions of a rendered string of text.
function SizeText (font : Font_ptr; text : CS.chars_ptr;
w, h : C.int) return C.int;
pragma Import (C, SizeText, "TTF_SizeText");
function Size_Text (font : Font_ptr; text : String;
w, h : C.int) return C.int;
pragma Inline (Size_Text);
function SizeUTF8 (font : Font_ptr; text : CS.chars_ptr;
w, h : C.int) return C.int;
pragma Import (C, SizeUTF8, "TTF_SizeUTF8");
function Size_UTF8 (font : Font_ptr; text : String;
w, h : C.int) return C.int;
pragma Inline (Size_UTF8);
function SizeUNICODE (font : Font_ptr; text : Uint16_ptr;
w, h : C.int) return C.int;
pragma Import (C, SizeUNICODE, "TTF_SizeUNICODE");
-- Create an 8-bit palettized surface and render the given text
-- at fast quality with the given font and color. The 0 pixel is
-- the colorkey, giving a transparent background, and the 1 pixel
-- set to the text color.
-- This function returns the new surface, or NULL if there was an
-- error.
function RenderText_Solid (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderText_Solid, "TTF_RenderText_Solid");
function Render_Text_Solid (font : Font_ptr; text : String;
fg : V.Color) return V.Surface_ptr;
pragma Inline (Render_Text_Solid);
function RenderUTF8_Solid (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderUTF8_Solid, "TTF_RenderUTF8_Solid");
function Render_UTF8_Solid (font : Font_ptr; text : String;
fg : V.Color) return V.Surface_ptr;
pragma Inline (Render_UTF8_Solid);
function RenderUNICODE_Solid (font : Font_ptr; text : Uint16_ptr;
fg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderUNICODE_Solid, "TTF_RenderUNICODE_Solid");
-- Create an 8-bit palettized surface and render the given glyph at
-- fast quality with the given font and color. The 0 pixel is the
-- colorkey, giving a transparent background, and the 1 pixel is
-- set to the text color. The glyph is rendered without any padding
-- or centering in the X direction, and aligned normally in the Y
-- direction. This function returns the new surface, of NULL if there
-- was an error.
function RenderGlyph_Solid (font : Font_ptr;
ch : Uint16; fg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderGlyph_Solid, "TTF_RenderGlyph_Solid");
-- Create an 8-bit palettized surface and render the given text at
-- high quality with the given font and colors. The 0 pixel is
-- background, while other pixels have varying degrees of the
-- foreground color. This function returns the new surface, or NUll if
-- there was an error.
function RenderText_Shaded (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderText_Shaded, "TTF_RenderText_Shaded");
function Render_Text_Shaded (font : Font_ptr; text : String;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Inline (Render_Text_Shaded);
function RenderUTF8_Shaded (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderUTF8_Shaded, "TTF_RenderUTF8_Shaded");
function Render_UTF8_Shaded (font : Font_ptr; text : String;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Inline (Render_UTF8_Shaded);
function RenderUNICODE_Shaded (font : Font_ptr; text : Uint16_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderUNICODE_Shaded, "TTF_RenderUNICODE_Shaded");
-- Create an 8-bit palettized surface and render the given glyph at
-- high quality with the given font and colors. The 0 pixel is the
-- background while other pixels have varying degrees of th foreground color.
-- The glyph is rendered without any padding or centering in the X
-- direction, and aligned normally in the Y direction.
-- This function returns the new surface, or NULL if there was an error.
function RenderGlyph_Shaded (font : Font_ptr; ch : Uint16;
fg : V.Color; bg : V.Color) return V.Surface_ptr;
pragma Import (C, RenderGlyph_Shaded, "TTF_RenderGlyph_Shaded");
-- Create a 32-bit ARGB surface and render the given text at high quality,
-- using alpha blending to dither the font with the given clor.
-- This function returns the new surface, or NULL if there was an error.
function RenderText_Blended (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color) return V.Surface;
pragma Import (C, RenderText_Blended, "TTF_RenderText_Blended");
function Render_Text_Blended (font : Font_ptr; text : String;
fg : V.Color) return V.Surface;
pragma Inline (Render_Text_Blended);
function RenderUTF8_Blended (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color) return V.Surface;
pragma Import (C, RenderUTF8_Blended, "TTF_RenderUTF8_Blended");
function Render_UTF8_Blended (font : Font_ptr; text : String;
fg : V.Color) return V.Surface;
pragma Inline (Render_UTF8_Blended);
function RenderUNICODE_Blended (font : Font_ptr; text : Uint16_ptr;
fg : V.Color) return V.Surface;
pragma Import (C, RenderUNICODE_Blended, "TTF_RenderUNICODE_Blended");
-- Create a 32-bit ARGB surface and render the given glyph at high quality
-- using alpha blending to dither the font with the given color.
-- The glyph is rendered without any padding or centering in the X
-- direction, and aligned normally in the Y direction.
-- This function returns the new surface, or NULL if there was an error.
function RenderGlyph_Blended (font : Font_ptr; ch : Uint16; fg : V.Color)
return V.Surface;
pragma Import (C, RenderGlyph_Blended, "TTF_RenderGlyph_Blended");
-- For compatibility with previous versions, here are the old functions.
function RenderText (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr
renames RenderText_Shaded;
function Render_Text (font : Font_ptr; text : String;
fg : V.Color; bg : V.Color) return V.Surface_ptr
renames Render_Text_Shaded;
function RenderUTF8 (font : Font_ptr; text : CS.chars_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr
renames RenderUTF8_Shaded;
function Render_UTF8 (font : Font_ptr; text : String;
fg : V.Color; bg : V.Color) return V.Surface_ptr
renames Render_UTF8_Shaded;
function RenderUNICODE (font : Font_ptr; text : Uint16_ptr;
fg : V.Color; bg : V.Color) return V.Surface_ptr
renames RenderUNICODE_Shaded;
-- Close an opened font file.
procedure CloseFont (font : Font_ptr);
pragma Import (C, CloseFont, "TTF_CloseFont");
-- De-initialize the TTF engine.
procedure TTF_Quit;
pragma Import (C, TTF_Quit, "TTF_Quit");
-- We'll use SDL for reporting errors.
procedure SetError (fmt : CS.chars_ptr)
renames Er.SetError;
procedure Set_Error (fmt : String)
renames Er.Set_Error;
function GetError return CS.chars_ptr
renames Er.GetError;
function Get_Error return String
renames Er.Get_Error;
end SDL_ttf;
|
-- ////////////////////////////////////////////////////////////
-- //
-- // SFML - Simple and Fast Multimedia Library
-- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
-- //
-- // 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.
-- //
-- ////////////////////////////////////////////////////////////
-- ////////////////////////////////////////////////////////////
-- // Headers
-- ////////////////////////////////////////////////////////////
with Sf.Config;
package Sf.Window.Event is
use Sf.Config;
-- ////////////////////////////////////////////////////////////
-- /// Definition of key codes for keyboard events
-- ////////////////////////////////////////////////////////////
subtype sfKeyCode is sfUint32;
sfKeyA : constant sfKeyCode := 97;
sfKeyB : constant sfKeyCode := 98;
sfKeyC : constant sfKeyCode := 99;
sfKeyD : constant sfKeyCode := 100;
sfKeyE : constant sfKeyCode := 101;
sfKeyF : constant sfKeyCode := 102;
sfKeyG : constant sfKeyCode := 103;
sfKeyH : constant sfKeyCode := 104;
sfKeyI : constant sfKeyCode := 105;
sfKeyJ : constant sfKeyCode := 106;
sfKeyK : constant sfKeyCode := 107;
sfKeyL : constant sfKeyCode := 108;
sfKeyM : constant sfKeyCode := 109;
sfKeyN : constant sfKeyCode := 110;
sfKeyO : constant sfKeyCode := 111;
sfKeyP : constant sfKeyCode := 112;
sfKeyQ : constant sfKeyCode := 113;
sfKeyR : constant sfKeyCode := 114;
sfKeyS : constant sfKeyCode := 115;
sfKeyT : constant sfKeyCode := 116;
sfKeyU : constant sfKeyCode := 117;
sfKeyV : constant sfKeyCode := 118;
sfKeyW : constant sfKeyCode := 119;
sfKeyX : constant sfKeyCode := 120;
sfKeyY : constant sfKeyCode := 121;
sfKeyZ : constant sfKeyCode := 122;
sfKeyNum0 : constant sfKeyCode := 48;
sfKeyNum1 : constant sfKeyCode := 49;
sfKeyNum2 : constant sfKeyCode := 50;
sfKeyNum3 : constant sfKeyCode := 51;
sfKeyNum4 : constant sfKeyCode := 52;
sfKeyNum5 : constant sfKeyCode := 53;
sfKeyNum6 : constant sfKeyCode := 54;
sfKeyNum7 : constant sfKeyCode := 55;
sfKeyNum8 : constant sfKeyCode := 56;
sfKeyNum9 : constant sfKeyCode := 57;
sfKeyEscape : constant sfKeyCode := 256;
sfKeyLControl : constant sfKeyCode := 257;
sfKeyLShift : constant sfKeyCode := 258;
sfKeyLAlt : constant sfKeyCode := 259;
sfKeyLSystem : constant sfKeyCode := 260;
sfKeyRControl : constant sfKeyCode := 261;
sfKeyRShift : constant sfKeyCode := 262;
sfKeyRAlt : constant sfKeyCode := 263;
sfKeyRSystem : constant sfKeyCode := 264;
sfKeyMenu : constant sfKeyCode := 265;
sfKeyLBracket : constant sfKeyCode := 266;
sfKeyRBracket : constant sfKeyCode := 267;
sfKeySemiColon : constant sfKeyCode := 268;
sfKeyComma : constant sfKeyCode := 269;
sfKeyPeriod : constant sfKeyCode := 270;
sfKeyQuote : constant sfKeyCode := 271;
sfKeySlash : constant sfKeyCode := 272;
sfKeyBackSlash : constant sfKeyCode := 273;
sfKeyTilde : constant sfKeyCode := 274;
sfKeyEqual : constant sfKeyCode := 275;
sfKeyDash : constant sfKeyCode := 276;
sfKeySpace : constant sfKeyCode := 277;
sfKeyReturn : constant sfKeyCode := 278;
sfKeyBack : constant sfKeyCode := 279;
sfKeyTab : constant sfKeyCode := 280;
sfKeyPageUp : constant sfKeyCode := 281;
sfKeyPageDown : constant sfKeyCode := 282;
sfKeyEnd : constant sfKeyCode := 283;
sfKeyHome : constant sfKeyCode := 284;
sfKeyInsert : constant sfKeyCode := 285;
sfKeyDelete : constant sfKeyCode := 286;
sfKeyAdd : constant sfKeyCode := 287;
sfKeySubtract : constant sfKeyCode := 288;
sfKeyMultiply : constant sfKeyCode := 289;
sfKeyDivide : constant sfKeyCode := 290;
sfKeyLeft : constant sfKeyCode := 291;
sfKeyRight : constant sfKeyCode := 292;
sfKeyUp : constant sfKeyCode := 293;
sfKeyDown : constant sfKeyCode := 294;
sfKeyNumpad0 : constant sfKeyCode := 295;
sfKeyNumpad1 : constant sfKeyCode := 296;
sfKeyNumpad2 : constant sfKeyCode := 297;
sfKeyNumpad3 : constant sfKeyCode := 298;
sfKeyNumpad4 : constant sfKeyCode := 299;
sfKeyNumpad5 : constant sfKeyCode := 300;
sfKeyNumpad6 : constant sfKeyCode := 301;
sfKeyNumpad7 : constant sfKeyCode := 302;
sfKeyNumpad8 : constant sfKeyCode := 303;
sfKeyNumpad9 : constant sfKeyCode := 304;
sfKeyF1 : constant sfKeyCode := 305;
sfKeyF2 : constant sfKeyCode := 306;
sfKeyF3 : constant sfKeyCode := 307;
sfKeyF4 : constant sfKeyCode := 308;
sfKeyF5 : constant sfKeyCode := 309;
sfKeyF6 : constant sfKeyCode := 310;
sfKeyF7 : constant sfKeyCode := 311;
sfKeyF8 : constant sfKeyCode := 312;
sfKeyF9 : constant sfKeyCode := 313;
sfKeyF10 : constant sfKeyCode := 314;
sfKeyF11 : constant sfKeyCode := 315;
sfKeyF12 : constant sfKeyCode := 316;
sfKeyF13 : constant sfKeyCode := 317;
sfKeyF14 : constant sfKeyCode := 318;
sfKeyF15 : constant sfKeyCode := 319;
sfKeyPause : constant sfKeyCode := 320;
sfKeyCount : constant sfKeyCode := 321;
-- ////////////////////////////////////////////////////////////
-- /// Definition of button codes for mouse events
-- ////////////////////////////////////////////////////////////
type sfMouseButton is (sfButtonLeft, sfButtonRight, sfButtonMiddle, sfButtonX1, sfButtonX2);
-- ////////////////////////////////////////////////////////////
-- /// Definition of joystick axis for joystick events
-- ////////////////////////////////////////////////////////////
type sfJoyAxis is (
sfJoyAxisX,
sfJoyAxisY,
sfJoyAxisZ,
sfJoyAxisR,
sfJoyAxisU,
sfJoyAxisV,
sfJoyAxisPOV);
-- ////////////////////////////////////////////////////////////
-- /// Definition of all the event types
-- ////////////////////////////////////////////////////////////
type sfEventType is (
sfEvtClosed,
sfEvtResized,
sfEvtLostFocus,
sfEvtGainedFocus,
sfEvtTextEntered,
sfEvtKeyPressed,
sfEvtKeyReleased,
sfEvtMouseWheelMoved,
sfEvtMouseButtonPressed,
sfEvtMouseButtonReleased,
sfEvtMouseMoved,
sfEvtMouseEntered,
sfEvtMouseLeft,
sfEvtJoyButtonPressed,
sfEvtJoyButtonReleased,
sfEvtJoyMoved);
-- ////////////////////////////////////////////////////////////
-- /// Keyboard event parameters
-- ////////////////////////////////////////////////////////////
type sfKeyEvent is record
Event_Type : aliased sfEventType;
Code : aliased sfKeyCode;
Alt : aliased sfBool;
Control : aliased sfBool;
Shift : aliased sfBool;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Text event parameters
-- ////////////////////////////////////////////////////////////
type sfTextEvent is record
Event_Type : aliased sfEventType;
Unicode : aliased sfUint32;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Mouse move event parameters
-- ////////////////////////////////////////////////////////////
type sfMouseMoveEvent is record
Event_Type : aliased sfEventType;
X : aliased Integer;
Y : aliased Integer;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Mouse buttons events parameters
-- ////////////////////////////////////////////////////////////
type sfMouseButtonEvent is record
Event_Type : aliased sfEventType;
Button : aliased sfMouseButton;
X : aliased Integer;
Y : aliased Integer;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Mouse wheel events parameters
-- ////////////////////////////////////////////////////////////
type sfMouseWheelEvent is record
Event_Type : aliased sfEventType;
Delta_Value : aliased Integer;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Joystick axis move event parameters
-- ////////////////////////////////////////////////////////////
type sfJoyMoveEvent is record
Event_Type : aliased sfEventType;
JoystickId : aliased sfUint32;
Axis : aliased sfJoyAxis;
Position : aliased Float;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Joystick buttons events parameters
-- ////////////////////////////////////////////////////////////
type sfJoyButtonEvent is record
Event_Type : aliased sfEventType;
JoystickId : aliased sfUint32;
Button : aliased sfUint32;
end record;
-- ////////////////////////////////////////////////////////////
-- /// Size events parameters
-- ////////////////////////////////////////////////////////////
type sfSizeEvent is record
Event_Type : aliased sfEventType;
Width : aliased sfUint32;
Height : aliased sfUint32;
end record;
-- ////////////////////////////////////////////////////////////
-- /// sfEvent defines a system event and its parameters
-- ////////////////////////////////////////////////////////////
type sfEvent (Discr : sfUint32 := 0) is record
case Discr is
when 0 =>
Event_Type : aliased sfEventType;
when 1 =>
Key : aliased sfKeyEvent;
when 2 =>
Text : aliased sfTextEvent;
when 3 =>
MouseMove : aliased sfMouseMoveEvent;
when 4 =>
MouseButton : aliased sfMouseButtonEvent;
when 5 =>
MouseWheel : aliased sfMouseWheelEvent;
when 6 =>
JoyMove : aliased sfJoyMoveEvent;
when 7 =>
JoyButton : aliased sfJoyButtonEvent;
when others =>
Size : aliased sfSizeEvent;
end case;
end record;
private
pragma Convention (C, sfMouseButton);
pragma Convention (C, sfJoyAxis);
pragma Convention (C, sfEventType);
pragma Convention (C_Pass_By_Copy, sfKeyEvent);
pragma Convention (C_Pass_By_Copy, sfTextEvent);
pragma Convention (C_Pass_By_Copy, sfMouseMoveEvent);
pragma Convention (C_Pass_By_Copy, sfMouseButtonEvent);
pragma Convention (C_Pass_By_Copy, sfMouseWheelEvent);
pragma Convention (C_Pass_By_Copy, sfJoyMoveEvent);
pragma Convention (C_Pass_By_Copy, sfJoyButtonEvent);
pragma Convention (C_Pass_By_Copy, sfSizeEvent);
pragma Convention (C_Pass_By_Copy, sfEvent);
pragma Unchecked_Union (sfEvent);
end Sf.Window.Event;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Localization, Internationalization, Globalization for Ada --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2009-2010, Vadim Godunko <vgodunko@gmail.com> --
-- 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$
------------------------------------------------------------------------------
private with Matreshka.Internals.Unicode.Ucd;
private with Matreshka.Internals.Utf16;
package League.Strings.Cursors.Grapheme_Clusters is
pragma Preelaborate;
type Grapheme_Cluster_Cursor is tagged private;
procedure First
(Self : in out Grapheme_Cluster_Cursor'Class;
Item : in out Universal_String);
procedure Last
(Self : in out Grapheme_Cluster_Cursor'Class;
Item : in out Universal_String);
procedure Next (Self : in out Grapheme_Cluster_Cursor'Class);
procedure Previous (Self : in out Grapheme_Cluster_Cursor'Class);
function Has_Element (Self : Grapheme_Cluster_Cursor'Class) return Boolean;
function Element (Self : Grapheme_Cluster_Cursor'Class)
return Universal_String;
private
type Grapheme_Cluster_Cursor is new Abstract_Tailored_Cursor with record
Previous_Position : Matreshka.Internals.Utf16.Utf16_String_Index;
Previous_Length : Natural;
Previous_State :
Matreshka.Internals.Unicode.Ucd.Grapheme_Cluster_Break;
Current_Position : Matreshka.Internals.Utf16.Utf16_String_Index;
Current_Length : Natural;
Current_State :
Matreshka.Internals.Unicode.Ucd.Grapheme_Cluster_Break;
Next_Position : Matreshka.Internals.Utf16.Utf16_String_Index;
Next_State :
Matreshka.Internals.Unicode.Ucd.Grapheme_Cluster_Break;
end record;
-- overriding procedure On_Changed
-- (Self : not null access Grapheme_Cluster_Cursor;
-- Changed_First : Positive;
-- Removed_Last : Natural;
-- Inserted_Last : Natural);
end League.Strings.Cursors.Grapheme_Clusters;
|
-- This package has been generated automatically by GNATtest.
-- Do not edit any part of it, see GNATtest documentation for more details.
-- begin read only
with GNATtest_Generated;
package Tk.Widget.Widget_Options_Test_Data.Widget_Options_Tests is
type Test_Widget_Options is abstract new GNATtest_Generated
.GNATtest_Standard
.Tk
.Widget
.Widget_Options_Test_Data
.Test_Widget_Options with
null record;
end Tk.Widget.Widget_Options_Test_Data.Widget_Options_Tests;
-- end read only
|
------------------------------------------------------------------------------
-- --
-- Copyright (C) 2018-2021, 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 Ada.Unchecked_Conversion;
package body USB.Device.HID.Joystick is
--------------
-- Set_Axis --
--------------
procedure Set_Axis (This : in out Instance;
A : Axis;
Value : Interfaces.Integer_8)
is
function To_UInt8 is new Ada.Unchecked_Conversion (Interfaces.Integer_8,
UInt8);
begin
This.Report (This.Report'First + (case A is
when X => 0,
when Y => 1)) := To_UInt8 (Value);
end Set_Axis;
-----------------
-- Set_Buttons --
-----------------
procedure Set_Buttons (This : in out Instance;
Buttons : UInt8)
is
begin
This.Report (This.Report'Last) := Buttons;
end Set_Buttons;
end USB.Device.HID.Joystick;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.CMOF.Properties;
with AMF.Internals.Helpers;
with AMF.Internals.Listener_Registry;
with AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds;
with AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds;
with AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds;
with AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds;
package body AMF.Internals.Tables.UMLDI_Notification is
--------------------------
-- Notify_Attribute_Set --
--------------------------
procedure Notify_Attribute_Set
(Element : AMF.Internals.AMF_Element;
Property : AMF.Internals.CMOF_Element;
Old_Value : AMF.UMLDI.UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind;
New_Value : AMF.UMLDI.UMLDI_UML_Association_Or_Connector_Or_Link_Shape_Kind) is
begin
AMF.Internals.Listener_Registry.Notify_Attribute_Set
(AMF.Internals.Helpers.To_Element (Element),
AMF.CMOF.Properties.CMOF_Property_Access
(AMF.Internals.Helpers.To_Element (Property)),
(Is_Empty => True),
AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.To_Holder (Old_Value),
AMF.UMLDI.Holders.UML_Association_Or_Connector_Or_Link_Shape_Kinds.To_Holder (New_Value));
end Notify_Attribute_Set;
--------------------------
-- Notify_Attribute_Set --
--------------------------
procedure Notify_Attribute_Set
(Element : AMF.Internals.AMF_Element;
Property : AMF.Internals.CMOF_Element;
Old_Value : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind;
New_Value : AMF.UMLDI.Optional_UMLDI_UML_Inherited_State_Border_Kind) is
begin
AMF.Internals.Listener_Registry.Notify_Attribute_Set
(AMF.Internals.Helpers.To_Element (Element),
AMF.CMOF.Properties.CMOF_Property_Access
(AMF.Internals.Helpers.To_Element (Property)),
(Is_Empty => True),
AMF.UMLDI.Holders.To_Holder (Old_Value),
AMF.UMLDI.Holders.To_Holder (New_Value));
end Notify_Attribute_Set;
--------------------------
-- Notify_Attribute_Set --
--------------------------
procedure Notify_Attribute_Set
(Element : AMF.Internals.AMF_Element;
Property : AMF.Internals.CMOF_Element;
Old_Value : AMF.UMLDI.UMLDI_UML_Interaction_Table_Label_Kind;
New_Value : AMF.UMLDI.UMLDI_UML_Interaction_Table_Label_Kind) is
begin
AMF.Internals.Listener_Registry.Notify_Attribute_Set
(AMF.Internals.Helpers.To_Element (Element),
AMF.CMOF.Properties.CMOF_Property_Access
(AMF.Internals.Helpers.To_Element (Property)),
(Is_Empty => True),
AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.To_Holder (Old_Value),
AMF.UMLDI.Holders.UML_Interaction_Table_Label_Kinds.To_Holder (New_Value));
end Notify_Attribute_Set;
--------------------------
-- Notify_Attribute_Set --
--------------------------
procedure Notify_Attribute_Set
(Element : AMF.Internals.AMF_Element;
Property : AMF.Internals.CMOF_Element;
Old_Value : AMF.UMLDI.UMLDI_UML_Interaction_Diagram_Kind;
New_Value : AMF.UMLDI.UMLDI_UML_Interaction_Diagram_Kind) is
begin
AMF.Internals.Listener_Registry.Notify_Attribute_Set
(AMF.Internals.Helpers.To_Element (Element),
AMF.CMOF.Properties.CMOF_Property_Access
(AMF.Internals.Helpers.To_Element (Property)),
(Is_Empty => True),
AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.To_Holder (Old_Value),
AMF.UMLDI.Holders.UML_Interaction_Diagram_Kinds.To_Holder (New_Value));
end Notify_Attribute_Set;
--------------------------
-- Notify_Attribute_Set --
--------------------------
procedure Notify_Attribute_Set
(Element : AMF.Internals.AMF_Element;
Property : AMF.Internals.CMOF_Element;
Old_Value : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind;
New_Value : AMF.UMLDI.UMLDI_UML_Navigability_Notation_Kind) is
begin
AMF.Internals.Listener_Registry.Notify_Attribute_Set
(AMF.Internals.Helpers.To_Element (Element),
AMF.CMOF.Properties.CMOF_Property_Access
(AMF.Internals.Helpers.To_Element (Property)),
(Is_Empty => True),
AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.To_Holder (Old_Value),
AMF.UMLDI.Holders.UML_Navigability_Notation_Kinds.To_Holder (New_Value));
end Notify_Attribute_Set;
end AMF.Internals.Tables.UMLDI_Notification;
|
-- CD1009G.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 'SIZE' SPECIFICATION MAY BE GIVEN IN THE VISIBLE
-- OR PRIVATE PART OF A PACKAGE FOR A RECORD TYPE DECLARED IN
-- THE VISIBLE PART OF THE SAME PACKAGE.
-- HISTORY:
-- PWB 03/25/89 MODIFIED METHOD OF CHECKING OBJECT SIZE AGAINST
-- TYPE SIZE; CHANGED EXTENSION FROM '.ADA' TO '.DEP'.
-- VCL 10/07/87 CREATED ORIGINAL TEST.
WITH REPORT; USE REPORT;
PROCEDURE CD1009G IS
BEGIN
TEST ("CD1009G", "A 'SIZE' CLAUSE MAY BE GIVEN IN THE VISIBLE " &
"OR PRIVATE PART OF A PACKAGE FOR A " &
"RECORD TYPE DECLARED IN THE " &
"VISIBLE PART OF THE SAME PACKAGE");
DECLARE
PACKAGE PACK IS
SPECIFIED_SIZE : CONSTANT := INTEGER'SIZE;
TYPE CHECK_TYPE_1 IS
RECORD
I : INTEGER;
END RECORD;
FOR CHECK_TYPE_1'SIZE
USE SPECIFIED_SIZE;
X : CHECK_TYPE_1 := ( I => IDENT_INT (1) );
TYPE CHECK_TYPE_2 IS
RECORD
I : INTEGER;
END RECORD;
PRIVATE
FOR CHECK_TYPE_2'SIZE USE SPECIFIED_SIZE;
END PACK;
USE PACK;
Y : CHECK_TYPE_2 := ( I => IDENT_INT (5) );
BEGIN
IF CHECK_TYPE_1'SIZE /= SPECIFIED_SIZE THEN
FAILED ("CHECK_TYPE_1'SIZE IS INCORRECT");
END IF;
IF X'SIZE < SPECIFIED_SIZE THEN
FAILED ("OBJECT SIZE TOO SMALL -- CHECK_TYPE_1. " &
"VALUE IS" & INTEGER'IMAGE( IDENT_INT( X.I) ) );
END IF;
IF CHECK_TYPE_2'SIZE /= SPECIFIED_SIZE THEN
FAILED ("CHECK_TYPE_2'SIZE IS INCORRECT");
END IF;
IF Y'SIZE < SPECIFIED_SIZE THEN
FAILED ("OBJECT SIZE TOO SMALL -- CHECK_TYPE_2. " &
"VALUE IS" & INTEGER'IMAGE( IDENT_INT(Y.I) ) );
END IF;
END;
RESULT;
END CD1009G;
|
-- 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 Tcl.Commands.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.Text_IO;
-- begin read only
-- end read only
package body Tcl.Commands.Test_Data.Tests is
-- begin read only
-- id:2.2/01/
--
-- This section can be used to add global variables and other elements.
--
-- end read only
function My_Proc
(ClientData: System.Address; Interpreter: Tcl_Interpreter; Argc: Positive;
Argv: Argv_Pointer.Pointer) return Tcl_Results with
Convention => C;
function My_Proc
(ClientData: System.Address; Interpreter: Tcl_Interpreter; Argc: Positive;
Argv: Argv_Pointer.Pointer) return Tcl_Results is
begin
Ada.Text_IO.Put_Line("Arguments:" & Positive'Image(Argc));
for I in 0 .. Argc - 1 loop
Ada.Text_IO.Put_Line(Natural'Image(I) & ": " & Get_Argument(Argv, I));
end loop;
return TCL_OK;
end My_Proc;
-- begin read only
-- end read only
-- begin read only
function Wrap_Test_Tcl_Create_Command_5606e9_12aca3
(Command_Name: String; Proc: Tcl_Cmd_Proc;
Interpreter: Tcl_Interpreter := Get_Interpreter;
Delete_Proc: Tcl_Cmd_Delete_Proc := Null_Tcl_Cmd_Delete_Proc)
return Tcl_Command is
begin
begin
pragma Assert
(Command_Name'Length > 0 and Proc /= Null_Tcl_Cmd_Proc and
Interpreter /= Null_Interpreter);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"req_sloc(tcl-commands.ads:0):Test_Tcl_CreateCommand test requirement violated");
end;
declare
Test_Tcl_Create_Command_5606e9_12aca3_Result: constant Tcl_Command :=
GNATtest_Generated.GNATtest_Standard.Tcl.Commands.Tcl_Create_Command
(Command_Name, Proc, Interpreter, Delete_Proc);
begin
begin
pragma Assert(True);
null;
exception
when System.Assertions.Assert_Failure =>
AUnit.Assertions.Assert
(False,
"ens_sloc(tcl-commands.ads:0:):Test_Tcl_CreateCommand test commitment violated");
end;
return Test_Tcl_Create_Command_5606e9_12aca3_Result;
end;
end Wrap_Test_Tcl_Create_Command_5606e9_12aca3;
-- end read only
-- begin read only
procedure Test_Tcl_Create_Command_test_tcl_createcommand
(Gnattest_T: in out Test);
procedure Test_Tcl_Create_Command_5606e9_12aca3
(Gnattest_T: in out Test) renames
Test_Tcl_Create_Command_test_tcl_createcommand;
-- id:2.2/5606e960122df3a5/Tcl_Create_Command/1/0/test_tcl_createcommand/
procedure Test_Tcl_Create_Command_test_tcl_createcommand
(Gnattest_T: in out Test) is
function Tcl_Create_Command
(Command_Name: String; Proc: Tcl_Cmd_Proc;
Interpreter: Tcl_Interpreter := Get_Interpreter;
Delete_Proc: Tcl_Cmd_Delete_Proc := Null_Tcl_Cmd_Delete_Proc)
return Tcl_Command renames
Wrap_Test_Tcl_Create_Command_5606e9_12aca3;
-- end read only
pragma Unreferenced(Gnattest_T);
begin
Assert
(Tcl_Create_Command("MyProc", My_Proc'Access) /= Null_Tcl_Command,
"Failed to create a new Tcl command");
Tcl_Eval("MyProc asd");
Tcl_Eval("MyProc ads sdf");
Tcl_Eval("MyProc {Asd asfd} wer sdgfdgfd");
-- begin read only
end Test_Tcl_Create_Command_test_tcl_createcommand;
-- 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 Tcl.Commands.Test_Data.Tests;
|
-----------------------------------------------------------------------
-- util-streams-texts-tr -- Text translation utilities on streams
-- Copyright (C) 2010, 2011, 2012, 2015, 2016, 2017 Stephane Carrez
-- Written by Stephane Carrez (Stephane.Carrez@gmail.com)
--
-- 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.Texts.Transforms;
with Ada.Wide_Wide_Characters.Handling;
package Util.Streams.Texts.WTR is
new Util.Texts.Transforms (Stream => Print_Stream'Class,
Char => Wide_Wide_Character,
Input => Wide_Wide_String,
Put => Write_Char,
To_Upper => Ada.Wide_Wide_Characters.Handling.To_Upper,
To_Lower => Ada.Wide_Wide_Characters.Handling.To_Lower);
|
-- Motherlode
-- Copyright (c) 2020 Fabien Chouteau
with HAL; use HAL;
with PyGamer.Time;
package body World is
Seed : UInt32 := 5323;
----------
-- Rand --
----------
function Rand return Float is
begin
Seed := 8253729 * Seed + 2396403;
return Float (Seed mod 32767) / 32767.0;
end Rand;
--------------
-- Get_Cell --
--------------
function Get_Cell (CX, CY : Natural) return Cell_Kind is
begin
return Ground (CX + CY * Ground_Width);
end Get_Cell;
-----------------
-- Choose_Cell --
-----------------
function Choose_Cell (CX, CY : Natural) return Cell_Kind is
Proba : array (Cell_Kind) of Natural;
----------------
-- From_Proba --
----------------
function From_Proba return Cell_Kind is
Total : Natural := 0;
Value : Natural := 0;
begin
for Elt of Proba loop
Total := Total + Elt;
end loop;
Value := Natural (Float (Total) * Rand);
Total := 0;
for Kind in Cell_Kind loop
if Value in Total .. Total + Proba (Kind) then
return Kind;
else
Total := Total + Proba (Kind);
end if;
end loop;
return Rock;
end From_Proba;
begin
if CY < 3 then
return Empty;
elsif CY = 3 then
return Dirt;
else
case CY is
when 0 .. 10 =>
Proba := (Empty => 13,
Dirt => 70,
Coal => 15,
Iron => 2,
Gold => 0,
Diamond => 0,
Rock => 0);
when 11 .. 50 =>
Proba := (Empty => 8,
Dirt => 67,
Coal => 15,
Iron => 7,
Gold => 0,
Diamond => 0,
Rock => 3);
when 51 .. 100 =>
Proba := (Empty => 8,
Dirt => 50,
Coal => 15,
Iron => 20,
Gold => 10,
Diamond => 2,
Rock => 5);
when 101 .. 200 =>
Proba := (Empty => 15,
Dirt => 40,
Coal => 5,
Iron => 10,
Gold => 15,
Diamond => 5,
Rock => 10);
when 201 .. 350 =>
Proba := (Empty => 10,
Dirt => 35,
Coal => 0,
Iron => 10,
Gold => 15,
Diamond => 15,
Rock => 15);
when others =>
Proba := (Empty => 0,
Dirt => 0,
Coal => 0,
Iron => 0,
Gold => 25,
Diamond => 25,
Rock => 50);
end case;
-- Neighboor Bonus
if CX > 0 then
Proba (Get_Cell (CX - 1, CY)) := Proba (Get_Cell (CX - 1, CY)) + 20;
end if;
if CY > 0 then
Proba (Get_Cell (CX, CY - 1)) := Proba (Get_Cell (CX, CY - 1)) + 20;
end if;
if CX < Ground_Width - 1 then
Proba (Get_Cell (CX + 1, CY)) := Proba (Get_Cell (CX + 1, CY)) + 20;
end if;
if CY < Ground_Depth - 1 then
Proba (Get_Cell (CX, CY - 1)) := Proba (Get_Cell (CX, CY - 1)) + 20;
end if;
return From_Proba;
end if;
end Choose_Cell;
---------------------
-- Generate_Ground --
---------------------
procedure Generate_Ground is
begin
Seed := 5000 + UInt32 (PyGamer.Time.Clock mod 323);
for X in 0 .. Ground_Width - 1 loop
for Y in 0 .. Ground_Depth - 1 loop
Ground (X + Y * Ground_Width) := Choose_Cell (X, Y);
end loop;
end loop;
end Generate_Ground;
--------------
-- Collides --
--------------
function Collides (X, Y : Integer) return Boolean is
begin
if X < 0 or else X >= Cell_Size * Ground_Width
or else
Y < 0 or else Y >= Cell_Size * Ground_Depth
then
-- Collides when out of bounds
return True;
end if;
return Ground ((X / Cell_Size) + (Y / Cell_Size) * Ground_Width) /= Empty;
end Collides;
end World;
|
-- Copyright (c) 2019 Maxim Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
with Program.Lexical_Elements;
with Program.Elements.Return_Object_Specifications;
with Program.Element_Vectors;
with Program.Elements.Exception_Handlers;
with Program.Elements.Extended_Return_Statements;
with Program.Element_Visitors;
package Program.Nodes.Extended_Return_Statements is
pragma Preelaborate;
type Extended_Return_Statement is
new Program.Nodes.Node
and Program.Elements.Extended_Return_Statements
.Extended_Return_Statement
and Program.Elements.Extended_Return_Statements
.Extended_Return_Statement_Text
with private;
function Create
(Return_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Return_Object : not null Program.Elements
.Return_Object_Specifications.Return_Object_Specification_Access;
Do_Token : Program.Lexical_Elements.Lexical_Element_Access;
Statements : Program.Element_Vectors.Element_Vector_Access;
Exception_Token : Program.Lexical_Elements.Lexical_Element_Access;
Exception_Handlers : Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access;
End_Token : Program.Lexical_Elements.Lexical_Element_Access;
Return_Token_2 : Program.Lexical_Elements.Lexical_Element_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Extended_Return_Statement;
type Implicit_Extended_Return_Statement is
new Program.Nodes.Node
and Program.Elements.Extended_Return_Statements
.Extended_Return_Statement
with private;
function Create
(Return_Object : not null Program.Elements
.Return_Object_Specifications.Return_Object_Specification_Access;
Statements : Program.Element_Vectors.Element_Vector_Access;
Exception_Handlers : Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Extended_Return_Statement
with Pre =>
Is_Part_Of_Implicit or Is_Part_Of_Inherited or Is_Part_Of_Instance;
private
type Base_Extended_Return_Statement is
abstract new Program.Nodes.Node
and Program.Elements.Extended_Return_Statements
.Extended_Return_Statement
with record
Return_Object : not null Program.Elements
.Return_Object_Specifications.Return_Object_Specification_Access;
Statements : Program.Element_Vectors.Element_Vector_Access;
Exception_Handlers : Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access;
end record;
procedure Initialize
(Self : aliased in out Base_Extended_Return_Statement'Class);
overriding procedure Visit
(Self : not null access Base_Extended_Return_Statement;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class);
overriding function Return_Object
(Self : Base_Extended_Return_Statement)
return not null Program.Elements.Return_Object_Specifications
.Return_Object_Specification_Access;
overriding function Statements
(Self : Base_Extended_Return_Statement)
return Program.Element_Vectors.Element_Vector_Access;
overriding function Exception_Handlers
(Self : Base_Extended_Return_Statement)
return Program.Elements.Exception_Handlers
.Exception_Handler_Vector_Access;
overriding function Is_Extended_Return_Statement_Element
(Self : Base_Extended_Return_Statement)
return Boolean;
overriding function Is_Statement_Element
(Self : Base_Extended_Return_Statement)
return Boolean;
type Extended_Return_Statement is
new Base_Extended_Return_Statement
and Program.Elements.Extended_Return_Statements
.Extended_Return_Statement_Text
with record
Return_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Do_Token : Program.Lexical_Elements.Lexical_Element_Access;
Exception_Token : Program.Lexical_Elements.Lexical_Element_Access;
End_Token : Program.Lexical_Elements.Lexical_Element_Access;
Return_Token_2 : Program.Lexical_Elements.Lexical_Element_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
end record;
overriding function To_Extended_Return_Statement_Text
(Self : aliased in out Extended_Return_Statement)
return Program.Elements.Extended_Return_Statements
.Extended_Return_Statement_Text_Access;
overriding function Return_Token
(Self : Extended_Return_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access;
overriding function Do_Token
(Self : Extended_Return_Statement)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Exception_Token
(Self : Extended_Return_Statement)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function End_Token
(Self : Extended_Return_Statement)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Return_Token_2
(Self : Extended_Return_Statement)
return Program.Lexical_Elements.Lexical_Element_Access;
overriding function Semicolon_Token
(Self : Extended_Return_Statement)
return not null Program.Lexical_Elements.Lexical_Element_Access;
type Implicit_Extended_Return_Statement is
new Base_Extended_Return_Statement
with record
Is_Part_Of_Implicit : Boolean;
Is_Part_Of_Inherited : Boolean;
Is_Part_Of_Instance : Boolean;
end record;
overriding function To_Extended_Return_Statement_Text
(Self : aliased in out Implicit_Extended_Return_Statement)
return Program.Elements.Extended_Return_Statements
.Extended_Return_Statement_Text_Access;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Extended_Return_Statement)
return Boolean;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Extended_Return_Statement)
return Boolean;
overriding function Is_Part_Of_Instance
(Self : Implicit_Extended_Return_Statement)
return Boolean;
end Program.Nodes.Extended_Return_Statements;
|
with Ada.Streams;
with Interfaces;
with System;
package ACO.Messages is
pragma Preelaborate;
use Interfaces;
type Id_Type is mod 2**11;
type Id_Array is array (Natural range <>) of Id_Type;
type Function_Code is mod 2**4;
type Node_Nr is mod 2**7;
Not_A_Slave : constant Node_Nr := 0;
subtype Slave_Node_Nr is Node_Nr range 1 .. Node_Nr'Last;
Broadcast_Id : constant Node_Nr := 0;
type CAN_Id_Type (As_Id : Boolean := False) is record
case As_Id is
when True =>
Id : Id_Type;
when False =>
Code : Function_Code;
Node : Node_Nr;
end case;
end record
with Unchecked_Union, Size => 11, Bit_Order => System.Low_Order_First;
for CAN_Id_Type use record
Id at 0 range 0 .. 10;
Code at 0 range 7 .. 10;
Node at 0 range 0 .. 6;
end record;
Max_Data_Length : constant := 8;
subtype Data_Length is Natural range 0 .. Max_Data_Length;
subtype Data_Type is Unsigned_8;
type Data_Array is array (Natural range <>) of Data_Type;
Empty_Data : Data_Array (1 .. 0);
subtype Msg_Data is Data_Array (0 .. Max_Data_Length - 1);
type Message is record
CAN_Id : CAN_Id_Type;
RTR : Boolean;
Length : Data_Length;
Data : Msg_Data;
end record;
function CAN_Id (Msg : Message) return Id_Type with Inline;
function Func_Code (Msg : Message) return Function_Code with Inline;
function Node_Id (Msg : Message) return Node_Nr with Inline;
function Create (CAN_Id : Id_Type;
RTR : Boolean;
DLC : Data_Length;
Data : Msg_Data)
return Message;
function Create (CAN_Id : Id_Type;
RTR : Boolean;
Data : Data_Array)
return Message
with Pre => Data'Length <= Msg_Data'Length;
function Create (Code : Function_Code;
Node : Node_Nr;
RTR : Boolean;
Data : Data_Array)
return Message
with Pre => Data'Length <= Msg_Data'Length;
procedure Print
(Stream : not null access Ada.Streams.Root_Stream_Type'Class;
Msg : in Message);
function Image (Msg : Message) return String;
function Image (CAN_Id : CAN_Id_Type) return String;
private
Fill_Data : constant Data_Type := 0;
end ACO.Messages;
|
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . A B O R T I O N --
-- --
-- S p e c --
-- --
-- $Revision: 2 $ --
-- --
-- Copyright (c) 1991,1992,1993,1994, FSU, All Rights Reserved --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU Library General Public License as published by the --
-- Free Software Foundation; either version 2, or (at your option) any --
-- later version. GNARL is distributed in the hope that it will be use- --
-- ful, but but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Gen- --
-- eral Library Public License for more details. You should have received --
-- a copy of the GNU Library General Public License along with GNARL; see --
-- file COPYING.LIB. If not, write to the Free Software Foundation, 675 --
-- Mass Ave, Cambridge, MA 02139, USA. --
-- --
------------------------------------------------------------------------------
with System.Task_Primitives;
-- Used for, Task_Primitives.Pre_Call_State
with System.Tasking.Utilities;
-- Used for, Utilities.ATCB_Ptr
package System.Tasking.Abortion is
procedure Abort_Tasks (Tasks : Task_List);
-- Abort_Tasks is called to initiate abortion, however, the actual
-- abortion is done by abortee by means of Abort_Handler
procedure Change_Base_Priority (T : System.Tasking.Utilities.ATCB_Ptr);
-- Change the base priority of T.
-- Has to be called with T.Lock write locked.
procedure Defer_Abortion;
-- pragma Inline (Defer_Abortion); -- To allow breakpoints to be set. ???
procedure Undefer_Abortion;
-- pragma Inline (Undefer_Abortion); -- To allow breakpoints to be set.
end System.Tasking.Abortion;
|
------------------------------------------------------------------------------
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
-- This program demonstrates the on-board gyro provided by the L3GD20 chip
-- on the STM32F429 Discovery boards. The pitch, roll, and yaw values are
-- continuously displayed on the LCD, as are the adjusted raw values. Move
-- the board to see them change. The values will be positive or negative,
-- depending on the direction of movement. Note that the values are not
-- constant, even when the board is not moving, due to noise.
-- This program demonstrates use of interrupts rather than polling.
-- NB: You may need to reset the board after downloading.
with Last_Chance_Handler; pragma Unreferenced (Last_Chance_Handler);
with Gyro_Interrupts;
with Output_Utils; use Output_Utils;
with Ada.Synchronous_Task_Control; use Ada.Synchronous_Task_Control;
with STM32.Device; use STM32.Device;
with STM32.Board; use STM32.Board;
with LCD_Std_Out;
with L3GD20; use L3GD20;
with STM32; use STM32;
with STM32.GPIO; use STM32.GPIO;
with STM32.EXTI; use STM32.EXTI;
procedure Demo_L3GD20 is
Axes : L3GD20.Angle_Rates;
Stable : L3GD20.Angle_Rates; -- the values when the board is motionless
Sensitivity : Float;
Scaled_X : Float;
Scaled_Y : Float;
Scaled_Z : Float;
procedure Get_Gyro_Offsets
(Offsets : out Angle_Rates;
Sample_Count : in Long_Integer);
-- Computes the averages for the gyro values returned when the board is
-- motionless
procedure Configure_Gyro;
-- Configures the on-board gyro chip
procedure Await_Raw_Angle_Rates (Rates : out Angle_Rates);
-- Returns the next angle rates available from the gyro, for all three
-- axes. Suspends until the gyro generates an interrupt indicating data
-- available. The interrupt handler sets a Suspension_Object to allow
-- the caller to resume, at which point it gets the raw data from the gyro.
procedure Configure_Gyro_Interrupt;
-- Configures the gyro's "data ready" interrupt (interrupt #2) on the
-- required port/pin for the F429 Discovery board. Enables the interrupt.
-- See the F429 Disco User Manual, Table 6, pg 19, for the port/pin.
---------------------------
-- Await_Raw_Angle_Rates --
---------------------------
procedure Await_Raw_Angle_Rates (Rates : out Angle_Rates) is
begin
Suspend_Until_True (Gyro_Interrupts.Data_Available);
Get_Raw_Angle_Rates (Gyro, Rates);
end Await_Raw_Angle_Rates;
--------------------
-- Configure_Gyro --
--------------------
procedure Configure_Gyro is
begin
-- Init the on-board gyro SPI and GPIO. This is board-specific, not
-- every board has a gyro. The F429 Discovery does, for example, but
-- the F4 Discovery does not.
STM32.Board.Initialize_Gyro_IO;
Gyro.Reset;
Gyro.Configure
(Power_Mode => L3GD20_Mode_Active,
Output_Data_Rate => L3GD20_Output_Data_Rate_95Hz,
Axes_Enable => L3GD20_Axes_Enable,
Bandwidth => L3GD20_Bandwidth_1,
BlockData_Update => L3GD20_BlockDataUpdate_Continous,
Endianness => L3GD20_Little_Endian,
Full_Scale => L3GD20_Fullscale_250);
Gyro.Enable_Low_Pass_Filter;
end Configure_Gyro;
------------------------------
-- Configure_Gyro_Interrupt --
------------------------------
procedure Configure_Gyro_Interrupt is
Config : GPIO_Port_Configuration;
-- This is the required port/pin configuration on STM32F429 Disco
-- boards for interrupt 2 on the L3GD20 gyro. See the F429 Disco
-- User Manual, Table 6, pg 19.
begin
Enable_Clock (MEMS_INT2);
Config.Mode := Mode_In;
Config.Resistors := Floating;
Config.Speed := Speed_50MHz;
Configure_IO (MEMS_INT2, Config);
Configure_Trigger (MEMS_INT2, Interrupt_Rising_Edge);
Gyro.Enable_Data_Ready_Interrupt; -- L3GD20 gyro interrupt 2
end Configure_Gyro_Interrupt;
----------------------
-- Get_Gyro_Offsets --
----------------------
procedure Get_Gyro_Offsets
(Offsets : out Angle_Rates;
Sample_Count : in Long_Integer)
is
Sample : Angle_Rates;
Total_X : Long_Integer := 0;
Total_Y : Long_Integer := 0;
Total_Z : Long_Integer := 0;
begin
for K in 1 .. Sample_Count loop
Await_Raw_Angle_Rates (Sample);
Total_X := Total_X + Long_Integer (Sample.X);
Total_Y := Total_Y + Long_Integer (Sample.Y);
Total_Z := Total_Z + Long_Integer (Sample.Z);
end loop;
Offsets.X := Angle_Rate (Total_X / Sample_Count);
Offsets.Y := Angle_Rate (Total_Y / Sample_Count);
Offsets.Z := Angle_Rate (Total_Z / Sample_Count);
end Get_Gyro_Offsets;
begin
LCD_Std_Out.Set_Font (Output_Utils.Selected_Font);
Configure_Gyro;
Configure_Gyro_Interrupt;
Sensitivity := Full_Scale_Sensitivity (Gyro);
Print (0, 0, "Calibrating");
Get_Gyro_Offsets (Stable, Sample_Count => 100); -- arbitrary count
Print_Static_Content (Stable);
loop
Await_Raw_Angle_Rates (Axes);
-- remove the computed stable offsets from the raw values
Axes.X := Axes.X - Stable.X;
Axes.Y := Axes.Y - Stable.Y;
Axes.Z := Axes.Z - Stable.Z;
-- print the values after the stable offset is removed
Print (Col_Adjusted, Line1_Adjusted, Axes.X'Img & " ");
Print (Col_Adjusted, Line2_Adjusted, Axes.Y'Img & " ");
Print (Col_Adjusted, Line3_Adjusted, Axes.Z'Img & " ");
-- scale the adjusted values
Scaled_X := Float (Axes.X) * Sensitivity;
Scaled_Y := Float (Axes.Y) * Sensitivity;
Scaled_Z := Float (Axes.Z) * Sensitivity;
-- print the final values
Print (Final_Column, Line1_Final, Scaled_X'Img & " ");
Print (Final_Column, Line2_Final, Scaled_Y'Img & " ");
Print (Final_Column, Line3_Final, Scaled_Z'Img & " ");
end loop;
end Demo_L3GD20;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUNTIME COMPONENTS --
-- --
-- S Y S T E M . S T R E A M _ A T T R I B U T E S --
-- --
-- S p e c --
-- --
-- $Revision$
-- --
-- Copyright (C) 1992-2000 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, 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. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the implementations of the stream attributes for
-- elementary types. These are the subprograms that are directly accessed
-- by occurrences of the stream attributes where the type is elementary.
-- We only provide the subprograms for the standard base types. For user
-- defined types, the subprogram for the corresponding root type is called
-- with an appropriate conversion.
with System;
with System.Unsigned_Types;
with Ada.Streams;
package System.Stream_Attributes is
pragma Preelaborate (Stream_Attributes);
pragma Suppress (Accessibility_Check, Stream_Attributes);
-- No need to check accessibility on arguments of subprograms
package UST renames System.Unsigned_Types;
subtype RST is Ada.Streams.Root_Stream_Type'Class;
-- Enumeration types are usually transferred using the routine for the
-- corresponding integer. The exception is that special routines are
-- provided for Boolean and the character types, in case the protocol
-- in use provides specially for these types.
-- Access types use either a thin pointer (single address) or fat pointer
-- (double address) form. The following types are used to hold access
-- values using unchecked conversions.
type Thin_Pointer is record
P1 : System.Address;
end record;
type Fat_Pointer is record
P1 : System.Address;
P2 : System.Address;
end record;
------------------------------------
-- Treatment of enumeration types --
------------------------------------
-- In this interface, there are no specific routines for general input
-- or output of enumeration types. Generally, enumeration types whose
-- representation is unsigned (no negative representation values) are
-- treated as unsigned integers, and enumeration types that do have
-- negative representation values are treated as signed integers.
-- An exception is that there are specialized routines for Boolean,
-- Character, and Wide_Character types, but these specialized routines
-- are used only if the type in question has a standard representation.
-- For the case of a non-standard representation (one where the size of
-- the first subtype is specified, or where an enumeration representation
-- clause is given, these three types are treated like any other cases
-- of enumeration types, as described above.
-- for
---------------------
-- Input Functions --
---------------------
-- Functions for S'Input attribute. These functions are also used for
-- S'Read, with the obvious transformation, since the input operation
-- is the same for all elementary types (no bounds or discriminants
-- are involved).
function I_AD (Stream : access RST) return Fat_Pointer;
function I_AS (Stream : access RST) return Thin_Pointer;
function I_B (Stream : access RST) return Boolean;
function I_C (Stream : access RST) return Character;
function I_F (Stream : access RST) return Float;
function I_I (Stream : access RST) return Integer;
function I_LF (Stream : access RST) return Long_Float;
function I_LI (Stream : access RST) return Long_Integer;
function I_LLF (Stream : access RST) return Long_Long_Float;
function I_LLI (Stream : access RST) return Long_Long_Integer;
function I_LLU (Stream : access RST) return UST.Long_Long_Unsigned;
function I_LU (Stream : access RST) return UST.Long_Unsigned;
function I_SF (Stream : access RST) return Short_Float;
function I_SI (Stream : access RST) return Short_Integer;
function I_SSI (Stream : access RST) return Short_Short_Integer;
function I_SSU (Stream : access RST) return UST.Short_Short_Unsigned;
function I_SU (Stream : access RST) return UST.Short_Unsigned;
function I_U (Stream : access RST) return UST.Unsigned;
function I_WC (Stream : access RST) return Wide_Character;
-----------------------
-- Output Procedures --
-----------------------
-- Procedures for S'Write attribute. These procedures are also used
-- for 'Output, since for elementary types there is no difference
-- between 'Write and 'Output because there are no discriminants
-- or bounds to be written.
procedure W_AD (Stream : access RST; Item : in Fat_Pointer);
procedure W_AS (Stream : access RST; Item : in Thin_Pointer);
procedure W_B (Stream : access RST; Item : in Boolean);
procedure W_C (Stream : access RST; Item : in Character);
procedure W_F (Stream : access RST; Item : in Float);
procedure W_I (Stream : access RST; Item : in Integer);
procedure W_LF (Stream : access RST; Item : in Long_Float);
procedure W_LI (Stream : access RST; Item : in Long_Integer);
procedure W_LLF (Stream : access RST; Item : in Long_Long_Float);
procedure W_LLI (Stream : access RST; Item : in Long_Long_Integer);
procedure W_LLU (Stream : access RST; Item : in UST.Long_Long_Unsigned);
procedure W_LU (Stream : access RST; Item : in UST.Long_Unsigned);
procedure W_SF (Stream : access RST; Item : in Short_Float);
procedure W_SI (Stream : access RST; Item : in Short_Integer);
procedure W_SSI (Stream : access RST; Item : in Short_Short_Integer);
procedure W_SSU (Stream : access RST; Item : in UST.Short_Short_Unsigned);
procedure W_SU (Stream : access RST; Item : in UST.Short_Unsigned);
procedure W_U (Stream : access RST; Item : in UST.Unsigned);
procedure W_WC (Stream : access RST; Item : in Wide_Character);
private
pragma Inline (I_AD);
pragma Inline (I_AS);
pragma Inline (I_B);
pragma Inline (I_C);
pragma Inline (I_F);
pragma Inline (I_I);
pragma Inline (I_LF);
pragma Inline (I_LI);
pragma Inline (I_LLF);
pragma Inline (I_LLI);
pragma Inline (I_LLU);
pragma Inline (I_LU);
pragma Inline (I_SF);
pragma Inline (I_SI);
pragma Inline (I_SSI);
pragma Inline (I_SSU);
pragma Inline (I_SU);
pragma Inline (I_U);
pragma Inline (I_WC);
pragma Inline (W_AD);
pragma Inline (W_AS);
pragma Inline (W_B);
pragma Inline (W_C);
pragma Inline (W_F);
pragma Inline (W_I);
pragma Inline (W_LF);
pragma Inline (W_LI);
pragma Inline (W_LLF);
pragma Inline (W_LLI);
pragma Inline (W_LLU);
pragma Inline (W_LU);
pragma Inline (W_SF);
pragma Inline (W_SI);
pragma Inline (W_SSI);
pragma Inline (W_SSU);
pragma Inline (W_SU);
pragma Inline (W_U);
pragma Inline (W_WC);
end System.Stream_Attributes;
|
-- PR ada/52735
-- Reported by Per Sandberg <per.sandberg@bredband.net>
-- { dg-do compile }
with Nested_Generic1_Pkg;
procedure Nested_Generic1 is
package P is new Nested_Generic1_Pkg;
begin
null;
end;
|
-- SPDX-FileCopyrightText: 2019 Max Reznik <reznikmm@gmail.com>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package body Program.Nodes.Generic_Function_Renaming_Declarations is
function Create
(Generic_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Function_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Names
.Defining_Name_Access;
Renames_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Renamed_Function : not null Program.Elements.Expressions
.Expression_Access;
With_Token : Program.Lexical_Elements.Lexical_Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Generic_Function_Renaming_Declaration is
begin
return Result : Generic_Function_Renaming_Declaration :=
(Generic_Token => Generic_Token, Function_Token => Function_Token,
Name => Name, Renames_Token => Renames_Token,
Renamed_Function => Renamed_Function, With_Token => With_Token,
Aspects => Aspects, Semicolon_Token => Semicolon_Token,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Name : not null Program.Elements.Defining_Names
.Defining_Name_Access;
Renamed_Function : not null Program.Elements.Expressions
.Expression_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False)
return Implicit_Generic_Function_Renaming_Declaration is
begin
return Result : Implicit_Generic_Function_Renaming_Declaration :=
(Name => Name, Renamed_Function => Renamed_Function,
Aspects => Aspects, Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Name
(Self : Base_Generic_Function_Renaming_Declaration)
return not null Program.Elements.Defining_Names.Defining_Name_Access is
begin
return Self.Name;
end Name;
overriding function Renamed_Function
(Self : Base_Generic_Function_Renaming_Declaration)
return not null Program.Elements.Expressions.Expression_Access is
begin
return Self.Renamed_Function;
end Renamed_Function;
overriding function Aspects
(Self : Base_Generic_Function_Renaming_Declaration)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access is
begin
return Self.Aspects;
end Aspects;
overriding function Generic_Token
(Self : Generic_Function_Renaming_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Generic_Token;
end Generic_Token;
overriding function Function_Token
(Self : Generic_Function_Renaming_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Function_Token;
end Function_Token;
overriding function Renames_Token
(Self : Generic_Function_Renaming_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Renames_Token;
end Renames_Token;
overriding function With_Token
(Self : Generic_Function_Renaming_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.With_Token;
end With_Token;
overriding function Semicolon_Token
(Self : Generic_Function_Renaming_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Generic_Function_Renaming_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Generic_Function_Renaming_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Generic_Function_Renaming_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
procedure Initialize
(Self : in out Base_Generic_Function_Renaming_Declaration'Class) is
begin
Set_Enclosing_Element (Self.Name, Self'Unchecked_Access);
Set_Enclosing_Element (Self.Renamed_Function, Self'Unchecked_Access);
for Item in Self.Aspects.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Generic_Function_Renaming_Declaration
(Self : Base_Generic_Function_Renaming_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Generic_Function_Renaming_Declaration;
overriding function Is_Declaration
(Self : Base_Generic_Function_Renaming_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Declaration;
overriding procedure Visit
(Self : not null access Base_Generic_Function_Renaming_Declaration;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Generic_Function_Renaming_Declaration (Self);
end Visit;
overriding function To_Generic_Function_Renaming_Declaration_Text
(Self : in out Generic_Function_Renaming_Declaration)
return Program.Elements.Generic_Function_Renaming_Declarations
.Generic_Function_Renaming_Declaration_Text_Access is
begin
return Self'Unchecked_Access;
end To_Generic_Function_Renaming_Declaration_Text;
overriding function To_Generic_Function_Renaming_Declaration_Text
(Self : in out Implicit_Generic_Function_Renaming_Declaration)
return Program.Elements.Generic_Function_Renaming_Declarations
.Generic_Function_Renaming_Declaration_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Generic_Function_Renaming_Declaration_Text;
end Program.Nodes.Generic_Function_Renaming_Declarations;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.
------------------------------------------------------------------------------
-- A clear variable action is a variable action that removes all values of a
-- variable.
------------------------------------------------------------------------------
with AMF.UML.Variable_Actions;
package AMF.UML.Clear_Variable_Actions is
pragma Preelaborate;
type UML_Clear_Variable_Action is limited interface
and AMF.UML.Variable_Actions.UML_Variable_Action;
type UML_Clear_Variable_Action_Access is
access all UML_Clear_Variable_Action'Class;
for UML_Clear_Variable_Action_Access'Storage_Size use 0;
end AMF.UML.Clear_Variable_Actions;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Testsuite Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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 Ada.Tags;
with Web_Services.SOAP.Handler_Registry;
with Web_Services.SOAP.Messages;
with SOAPConf.Payloads;
package body SOAPConf.Handlers is
procedure Echo_OK_Handler
(Input_Message : Web_Services.SOAP.Messages.SOAP_Message_Access;
Output_Message : out Web_Services.SOAP.Messages.SOAP_Message_Access);
procedure Default_Handler
(Input_Message : Web_Services.SOAP.Messages.SOAP_Message_Access;
Output_Message : out Web_Services.SOAP.Messages.SOAP_Message_Access);
---------------------
-- Default_Handler --
---------------------
procedure Default_Handler
(Input_Message : Web_Services.SOAP.Messages.SOAP_Message_Access;
Output_Message : out Web_Services.SOAP.Messages.SOAP_Message_Access) is
begin
Output_Message := new Web_Services.SOAP.Messages.SOAP_Message;
end Default_Handler;
---------------------
-- Echo_OK_Handler --
---------------------
procedure Echo_OK_Handler
(Input_Message : Web_Services.SOAP.Messages.SOAP_Message_Access;
Output_Message : out Web_Services.SOAP.Messages.SOAP_Message_Access)
is
Input : SOAPConf.Payloads.Echo_OK
renames SOAPConf.Payloads.Echo_OK (Input_Message.Payload.all);
begin
Output_Message :=
new Web_Services.SOAP.Messages.SOAP_Message'
(Action => <>,
Namespace_URI => <>,
Local_Name => <>,
Output => null,
Headers => <>,
Payload =>
new SOAPConf.Payloads.Response_OK'(Text => Input.Text));
end Echo_OK_Handler;
begin
Web_Services.SOAP.Handler_Registry.Register
(Ada.Tags.No_Tag, Default_Handler'Access);
Web_Services.SOAP.Handler_Registry.Register
(SOAPConf.Payloads.Echo_OK'Tag, Echo_OK_Handler'Access);
end SOAPConf.Handlers;
|
------------------------------------------------------------------------------
-- --
-- THIS IS AN AUTOMATICALLY GENERATED FILE! DO NOT EDIT! --
-- --
-- WAVEFILES --
-- --
-- Quick Wave Data I/O Check --
-- --
-- The MIT License (MIT) --
-- --
-- Copyright (c) 2020 Gustavo A. Hoffmann --
-- --
-- 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.Text_IO; use Ada.Text_IO;
with Ada.Strings.Fixed; use Ada.Strings.Fixed;
with Audio.Wavefiles; use Audio.Wavefiles;
with Audio.Wavefiles.Report; use Audio.Wavefiles.Report;
with Audio.Wavefiles.Data_Types; use Audio.Wavefiles.Data_Types;
with Audio.Wavefiles.Data_Types.Text_IO;
use Audio.Wavefiles.Data_Types.Text_IO;
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
with Audio.Wavefiles.Generic_Float_PCM_IO;
#else
with Audio.Wavefiles.Generic_Fixed_PCM_IO;
#end if;
with Audio.RIFF.Wav.Formats; use Audio.RIFF.Wav.Formats;
with Audio.RIFF.Wav.Formats.Report;
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
package body Quick_Wav_Data_Checks.Float_Checks is
#else
package body Quick_Wav_Data_Checks.Fixed_Checks is
#end if;
Verbose : constant Boolean := False;
type Integer_64 is range -2 ** 63 .. 2 ** 63 - 1
with Size => 64;
package Fixed_64_PCM_As_Integer_Text_IO is new
Ada.Text_IO.Integer_IO (Integer_64);
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
subtype PCM_Sample is Wav_Float_128;
subtype PCM_Buffer is Wav_Buffer_Float_128;
subtype Channel_Range is Wav_Buffer_Range;
package PCM_Sample_Text_IO renames Wav_Float_128_Text_IO;
package PCM_IO is new Audio.Wavefiles.Generic_Float_PCM_IO
(PCM_Sample => PCM_Sample,
Channel_Range => Channel_Range,
PCM_MC_Sample => PCM_Buffer);
use PCM_IO;
PCM_Ref : constant PCM_Buffer (1 .. 11) :=
(1 => 2#1.0#e-0,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => (2#1.0#e-0 + 2#1.0#e-23),
6 => (-2#1.0#e-0 - 2#1.0#e-23),
7 => (2#1.0#e-0 + 2#1.0#e-52),
8 => (-2#1.0#e-0 - 2#1.0#e-52),
9 => (2#1.0#e-0 + 2#1.0#e-56),
10 => (-2#1.0#e-0 - 2#1.0#e-56),
others => 0.0);
-- 32-bit Float: 23-bit mantissa
-- 64-bit Float: 52-bit mantissa
-- 128-bit Float: 112-bit mantissa
PCM_Ref_32 : constant PCM_Buffer (1 .. 11) :=
(1 => 2#1.0#e-0,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => (2#1.0#e-0 + 2#1.0#e-23),
6 => (-2#1.0#e-0 - 2#1.0#e-23),
7 => (2#1.0#e-0),
8 => (-2#1.0#e-0),
9 => (2#1.0#e-0),
10 => (-2#1.0#e-0),
others => 0.0);
PCM_Ref_64 : constant PCM_Buffer (1 .. 11) :=
(1 => 2#1.0#e-0,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => (2#1.0#e-0 + 2#1.0#e-23),
6 => (-2#1.0#e-0 - 2#1.0#e-23),
7 => (2#1.0#e-0 + 2#1.0#e-52),
8 => (-2#1.0#e-0 - 2#1.0#e-52),
9 => (2#1.0#e-0),
10 => (-2#1.0#e-0),
others => 0.0);
#else
subtype PCM_Sample is Wav_Fixed_64;
subtype PCM_Buffer is Wav_Buffer_Fixed_64;
subtype Channel_Range is Wav_Buffer_Range;
package PCM_Sample_Text_IO renames Wav_Fixed_64_Text_IO;
package PCM_IO is new Audio.Wavefiles.Generic_Fixed_PCM_IO
(PCM_Sample => PCM_Sample,
Channel_Range => Channel_Range,
PCM_MC_Sample => PCM_Buffer);
use PCM_IO;
PCM_Ref : constant PCM_Buffer (1 .. 15) :=
(1 => 16#0.FFFF_FFFF_FFFF_FFFE#,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => 2#1.0#e-15,
6 => -2#1.0#e-15,
7 => 2#1.0#e-23,
8 => -2#1.0#e-23,
9 => 2#1.0#e-31,
10 => -2#1.0#e-31,
11 => 2#1.0#e-63,
12 => -2#1.0#e-63,
others => 0.0);
PCM_Ref_16 : constant PCM_Buffer (1 .. 15) :=
(1 => 16#0.FFFE_0000_0000_0000#,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => 2#1.0#e-15,
6 => -2#1.0#e-15,
others => 0.0);
PCM_Ref_24 : constant PCM_Buffer (1 .. 15) :=
(1 => 16#0.FFFF_FE00_0000_0000#,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => 2#1.0#e-15,
6 => -2#1.0#e-15,
7 => 2#1.0#e-23,
8 => -2#1.0#e-23,
others => 0.0);
PCM_Ref_32 : constant PCM_Buffer (1 .. 15) :=
(1 => 16#0.FFFF_FFFE_0000_0000#,
2 => -2#1.0#e-0,
3 => 2#1.0#e-1,
4 => -2#1.0#e-1,
5 => 2#1.0#e-15,
6 => -2#1.0#e-15,
7 => 2#1.0#e-23,
8 => -2#1.0#e-23,
9 => 2#1.0#e-31,
10 => -2#1.0#e-31,
others => 0.0);
#end if;
type Bits_Per_Sample_List is array (Positive range <>) of Wav_Bit_Depth;
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
Test_Bits_Per_Sample : constant Bits_Per_Sample_List := (Bit_Depth_32,
Bit_Depth_64);
#else
Test_Bits_Per_Sample : constant Bits_Per_Sample_List := (Bit_Depth_16,
Bit_Depth_24,
Bit_Depth_32);
#end if;
procedure Display_PCM_Vals
(PCM_Vals : PCM_Buffer;
Header : String);
procedure Write_PCM_Vals
(WF : in out Wavefile;
PCM_Vals : PCM_Buffer);
function PCM_Data_Is_OK
(PCM_Ref, PCM_DUT : PCM_Buffer) return Boolean;
function PCM_Data_Is_OK
(Test_Bits : Wav_Bit_Depth;
PCM_DUT : PCM_Buffer) return Boolean;
function Wav_IO_OK_For_Audio_Resolution
(Test_Bits : Wav_Bit_Depth;
Wav_Test_File_Name : String) return Boolean;
procedure Display_Info
(WF : Wavefile;
Header : String);
procedure Write_Wavefile
(Wav_File_Name : String;
Test_Bits : Wav_Bit_Depth);
procedure Read_Wavefile
(Wav_File_Name : String;
PCM_DUT : out PCM_Buffer);
function Image (B : Wav_Bit_Depth) return String renames
Audio.RIFF.Wav.Formats.Report.Image;
----------------------
-- Display_PCM_Vals --
----------------------
procedure Display_PCM_Vals (PCM_Vals : PCM_Buffer;
Header : String)
is
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
Display_Integer_Value : constant Boolean := False;
#else
Display_Integer_Value : constant Boolean := True;
#end if;
begin
Put_Line (Header);
for Sample_Count in PCM_Vals'Range loop
declare
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
PCM_Integer : array (1 .. 2) of Integer_64
with
Address => PCM_Vals (Sample_Count)'Address,
Size => 128;
#else
PCM_Integer : Integer_64
with
Address => PCM_Vals (Sample_Count)'Address,
Size => 64;
#end if;
begin
Put (" Val: ");
PCM_Sample_Text_IO.Put (Item => PCM_Vals (Sample_Count),
Fore => 5,
Aft => 60,
Exp => 5);
if Display_Integer_Value then
Put (" - ");
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
for I in PCM_Integer'Range loop
Fixed_64_PCM_As_Integer_Text_IO.Put
(PCM_Integer (I), Base => 2, Width => 68);
end loop;
#else
Fixed_64_PCM_As_Integer_Text_IO.Put
(PCM_Integer, Base => 2, Width => 68);
#end if;
end if;
New_Line;
end;
end loop;
end Display_PCM_Vals;
--------------------
-- Write_PCM_Vals --
--------------------
procedure Write_PCM_Vals (WF : in out Wavefile;
PCM_Vals : PCM_Buffer) is
PCM_Buf : PCM_Buffer (1 .. Number_Of_Channels (WF));
begin
for Sample_Count in PCM_Vals'Range loop
for J in PCM_Buf'Range loop
PCM_Buf (J) := PCM_Vals (Sample_Count);
end loop;
Put (WF, PCM_Buf);
end loop;
end Write_PCM_Vals;
------------------
-- Display_Info --
------------------
procedure Display_Info
(WF : Wavefile;
Header : String)
is
Separator : constant String
:= "===========================================================";
begin
Put_Line (Separator);
Put_Line (Header);
Display_Info (WF);
Put_Line (Separator);
end Display_Info;
--------------------
-- Write_Wavefile --
--------------------
procedure Write_Wavefile
(Wav_File_Name : String;
Test_Bits : Wav_Bit_Depth)
is
WF_Out : Wavefile;
Wave_Format : Wave_Format_Extensible;
begin
Wave_Format := Init (Bit_Depth => Test_Bits,
Sample_Rate => Sample_Rate_44100,
Number_Of_Channels => 2,
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
Use_Float => True);
#else
Use_Float => False);
#end if;
WF_Out.Set_Format_Of_Wavefile (Wave_Format);
WF_Out.Create (Out_File, Wav_File_Name);
Write_PCM_Vals (WF_Out, PCM_Ref);
WF_Out.Close;
end Write_Wavefile;
-------------------
-- Read_Wavefile --
-------------------
procedure Read_Wavefile
(Wav_File_Name : String;
PCM_DUT : out PCM_Buffer)
is
WF_In : Wavefile;
-- Wave_Format : Wave_Format_Extensible;
EOF : Boolean;
Samples : Integer := 0;
begin
WF_In.Open (In_File, Wav_File_Name);
-- Wave_Format := WF_In.Format_Of_Wavefile;
if Verbose then
Display_Info (WF_In, "Input File:");
end if;
Samples := 0;
PCM_DUT := (others => 0.0);
loop
Samples := Samples + 1;
-- Put ("[" & Integer'Image (Samples) & "]");
declare
PCM_Buf : constant PCM_Buffer := Get (WF_In);
begin
PCM_DUT (Samples) := PCM_Buf (PCM_Buf'First);
end;
EOF := WF_In.End_Of_File;
exit when EOF;
end loop;
if Verbose then
Display_PCM_Vals (PCM_Ref,
"Constant PCM values for testing:");
Display_PCM_Vals (PCM_DUT,
"Read PCM values:");
end if;
WF_In.Close;
end Read_Wavefile;
--------------------
-- PCM_Data_Is_OK --
--------------------
function PCM_Data_Is_OK
(PCM_Ref, PCM_DUT : PCM_Buffer) return Boolean
is
Success : Boolean := True;
begin
for I in PCM_DUT'Range loop
if PCM_DUT (I) /= PCM_Ref (I) then
Put_Line ("- Error for check at index"
& Integer'Image (I));
Success := False;
end if;
end loop;
return Success;
end PCM_Data_Is_OK;
--------------------
-- PCM_Data_Is_OK --
--------------------
function PCM_Data_Is_OK
(Test_Bits : Wav_Bit_Depth;
PCM_DUT : PCM_Buffer) return Boolean is
begin
case Test_Bits is
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
when Bit_Depth_32 =>
return PCM_Data_Is_OK (PCM_Ref_32, PCM_DUT);
when Bit_Depth_64 =>
return PCM_Data_Is_OK (PCM_Ref_64, PCM_DUT);
#else
when Bit_Depth_16 =>
return PCM_Data_Is_OK (PCM_Ref_16, PCM_DUT);
when Bit_Depth_24 =>
return PCM_Data_Is_OK (PCM_Ref_24, PCM_DUT);
when Bit_Depth_32 =>
return PCM_Data_Is_OK (PCM_Ref_32, PCM_DUT);
#end if;
when others =>
Put_Line ("Unknown test for "
& Image (Test_Bits)
& " bits");
return False;
end case;
end PCM_Data_Is_OK;
------------------------------------
-- Wav_IO_OK_For_Audio_Resolution --
------------------------------------
function Wav_IO_OK_For_Audio_Resolution
(Test_Bits : Wav_Bit_Depth;
Wav_Test_File_Name : String) return Boolean
is
Test_Bits_String : constant String
:= Trim (Image (Test_Bits), Ada.Strings.Both);
Wav_File_Name : constant String
:= Wav_Test_File_Name & "_" & Test_Bits_String & ".wav";
Test_Message : constant String
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
:= "Float " & Image (Test_Bits);
#else
:= "Fixed " & Image (Test_Bits);
#end if;
PCM_DUT : PCM_Buffer (PCM_Ref'Range);
Success : Boolean := True;
begin
Write_Wavefile (Wav_File_Name, Test_Bits);
Read_Wavefile (Wav_File_Name, PCM_DUT);
if PCM_Data_Is_OK (Test_Bits, PCM_DUT) then
Put_Line ("PASS : " & Test_Message);
else
Put_Line ("FAIL : " & Test_Message);
Success := False;
end if;
return Success;
end Wav_IO_OK_For_Audio_Resolution;
---------------
-- Wav_IO_OK --
---------------
function Wav_IO_OK
(Wav_Filename_Prefix : String) return Boolean
is
Wav_Test_File_Name : constant String
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
:= Wav_Filename_Prefix & "check_extremes_float";
#else
:= Wav_Filename_Prefix & "check_extremes_fixed";
#end if;
Success : Boolean := True;
begin
for Test_Bits of Test_Bits_Per_Sample loop
if not Wav_IO_OK_For_Audio_Resolution (Test_Bits,
Wav_Test_File_Name)
then
Success := False;
end if;
end loop;
return Success;
end Wav_IO_OK;
#if NUM_TYPE'Defined and then (NUM_TYPE = "FLOAT") then
end Quick_Wav_Data_Checks.Float_Checks;
#else
end Quick_Wav_Data_Checks.Fixed_Checks;
#end if;
|
<?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>call_Loop_LB2D_buf_p</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>stream&lt;PackedStencil&lt;unsigned int, 1, 1, 1, 1&gt; &gt;.V.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</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>slice_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></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</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>43</count>
<item_version>0</item_version>
<item class_id="9" tracking_level="1" version="0" object_id="_3">
<Value>
<Obj>
<type>0</type>
<id>7</id>
<name>buffer_0_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>168</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</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>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>168</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>buffer[0].value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_4">
<Value>
<Obj>
<type>0</type>
<id>8</id>
<name>buffer_1_value_V</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>168</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>168</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>buffer[1].value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</oprand_edges>
<opcode>alloca</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_5">
<Value>
<Obj>
<type>0</type>
<id>9</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>
<bitwidth>0</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_6">
<Value>
<Obj>
<type>0</type>
<id>11</id>
<name>write_idx_1</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>75</item>
<item>76</item>
<item>77</item>
<item>78</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_7">
<Value>
<Obj>
<type>0</type>
<id>12</id>
<name>row</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>80</item>
<item>81</item>
<item>82</item>
<item>83</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_8">
<Value>
<Obj>
<type>0</type>
<id>13</id>
<name>tmp</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>84</item>
<item>86</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_9">
<Value>
<Obj>
<type>0</type>
<id>15</id>
<name>row_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>row</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>87</item>
<item>89</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_10">
<Value>
<Obj>
<type>0</type>
<id>16</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>90</item>
<item>91</item>
<item>92</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_11">
<Value>
<Obj>
<type>0</type>
<id>20</id>
<name>tmp_5</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>10</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>113</item>
<item>114</item>
<item>116</item>
<item>118</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_12">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>icmp</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</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>119</item>
<item>121</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>122</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>write_idx_1_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>211</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>211</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>96</item>
<item>97</item>
<item>98</item>
<item>99</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_15">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>col</name>
<fileName></fileName>
<fileDirectory></fileDirectory>
<lineNumber>0</lineNumber>
<contextFuncName></contextFuncName>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>100</item>
<item>101</item>
<item>102</item>
<item>103</item>
</oprand_edges>
<opcode>phi</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_16">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>tmp_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>104</item>
<item>106</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_17">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>col_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>col</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>107</item>
<item>108</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>109</item>
<item>110</item>
<item>111</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>col_cast</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>131</item>
</oprand_edges>
<opcode>zext</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>34</id>
<name>tmp_7</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>63</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>133</item>
<item>134</item>
<item>135</item>
<item>137</item>
</oprand_edges>
<opcode>partselect</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>icmp1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</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>138</item>
<item>140</item>
</oprand_edges>
<opcode>icmp</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>write_idx_1_3</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>184</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>184</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>141</item>
<item>143</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>37</id>
<name>p_write_idx_1_1</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>144</item>
<item>145</item>
<item>146</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>tmp_value_V_2</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>186</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>186</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>tmp.value.V</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>148</item>
<item>149</item>
</oprand_edges>
<opcode>read</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name>buffer_0_value_V_ad</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>150</item>
<item>151</item>
<item>152</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>40</id>
<name>buffer_0_value_V_lo</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>153</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>41</id>
<name>buffer_1_value_V_ad</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>11</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>154</item>
<item>155</item>
<item>156</item>
</oprand_edges>
<opcode>getelementptr</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>42</id>
<name>buffer_1_value_V_lo</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>157</item>
</oprand_edges>
<opcode>load</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>43</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>187</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>187</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>158</item>
<item>159</item>
<item>160</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>45</id>
<name>tmp_8</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>161</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>p_Val2_2_0_phi</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>162</item>
<item>163</item>
<item>164</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>p_Val2_2_1_phi</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>198</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>198</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>32</bitwidth>
</Value>
<oprand_edges>
<count>3</count>
<item_version>0</item_version>
<item>165</item>
<item>166</item>
<item>167</item>
</oprand_edges>
<opcode>select</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>p_Result_s</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>206</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>206</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>__Result__</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>96</bitwidth>
</Value>
<oprand_edges>
<count>4</count>
<item_version>0</item_version>
<item>169</item>
<item>170</item>
<item>171</item>
<item>172</item>
</oprand_edges>
<opcode>bitconcatenate</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>49</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>207</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>207</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>174</item>
<item>175</item>
<item>176</item>
</oprand_edges>
<opcode>write</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_35">
<Value>
<Obj>
<type>0</type>
<id>50</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>208</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>208</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>177</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_36">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>tmp_9</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>183</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>183</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName></originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>1</bitwidth>
</Value>
<oprand_edges>
<count>1</count>
<item_version>0</item_version>
<item>127</item>
</oprand_edges>
<opcode>trunc</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</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_32_shifts/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>128</item>
<item>129</item>
<item>130</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>55</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</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_32_shifts/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>124</item>
<item>125</item>
<item>297</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>56</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</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_32_shifts/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>126</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</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_32_shifts/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>178</item>
<item>179</item>
<item>296</item>
</oprand_edges>
<opcode>store</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_41">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name></name>
<fileName>../../../lib_files/Stencil.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>75</lineNumber>
<contextFuncName>operator=</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_32_shifts/conv2d</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>209</second>
</item>
<item>
<first>
<first>../../../lib_files/Stencil.h</first>
<second>operator=</second>
</first>
<second>75</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>180</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_42">
<Value>
<Obj>
<type>0</type>
<id>62</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>179</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>179</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>123</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>write_idx_1_2</name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>211</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>211</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>write_idx_1</originalName>
<rtlName></rtlName>
<coreName></coreName>
</Obj>
<bitwidth>64</bitwidth>
</Value>
<oprand_edges>
<count>2</count>
<item_version>0</item_version>
<item>93</item>
<item>94</item>
</oprand_edges>
<opcode>add</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name></name>
<fileName>../../../lib_files/Linebuffer.h</fileName>
<fileDirectory>/home/dhuff/Halide-HLS/apps/hls_examples/camera_ready_synthesis/app_files/big_apps_32_shifts/conv2d</fileDirectory>
<lineNumber>177</lineNumber>
<contextFuncName>call</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_32_shifts/conv2d</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>../../../lib_files/Linebuffer.h</first>
<second>call</second>
</first>
<second>177</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>95</item>
</oprand_edges>
<opcode>br</opcode>
<m_Display>0</m_Display>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>68</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>
<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>12</count>
<item_version>0</item_version>
<item class_id="16" tracking_level="1" version="0" object_id="_46">
<Value>
<Obj>
<type>2</type>
<id>70</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>1</content>
</item>
<item class_id_reference="16" object_id="_47">
<Value>
<Obj>
<type>2</type>
<id>74</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="_48">
<Value>
<Obj>
<type>2</type>
<id>79</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_49">
<Value>
<Obj>
<type>2</type>
<id>85</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1080</content>
</item>
<item class_id_reference="16" object_id="_50">
<Value>
<Obj>
<type>2</type>
<id>88</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1</content>
</item>
<item class_id_reference="16" object_id="_51">
<Value>
<Obj>
<type>2</type>
<id>105</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>11</bitwidth>
</Value>
<const_type>0</const_type>
<content>1920</content>
</item>
<item class_id_reference="16" object_id="_52">
<Value>
<Obj>
<type>2</type>
<id>115</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>1</content>
</item>
<item class_id_reference="16" object_id="_53">
<Value>
<Obj>
<type>2</type>
<id>117</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>10</content>
</item>
<item class_id_reference="16" object_id="_54">
<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>10</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_55">
<Value>
<Obj>
<type>2</type>
<id>136</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>63</content>
</item>
<item class_id_reference="16" object_id="_56">
<Value>
<Obj>
<type>2</type>
<id>139</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>63</bitwidth>
</Value>
<const_type>0</const_type>
<content>0</content>
</item>
<item class_id_reference="16" object_id="_57">
<Value>
<Obj>
<type>2</type>
<id>142</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>18446744073709551614</content>
</item>
</consts>
<blocks class_id="17" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="18" tracking_level="1" version="0" object_id="_58">
<Obj>
<type>3</type>
<id>10</id>
<name>newFuncRoot</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>3</count>
<item_version>0</item_version>
<item>7</item>
<item>8</item>
<item>9</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_59">
<Obj>
<type>3</type>
<id>17</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>5</count>
<item_version>0</item_version>
<item>11</item>
<item>12</item>
<item>13</item>
<item>15</item>
<item>16</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_60">
<Obj>
<type>3</type>
<id>23</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>3</count>
<item_version>0</item_version>
<item>20</item>
<item>21</item>
<item>22</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_61">
<Obj>
<type>3</type>
<id>29</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>5</count>
<item_version>0</item_version>
<item>24</item>
<item>25</item>
<item>26</item>
<item>27</item>
<item>28</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_62">
<Obj>
<type>3</type>
<id>44</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>11</count>
<item_version>0</item_version>
<item>30</item>
<item>34</item>
<item>35</item>
<item>36</item>
<item>37</item>
<item>38</item>
<item>39</item>
<item>40</item>
<item>41</item>
<item>42</item>
<item>43</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_63">
<Obj>
<type>3</type>
<id>51</id>
<name>.preheader56.preheader.critedge.0</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>6</count>
<item_version>0</item_version>
<item>45</item>
<item>46</item>
<item>47</item>
<item>48</item>
<item>49</item>
<item>50</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_64">
<Obj>
<type>3</type>
<id>54</id>
<name>._crit_edge</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>52</item>
<item>53</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_65">
<Obj>
<type>3</type>
<id>57</id>
<name>branch4</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>55</item>
<item>56</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_66">
<Obj>
<type>3</type>
<id>60</id>
<name>branch5</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>58</item>
<item>59</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_67">
<Obj>
<type>3</type>
<id>63</id>
<name>._crit_edge33</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>62</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_68">
<Obj>
<type>3</type>
<id>67</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>2</count>
<item_version>0</item_version>
<item>64</item>
<item>66</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_69">
<Obj>
<type>3</type>
<id>69</id>
<name>.preheader.exitStub</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>68</item>
</node_objs>
</item>
</blocks>
<edges class_id="19" tracking_level="0" version="0">
<count>106</count>
<item_version>0</item_version>
<item class_id="20" tracking_level="1" version="0" object_id="_70">
<id>71</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>7</sink_obj>
</item>
<item class_id_reference="20" object_id="_71">
<id>72</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>8</sink_obj>
</item>
<item class_id_reference="20" object_id="_72">
<id>73</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>9</sink_obj>
</item>
<item class_id_reference="20" object_id="_73">
<id>75</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_74">
<id>76</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_75">
<id>77</id>
<edge_type>1</edge_type>
<source_obj>64</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_76">
<id>78</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>11</sink_obj>
</item>
<item class_id_reference="20" object_id="_77">
<id>80</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_78">
<id>81</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_79">
<id>82</id>
<edge_type>1</edge_type>
<source_obj>15</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_80">
<id>83</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>12</sink_obj>
</item>
<item class_id_reference="20" object_id="_81">
<id>84</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_82">
<id>86</id>
<edge_type>1</edge_type>
<source_obj>85</source_obj>
<sink_obj>13</sink_obj>
</item>
<item class_id_reference="20" object_id="_83">
<id>87</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_84">
<id>89</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>15</sink_obj>
</item>
<item class_id_reference="20" object_id="_85">
<id>90</id>
<edge_type>1</edge_type>
<source_obj>13</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_86">
<id>91</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_87">
<id>92</id>
<edge_type>2</edge_type>
<source_obj>69</source_obj>
<sink_obj>16</sink_obj>
</item>
<item class_id_reference="20" object_id="_88">
<id>93</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_89">
<id>94</id>
<edge_type>1</edge_type>
<source_obj>70</source_obj>
<sink_obj>64</sink_obj>
</item>
<item class_id_reference="20" object_id="_90">
<id>95</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>66</sink_obj>
</item>
<item class_id_reference="20" object_id="_91">
<id>96</id>
<edge_type>1</edge_type>
<source_obj>11</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_92">
<id>97</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_93">
<id>98</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_94">
<id>99</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>24</sink_obj>
</item>
<item class_id_reference="20" object_id="_95">
<id>100</id>
<edge_type>1</edge_type>
<source_obj>79</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_96">
<id>101</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_97">
<id>102</id>
<edge_type>1</edge_type>
<source_obj>27</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_98">
<id>103</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>25</sink_obj>
</item>
<item class_id_reference="20" object_id="_99">
<id>104</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_100">
<id>106</id>
<edge_type>1</edge_type>
<source_obj>105</source_obj>
<sink_obj>26</sink_obj>
</item>
<item class_id_reference="20" object_id="_101">
<id>107</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_102">
<id>108</id>
<edge_type>1</edge_type>
<source_obj>88</source_obj>
<sink_obj>27</sink_obj>
</item>
<item class_id_reference="20" object_id="_103">
<id>109</id>
<edge_type>1</edge_type>
<source_obj>26</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_104">
<id>110</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_105">
<id>111</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>28</sink_obj>
</item>
<item class_id_reference="20" object_id="_106">
<id>114</id>
<edge_type>1</edge_type>
<source_obj>12</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_107">
<id>116</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>20</sink_obj>
</item>
<item class_id_reference="20" object_id="_108">
<id>118</id>
<edge_type>1</edge_type>
<source_obj>117</source_obj>
<sink_obj>20</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>21</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>21</sink_obj>
</item>
<item class_id_reference="20" object_id="_111">
<id>122</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>22</sink_obj>
</item>
<item class_id_reference="20" object_id="_112">
<id>123</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>62</sink_obj>
</item>
<item class_id_reference="20" object_id="_113">
<id>124</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_114">
<id>125</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>55</sink_obj>
</item>
<item class_id_reference="20" object_id="_115">
<id>126</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>56</sink_obj>
</item>
<item class_id_reference="20" object_id="_116">
<id>127</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>52</sink_obj>
</item>
<item class_id_reference="20" object_id="_117">
<id>128</id>
<edge_type>1</edge_type>
<source_obj>52</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_118">
<id>129</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_119">
<id>130</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>53</sink_obj>
</item>
<item class_id_reference="20" object_id="_120">
<id>131</id>
<edge_type>1</edge_type>
<source_obj>25</source_obj>
<sink_obj>30</sink_obj>
</item>
<item class_id_reference="20" object_id="_121">
<id>134</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_122">
<id>135</id>
<edge_type>1</edge_type>
<source_obj>115</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_123">
<id>137</id>
<edge_type>1</edge_type>
<source_obj>136</source_obj>
<sink_obj>34</sink_obj>
</item>
<item class_id_reference="20" object_id="_124">
<id>138</id>
<edge_type>1</edge_type>
<source_obj>34</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_125">
<id>140</id>
<edge_type>1</edge_type>
<source_obj>139</source_obj>
<sink_obj>35</sink_obj>
</item>
<item class_id_reference="20" object_id="_126">
<id>141</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_127">
<id>143</id>
<edge_type>1</edge_type>
<source_obj>142</source_obj>
<sink_obj>36</sink_obj>
</item>
<item class_id_reference="20" object_id="_128">
<id>144</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_129">
<id>145</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_130">
<id>146</id>
<edge_type>1</edge_type>
<source_obj>24</source_obj>
<sink_obj>37</sink_obj>
</item>
<item class_id_reference="20" object_id="_131">
<id>149</id>
<edge_type>1</edge_type>
<source_obj>1</source_obj>
<sink_obj>38</sink_obj>
</item>
<item class_id_reference="20" object_id="_132">
<id>150</id>
<edge_type>1</edge_type>
<source_obj>7</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_133">
<id>151</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_134">
<id>152</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>39</sink_obj>
</item>
<item class_id_reference="20" object_id="_135">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>39</source_obj>
<sink_obj>40</sink_obj>
</item>
<item class_id_reference="20" object_id="_136">
<id>154</id>
<edge_type>1</edge_type>
<source_obj>8</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_137">
<id>155</id>
<edge_type>1</edge_type>
<source_obj>74</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_138">
<id>156</id>
<edge_type>1</edge_type>
<source_obj>30</source_obj>
<sink_obj>41</sink_obj>
</item>
<item class_id_reference="20" object_id="_139">
<id>157</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>42</sink_obj>
</item>
<item class_id_reference="20" object_id="_140">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>21</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_141">
<id>159</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_142">
<id>160</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>43</sink_obj>
</item>
<item class_id_reference="20" object_id="_143">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>37</source_obj>
<sink_obj>45</sink_obj>
</item>
<item class_id_reference="20" object_id="_144">
<id>162</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_145">
<id>163</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_146">
<id>164</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>46</sink_obj>
</item>
<item class_id_reference="20" object_id="_147">
<id>165</id>
<edge_type>1</edge_type>
<source_obj>45</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_148">
<id>166</id>
<edge_type>1</edge_type>
<source_obj>40</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_149">
<id>167</id>
<edge_type>1</edge_type>
<source_obj>42</source_obj>
<sink_obj>47</sink_obj>
</item>
<item class_id_reference="20" object_id="_150">
<id>170</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_151">
<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="_152">
<id>172</id>
<edge_type>1</edge_type>
<source_obj>46</source_obj>
<sink_obj>48</sink_obj>
</item>
<item class_id_reference="20" object_id="_153">
<id>175</id>
<edge_type>1</edge_type>
<source_obj>2</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_154">
<id>176</id>
<edge_type>1</edge_type>
<source_obj>48</source_obj>
<sink_obj>49</sink_obj>
</item>
<item class_id_reference="20" object_id="_155">
<id>177</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>50</sink_obj>
</item>
<item class_id_reference="20" object_id="_156">
<id>178</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_157">
<id>179</id>
<edge_type>1</edge_type>
<source_obj>41</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_158">
<id>180</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>59</sink_obj>
</item>
<item class_id_reference="20" object_id="_159">
<id>281</id>
<edge_type>2</edge_type>
<source_obj>10</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_160">
<id>282</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>69</sink_obj>
</item>
<item class_id_reference="20" object_id="_161">
<id>283</id>
<edge_type>2</edge_type>
<source_obj>17</source_obj>
<sink_obj>23</sink_obj>
</item>
<item class_id_reference="20" object_id="_162">
<id>284</id>
<edge_type>2</edge_type>
<source_obj>23</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_163">
<id>285</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>67</sink_obj>
</item>
<item class_id_reference="20" object_id="_164">
<id>286</id>
<edge_type>2</edge_type>
<source_obj>29</source_obj>
<sink_obj>44</sink_obj>
</item>
<item class_id_reference="20" object_id="_165">
<id>287</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_166">
<id>288</id>
<edge_type>2</edge_type>
<source_obj>44</source_obj>
<sink_obj>51</sink_obj>
</item>
<item class_id_reference="20" object_id="_167">
<id>289</id>
<edge_type>2</edge_type>
<source_obj>51</source_obj>
<sink_obj>54</sink_obj>
</item>
<item class_id_reference="20" object_id="_168">
<id>290</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>60</sink_obj>
</item>
<item class_id_reference="20" object_id="_169">
<id>291</id>
<edge_type>2</edge_type>
<source_obj>54</source_obj>
<sink_obj>57</sink_obj>
</item>
<item class_id_reference="20" object_id="_170">
<id>292</id>
<edge_type>2</edge_type>
<source_obj>57</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_171">
<id>293</id>
<edge_type>2</edge_type>
<source_obj>60</source_obj>
<sink_obj>63</sink_obj>
</item>
<item class_id_reference="20" object_id="_172">
<id>294</id>
<edge_type>2</edge_type>
<source_obj>63</source_obj>
<sink_obj>29</sink_obj>
</item>
<item class_id_reference="20" object_id="_173">
<id>295</id>
<edge_type>2</edge_type>
<source_obj>67</source_obj>
<sink_obj>17</sink_obj>
</item>
<item class_id_reference="20" object_id="_174">
<id>296</id>
<edge_type>4</edge_type>
<source_obj>42</source_obj>
<sink_obj>58</sink_obj>
</item>
<item class_id_reference="20" object_id="_175">
<id>297</id>
<edge_type>4</edge_type>
<source_obj>40</source_obj>
<sink_obj>55</sink_obj>
</item>
</edges>
</cdfg>
<cdfg_regions class_id="21" tracking_level="0" version="0">
<count>7</count>
<item_version>0</item_version>
<item class_id="22" tracking_level="1" version="0" object_id="_176">
<mId>1</mId>
<mTag>call_Loop_LB2D_buf_p</mTag>
<mType>0</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>2</item>
<item>3</item>
<item>7</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>2077921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_177">
<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>10</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="_178">
<mId>3</mId>
<mTag>LB2D_buf</mTag>
<mType>1</mType>
<sub_regions>
<count>3</count>
<item_version>0</item_version>
<item>4</item>
<item>5</item>
<item>6</item>
</sub_regions>
<basic_blocks>
<count>0</count>
<item_version>0</item_version>
</basic_blocks>
<mII>-1</mII>
<mDepth>-1</mDepth>
<mMinTripCount>1080</mMinTripCount>
<mMaxTripCount>1080</mMaxTripCount>
<mMinLatency>2077920</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_179">
<mId>4</mId>
<mTag>Region 1</mTag>
<mType>0</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>17</item>
<item>23</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="_180">
<mId>5</mId>
<mTag>LB2D_buf.1</mTag>
<mType>1</mType>
<sub_regions>
<count>0</count>
<item_version>0</item_version>
</sub_regions>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>29</item>
<item>44</item>
<item>51</item>
<item>54</item>
<item>57</item>
<item>60</item>
<item>63</item>
</basic_blocks>
<mII>1</mII>
<mDepth>3</mDepth>
<mMinTripCount>1920</mMinTripCount>
<mMaxTripCount>1920</mMaxTripCount>
<mMinLatency>1921</mMinLatency>
<mMaxLatency>-1</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"></mDfPipe>
</item>
<item class_id_reference="22" object_id="_181">
<mId>6</mId>
<mTag>Region 2</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>67</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="_182">
<mId>7</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>69</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="-1"></fsm>
<res class_id="-1"></res>
<node_label_latency class_id="26" tracking_level="0" version="0">
<count>43</count>
<item_version>0</item_version>
<item class_id="27" tracking_level="0" version="0">
<first>7</first>
<second class_id="28" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>8</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>9</first>
<second>
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>11</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>12</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>13</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>15</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>16</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>20</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>21</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>22</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>24</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>25</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>26</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>27</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>28</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>30</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>34</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>35</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>36</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>37</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>38</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>39</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>41</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>42</first>
<second>
<first>2</first>
<second>1</second>
</second>
</item>
<item>
<first>43</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>45</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>46</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>47</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>52</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>53</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>55</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>56</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>58</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>59</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
<item>
<first>64</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>68</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="29" tracking_level="0" version="0">
<count>12</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="0" version="0">
<first>10</first>
<second class_id="31" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>17</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>23</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>29</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
<item>
<first>44</first>
<second>
<first>2</first>
<second>4</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>3</first>
<second>4</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>57</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>4</first>
<second>4</second>
</second>
</item>
<item>
<first>67</first>
<second>
<first>3</first>
<second>3</second>
</second>
</item>
<item>
<first>69</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="32" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="33" tracking_level="1" version="0" object_id="_183">
<region_name>LB2D_buf.1</region_name>
<basic_blocks>
<count>7</count>
<item_version>0</item_version>
<item>29</item>
<item>44</item>
<item>51</item>
<item>54</item>
<item>57</item>
<item>60</item>
<item>63</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>3</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="34" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="35" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</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>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="36" 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="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_port_io_nodes>
<port2core class_id="38" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</port2core>
<node2core>
<count>0</count>
<item_version>0</item_version>
</node2core>
</syndb>
</boost_serialization>
|
with STM32.Device; use STM32.Device;
with HAL; use HAL;
with STM32.ADC; use STM32.ADC;
with STM32.GPIO; use STM32.GPIO;
package analog is
Converter : Analog_To_Digital_Converter renames ADC_1;
Successful : Boolean;
procedure Configure_Analog_Input (Input : GPIO_Point);
procedure ADC_Init (Input : GPIO_Point; Channel : UInt5);
function Analog_Read return uint16;
flt : Short_Float := 0.0;
end analog;
|
package body Operator_Subprogram_Calls is
type R is
record
I : Integer;
end record;
function "<"(P1 : R; P2 : R) return Boolean;
procedure Test is
R1 : R := (I => 42);
R2 : R := (I => 42);
function Foo(I1 : R; I2 : R) return Boolean renames "<";
begin
if (R1 < R2) and Foo(R1, R2) then
null;
end if;
end Test;
function "<"(P1 : R; P2 : R) return Boolean is
function Foo(I1 : Integer; I2 : Integer) return Boolean renames "<";
begin
return Foo(P1.I, P2.I);
end "<";
function "<="(P1 : R; P2 : R) return Boolean;
procedure Test2 is
R1 : R := (I => 42);
R2 : R := (I => 42);
function Foo(I1 : R; I2 : R) return Boolean renames "<=";
begin
if (R1 <= R2) and Foo(R1, R2) then
null;
end if;
end Test2;
function "<="(P1 : R; P2 : R) return Boolean is
function Foo(I1 : Integer; I2 : Integer) return Boolean renames "<=";
begin
return Foo(P1.I, P2.I);
end "<=";
end Operator_Subprogram_Calls;
|
-- This spec has been automatically generated from STM32F103.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with System;
package STM32_SVD.SPI is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR1_CPHA_Field is STM32_SVD.Bit;
subtype CR1_CPOL_Field is STM32_SVD.Bit;
subtype CR1_MSTR_Field is STM32_SVD.Bit;
subtype CR1_BR_Field is STM32_SVD.UInt3;
subtype CR1_SPE_Field is STM32_SVD.Bit;
subtype CR1_LSBFIRST_Field is STM32_SVD.Bit;
subtype CR1_SSI_Field is STM32_SVD.Bit;
subtype CR1_SSM_Field is STM32_SVD.Bit;
subtype CR1_RXONLY_Field is STM32_SVD.Bit;
subtype CR1_DFF_Field is STM32_SVD.Bit;
subtype CR1_CRCNEXT_Field is STM32_SVD.Bit;
subtype CR1_CRCEN_Field is STM32_SVD.Bit;
subtype CR1_BIDIOE_Field is STM32_SVD.Bit;
subtype CR1_BIDIMODE_Field is STM32_SVD.Bit;
-- control register 1
type CR1_Register is record
-- Clock phase
CPHA : CR1_CPHA_Field := 16#0#;
-- Clock polarity
CPOL : CR1_CPOL_Field := 16#0#;
-- Master selection
MSTR : CR1_MSTR_Field := 16#0#;
-- Baud rate control
BR : CR1_BR_Field := 16#0#;
-- SPI enable
SPE : CR1_SPE_Field := 16#0#;
-- Frame format
LSBFIRST : CR1_LSBFIRST_Field := 16#0#;
-- Internal slave select
SSI : CR1_SSI_Field := 16#0#;
-- Software slave management
SSM : CR1_SSM_Field := 16#0#;
-- Receive only
RXONLY : CR1_RXONLY_Field := 16#0#;
-- Data frame format
DFF : CR1_DFF_Field := 16#0#;
-- CRC transfer next
CRCNEXT : CR1_CRCNEXT_Field := 16#0#;
-- Hardware CRC calculation enable
CRCEN : CR1_CRCEN_Field := 16#0#;
-- Output enable in bidirectional mode
BIDIOE : CR1_BIDIOE_Field := 16#0#;
-- Bidirectional data mode enable
BIDIMODE : CR1_BIDIMODE_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR1_Register use record
CPHA at 0 range 0 .. 0;
CPOL at 0 range 1 .. 1;
MSTR at 0 range 2 .. 2;
BR at 0 range 3 .. 5;
SPE at 0 range 6 .. 6;
LSBFIRST at 0 range 7 .. 7;
SSI at 0 range 8 .. 8;
SSM at 0 range 9 .. 9;
RXONLY at 0 range 10 .. 10;
DFF at 0 range 11 .. 11;
CRCNEXT at 0 range 12 .. 12;
CRCEN at 0 range 13 .. 13;
BIDIOE at 0 range 14 .. 14;
BIDIMODE at 0 range 15 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CR2_RXDMAEN_Field is STM32_SVD.Bit;
subtype CR2_TXDMAEN_Field is STM32_SVD.Bit;
subtype CR2_SSOE_Field is STM32_SVD.Bit;
subtype CR2_ERRIE_Field is STM32_SVD.Bit;
subtype CR2_RXNEIE_Field is STM32_SVD.Bit;
subtype CR2_TXEIE_Field is STM32_SVD.Bit;
-- control register 2
type CR2_Register is record
-- Rx buffer DMA enable
RXDMAEN : CR2_RXDMAEN_Field := 16#0#;
-- Tx buffer DMA enable
TXDMAEN : CR2_TXDMAEN_Field := 16#0#;
-- SS output enable
SSOE : CR2_SSOE_Field := 16#0#;
-- unspecified
Reserved_3_4 : STM32_SVD.UInt2 := 16#0#;
-- Error interrupt enable
ERRIE : CR2_ERRIE_Field := 16#0#;
-- RX buffer not empty interrupt enable
RXNEIE : CR2_RXNEIE_Field := 16#0#;
-- Tx buffer empty interrupt enable
TXEIE : CR2_TXEIE_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CR2_Register use record
RXDMAEN at 0 range 0 .. 0;
TXDMAEN at 0 range 1 .. 1;
SSOE at 0 range 2 .. 2;
Reserved_3_4 at 0 range 3 .. 4;
ERRIE at 0 range 5 .. 5;
RXNEIE at 0 range 6 .. 6;
TXEIE at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype SR_RXNE_Field is STM32_SVD.Bit;
subtype SR_TXE_Field is STM32_SVD.Bit;
subtype SR_CHSIDE_Field is STM32_SVD.Bit;
subtype SR_UDR_Field is STM32_SVD.Bit;
subtype SR_CRCERR_Field is STM32_SVD.Bit;
subtype SR_MODF_Field is STM32_SVD.Bit;
subtype SR_OVR_Field is STM32_SVD.Bit;
subtype SR_BSY_Field is STM32_SVD.Bit;
-- status register
type SR_Register is record
-- Read-only. Receive buffer not empty
RXNE : SR_RXNE_Field := 16#0#;
-- Read-only. Transmit buffer empty
TXE : SR_TXE_Field := 16#1#;
-- Read-only. Channel side
CHSIDE : SR_CHSIDE_Field := 16#0#;
-- Read-only. Underrun flag
UDR : SR_UDR_Field := 16#0#;
-- CRC error flag
CRCERR : SR_CRCERR_Field := 16#0#;
-- Read-only. Mode fault
MODF : SR_MODF_Field := 16#0#;
-- Read-only. Overrun flag
OVR : SR_OVR_Field := 16#0#;
-- Read-only. Busy flag
BSY : SR_BSY_Field := 16#0#;
-- unspecified
Reserved_8_31 : STM32_SVD.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SR_Register use record
RXNE at 0 range 0 .. 0;
TXE at 0 range 1 .. 1;
CHSIDE at 0 range 2 .. 2;
UDR at 0 range 3 .. 3;
CRCERR at 0 range 4 .. 4;
MODF at 0 range 5 .. 5;
OVR at 0 range 6 .. 6;
BSY at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
subtype DR_DR_Field is STM32_SVD.UInt16;
-- data register
type DR_Register is record
-- Data register
DR : DR_DR_Field := 16#0#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for DR_Register use record
DR at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype CRCPR_CRCPOLY_Field is STM32_SVD.UInt16;
-- CRC polynomial register
type CRCPR_Register is record
-- CRC polynomial register
CRCPOLY : CRCPR_CRCPOLY_Field := 16#7#;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CRCPR_Register use record
CRCPOLY at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype RXCRCR_RxCRC_Field is STM32_SVD.UInt16;
-- RX CRC register
type RXCRCR_Register is record
-- Read-only. Rx CRC register
RxCRC : RXCRCR_RxCRC_Field;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for RXCRCR_Register use record
RxCRC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype TXCRCR_TxCRC_Field is STM32_SVD.UInt16;
-- TX CRC register
type TXCRCR_Register is record
-- Read-only. Tx CRC register
TxCRC : TXCRCR_TxCRC_Field;
-- unspecified
Reserved_16_31 : STM32_SVD.UInt16;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TXCRCR_Register use record
TxCRC at 0 range 0 .. 15;
Reserved_16_31 at 0 range 16 .. 31;
end record;
subtype I2SCFGR_CHLEN_Field is STM32_SVD.Bit;
subtype I2SCFGR_DATLEN_Field is STM32_SVD.UInt2;
subtype I2SCFGR_CKPOL_Field is STM32_SVD.Bit;
subtype I2SCFGR_I2SSTD_Field is STM32_SVD.UInt2;
subtype I2SCFGR_PCMSYNC_Field is STM32_SVD.Bit;
subtype I2SCFGR_I2SCFG_Field is STM32_SVD.UInt2;
subtype I2SCFGR_I2SE_Field is STM32_SVD.Bit;
subtype I2SCFGR_I2SMOD_Field is STM32_SVD.Bit;
-- I2S configuration register
type I2SCFGR_Register is record
-- Channel length (number of bits per audio channel)
CHLEN : I2SCFGR_CHLEN_Field := 16#0#;
-- Data length to be transferred
DATLEN : I2SCFGR_DATLEN_Field := 16#0#;
-- Steady state clock polarity
CKPOL : I2SCFGR_CKPOL_Field := 16#0#;
-- I2S standard selection
I2SSTD : I2SCFGR_I2SSTD_Field := 16#0#;
-- unspecified
Reserved_6_6 : STM32_SVD.Bit := 16#0#;
-- PCM frame synchronization
PCMSYNC : I2SCFGR_PCMSYNC_Field := 16#0#;
-- I2S configuration mode
I2SCFG : I2SCFGR_I2SCFG_Field := 16#0#;
-- I2S Enable
I2SE : I2SCFGR_I2SE_Field := 16#0#;
-- I2S mode selection
I2SMOD : I2SCFGR_I2SMOD_Field := 16#0#;
-- unspecified
Reserved_12_31 : STM32_SVD.UInt20 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for I2SCFGR_Register use record
CHLEN at 0 range 0 .. 0;
DATLEN at 0 range 1 .. 2;
CKPOL at 0 range 3 .. 3;
I2SSTD at 0 range 4 .. 5;
Reserved_6_6 at 0 range 6 .. 6;
PCMSYNC at 0 range 7 .. 7;
I2SCFG at 0 range 8 .. 9;
I2SE at 0 range 10 .. 10;
I2SMOD at 0 range 11 .. 11;
Reserved_12_31 at 0 range 12 .. 31;
end record;
subtype I2SPR_I2SDIV_Field is STM32_SVD.Byte;
subtype I2SPR_ODD_Field is STM32_SVD.Bit;
subtype I2SPR_MCKOE_Field is STM32_SVD.Bit;
-- I2S prescaler register
type I2SPR_Register is record
-- I2S Linear prescaler
I2SDIV : I2SPR_I2SDIV_Field := 16#A#;
-- Odd factor for the prescaler
ODD : I2SPR_ODD_Field := 16#0#;
-- Master clock output enable
MCKOE : I2SPR_MCKOE_Field := 16#0#;
-- unspecified
Reserved_10_31 : STM32_SVD.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for I2SPR_Register use record
I2SDIV at 0 range 0 .. 7;
ODD at 0 range 8 .. 8;
MCKOE at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Serial peripheral interface
type SPI_Peripheral is record
-- control register 1
CR1 : aliased CR1_Register;
-- control register 2
CR2 : aliased CR2_Register;
-- status register
SR : aliased SR_Register;
-- data register
DR : aliased DR_Register;
-- CRC polynomial register
CRCPR : aliased CRCPR_Register;
-- RX CRC register
RXCRCR : aliased RXCRCR_Register;
-- TX CRC register
TXCRCR : aliased TXCRCR_Register;
-- I2S configuration register
I2SCFGR : aliased I2SCFGR_Register;
-- I2S prescaler register
I2SPR : aliased I2SPR_Register;
end record
with Volatile;
for SPI_Peripheral use record
CR1 at 16#0# range 0 .. 31;
CR2 at 16#4# range 0 .. 31;
SR at 16#8# range 0 .. 31;
DR at 16#C# range 0 .. 31;
CRCPR at 16#10# range 0 .. 31;
RXCRCR at 16#14# range 0 .. 31;
TXCRCR at 16#18# range 0 .. 31;
I2SCFGR at 16#1C# range 0 .. 31;
I2SPR at 16#20# range 0 .. 31;
end record;
-- Serial peripheral interface
SPI1_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40013000#);
-- Serial peripheral interface
SPI2_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40003800#);
-- Serial peripheral interface
SPI3_Periph : aliased SPI_Peripheral
with Import, Address => System'To_Address (16#40003C00#);
end STM32_SVD.SPI;
|
-- 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 ShipModules.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 ShipModules.Test_Data;
|
<?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>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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo class_id="6" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<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>src_offset</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>dst</originalName>
<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>dst_offset</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>dst_offset_read</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item class_id="10" tracking_level="0" version="0">
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</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>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>1</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_13">
<Value>
<Obj>
<type>0</type>
<id>21</id>
<name>src_offset_read</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>2</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_14">
<Value>
<Obj>
<type>0</type>
<id>22</id>
<name>tmp_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>tmp_7_fu_318_p3</rtlName>
<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>
<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="_15">
<Value>
<Obj>
<type>0</type>
<id>23</id>
<name>zext_ln48_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>48</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>48</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln48_1_fu_326_p1</rtlName>
<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>
<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="_16">
<Value>
<Obj>
<type>0</type>
<id>24</id>
<name>zext_ln48</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>48</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>48</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln48_fu_330_p1</rtlName>
<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>
<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="_17">
<Value>
<Obj>
<type>0</type>
<id>25</id>
<name>src_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<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>
<item class_id_reference="9" object_id="_18">
<Value>
<Obj>
<type>0</type>
<id>26</id>
<name>src1_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>7</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_19">
<Value>
<Obj>
<type>0</type>
<id>27</id>
<name>src2_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>8</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_20">
<Value>
<Obj>
<type>0</type>
<id>28</id>
<name>src3_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>9</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_21">
<Value>
<Obj>
<type>0</type>
<id>29</id>
<name>src4_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>10</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_22">
<Value>
<Obj>
<type>0</type>
<id>30</id>
<name>src5_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>11</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_23">
<Value>
<Obj>
<type>0</type>
<id>31</id>
<name>src6_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>12</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_24">
<Value>
<Obj>
<type>0</type>
<id>32</id>
<name>src7_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>13</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_25">
<Value>
<Obj>
<type>0</type>
<id>33</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>14</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_26">
<Value>
<Obj>
<type>0</type>
<id>35</id>
<name>k_0</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>15</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_27">
<Value>
<Obj>
<type>0</type>
<id>36</id>
<name>icmp_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>icmp_ln55_fu_342_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.72</m_delay>
<m_topoIndex>16</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_28">
<Value>
<Obj>
<type>0</type>
<id>38</id>
<name>k</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName>k</originalName>
<rtlName>k_fu_348_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.80</m_delay>
<m_topoIndex>17</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_29">
<Value>
<Obj>
<type>0</type>
<id>39</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>18</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_30">
<Value>
<Obj>
<type>0</type>
<id>44</id>
<name>zext_ln60</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln60_fu_354_p1</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>19</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_31">
<Value>
<Obj>
<type>0</type>
<id>45</id>
<name>zext_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln63_fu_366_p1</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>20</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_32">
<Value>
<Obj>
<type>0</type>
<id>46</id>
<name>add_ln63_8</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_8_fu_370_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.85</m_delay>
<m_topoIndex>21</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_33">
<Value>
<Obj>
<type>0</type>
<id>47</id>
<name>zext_ln63_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>zext_ln63_1_fu_407_p1</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>59</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_34">
<Value>
<Obj>
<type>0</type>
<id>48</id>
<name>dst_addr</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>60</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>22</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>23</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_37">
<Value>
<Obj>
<type>0</type>
<id>51</id>
<name>zext_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>grp_fu_490_p00</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>61</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_38">
<Value>
<Obj>
<type>0</type>
<id>52</id>
<name>src_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>42</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_39">
<Value>
<Obj>
<type>0</type>
<id>53</id>
<name>sext_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>62</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_40">
<Value>
<Obj>
<type>0</type>
<id>54</id>
<name>mul_ln61</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>63</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>24</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>25</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_43">
<Value>
<Obj>
<type>0</type>
<id>57</id>
<name>sext_ln61_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>43</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_44">
<Value>
<Obj>
<type>0</type>
<id>58</id>
<name>src1_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>26</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_45">
<Value>
<Obj>
<type>0</type>
<id>59</id>
<name>sext_ln61_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>44</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_46">
<Value>
<Obj>
<type>0</type>
<id>60</id>
<name>mul_ln61_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U10</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>45</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>27</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>28</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_49">
<Value>
<Obj>
<type>0</type>
<id>63</id>
<name>sext_ln61_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>64</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_50">
<Value>
<Obj>
<type>0</type>
<id>64</id>
<name>src2_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>46</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_51">
<Value>
<Obj>
<type>0</type>
<id>65</id>
<name>sext_ln61_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>65</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_52">
<Value>
<Obj>
<type>0</type>
<id>66</id>
<name>mul_ln61_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U15</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>66</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>29</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>30</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_55">
<Value>
<Obj>
<type>0</type>
<id>69</id>
<name>sext_ln61_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>47</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_56">
<Value>
<Obj>
<type>0</type>
<id>70</id>
<name>src3_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>31</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_57">
<Value>
<Obj>
<type>0</type>
<id>71</id>
<name>sext_ln61_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>48</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_58">
<Value>
<Obj>
<type>0</type>
<id>72</id>
<name>mul_ln61_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U11</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>49</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>32</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>33</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_61">
<Value>
<Obj>
<type>0</type>
<id>75</id>
<name>sext_ln61_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>67</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_62">
<Value>
<Obj>
<type>0</type>
<id>76</id>
<name>src4_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>50</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_63">
<Value>
<Obj>
<type>0</type>
<id>77</id>
<name>sext_ln61_8</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>68</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_64">
<Value>
<Obj>
<type>0</type>
<id>78</id>
<name>mul_ln61_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U16</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>69</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>34</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>35</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_67">
<Value>
<Obj>
<type>0</type>
<id>81</id>
<name>sext_ln61_9</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>51</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_68">
<Value>
<Obj>
<type>0</type>
<id>82</id>
<name>src5_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>36</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_69">
<Value>
<Obj>
<type>0</type>
<id>83</id>
<name>sext_ln61_10</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>52</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_70">
<Value>
<Obj>
<type>0</type>
<id>84</id>
<name>mul_ln61_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mul_mul_15s_16s_29_1_1_U12</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.84</m_delay>
<m_topoIndex>53</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>37</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>38</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_73">
<Value>
<Obj>
<type>0</type>
<id>87</id>
<name>sext_ln61_11</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>70</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_74">
<Value>
<Obj>
<type>0</type>
<id>88</id>
<name>src6_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>54</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_75">
<Value>
<Obj>
<type>0</type>
<id>89</id>
<name>sext_ln61_12</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>71</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_76">
<Value>
<Obj>
<type>0</type>
<id>90</id>
<name>mul_ln61_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U17</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>72</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>39</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>60</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>60</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>40</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_79">
<Value>
<Obj>
<type>0</type>
<id>93</id>
<name>sext_ln61_13</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>55</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_80">
<Value>
<Obj>
<type>0</type>
<id>94</id>
<name>src7_load</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.73</m_delay>
<m_topoIndex>41</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_81">
<Value>
<Obj>
<type>0</type>
<id>95</id>
<name>sext_ln61_14</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>56</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_82">
<Value>
<Obj>
<type>0</type>
<id>96</id>
<name>mul_ln61_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>61</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>61</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.63</m_delay>
<m_topoIndex>57</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_83">
<Value>
<Obj>
<type>0</type>
<id>97</id>
<name>add_ln63_1</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>73</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_84">
<Value>
<Obj>
<type>0</type>
<id>98</id>
<name>add_ln63_2</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U15</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>74</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_85">
<Value>
<Obj>
<type>0</type>
<id>99</id>
<name>add_ln63_3</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_3_fu_439_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.13</m_delay>
<m_topoIndex>75</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_86">
<Value>
<Obj>
<type>0</type>
<id>100</id>
<name>add_ln63_4</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U16</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>76</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_87">
<Value>
<Obj>
<type>0</type>
<id>101</id>
<name>add_ln63_5</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>58</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_88">
<Value>
<Obj>
<type>0</type>
<id>102</id>
<name>add_ln63_6</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dct_mac_muladd_15s_16s_29s_29_1_1_U17</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>2.20</m_delay>
<m_topoIndex>77</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_89">
<Value>
<Obj>
<type>0</type>
<id>103</id>
<name>add_ln63_7</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_7_fu_443_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>78</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_90">
<Value>
<Obj>
<type>0</type>
<id>104</id>
<name>add_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>add_ln63_fu_447_p2</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.89</m_delay>
<m_topoIndex>79</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_91">
<Value>
<Obj>
<type>0</type>
<id>105</id>
<name>trunc_ln</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName>dst_d0</rtlName>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>80</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_92">
<Value>
<Obj>
<type>0</type>
<id>106</id>
<name>dst_addr_write_ln63</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>63</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>63</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>1.29</m_delay>
<m_topoIndex>81</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_93">
<Value>
<Obj>
<type>0</type>
<id>108</id>
<name>_ln55</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>55</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>55</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>82</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</item>
<item class_id_reference="9" object_id="_94">
<Value>
<Obj>
<type>0</type>
<id>110</id>
<name>_ln65</name>
<fileName>dct.cpp</fileName>
<fileDirectory>..</fileDirectory>
<lineNumber>65</lineNumber>
<contextFuncName>dct_1d</contextFuncName>
<inlineStackInfo>
<count>1</count>
<item_version>0</item_version>
<item>
<first>/usr/local/labs/SDS/current/ge46bod/Design_Analysis/lab1</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>
<first>dct.cpp</first>
<second>dct_1d</second>
</first>
<second>65</second>
</item>
</second>
</item>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<m_isOnCriticalPath>0</m_isOnCriticalPath>
<m_isLCDNode>0</m_isLCDNode>
<m_isStartOfPath>0</m_isStartOfPath>
<m_delay>0.00</m_delay>
<m_topoIndex>83</m_topoIndex>
<m_clusterGroupNumber>-1</m_clusterGroupNumber>
</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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>40</id>
<name/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<coreName/>
</Obj>
<node_objs>
<count>4</count>
<item_version>0</item_version>
<item>35</item>
<item>36</item>
<item>38</item>
<item>39</item>
</node_objs>
</item>
<item class_id_reference="18" object_id="_105">
<Obj>
<type>3</type>
<id>109</id>
<name>DCT_Outer_Loop</name>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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/>
<fileName/>
<fileDirectory/>
<lineNumber>0</lineNumber>
<contextFuncName/>
<inlineStackInfo>
<count>0</count>
<item_version>0</item_version>
</inlineStackInfo>
<originalName/>
<rtlName/>
<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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_137">
<id>149</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>33</sink_obj>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_140">
<id>153</id>
<edge_type>1</edge_type>
<source_obj>38</source_obj>
<sink_obj>35</sink_obj>
<is_back_edge>1</is_back_edge>
</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>
<is_back_edge>1</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_144">
<id>158</id>
<edge_type>1</edge_type>
<source_obj>35</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_145">
<id>160</id>
<edge_type>1</edge_type>
<source_obj>159</source_obj>
<sink_obj>38</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_146">
<id>161</id>
<edge_type>1</edge_type>
<source_obj>36</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_147">
<id>162</id>
<edge_type>2</edge_type>
<source_obj>109</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_148">
<id>163</id>
<edge_type>2</edge_type>
<source_obj>111</source_obj>
<sink_obj>39</sink_obj>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</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>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_250">
<id>270</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>108</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_251">
<id>299</id>
<edge_type>2</edge_type>
<source_obj>34</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_252">
<id>300</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>111</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_253">
<id>301</id>
<edge_type>2</edge_type>
<source_obj>40</source_obj>
<sink_obj>109</sink_obj>
<is_back_edge>0</is_back_edge>
</item>
<item class_id_reference="20" object_id="_254">
<id>302</id>
<edge_type>2</edge_type>
<source_obj>109</source_obj>
<sink_obj>40</sink_obj>
<is_back_edge>1</is_back_edge>
</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>11</mMinLatency>
<mMaxLatency>11</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</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>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</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>40</item>
<item>109</item>
</basic_blocks>
<mII>1</mII>
<mDepth>3</mDepth>
<mMinTripCount>8</mMinTripCount>
<mMaxTripCount>8</mMaxTripCount>
<mMinLatency>9</mMinLatency>
<mMaxLatency>9</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</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>0</mMaxLatency>
<mIsDfPipe>0</mIsDfPipe>
<mDfPipe class_id="-1"/>
</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>5</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>28</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>39</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_281">
<id>44</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_282">
<id>45</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_283">
<id>46</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_284">
<id>49</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_285">
<id>50</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_286">
<id>55</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_287">
<id>56</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_288">
<id>58</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_289">
<id>61</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_290">
<id>62</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_291">
<id>67</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_292">
<id>68</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_293">
<id>70</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_294">
<id>73</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_295">
<id>74</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_296">
<id>79</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_297">
<id>80</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_298">
<id>82</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_299">
<id>85</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_300">
<id>86</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_301">
<id>91</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_302">
<id>92</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_303">
<id>94</id>
<stage>2</stage>
<latency>2</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_304">
<id>3</id>
<operations>
<count>29</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_305">
<id>50</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_306">
<id>52</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_307">
<id>56</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_308">
<id>57</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_309">
<id>58</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_310">
<id>59</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_311">
<id>60</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_312">
<id>62</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_313">
<id>64</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_314">
<id>68</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_315">
<id>69</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_316">
<id>70</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_317">
<id>71</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_318">
<id>72</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_319">
<id>74</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_320">
<id>76</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_321">
<id>80</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_322">
<id>81</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_323">
<id>82</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_324">
<id>83</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_325">
<id>84</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_326">
<id>86</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_327">
<id>88</id>
<stage>2</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_328">
<id>92</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_329">
<id>93</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_330">
<id>94</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_331">
<id>95</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_332">
<id>96</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_333">
<id>101</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_334">
<id>4</id>
<operations>
<count>32</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_335">
<id>41</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_336">
<id>42</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_337">
<id>43</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_338">
<id>47</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_339">
<id>48</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_340">
<id>51</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_341">
<id>52</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_342">
<id>53</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_343">
<id>54</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_344">
<id>63</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_345">
<id>64</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_346">
<id>65</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_347">
<id>66</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_348">
<id>75</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_349">
<id>76</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_350">
<id>77</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_351">
<id>78</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_352">
<id>87</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_353">
<id>88</id>
<stage>1</stage>
<latency>2</latency>
</item>
<item class_id_reference="28" object_id="_354">
<id>89</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_355">
<id>90</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_356">
<id>97</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_357">
<id>98</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_358">
<id>99</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_359">
<id>100</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_360">
<id>102</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_361">
<id>103</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_362">
<id>104</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_363">
<id>105</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_364">
<id>106</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_365">
<id>107</id>
<stage>1</stage>
<latency>1</latency>
</item>
<item class_id_reference="28" object_id="_366">
<id>108</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
<item class_id_reference="26" object_id="_367">
<id>5</id>
<operations>
<count>1</count>
<item_version>0</item_version>
<item class_id_reference="28" object_id="_368">
<id>110</id>
<stage>1</stage>
<latency>1</latency>
</item>
</operations>
</item>
</states>
<transitions class_id="29" tracking_level="0" version="0">
<count>5</count>
<item_version>0</item_version>
<item class_id="30" tracking_level="1" version="0" object_id="_369">
<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>
<item class_id_reference="30" object_id="_370">
<inState>3</inState>
<outState>4</outState>
<condition>
<id>-1</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="_371">
<inState>4</inState>
<outState>2</outState>
<condition>
<id>-1</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="_372">
<inState>2</inState>
<outState>5</outState>
<condition>
<id>-1</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="_373">
<inState>2</inState>
<outState>3</outState>
<condition>
<id>-1</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="36" tracking_level="1" version="0" object_id="_374">
<dp_component_resource class_id="37" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_resource>
<dp_expression_resource>
<count>8</count>
<item_version>0</item_version>
<item class_id="38" tracking_level="0" version="0">
<first>add_ln63_3_fu_439_p2 ( + ) </first>
<second class_id="39" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="40" tracking_level="0" version="0">
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>36</second>
</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_443_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_370_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>8</second>
</item>
<item>
<first>(1P1)</first>
<second>8</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>add_ln63_fu_447_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>29</second>
</item>
<item>
<first>(1P1)</first>
<second>29</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>ap_enable_pp0 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>1</second>
</item>
<item>
<first>(1P1)</first>
<second>2</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1 ( xor ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>2</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_342_p2 ( icmp ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>5</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>11</second>
</item>
</second>
</item>
<item>
<first>k_fu_348_p2 ( + ) </first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0P0)</first>
<second>4</second>
</item>
<item>
<first>(1P1)</first>
<second>1</second>
</item>
<item>
<first>FF</first>
<second>0</second>
</item>
<item>
<first>LUT</first>
<second>12</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>8</count>
<item_version>0</item_version>
<item>
<first>dct_coeff_table_0_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>14</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>112</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>14</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_U</first>
<second>
<count>7</count>
<item_version>0</item_version>
<item>
<first>(0Words)</first>
<second>8</second>
</item>
<item>
<first>(1Bits)</first>
<second>15</second>
</item>
<item>
<first>(2Banks)</first>
<second>1</second>
</item>
<item>
<first>(3W*Bits*Banks)</first>
<second>120</second>
</item>
<item>
<first>BRAM</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
<item>
<first>LUT</first>
<second>2</second>
</item>
</second>
</item>
</dp_memory_resource>
<dp_multiplexer_resource>
<count>4</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>4</second>
</item>
<item>
<first>(1Bits)</first>
<second>1</second>
</item>
<item>
<first>(2Count)</first>
<second>4</second>
</item>
<item>
<first>LUT</first>
<second>21</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter1</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>ap_enable_reg_pp0_iter2</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>k_0_reg_307</first>
<second>
<count>4</count>
<item_version>0</item_version>
<item>
<first>(0Size)</first>
<second>2</second>
</item>
<item>
<first>(1Bits)</first>
<second>4</second>
</item>
<item>
<first>(2Count)</first>
<second>8</second>
</item>
<item>
<first>LUT</first>
<second>9</second>
</item>
</second>
</item>
</dp_multiplexer_resource>
<dp_register_resource>
<count>26</count>
<item_version>0</item_version>
<item>
<first>add_ln63_5_reg_656</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_576</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>8</second>
</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_576_pp0_iter1_reg</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>8</second>
</item>
</second>
</item>
<item>
<first>ap_CS_fsm</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>ap_enable_reg_pp0_iter0</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>ap_enable_reg_pp0_iter1</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>ap_enable_reg_pp0_iter2</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>dct_coeff_table_0_lo_reg_621</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>14</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>14</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_lo_reg_631</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_lo_reg_641</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_lo_reg_651</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>15</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>15</second>
</item>
</second>
</item>
<item>
<first>icmp_ln55_reg_567</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>icmp_ln55_reg_567_pp0_iter1_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>k_0_reg_307</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>4</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_1_reg_626</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_3_reg_636</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>mul_ln61_5_reg_646</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>29</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>29</second>
</item>
</second>
</item>
<item>
<first>src1_addr_reg_532</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src2_addr_reg_537</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src3_addr_reg_542</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src4_addr_reg_547</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src5_addr_reg_552</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src6_addr_reg_557</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src7_addr_reg_562</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>src_addr_reg_527</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>3</second>
</item>
<item>
<first>(Consts)</first>
<second>0</second>
</item>
<item>
<first>FF</first>
<second>3</second>
</item>
</second>
</item>
<item>
<first>zext_ln48_1_reg_522</first>
<second>
<count>3</count>
<item_version>0</item_version>
<item>
<first>(Bits)</first>
<second>8</second>
</item>
<item>
<first>(Consts)</first>
<second>4</second>
</item>
<item>
<first>FF</first>
<second>4</second>
</item>
</second>
</item>
</dp_register_resource>
<dp_dsp_resource>
<count>8</count>
<item_version>0</item_version>
<item>
<first>dct_mac_muladd_14ns_16s_29s_29_1_1_U14</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_14ns_29_1_1_U13</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U15</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U16</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mac_muladd_15s_16s_29s_29_1_1_U17</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U10</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U11</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
<item>
<first>dct_mul_mul_15s_16s_29_1_1_U12</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>
<first>DSP48E</first>
<second>1</second>
</item>
</second>
</item>
</dp_dsp_resource>
<dp_component_map class_id="41" tracking_level="0" version="0">
<count>0</count>
<item_version>0</item_version>
</dp_component_map>
<dp_expression_map>
<count>6</count>
<item_version>0</item_version>
<item class_id="42" tracking_level="0" version="0">
<first>add_ln63_3_fu_439_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_443_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_370_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>add_ln63_fu_447_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_342_p2 ( icmp ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>k_fu_348_p2 ( + ) </first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
</dp_expression_map>
<dp_fifo_map>
<count>0</count>
<item_version>0</item_version>
</dp_fifo_map>
<dp_memory_map>
<count>8</count>
<item_version>0</item_version>
<item>
<first>dct_coeff_table_0_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>88</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>102</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>109</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>116</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>123</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_U</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>130</item>
</second>
</item>
</dp_memory_map>
</res>
<node_label_latency class_id="43" tracking_level="0" version="0">
<count>83</count>
<item_version>0</item_version>
<item class_id="44" tracking_level="0" version="0">
<first>20</first>
<second class_id="45" 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>38</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>39</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>3</first>
<second>0</second>
</second>
</item>
<item>
<first>48</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>49</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>50</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>51</first>
<second>
<first>3</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>3</first>
<second>0</second>
</second>
</item>
<item>
<first>54</first>
<second>
<first>3</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>2</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>2</first>
<second>0</second>
</second>
</item>
<item>
<first>60</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>61</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>62</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>63</first>
<second>
<first>3</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>3</first>
<second>0</second>
</second>
</item>
<item>
<first>66</first>
<second>
<first>3</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>2</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>2</first>
<second>0</second>
</second>
</item>
<item>
<first>72</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>73</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>74</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>75</first>
<second>
<first>3</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>3</first>
<second>0</second>
</second>
</item>
<item>
<first>78</first>
<second>
<first>3</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>2</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>2</first>
<second>0</second>
</second>
</item>
<item>
<first>84</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>85</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>86</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>87</first>
<second>
<first>3</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>3</first>
<second>0</second>
</second>
</item>
<item>
<first>90</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>91</first>
<second>
<first>1</first>
<second>0</second>
</second>
</item>
<item>
<first>92</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>93</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>94</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>95</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>96</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>97</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>98</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>99</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>100</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>101</first>
<second>
<first>2</first>
<second>0</second>
</second>
</item>
<item>
<first>102</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>103</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>104</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>105</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>106</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>108</first>
<second>
<first>3</first>
<second>0</second>
</second>
</item>
<item>
<first>110</first>
<second>
<first>4</first>
<second>0</second>
</second>
</item>
</node_label_latency>
<bblk_ent_exit class_id="46" tracking_level="0" version="0">
<count>4</count>
<item_version>0</item_version>
<item class_id="47" tracking_level="0" version="0">
<first>34</first>
<second class_id="48" tracking_level="0" version="0">
<first>0</first>
<second>0</second>
</second>
</item>
<item>
<first>40</first>
<second>
<first>1</first>
<second>1</second>
</second>
</item>
<item>
<first>109</first>
<second>
<first>1</first>
<second>3</second>
</second>
</item>
<item>
<first>111</first>
<second>
<first>2</first>
<second>2</second>
</second>
</item>
</bblk_ent_exit>
<regions class_id="49" tracking_level="0" version="0">
<count>1</count>
<item_version>0</item_version>
<item class_id="50" tracking_level="1" version="0" object_id="_375">
<region_name>DCT_Outer_Loop</region_name>
<basic_blocks>
<count>2</count>
<item_version>0</item_version>
<item>40</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>3</pipe_depth>
</item>
</regions>
<dp_fu_nodes class_id="51" tracking_level="0" version="0">
<count>74</count>
<item_version>0</item_version>
<item class_id="52" 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>49</item>
</second>
</item>
<item>
<first>157</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>50</item>
<item>50</item>
</second>
</item>
<item>
<first>163</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>170</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>56</item>
<item>56</item>
</second>
</item>
<item>
<first>176</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>58</item>
<item>58</item>
</second>
</item>
<item>
<first>181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>188</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>62</item>
<item>62</item>
</second>
</item>
<item>
<first>194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>201</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>68</item>
<item>68</item>
</second>
</item>
<item>
<first>207</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>70</item>
<item>70</item>
</second>
</item>
<item>
<first>212</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>219</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>74</item>
<item>74</item>
</second>
</item>
<item>
<first>225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>232</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>80</item>
<item>80</item>
</second>
</item>
<item>
<first>238</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>82</item>
<item>82</item>
</second>
</item>
<item>
<first>243</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>250</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>86</item>
<item>86</item>
</second>
</item>
<item>
<first>256</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>263</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>92</item>
<item>92</item>
</second>
</item>
<item>
<first>269</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>94</item>
<item>94</item>
</second>
</item>
<item>
<first>274</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>52</item>
<item>52</item>
</second>
</item>
<item>
<first>279</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>64</item>
<item>64</item>
</second>
</item>
<item>
<first>284</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>76</item>
<item>76</item>
</second>
</item>
<item>
<first>289</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>88</item>
<item>88</item>
</second>
</item>
<item>
<first>294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>301</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>106</item>
</second>
</item>
<item>
<first>311</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>318</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>326</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>330</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>342</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>354</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>366</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</item>
</second>
</item>
<item>
<first>370</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>375</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>379</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>59</item>
</second>
</item>
<item>
<first>383</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>387</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>391</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>395</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>399</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>403</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>407</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>411</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</item>
</second>
</item>
<item>
<first>418</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>421</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>425</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>432</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>439</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>443</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>447</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>453</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
<item>
<first>464</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>470</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>476</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>482</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>96</item>
<item>101</item>
</second>
</item>
<item>
<first>490</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>54</item>
<item>97</item>
</second>
</item>
<item>
<first>498</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>66</item>
<item>98</item>
</second>
</item>
<item>
<first>506</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>78</item>
<item>100</item>
</second>
</item>
<item>
<first>514</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>90</item>
<item>102</item>
</second>
</item>
</dp_fu_nodes>
<dp_fu_nodes_expression class_id="54" tracking_level="0" version="0">
<count>55</count>
<item_version>0</item_version>
<item class_id="55" tracking_level="0" version="0">
<first>add_ln63_3_fu_439</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>99</item>
</second>
</item>
<item>
<first>add_ln63_7_fu_443</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>103</item>
</second>
</item>
<item>
<first>add_ln63_8_fu_370</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>add_ln63_fu_447</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>104</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_ad_gep_fu_150</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_gep_fu_163</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_gep_fu_181</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_gep_fu_194</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_gep_fu_212</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_gep_fu_225</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_gep_fu_243</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_gep_fu_256</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>dst_addr_gep_fu_294</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>48</item>
</second>
</item>
<item>
<first>grp_fu_482</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>96</item>
<item>101</item>
</second>
</item>
<item>
<first>grp_fu_490</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>54</item>
<item>97</item>
</second>
</item>
<item>
<first>grp_fu_498</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>66</item>
<item>98</item>
</second>
</item>
<item>
<first>grp_fu_506</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>78</item>
<item>100</item>
</second>
</item>
<item>
<first>grp_fu_514</first>
<second>
<count>2</count>
<item_version>0</item_version>
<item>90</item>
<item>102</item>
</second>
</item>
<item>
<first>icmp_ln55_fu_342</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>k_0_phi_fu_311</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>k_fu_348</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>mul_ln61_1_fu_464</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>mul_ln61_3_fu_470</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>mul_ln61_5_fu_476</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>sext_ln61_10_fu_395</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>83</item>
</second>
</item>
<item>
<first>sext_ln61_11_fu_432</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>87</item>
</second>
</item>
<item>
<first>sext_ln61_12_fu_435</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>89</item>
</second>
</item>
<item>
<first>sext_ln61_13_fu_399</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>93</item>
</second>
</item>
<item>
<first>sext_ln61_14_fu_403</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>95</item>
</second>
</item>
<item>
<first>sext_ln61_1_fu_375</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>57</item>
</second>
</item>
<item>
<first>sext_ln61_2_fu_379</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>59</item>
</second>
</item>
<item>
<first>sext_ln61_3_fu_418</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>63</item>
</second>
</item>
<item>
<first>sext_ln61_4_fu_421</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>65</item>
</second>
</item>
<item>
<first>sext_ln61_5_fu_383</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>69</item>
</second>
</item>
<item>
<first>sext_ln61_6_fu_387</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>71</item>
</second>
</item>
<item>
<first>sext_ln61_7_fu_425</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>75</item>
</second>
</item>
<item>
<first>sext_ln61_8_fu_428</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>77</item>
</second>
</item>
<item>
<first>sext_ln61_9_fu_391</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>81</item>
</second>
</item>
<item>
<first>sext_ln61_fu_414</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>53</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>tmp_7_fu_318</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>22</item>
</second>
</item>
<item>
<first>trunc_ln_fu_453</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>105</item>
</second>
</item>
<item>
<first>zext_ln48_1_fu_326</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>zext_ln48_fu_330</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>24</item>
</second>
</item>
<item>
<first>zext_ln60_fu_354</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>44</item>
</second>
</item>
<item>
<first>zext_ln61_fu_411</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>51</item>
</second>
</item>
<item>
<first>zext_ln63_1_fu_407</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>47</item>
</second>
</item>
<item>
<first>zext_ln63_fu_366</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>45</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>dst_offset_read_read_fu_82</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>20</item>
</second>
</item>
<item>
<first>src_offset_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="56" tracking_level="0" version="0">
<count>17</count>
<item_version>0</item_version>
<item class_id="57" tracking_level="0" version="0">
<first class_id="58" 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>29</count>
<item_version>0</item_version>
<item>
<first>307</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>522</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
<item>
<first>527</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>532</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>537</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>542</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>547</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>552</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>557</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>562</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>567</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>571</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>576</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>581</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>586</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>591</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>596</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>601</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>606</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>611</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>616</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>621</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>626</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>631</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>636</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>641</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>646</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>651</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>656</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
</dp_reg_nodes>
<dp_regname_nodes>
<count>29</count>
<item_version>0</item_version>
<item>
<first>add_ln63_5_reg_656</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>101</item>
</second>
</item>
<item>
<first>add_ln63_8_reg_576</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>46</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_ad_reg_581</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>49</item>
</second>
</item>
<item>
<first>dct_coeff_table_0_lo_reg_621</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>50</item>
</second>
</item>
<item>
<first>dct_coeff_table_1_ad_reg_586</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>55</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_ad_reg_591</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>61</item>
</second>
</item>
<item>
<first>dct_coeff_table_2_lo_reg_631</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>62</item>
</second>
</item>
<item>
<first>dct_coeff_table_3_ad_reg_596</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>67</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_ad_reg_601</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>73</item>
</second>
</item>
<item>
<first>dct_coeff_table_4_lo_reg_641</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>74</item>
</second>
</item>
<item>
<first>dct_coeff_table_5_ad_reg_606</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>79</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_ad_reg_611</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>85</item>
</second>
</item>
<item>
<first>dct_coeff_table_6_lo_reg_651</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>86</item>
</second>
</item>
<item>
<first>dct_coeff_table_7_ad_reg_616</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>91</item>
</second>
</item>
<item>
<first>icmp_ln55_reg_567</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>36</item>
</second>
</item>
<item>
<first>k_0_reg_307</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
<item>
<first>k_reg_571</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>38</item>
</second>
</item>
<item>
<first>mul_ln61_1_reg_626</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>60</item>
</second>
</item>
<item>
<first>mul_ln61_3_reg_636</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>72</item>
</second>
</item>
<item>
<first>mul_ln61_5_reg_646</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>84</item>
</second>
</item>
<item>
<first>src1_addr_reg_532</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>26</item>
</second>
</item>
<item>
<first>src2_addr_reg_537</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>27</item>
</second>
</item>
<item>
<first>src3_addr_reg_542</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>28</item>
</second>
</item>
<item>
<first>src4_addr_reg_547</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>29</item>
</second>
</item>
<item>
<first>src5_addr_reg_552</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>30</item>
</second>
</item>
<item>
<first>src6_addr_reg_557</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>31</item>
</second>
</item>
<item>
<first>src7_addr_reg_562</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>32</item>
</second>
</item>
<item>
<first>src_addr_reg_527</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>25</item>
</second>
</item>
<item>
<first>zext_ln48_1_reg_522</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>23</item>
</second>
</item>
</dp_regname_nodes>
<dp_reg_phi>
<count>1</count>
<item_version>0</item_version>
<item>
<first>307</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_0_reg_307</first>
<second>
<count>1</count>
<item_version>0</item_version>
<item>35</item>
</second>
</item>
</dp_regname_phi>
<dp_port_io_nodes class_id="59" tracking_level="0" version="0">
<count>11</count>
<item_version>0</item_version>
<item class_id="60" 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>dst_offset</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>
<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>src_offset</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>
</dp_port_io_nodes>
<port2core class_id="61" tracking_level="0" version="0">
<count>9</count>
<item_version>0</item_version>
<item class_id="62" 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>
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . M E M O R Y _ C O M P A R E --
-- --
-- S p e c --
-- --
-- Copyright (C) 2006-2021, 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. --
-- --
------------------------------------------------------------------------------
with System.Memory_Types;
package System.Memory_Compare is
pragma No_Elaboration_Code_All;
pragma Preelaborate;
function memcmp
(S1 : Address;
S2 : Address;
N : Memory_Types.size_t) return Integer;
pragma Export (C, memcmp, "memcmp");
-- Compares the first n bytes of the memory areas s1 and s2. It returns
-- an integer less than, equal to, or greater than zero if s1 is
-- found, respectively, to be less than, to match, or be greater than s2.
end System.Memory_Compare;
|
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K I N G . P R O T E C T E D _ O B J E C T S . --
-- M U L T I P R O C E S S O R S --
-- S p e c --
-- --
-- Copyright (C) 2010-2021, AdaCore --
-- --
-- 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. 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. --
-- --
-- --
-- --
-- --
-- --
-- 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. --
-- --
------------------------------------------------------------------------------
package System.Tasking.Protected_Objects.Multiprocessors is
procedure Served (Entry_Call : Entry_Call_Link);
-- This procedure is called at the end of a call to an entry or to a
-- protected procedure. It adds Entry_Call to a per-CPU list, and pokes
-- the CPU (the one from the task waiting on the entry).
procedure Wakeup_Served_Entry;
-- Called when the CPU is poked to awake all the tasks of the current CPU
-- waiting on entries.
end System.Tasking.Protected_Objects.Multiprocessors;
|
------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <vgodunko@gmail.com> --
-- 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.DC;
with AMF.DG.Clip_Paths;
with AMF.DG.Groups;
with AMF.DG.Markers;
with AMF.DG.Styles.Collections;
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.DD_Attributes;
with AMF.Visitors.DG_Iterators;
with AMF.Visitors.DG_Visitors;
package body AMF.Internals.DG_Polylines is
---------------
-- Get_Point --
---------------
overriding function Get_Point
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DC.Sequence_Of_DC_Point is
begin
return
AMF.Internals.Tables.DD_Attributes.Internal_Get_Point
(Self.Element);
end Get_Point;
----------------------
-- Get_Start_Marker --
----------------------
overriding function Get_Start_Marker
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Markers.DG_Marker_Access is
begin
return
AMF.DG.Markers.DG_Marker_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Start_Marker
(Self.Element)));
end Get_Start_Marker;
----------------------
-- Set_Start_Marker --
----------------------
overriding procedure Set_Start_Marker
(Self : not null access DG_Polyline_Proxy;
To : AMF.DG.Markers.DG_Marker_Access) is
begin
AMF.Internals.Tables.DD_Attributes.Internal_Set_Start_Marker
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Start_Marker;
--------------------
-- Get_End_Marker --
--------------------
overriding function Get_End_Marker
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Markers.DG_Marker_Access is
begin
return
AMF.DG.Markers.DG_Marker_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.DD_Attributes.Internal_Get_End_Marker
(Self.Element)));
end Get_End_Marker;
--------------------
-- Set_End_Marker --
--------------------
overriding procedure Set_End_Marker
(Self : not null access DG_Polyline_Proxy;
To : AMF.DG.Markers.DG_Marker_Access) is
begin
AMF.Internals.Tables.DD_Attributes.Internal_Set_End_Marker
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_End_Marker;
--------------------
-- Get_Mid_Marker --
--------------------
overriding function Get_Mid_Marker
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Markers.DG_Marker_Access is
begin
return
AMF.DG.Markers.DG_Marker_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Mid_Marker
(Self.Element)));
end Get_Mid_Marker;
--------------------
-- Set_Mid_Marker --
--------------------
overriding procedure Set_Mid_Marker
(Self : not null access DG_Polyline_Proxy;
To : AMF.DG.Markers.DG_Marker_Access) is
begin
AMF.Internals.Tables.DD_Attributes.Internal_Set_Mid_Marker
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Mid_Marker;
---------------
-- Get_Group --
---------------
overriding function Get_Group
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Groups.DG_Group_Access is
begin
return
AMF.DG.Groups.DG_Group_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Group
(Self.Element)));
end Get_Group;
---------------
-- Set_Group --
---------------
overriding procedure Set_Group
(Self : not null access DG_Polyline_Proxy;
To : AMF.DG.Groups.DG_Group_Access) is
begin
AMF.Internals.Tables.DD_Attributes.Internal_Set_Group
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Group;
---------------------
-- Get_Local_Style --
---------------------
overriding function Get_Local_Style
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Styles.Collections.Ordered_Set_Of_DG_Style is
begin
return
AMF.DG.Styles.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Local_Style
(Self.Element)));
end Get_Local_Style;
----------------------
-- Get_Shared_Style --
----------------------
overriding function Get_Shared_Style
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Styles.Collections.Ordered_Set_Of_DG_Style is
begin
return
AMF.DG.Styles.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Shared_Style
(Self.Element)));
end Get_Shared_Style;
-------------------
-- Get_Transform --
-------------------
overriding function Get_Transform
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Sequence_Of_DG_Transform is
begin
return
AMF.Internals.Tables.DD_Attributes.Internal_Get_Transform
(Self.Element);
end Get_Transform;
-------------------
-- Get_Clip_Path --
-------------------
overriding function Get_Clip_Path
(Self : not null access constant DG_Polyline_Proxy)
return AMF.DG.Clip_Paths.DG_Clip_Path_Access is
begin
return
AMF.DG.Clip_Paths.DG_Clip_Path_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.DD_Attributes.Internal_Get_Clip_Path
(Self.Element)));
end Get_Clip_Path;
-------------------
-- Set_Clip_Path --
-------------------
overriding procedure Set_Clip_Path
(Self : not null access DG_Polyline_Proxy;
To : AMF.DG.Clip_Paths.DG_Clip_Path_Access) is
begin
AMF.Internals.Tables.DD_Attributes.Internal_Set_Clip_Path
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Clip_Path;
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant DG_Polyline_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.DG_Visitors.DG_Visitor'Class then
AMF.Visitors.DG_Visitors.DG_Visitor'Class
(Visitor).Enter_Polyline
(AMF.DG.Polylines.DG_Polyline_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant DG_Polyline_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.DG_Visitors.DG_Visitor'Class then
AMF.Visitors.DG_Visitors.DG_Visitor'Class
(Visitor).Leave_Polyline
(AMF.DG.Polylines.DG_Polyline_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant DG_Polyline_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.DG_Iterators.DG_Iterator'Class then
AMF.Visitors.DG_Iterators.DG_Iterator'Class
(Iterator).Visit_Polyline
(Visitor,
AMF.DG.Polylines.DG_Polyline_Access (Self),
Control);
end if;
end Visit_Element;
end AMF.Internals.DG_Polylines;
|
with Ada.Text_IO; use Ada.Text_IO;
with Bits;
package body Blade is
epsilon : constant Float := 10.0 ** (-6);
function GP_OP (BA, BB : Basis_Blade; Outer : Boolean) return Basis_Blade;
function Inner_Product_Filter (Grade_1, Grade_2 : Integer;
Blades : Blade_List; Cont : Contraction_Type)
return Blade_List;
function Inner_Product_Filter (Grade_1, Grade_2 : Integer;
BB : Basis_Blade; Cont : Contraction_Type)
return Basis_Blade;
function New_Blade (Weight : Float := 1.0) return Basis_Blade;
function To_Eigen_Basis (BB : Basis_Blade; Met : Metric.Metric_Record)
return Blade_List;
function To_Metric_Basis (BL : Blade_List; Met : Metric.Metric_Record)
return Blade_List;
function Transform_Basis (BA : Blade.Basis_Blade; Met : GA_Maths.Float_Matrix)
return Blade_List;
-- -------------------------------------------------------------------------
function "<" (Left, Right : Blade.Basis_Blade) return Boolean is
begin
return Bitmap (Left) < Bitmap (Right);
end "<";
-- ------------------------------------------------------------------------
function "*" (S : Float; BB : Basis_Blade) return Basis_Blade is
begin
return (BB.Bitmap, S * BB.Weight);
end "*";
-- ------------------------------------------------------------------------
function "*" (BB : Basis_Blade; S : Float) return Basis_Blade is
begin
return S * BB;
end "*";
-- ------------------------------------------------------------------------
procedure Add_Blade (Blades : in out Blade_List; BB : Basis_Blade)is
begin
Blades.Append (BB);
end Add_Blade;
-- -------------------------------------------------------------------------
procedure Add_Blade (Blades : in out Blade_Vector;
Index : Natural; BB : Basis_Blade)is
begin
Blades.Replace_Element (Index, BB);
end Add_Blade;
-- -------------------------------------------------------------------------
procedure Add_Blades (Blades : in out Blade_List; More_Blades : Blade_List) is
use Blade_List_Package;
Curs : Cursor := More_Blades.First;
aBlade : Basis_Blade;
begin
while Has_Element (Curs) loop
aBlade := Element (Curs);
if Weight (aBlade) /= 0.0 then
Blades.Append (aBlade);
end if;
Next (Curs);
end loop;
end Add_Blades;
-- -------------------------------------------------------------------------
function BB_First (BB_List : Blade_List) return Basis_Blade is
begin
return BB_List.First_Element;
end BB_First;
-- -------------------------------------------------------------------------
function BB_Item (BB_List : Blade_List; Index : Integer) return Basis_Blade is
use Blade_List_Package;
Curs : Cursor := BB_List.First;
begin
if Index > 1 then
for count in 2 .. Index loop
Next (Curs);
end loop;
end if;
return Element (Curs);
end BB_Item;
-- -------------------------------------------------------------------------
function Blade_String (aBlade : Basis_Blade; BV_Names : Basis_Vector_Names)
return Ada.Strings.Unbounded.Unbounded_String is
use Names_Package;
BM : Unsigned_32 := aBlade.Bitmap;
Bit_Num : Natural := 1;
Scale : constant GA_Maths.float_3 := GA_Maths.float_3 (Weight (aBlade));
Name : Unbounded_String;
Val : Unbounded_String;
theString : Ada.Strings.Unbounded.Unbounded_String := To_Unbounded_String ("");
begin
-- Put_Line ("Blade.Blade_String, initial BM: " & Unsigned_32'Image (BM));
if BM = 0 then
theString := To_Unbounded_String (GA_Maths.float_3'Image (Scale));
else
while BM /= 0 loop
-- Put_Line ("Blade.Blade_String, BM, Bit_Num: " & Unsigned_32'Image (BM) &
-- ", " & Natural'Image (Bit_Num));
if (BM and 1) /= 0 then
-- Put_Line ("Blade.Blade_String, BM bit detected: " & Unsigned_32'Image (BM));
if Length (theString) > 0 then
theString := theString & "^";
end if;
if Is_Empty (Vector (BV_Names)) or
(Bit_Num > Natural (Length (Vector (BV_Names))) or
(Bit_Num) < 1) then
theString := theString & "e";
Val := To_Unbounded_String (Natural'Image (Bit_Num));
Val := Trim (Val, Ada.Strings.Left);
theString := theString & Val;
else
Name := Element (BV_Names, Bit_Num);
theString := theString & Name;
end if;
-- Put_Line ("Blade.Blade_String, theString: " & To_String (theString));
end if;
BM := BM / 2; -- BM >>= 1;
Bit_Num := Bit_Num + 1;
end loop;
if Length (theString) > 0 then
theString := GA_Maths.float_3'Image (Scale) & " * " & theString;
end if;
end if;
-- Put_Line ("Blade.Blade_String, final theString: " & To_String (theString));
return theString;
exception
when others =>
Put_Line ("An exception occurred in Blade.Blade_String.");
raise;
end Blade_String;
-- -------------------------------------------------------------------------
function Bitmap (BB : Basis_Blade) return Unsigned_32 is
begin
return BB.Bitmap;
end Bitmap;
-- ------------------------------------------------------------------------
function Canonical_Reordering_Sign (Map_A, Map_B : Unsigned_32) return float is
A : Unsigned_32 := Map_A / 2;
Swaps : Natural := 0;
begin
while A /= 0 loop
Swaps := Swaps + Bits.Bit_Count (A and Map_B);
A := A / 2;
end loop;
if Swaps mod 2 = 0 then -- an even number of swaps
return 1.0;
else -- an odd number of swaps
return -1.0;
end if;
end Canonical_Reordering_Sign;
-- ------------------------------------------------------------------------
-- Based on BasisBlade.java geometricProduct(BasisBlade a, BasisBlade b, double[] m)
-- wher m is an array of doubles giving the metric for each basis vector.
function Geometric_Product (BB : Basis_Blade; Sc : Float) return Basis_Blade is
S_Blade : constant Basis_Blade := New_Scalar_Blade (Sc);
begin
return GP_OP (BB, S_Blade, False);
end Geometric_Product;
-- ------------------------------------------------------------------------
-- Geometric_Product computes the geometric product of two basis blades.
function Geometric_Product (BA, BB : Basis_Blade) return Basis_Blade is
begin
return GP_OP (BA, BB, False);
end Geometric_Product;
-- ------------------------------------------------------------------------
-- This Geometric_Product returns an ArrayList because
-- the result does not have to be a single BasisBlade.
function Geometric_Product (BA, BB : Basis_Blade;
Met : Metric.Metric_Record) return Blade_List is
use Blade_List_Package;
use GA_Maths.Float_Array_Package;
List_A : constant Blade_List := To_Eigen_Basis (BA, Met);
List_B : constant Blade_List := To_Eigen_Basis (BB, Met);
LA_Cursor : Cursor := List_A.First;
LB_Cursor : Cursor;
Eigen_Vals : constant Real_Vector := Metric.Eigen_Values (Met); -- M.getEigenMetric
GP : Basis_Blade;
Result : Blade_List;
begin
-- List_A and List_B needed because To_Eigen_Basis returns an ArrayList
-- because its result does not have to be a single BasisBlade.
while Has_Element (LA_Cursor) loop
LB_Cursor := List_B.First;
while Has_Element (LB_Cursor) loop
GP := Geometric_Product
(Element (LA_Cursor), Element (LB_Cursor), Eigen_Vals);
Add_Blade (Result, (GP));
Next (LB_Cursor);
end loop;
Next (LA_Cursor);
end loop;
Simplify (Result);
Result := To_Metric_Basis (Result, Met);
return Result;
exception
when others =>
Put_Line ("An exception occurred in Blade.Geometric_Product with Metric.");
raise;
end Geometric_Product;
-- ------------------------------------------------------------------------
function Geometric_Product (BA, BB : Basis_Blade;
Eigen_Vals : GA_Maths.Float_Array_Package.Real_Vector)
return Basis_Blade is
-- Eigen_Vals gives the metric for each basis vector
-- BM is the meet (bitmap of annihilated vectors)
-- Only retain vectors common to both blades
BM : Unsigned_32 := Bitmap (BA) and Bitmap (BB); -- M.getEigenMetric
Index : Integer := 1;
New_Blade : Basis_Blade := Geometric_Product (BA, BB); -- Euclidean metric
begin
while BM /= 0 loop
if (BM and 1) /= 0 then
-- This basis vector is non-zero
New_Blade.Weight := New_Blade.Weight * Eigen_Vals (Index);
end if;
-- Move right to next basis vector indicator
-- BM := BM / 2;
BM := Shift_Right (BM, 1);
Index := Index + 1;
end loop;
if New_Blade.Weight = 0.0 then
New_Blade := New_Basis_Blade;
end if;
return New_Blade;
exception
when others =>
Put_Line ("An exception occurred in Blade.Geometric_Product with Metric.");
raise;
end Geometric_Product;
-- ------------------------------------------------------------------------
function GP_OP (BA, BB : Basis_Blade; Outer : Boolean) return Basis_Blade is
OP_Blade : Basis_Blade;
Sign : Float;
begin
if Outer and then (BA.Bitmap and BB.Bitmap) /= 0 then
-- BA and BB are parallel; so their volume is zero
OP_Blade := New_Basis_Blade (0, 0.0); -- return zero blade
else -- compute geometric product
-- if BA.Bitmap = BB.Bitmap, xor = 0, so Dot product part of MV
-- else xor > 0 so Outer product part of MV
Sign := Canonical_Reordering_Sign (BA.Bitmap, BB.Bitmap);
OP_Blade := New_Blade
(BA.Bitmap xor BB.Bitmap, Sign * BA.Weight * BB.Weight);
end if;
return OP_Blade;
exception
when others =>
Put_Line ("An exception occurred in Blade.GP_OP");
raise;
end GP_OP;
-- ------------------------------------------------------------------------
function Grade (BB : Basis_Blade) return Integer is
begin
return Bits.Bit_Count (BB.Bitmap);
end Grade;
-- ------------------------------------------------------------------------
function Grade_Inversion (B : Basis_Blade) return Basis_Blade is
W : constant Float
:= Float (Minus_1_Power (Grade (B)) * Integer (B.Weight));
begin
return New_Blade (B.Bitmap, W);
end Grade_Inversion;
-- ------------------------------------------------------------------------
function Inner_Product (BA, BB : Basis_Blade; Cont : Contraction_Type)
return Basis_Blade is
begin
return Inner_Product_Filter (Grade (BA), Grade (BB),
Geometric_Product (BA, BB), Cont);
end Inner_Product;
-- ------------------------------------------------------------------------
function Inner_Product (BA, BB : Basis_Blade; Met : Metric.Metric_Record;
Cont : Contraction_Type) return Blade_List is
GP : constant Blade_List := Geometric_Product (BA, BB, Met);
begin
return Inner_Product_Filter (Grade (BA), Grade (BB), GP, Cont);
end Inner_Product;
-- ------------------------------------------------------------------------
function Inner_Product_Filter (Grade_1, Grade_2 : Integer;
BB : Basis_Blade; Cont : Contraction_Type)
return Basis_Blade is
IP_Blade : Basis_Blade;
begin
case Cont is
when Left_Contraction =>
if (Grade_1 > Grade_2) or (Grade (BB) /= (Grade_2 - Grade_1)) then
IP_Blade := New_Basis_Blade;
else -- Grade_1 <= Grade_2 and Grade (BB) = Grade_2 - Grade_1
IP_Blade := BB;
end if;
when Right_Contraction =>
if (Grade_1 < Grade_2) or (Grade (BB) /= Grade_1 - Grade_2) then
IP_Blade := New_Basis_Blade;
else
IP_Blade := BB;
end if;
when Hestenes_Inner_Product =>
if (Grade_1 = 0) or (Grade_2 = 0) then
IP_Blade := New_Basis_Blade;
elsif Abs (Grade_1 - Grade_2) = Grade (BB) then
IP_Blade := BB;
end if;
when Modified_Hestenes_Inner_Product =>
if Abs (Grade_1 - Grade_2) = Grade (BB) then
IP_Blade := BB;
else
IP_Blade := New_Basis_Blade;
end if;
end case;
return IP_Blade;
exception
when others =>
Put_Line ("An exception occurred in Blade.Inner_Product_Filter");
raise;
end Inner_Product_Filter;
-- ------------------------------------------------------------------------
function Inner_Product_Filter (Grade_1, Grade_2 : Integer;
Blades : Blade_List;
Cont : Contraction_Type)
return Blade_List is
use Blade_List_Package;
Blade_Cursor : Cursor := Blades.First;
aBlade : Basis_Blade;
New_Blades : Blade_List;
begin
while Has_Element (Blade_Cursor) loop
-- Inner_Product_Filter returns either a null blade or Element (Blade_Cursor)
aBlade := Inner_Product_Filter (Grade_1, Grade_2,
Element (Blade_Cursor), Cont);
if Weight (aBlade) /= 0.0 then
Add_Blade (New_Blades, (aBlade));
end if;
Next (Blade_Cursor);
end loop;
return New_Blades;
exception
when others =>
Put_Line ("An exception occurred in Blade.Inner_Product_Filter");
raise;
end Inner_Product_Filter;
-- ------------------------------------------------------------------------
function List_Length (Blades : Blade_List) return Integer is
begin
return Integer (Blades.Length);
end List_Length;
-- ------------------------------------------------------------------------
function Minus_1_Power (Power : Integer) return Integer is
begin
return (-1) ** Power;
end Minus_1_Power;
-- ------------------------------------------------------------------------
function New_Blade (Weight : Float := 1.0) return Basis_Blade is
Blade : Basis_Blade;
begin
Blade.Weight := Weight;
return Blade;
end New_Blade;
-- ------------------------------------------------------------------------
function New_Blade (Bitmap : Unsigned_32; Weight : Float := 1.0)
return Basis_Blade is
Blade : Basis_Blade;
begin
if Bitmap < 32 then
Blade.Bitmap := Bitmap;
Blade.Weight := Weight;
else
raise Blade_Exception with
"Blade.New_Blade, invalid Bitmap" & Unsigned_32'Image (Bitmap);
end if;
return Blade;
end New_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Bitmap : Unsigned_32; Weight : Float := 1.0)
return Basis_Blade is
Blade : Basis_Blade;
begin
if Bitmap < 32 then
Blade.Bitmap := Bitmap;
Blade.Weight := Weight;
else
raise Blade_Exception with
"Blade.New_Basis_Blade, invalid Bitmap" & Unsigned_32'Image (Bitmap);
end if;
return Blade;
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Weight : Float := 0.0) return Basis_Blade is
Blade : Basis_Blade;
begin
Blade.Bitmap := 0;
Blade.Weight := Weight;
return Blade;
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Index : BV_Base; Weight : Float := 1.0) return Basis_Blade is
begin
return (Index'Enum_Rep, Weight);
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Index : E2_Base; Weight : Float := 1.0) return Basis_Blade is
begin
return (Index'Enum_Rep, Weight);
exception
when others =>
Put_Line ("An exception occurred in Blade.New_Basis_Blade");
raise;
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Index : E3_Base; Weight : Float := 1.0) return Basis_Blade is
begin
return (Index'Enum_Rep, Weight);
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Basis_Blade (Index : C3_Base; Weight : Float := 1.0) return Basis_Blade is
begin
return (Index'Enum_Rep, Weight);
end New_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Complex_Basis_Blade (Index : C3_Base;
Weight : GA_Maths.Complex_Types.Complex := (0.0, 1.0))
return Complex_Basis_Blade is
begin
return (Index'Enum_Rep, Weight);
end New_Complex_Basis_Blade;
-- ------------------------------------------------------------------------
function New_Scalar_Blade (Weight : Float := 1.0) return Basis_Blade is
Blade : Basis_Blade;
begin
Blade.Bitmap := 0;
Blade.Weight := Weight;
return Blade;
end New_Scalar_Blade;
-- ------------------------------------------------------------------------
function New_Zero_Blade return Basis_Blade is
Blade : Basis_Blade;
begin
return Blade;
end New_Zero_Blade;
-- ------------------------------------------------------------------------
function Outer_Product (BA, BB : Basis_Blade) return Basis_Blade is
begin
return GP_OP (BA, BB, True);
end Outer_Product;
-- ------------------------------------------------------------------------
function Reverse_Blade (B : Basis_Blade) return Basis_Blade is
G : constant Integer := Grade (B); -- Bit_Count (B.Bitmap)
W : constant Float
:= Float (Minus_1_Power ((G * (G - 1)) / 2)) * B.Weight;
begin
return (B.Bitmap, W);
end Reverse_Blade;
-- ------------------------------------------------------------------------
procedure Simplify (Blades : in out Blade_List) is
use Blade_List_Package;
Current_Blade : Blade.Basis_Blade;
Blade_B : Blade.Basis_Blade;
Blade_Cursor : Cursor;
Result : Blade_List;
begin
if List (Blades) /= Empty_List then
Blade_Cursor := Blades.First;
while Has_Element (Blade_Cursor) loop
Blade_B := Element (Blade_Cursor);
if Weight (Blade_B) = 0.0 then
Delete (Blades, Blade_Cursor);
else
Next (Blade_Cursor);
end if;
end loop;
if List (Blades) /= Empty_List then
Blade_Sort_Package.Sort (List (Blades));
Blade_Cursor := Blades.First;
Current_Blade := Element (Blade_Cursor);
Next (Blade_Cursor);
while Has_Element (Blade_Cursor) loop
Blade_B := Element (Blade_Cursor);
if Bitmap (Blade_B) = Bitmap (Current_Blade) then
Current_Blade :=
New_Blade (Bitmap (Current_Blade),
Weight (Current_Blade) + Weight (Blade_B));
else
if Abs (Weight (Current_Blade)) > epsilon then
Result.Append (Current_Blade);
end if;
Current_Blade := Blade_B;
end if;
Next (Blade_Cursor);
end loop;
if Abs (Weight (Current_Blade)) > epsilon then
Result.Append (Current_Blade);
end if;
Blades := Result;
end if;
end if;
end Simplify;
-- -------------------------------------------------------------------------
function To_Eigen_Basis (BB : Basis_Blade; Met : Metric.Metric_Record)
return Blade_List is
begin
return Transform_Basis (BB, GA_Maths.Float_Matrix (Metric.Eigen_Vectors (Met)));
end To_Eigen_Basis;
-- ------------------------------------------------------------------------
function To_Metric_Basis (BB : Basis_Blade; Met : Metric.Metric_Record)
return Blade_List is
begin
return Transform_Basis (BB, GA_Maths.Float_Matrix (Metric.Inv_Eigen_Matrix (Met)));
end To_Metric_Basis;
-- ------------------------------------------------------------------------
function To_Metric_Basis (BL : Blade_List; Met : Metric.Metric_Record)
return Blade_List is
use Blade_List_Package;
BL_Cursor : Cursor := BL.First;
Tmp_List : Blade_List;
TL_Cursor : Cursor;
Result : Blade_List;
begin
-- GA_Utilities.Print_Blade_List ("Blade.To_Metric_Basis BL", BL);
while Has_Element (BL_Cursor) loop
Tmp_List.Clear;
-- GA_Utilities.Print_Blade ("Blade.To_Metric_Basis blade", Element (BL_Cursor));
Tmp_List := To_Metric_Basis (Element (BL_Cursor), Met);
-- GA_Utilities.Print_Blade_List ("Blade.To_Metric_Basis Tmp_List", Tmp_List);
TL_Cursor := Tmp_List.First;
while Has_Element (TL_Cursor) loop
Result.Append (Element (TL_Cursor));
Next (TL_Cursor);
end loop;
Next (BL_Cursor);
end loop;
Simplify (Result);
return Result;
exception
when others =>
Put_Line ("An exception occurred in Blade.To_Metric_Basis");
raise;
end To_Metric_Basis;
-- ------------------------------------------------------------------------
-- Transform_Basis transforms a Basis_Blade to a new basis
-- Based on Metric.java ArrayList transform(BasisBlade a, DoubleMatrix2D M)
function Transform_Basis (BA : Blade.Basis_Blade;
Met : GA_Maths.Float_Matrix)
return Blade_List is
use Blade_List_Package;
List_A : Blade_List;
BM : Unsigned_32 := Bitmap (BA);
Curs : Cursor;
OP : Basis_Blade;
Temp : Blade_List;
I_Col : Integer := 1;
Value : Float;
begin
-- New_Line;
-- GA_Utilities.Print_Matrix ("Blade.Transform_Basis Met", Real_Matrix ((Met)));
-- GA_Utilities.Print_Blade ("Blade.Transform_Basis BA", BA);
-- Put_Line ("Blade.Transform_Basis Bitmap (BA)" & Unsigned_32'Image (BM));
-- start with just a scalar
List_A.Append (New_Blade (Weight (BA)));
-- convert each 1 bit to a list of blades
-- Put_Line ("Blade.Transform_Basis 1st blade added");
while BM /= 0 loop
-- Put_Line ("Blade.Transform_Basis BM" & Unsigned_32'Image (BM));
if (BM and 1) /= 0 then
Temp.Clear;
for Row in 1 .. Met'Length (1) loop
-- Put_Line ("Blade.Transform_Basis Row, I_Col" &
-- Integer'Image (Row) & Integer'Image (I_Col));
Value := Met (Row, I_Col);
if Value /= 0.0 then
-- Wedge column Col of the matrix with List_A
Curs := List_A.First;
while Has_Element (Curs) loop
-- GA_Utilities.Print_Blade ("Blade.Transform_Basis Element (Curs)", Element (Curs));
OP := Outer_Product (Element (Curs),
New_Basis_Blade (2 ** (Row - 1), Value));
Temp.Append (OP);
Next (Curs);
end loop;
end if;
end loop; -- Row
List_A := Temp;
end if; -- (BM and 1) /= 0
BM := Shift_Right (BM, 1);
I_Col := I_Col + 1;
end loop; -- BM /= 0
return List_A;
exception
when others =>
Put_Line ("An exception occurred in Blade.Transform_Basis");
raise;
end Transform_Basis;
-- ------------------------------------------------------------------------
procedure Update_Blade (BB : in out Basis_Blade; Weight : Float) is
begin
BB.Weight := Weight;
exception
when others =>
Put_Line ("An exception occurred in Blade.Update_Blade 1");
raise;
end Update_Blade;
-- ------------------------------------------------------------------------
procedure Update_Blade (BB : in out Basis_Blade; Bitmap : Unsigned_32) is
begin
if Bitmap < 32 then
BB.Bitmap := Bitmap;
else
raise Blade_Exception with "Blade.Update_Blade invalid Bitmap.";
end if;
end Update_Blade;
-- ------------------------------------------------------------------------
procedure Update_Blade (BB : in out Basis_Blade; Bitmap : Unsigned_32;
Weight : Float) is
begin
if Bitmap < 32 then
BB.Bitmap := Bitmap;
BB.Weight := Weight;
else
raise Blade_Exception with "Blade.Update_Blade invalid Bitmap.";
end if;
end Update_Blade;
-- ------------------------------------------------------------------------
function Weight (BB : Basis_Blade) return Float is
begin
return BB.Weight;
end Weight;
-- ------------------------------------------------------------------------
end Blade;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.