import java.util.*;
public class FlatPrefetchNode extends FlatNode {
- HashSet<PrefetchPair> pp;
+ public Integer siteid;
+ HashSet<PrefetchPair> hspp;
public FlatPrefetchNode() {
- pp = new HashSet<PrefetchPair>();
+ hspp = new HashSet<PrefetchPair>();
+ siteid = new Integer(1);
}
public String toString() {
- return "prefetchnode";
+ String st="prefetch(";
+ boolean first=true;
+ for(Iterator<PrefetchPair> it=hspp.iterator();it.hasNext();) {
+ PrefetchPair pp=it.next();
+ if (!first)
+ st+=", ";
+ first=false;
+ st+=pp;
+ }
+ return st+")";
}
public int kind() {
}
public void insPrefetchPair(PrefetchPair pp) {
- this.pp.add(pp);
+ hspp.add(pp);
}
public void insAllpp(HashSet<PrefetchPair> hspp) {
- this.pp.addAll(hspp);
+ this.hspp.addAll(hspp);
}
public HashSet<PrefetchPair> getPrefetchPairs() {
- return this.pp;
+ return hspp;
+ }
+
+ public int getNumPairs() {
+ return hspp.size();
}
}