1 / 10

Algorithm Representations and Iteration Bound

Algorithm Representations and Iteration Bound. The basic representation of an algorithm. Shows only dependency among operations. No notion of delay is represented. No loop, cycle allowed. Can be used to represent asynchronous operations.

nadalia
Download Presentation

Algorithm Representations and Iteration Bound

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithm Representations and Iteration Bound

  2. The basic representation of an algorithm. Shows only dependency among operations. No notion of delay is represented. No loop, cycle allowed. Can be used to represent asynchronous operations. Most useful in exploiting inherent parallelism in the algorithm No implementation or hardware constraint are imposed on DG. Dependence Graph (DG) (C)2002-2006 Yu Hen Hu

  3. Node: Computation Associated with a computing time. Direct edge: data path and delay Delay: iteration count Example y(n) = a*y(n-1) + b*u(n) The delay of 1 u.t. indicates that to compute y(n+1) in the next iteration depends on result y(n) of the present iteration. Delay labeled with D or positive integer on edges Data Flow Graph (C)2002-2006 Yu Hen Hu

  4. Intra-iteration dependency A direct edge without any delay Inter-iteration dependency Direct edge with 1 or more delays Node computing delay labeled with parenthesis. Critical path: longest path between … Example: critical path delay = 4+2+2 = 8 t.u. Recursive DFG: contains loops. Must have at least one delay element along any loop. Otherwise, the algorithm is NON-computable! DFG x(n) D D M1 M2 (4) (4) M0 (4) y(n) A1 A0 (2) (2) (C)2002-2006 Yu Hen Hu

  5. T{A-B-A} = (2+4)/2 = 3 t.u. T = max{(2+4)/2, (2+4+5)/1} = max{3, 11} = 11 Loop bound and Iteration bound D (2) (5) (4) A B C 2D (2) (4) A B 2D (C)2002-2006 Yu Hen Hu

  6. Paths are from one delay element to another. Matrix L(m) dimension d by d, d: # of delay elements Element ij(m) = longest computing time from output of di to input of dj with exactly m-1 delays in between. If no such path exists, ij(m)=-1. Let K = {k; k [1, d], ik(1) > -1 and kj(m) > -1}, then Once L(m) is computed, the iteration bound can be found as: This algorithm can be easily programmed once L(1) is given. Longest Path Matrix Algorithm (C)2002-2006 Yu Hen Hu

  7. 1 (1) D d1 D d2 (2) 4 2 (1) D d3 (2) 5 3 (1) (2) D d4 6 LPM Example (Fig. 2.2) lpm.m (C)2002-2006 Yu Hen Hu

  8. Create a new Graph Gd from the given DFG G. Each node of Gd is a delay element in G. Edge from node i to node j in Gd is the longest path from delay i to delay j in G. So Gd can be constructed from non-negative entries of L(1). Compute cycle mean of each cycle in Gd. A cycle mean is the average lengths of all eges in a cycle Maximum cycle mean of Gd is the maximum cycle (loop) bound of all loops in G and hence is the iteration bound. Algorithm: Compute Gc’ whose edge is negative of that of G. Choose an arbitrary node s, such that fs(0)=0, fk(0) = . Iterations: iteration bound = Minimum Cycle Mean Algorithm mcm.m (C)2002-2006 Yu Hen Hu

  9. (1) (2) (1) (1) (1) (2) 1 2 4 3 6 5 D d1 D d2 (1) 7 Example (Figure 2.4) (C)2002-2006 Yu Hen Hu

  10. LPM Method MCM Method i-m matrix T = 8 -8 -4 Gd’ -4 2 1 -8 LPM and MCM for Fig. 2.4 (C)2002-2006 Yu Hen Hu

More Related