Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
1/19
A join point for loops in AspectJ Bruno Harbulot and John Gurd - - PowerPoint PPT Presentation
A join point for loops in AspectJ Bruno Harbulot and John Gurd Bruno Harbulot AOSD 2006 Bonn, 22/03/2006 The University of Manchester AOSD 2006 Bonn, March 2006 1/19 What we would like to do Write aspects that represent the
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
1/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
2/19
– “parallelise all the loops iterating from 0 to the
– or “parallelise all the loops iterating over a
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
3/19
– by making the iteration space visible as
– by turning loops into self-contained objects
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
4/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
5/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
6/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
7/19
– General loops – Loops with unique successor – Loops with unique exit node
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
8/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
9/19
for (int i = 0 ; i<MAX ; i ++) { /* A */ } int j = 0 ; int STRIDE = 1 ; for (; j < MAX ; j+=STRIDE) { /* A */ } int k = 0 ; while (k < MAX) { /* A */ k ++ ; }
i=0; if (i<MAX) /* A */ i++; return;
Back edge
Natural Loop Header
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
10/19
header pre-header header
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
11/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
12/19
i=0; 1 if(i<MAXI) 2 j=0; 3 if(j<MAXJ) if(c(i,j)) j++; i++ /* A */ 4 6 5 7 8
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
13/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
14/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
15/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
16/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
17/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
18/19
Bruno Harbulot – AOSD 2006 – Bonn, 22/03/2006
19/19
http://www.cs.manchester.ac.uk/cnc/projects/loopsaj/