2 # Generated python file of Graph GraphLoopMemory_1
6 # Graph creation of GraphLoopMemory_1
7 def DefGraphLoopMemory_1() :
8 GraphLoopMemory_1 = Graph( 'GraphLoopMemory_1' )
9 GraphLoopMemory_1.SetName( 'GraphLoopMemory_1' )
10 GraphLoopMemory_1.SetAuthor( 'JR' )
11 GraphLoopMemory_1.SetComment( 'For solving of memory leaks' )
12 GraphLoopMemory_1.Coords( 0 , 0 )
14 # Creation of Factory Nodes
16 # Creation of Loop Nodes
18 PyInit.append( 'def Init(Index,Min,Max,Incr) : ' )
19 PyInit.append( ' if Min <= Max : ' )
20 PyInit.append( ' Index = Min ' )
21 PyInit.append( ' else : ' )
22 PyInit.append( ' Index = Max ' )
23 PyInit.append( ' return Index,Min,Max,Incr ' )
25 PyMoreInit.append( 'def More(Index,Min,Max,Incr) : ' )
26 PyMoreInit.append( ' if Index < Max : ' )
27 PyMoreInit.append( ' DoLoop = 1 ' )
28 PyMoreInit.append( ' else : ' )
29 PyMoreInit.append( ' DoLoop = 0 ' )
30 PyMoreInit.append( ' return DoLoop,Index,Min,Max,Incr ' )
32 PyNextInit.append( 'def Next(Index,Min,Max,Incr) : ' )
33 PyNextInit.append( ' Index = Index + Incr ' )
34 PyNextInit.append( ' return Index,Min,Max,Incr ' )
35 Init,EndInit = GraphLoopMemory_1.LNode( 'Init' , PyInit , 'More' , PyMoreInit , 'Next' , PyNextInit )
36 EndInit.SetName( 'EndInit' )
37 EndInit.SetAuthor( '' )
38 EndInit.SetComment( 'Compute Node' )
39 EndInit.Coords( 366 , 262 )
41 EndInit.SetPyFunction( '' , PyEndInit )
42 IInitDoLoop = Init.GetInPort( 'DoLoop' )
43 IInitIndex = Init.InPort( 'Index' , 'long' )
44 IInitMin = Init.InPort( 'Min' , 'long' )
45 IInitMax = Init.InPort( 'Max' , 'long' )
46 IInitIncr = Init.InPort( 'Incr' , 'long' )
47 IInitGate = Init.GetInPort( 'Gate' )
48 OInitDoLoop = Init.GetOutPort( 'DoLoop' )
49 OInitIndex = Init.GetOutPort( 'Index' )
50 OInitMin = Init.GetOutPort( 'Min' )
51 OInitMax = Init.GetOutPort( 'Max' )
52 OInitIncr = Init.GetOutPort( 'Incr' )
53 IEndInitDoLoop = EndInit.GetInPort( 'DoLoop' )
54 IEndInitIndex = EndInit.GetInPort( 'Index' )
55 IEndInitMin = EndInit.GetInPort( 'Min' )
56 IEndInitMax = EndInit.GetInPort( 'Max' )
57 IEndInitIncr = EndInit.GetInPort( 'Incr' )
58 IEndInitGate = EndInit.GetInPort( 'Gate' )
59 OEndInitDoLoop = EndInit.GetOutPort( 'DoLoop' )
60 OEndInitIndex = EndInit.GetOutPort( 'Index' )
61 OEndInitMin = EndInit.GetOutPort( 'Min' )
62 OEndInitMax = EndInit.GetOutPort( 'Max' )
63 OEndInitIncr = EndInit.GetOutPort( 'Incr' )
64 OEndInitGate = EndInit.GetOutPort( 'Gate' )
65 Init.SetName( 'Init' )
67 Init.SetComment( 'Compute Node' )
68 Init.Coords( 17 , 257 )
71 LInitIndexEndInitIndex = GraphLoopMemory_1.Link( OInitIndex , IEndInitIndex )
73 LInitMinEndInitMin = GraphLoopMemory_1.Link( OInitMin , IEndInitMin )
75 LInitMaxEndInitMax = GraphLoopMemory_1.Link( OInitMax , IEndInitMax )
77 LInitIncrEndInitIncr = GraphLoopMemory_1.Link( OInitIncr , IEndInitIncr )
82 IInitMax.Input( 100000 )
85 # Output Ports of the graph
86 #OEndInitIndex = EndInit.GetOutPort( 'Index' )
87 #OEndInitMin = EndInit.GetOutPort( 'Min' )
88 #OEndInitMax = EndInit.GetOutPort( 'Max' )
89 #OEndInitIncr = EndInit.GetOutPort( 'Incr' )
90 return GraphLoopMemory_1
93 GraphLoopMemory_1 = DefGraphLoopMemory_1()