Algorithm Representations and Iteration Bound - PowerPoint PPT Presentation

About This Presentation
Title:

Algorithm Representations and Iteration Bound

Description:

Algorithm Representations and Iteration Bound Dependence Graph (DG) The basic representation of an algorithm. Shows only dependency among operations. – PowerPoint PPT presentation

Number of Views:38
Avg rating:3.0/5.0
Slides: 11
Provided by: YuH82
Learn more at: http://web.cecs.pdx.edu
Category:

less

Transcript and Presenter's Notes

Title: Algorithm Representations and Iteration Bound


1
Algorithm Representations and Iteration Bound
2
Dependence Graph (DG)
  • 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.

3
Data Flow Graph
  • Node
  • Computation
  • Associated with a computing time.
  • Direct edge
  • data path and delay
  • Delay iteration count
  • Example
  • y(n) ay(n-1) bu(n)
  • The delay of 1 u.t. indicates that to compute
    y(n1) in the next iteration depends on result
    y(n) of the present iteration.
  • Delay labeled with D or positive integer on edges

4
DFG
x(n)
D
D
  • 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 422 8 t.u.

M1
M2
(4)
(4)
M0
(4)
y(n)
A1
A0
(2)
(2)
  • Recursive DFG contains loops. Must have at least
    one delay element along any loop. Otherwise, the
    algorithm is NON-computable!

5
Loop bound and Iteration bound
D
(2)
(5)
(4)
A
B
C
2D
(2)
(4)
A
B
  • TA-B-A (24)/2 3 t.u.
  • T? max(24)/2, (245)/1
  • max3, 11 11

2D
6
Longest Path Matrix Algorithm
  • 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) gt -1 and ?kj(m) gt
    -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.

7
LPM Example (Fig. 2.2)
  • lpm.m

8
Minimum Cycle Mean Algorithm
  1. 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).
  2. Compute cycle mean of each cycle in Gd. A cycle
    mean is the average lengths of all eges in a
    cycle
  3. 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

mcm.m
9
Example (Figure 2.4)
10
LPM and MCM for Fig. 2.4
  • LPM Method
  • MCM Method
  • i-m matrix
  • T? 8

m0 m1
i1 -12/2 -8/1 -6
i2 -? -8/1 -8
Write a Comment
User Comments (0)
About PowerShow.com