AggregatePropagationFilter.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.data.experiment.scope.filters;
00002 
00003 import edu.rice.cs.hpc.data.experiment.Experiment;
00004 import edu.rice.cs.hpc.data.experiment.metric.AggregateMetric;
00005 import edu.rice.cs.hpc.data.experiment.metric.BaseMetric;
00006 import edu.rice.cs.hpc.data.experiment.metric.FinalMetric;
00007 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00008 
00009 /***********************
00010  * Filter metric to filter inclusive metrics and pre-aggregated metrics 
00011  * @author laksonoadhianto
00012  *
00013  */
00014 public class AggregatePropagationFilter extends InclusiveOnlyMetricPropagationFilter {
00015 
00016     public AggregatePropagationFilter(Experiment experiment) {
00017         super(experiment);
00018     }
00019 
00020     /****************
00021      *  propagate only if the parent's diPropagation filter it and the metric is a type of aggregate
00022      */
00023     public boolean doPropagation(Scope source, Scope target, int src_idx,
00024             int targ_idx) {
00025         boolean bParentResult = super.doPropagation(source, target, src_idx, targ_idx);
00026         if (!bParentResult) {
00027             BaseMetric m = this._experiment.getMetric(src_idx);// .getMetricType();
00028             bParentResult = bParentResult   || (m instanceof FinalMetric) || (m instanceof AggregateMetric);
00029             /*|| ( mType == MetricType.PREAGGREGATE )
00030                                             || ( mType == MetricType.DERIVED_INCR );
00031                                             */
00032         }
00033         return bParentResult;
00034     }
00035 
00036 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1