InclusiveMetricsScopeVisitor.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.data.experiment.scope.visitors;
00002 
00003 import edu.rice.cs.hpc.data.experiment.Experiment;
00004 import edu.rice.cs.hpc.data.experiment.scope.AlienScope;
00005 import edu.rice.cs.hpc.data.experiment.scope.CallSiteScope;
00006 import edu.rice.cs.hpc.data.experiment.scope.FileScope;
00007 import edu.rice.cs.hpc.data.experiment.scope.GroupScope;
00008 import edu.rice.cs.hpc.data.experiment.scope.LineScope;
00009 import edu.rice.cs.hpc.data.experiment.scope.LoadModuleScope;
00010 import edu.rice.cs.hpc.data.experiment.scope.LoopScope;
00011 import edu.rice.cs.hpc.data.experiment.scope.ProcedureScope;
00012 import edu.rice.cs.hpc.data.experiment.scope.RootScope;
00013 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00014 import edu.rice.cs.hpc.data.experiment.scope.ScopeVisitType;
00015 import edu.rice.cs.hpc.data.experiment.scope.StatementRangeScope;
00016 import edu.rice.cs.hpc.data.experiment.scope.filters.MetricValuePropagationFilter;
00017 
00027 public class InclusiveMetricsScopeVisitor extends AbstractInclusiveMetricsVisitor {
00028     private int numberOfPrimaryMetrics;
00029 
00030     public InclusiveMetricsScopeVisitor(Experiment experiment, MetricValuePropagationFilter filter) {
00031         super(experiment, filter);
00032         this.numberOfPrimaryMetrics = experiment.getMetricCount();
00033 
00034     }
00035 
00036     //----------------------------------------------------
00037     // visitor pattern instantiations for each Scope type
00038     //----------------------------------------------------
00039 
00040     public void visit(Scope scope, ScopeVisitType vt) { up(scope, vt); }
00041     public void visit(RootScope scope, ScopeVisitType vt) { }
00042     public void visit(LoadModuleScope scope, ScopeVisitType vt) { up(scope, vt); }
00043     public void visit(FileScope scope, ScopeVisitType vt) { up(scope, vt); }
00044     public void visit(ProcedureScope scope, ScopeVisitType vt) { up(scope, vt); }
00045     public void visit(AlienScope scope, ScopeVisitType vt) { up(scope, vt); }
00046     public void visit(LoopScope scope, ScopeVisitType vt) { up(scope, vt); }
00047     public void visit(LineScope scope, ScopeVisitType vt) { up(scope, vt); }
00048     public void visit(StatementRangeScope scope, ScopeVisitType vt) { up(scope, vt); }
00049     public void visit(CallSiteScope scope, ScopeVisitType vt) { up(scope, vt); }
00050     public void visit(GroupScope scope, ScopeVisitType vt) { up(scope, vt); }
00051 
00052 
00058     protected void accumulateToParent(Scope parent, Scope source) {
00059         parent.accumulateMetrics(source, this.filter, this.numberOfPrimaryMetrics);
00060     }
00061 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1