Commit c15d7ab4 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add all associations

parent afad3240
...@@ -184,10 +184,11 @@ package body TASTE.Concurrency_View is ...@@ -184,10 +184,11 @@ package body TASTE.Concurrency_View is
(Parse (Path & "/trigger.tmplt", Trig_Tmpl)) = "TRUE"); (Parse (Path & "/trigger.tmplt", Trig_Tmpl)) = "TRUE");
function Generate_Partition (Partition : CV_Partition) function Generate_Partition (Partition : CV_Partition)
return Translate_Set return String
is is
Threads : Tag; Threads : Tag;
Blocks : Tag; Blocks : Tag;
Partition_Assoc : Translate_Set;
begin begin
for T of Partition.Threads loop for T of Partition.Threads loop
declare declare
...@@ -222,28 +223,28 @@ package body TASTE.Concurrency_View is ...@@ -222,28 +223,28 @@ package body TASTE.Concurrency_View is
String'(Parse (Path & "/block.tmplt", Block_Assoc)); String'(Parse (Path & "/block.tmplt", Block_Assoc));
end; end;
end loop; end loop;
return Translate_Set'(+Assoc ("Threads", Threads) Partition_Assoc := +Assoc ("Threads", Threads)
& Assoc ("Blocks", Blocks)); & Assoc ("Blocks", Blocks);
return Parse (Path & "/partition.tmplt", Partition_Assoc);
end Generate_Partition; end Generate_Partition;
Partitions : Tag;
Node_Assoc : Translate_Set;
begin begin
-- A node contains partitions, we must render them all separately
-- using their own templates (threads and blocks), and then call
-- use the node template with these tags.
if Trigger then if Trigger then
for Partition of CV.Nodes (Node_Name).Partitions loop for Partition of CV.Nodes (Node_Name).Partitions loop
declare Partitions := Partitions & Generate_Partition (Partition);
Partition_Assoc : constant Translate_Set :=
Generate_Partition (Partition);
begin
Put_Info ("Generating from " & Path);
Create (File => Output_File,
Mode => Out_File,
Name => Output_Dir & File_Name);
Put_Line (Output_File,
Parse (Path & "/node.tmplt", Partition_Assoc));
Close (Output_File);
end;
end loop; end loop;
Node_Assoc := +Assoc ("Partitions", Partitions);
Put_Info ("Generating from " & Path);
Create (File => Output_File,
Mode => Out_File,
Name => Output_Dir & File_Name);
Put_Line (Output_File,
Parse (Path & "/node.tmplt", Node_Assoc));
Close (Output_File);
end if; end if;
end; end;
<<continue>> <<continue>>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment