Ignore:
Timestamp:
07/31/19 13:34:37 (5 years ago)
Author:
yushan
Message:

dev for graph

Location:
XIOS/dev/dev_trunk_omp/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_trunk_omp/src/filter/binary_arithmetic_filter.hpp

    r1681 r1685  
    4040      std::tuple<int, int, int> virtual buildGraph(std::vector<CDataPacketPtr> data); 
    4141       
    42       // CDataPacketPtr virtual buildGraph_post(CDataPacketPtr packet, std::vector<CDataPacketPtr> data); 
     42 
    4343  }; // class CScalarFieldArithmeticFilter 
    4444 
  • XIOS/dev/dev_trunk_omp/src/filter/file_writer_filter.cpp

    r1681 r1685  
    3838      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes += "</br>file attributes : </br>" +this->field->file->record4graphXiosAttributes(); 
    3939      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].clusterID =1; 
    40       (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 
     40      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
    4141 
    4242      if(CXios::isClient && CWorkflowGraph::build_begin)  
  • XIOS/dev/dev_trunk_omp/src/filter/output_pin.cpp

    r1681 r1685  
    129129  } 
    130130 
    131   int COutputPin::getDistance() 
    132   { 
    133     int distance = 0; 
    134     // for(int i=0; i<parent_filters.size(); i++) 
    135     // { 
    136     //   distance = max(distance, parent_filters[i]->getDistance()+1); 
    137     // } 
    138     return distance; 
    139   } 
     131 
    140132 
    141133 
  • XIOS/dev/dev_trunk_omp/src/filter/output_pin.hpp

    r1681 r1685  
    1818  { 
    1919    public: 
    20       // StdString output_field_id; 
    2120      int tag; 
    2221      Time start_graph; 
     
    8685 
    8786      void virtual setParentFiltersTag(); 
    88       int virtual getDistance(); 
    8987 
    9088 
  • XIOS/dev/dev_trunk_omp/src/filter/pass_through_filter.cpp

    r1681 r1685  
    1818    if(building_graph) 
    1919    { 
     20      std::cout<<"pass through packet->distance = "<<data[0]->distance<<std::endl; 
    2021      // std::cout<<"CPassThroughFilter::apply field_id = "<<this->field->getId()<<" start = "<<start_graph<<" end = "<<end_graph<<std::endl; 
    2122      this->filterID = InvalidableObject::filterIdGenerator++; 
     
    2526 
    2627      CWorkflowGraph::addNode(this->filterID, "Pass Through Filter\\n("+data[0]->field->getId()+")", 2, 1, 1, data[0]); 
    27       (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 
     28      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = data[0]->distance+1; 
    2829 
    2930      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
     
    3940       
    4041      data[0]->src_filterID=this->filterID; 
     42      data[0]->distance++; 
    4143 
    4244    } 
    4345 
    4446    data[0]->field = this->field; 
     47 
    4548  } 
    4649 
  • XIOS/dev/dev_trunk_omp/src/filter/spatial_transform_filter.cpp

    r1681 r1685  
    7575 
    7676    CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 
    77     CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field, this->getDistance()); 
     77    CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 
    7878    if (outputPacket) 
    7979    { 
     
    112112 
    113113    CSpatialTransformFilterEngine* spaceFilter = static_cast<CSpatialTransformFilterEngine*>(engine); 
    114     CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field, this->getDistance()); 
     114    CDataPacketPtr outputPacket = spaceFilter->applyFilter(data, outputDefaultValue, this->tag, this->start_graph, this->end_graph, this->field); 
    115115 
    116116    if (outputPacket) 
     
    179179  } 
    180180 
    181   bool CSpatialTransformFilterEngine::buildGraph(std::vector<CDataPacketPtr> data, int tag, Time start_graph, Time end_graph, CField *field, int distance) 
     181  bool CSpatialTransformFilterEngine::buildGraph(std::vector<CDataPacketPtr> data, int tag, Time start_graph, Time end_graph, CField *field) 
    182182  { 
    183183    bool building_graph = tag ? data[0]->timestamp >= start_graph && data[0]->timestamp <= end_graph : false; 
     
    207207  } 
    208208 
    209   CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue, int tag, Time start_graph, Time end_graph, CField *field, int distance) 
     209  CDataPacketPtr CSpatialTransformFilterEngine::applyFilter(std::vector<CDataPacketPtr> data, double defaultValue, int tag, Time start_graph, Time end_graph, CField *field) 
    210210  { 
    211211     
    212     bool BG = buildGraph(data, tag, start_graph, end_graph, field, distance); 
     212    bool BG = buildGraph(data, tag, start_graph, end_graph, field); 
    213213 
    214214    CDataPacketPtr packet(new CDataPacket); 
  • XIOS/dev/dev_trunk_omp/src/filter/spatial_transform_filter.hpp

    r1681 r1685  
    121121       * \return the result of the grid transformation 
    122122       */ 
    123       CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0, int distance=1); 
    124       bool buildGraph(std::vector<CDataPacketPtr> data, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0, int distance=1); 
     123      CDataPacketPtr applyFilter(std::vector<CDataPacketPtr> data, double defaultValue = 0, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 
     124      bool buildGraph(std::vector<CDataPacketPtr> data, int tag=0, Time start_graph=0, Time end_graph=-1, CField *field=0); 
    125125 
    126126       /*! 
  • XIOS/dev/dev_trunk_omp/src/filter/store_filter.cpp

    r1681 r1685  
    100100      CWorkflowGraph::allocNodeEdge(); 
    101101  
    102       CWorkflowGraph::addNode(this->filterID, "Store Filter", 7, 1, 1, data[0]); 
     102      CWorkflowGraph::addNode(this->filterID, "Store Filter", 7, 0, 1, data[0]); 
    103103      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].distance = ++(data[0]->distance); 
    104104      (*CWorkflowGraph::mapFilters_ptr_with_info)[this->filterID].attributes = this->field->record4graphXiosAttributes(); 
  • XIOS/dev/dev_trunk_omp/src/filter/temporal_filter.cpp

    r1681 r1685  
    139139          packet->src_filterID=this->filterID; 
    140140          packet->distance = data[0]->distance+1; 
     141          std::cout<<"temporal packet->distance = "<<packet->distance<<std::endl; 
    141142          this->filterIDoutputs.clear(); 
    142143          CWorkflowGraph::build_begin=true; 
  • XIOS/dev/dev_trunk_omp/src/node/field.cpp

    r1681 r1685  
    13191319           storeFilter->end_graph = filter_end; 
    13201320           storeFilter->field = this; 
    1321            storeFilter->distance = instantDataFilter->getDistance()+1; 
     1321           storeFilter->distance = instantDataFilter->distance+1; 
    13221322         } 
    13231323 
     
    13341334           fileWriterFilter->start_graph = filter_start; 
    13351335           fileWriterFilter->end_graph = filter_end; 
    1336            fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)->getDistance()+1; 
     1336           fileWriterFilter->distance = getTemporalDataFilter(gc, file->output_freq)->distance+1; 
    13371337 
    13381338           // std::cout<<"CFileWriterFilter filter start = "<<filter_start<<" end = "<<filter_end<<" field = "<<this->getId()<<std::endl; 
     
    15601560 
    15611561       const bool detectMissingValues = (!detect_missing_value.isEmpty()  && detect_missing_value == true); 
    1562        std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, CContext::getCurrent()->getCalendar()->getInitDate(), 
    1563                                                                              freq_op, freq_offset, outFreq, 
    1564                                                                              detectMissingValues)); 
     1562       std::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 
     1563                                                                             CContext::getCurrent()->getCalendar()->getInitDate(), 
     1564                                                                             freq_op, freq_offset, outFreq, detectMissingValues)); 
    15651565 
    15661566       instantDataFilter->connectOutput(temporalFilter, 0); 
  • XIOS/dev/dev_trunk_omp/src/node/field_impl.hpp

    r1681 r1685  
    2323      if (check_if_active.isEmpty() || (!check_if_active.isEmpty() && (!check_if_active) || isActive(true))) 
    2424        clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 
    25         // clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data, this->getId()); 
    2625    } 
    2726    else if (instantDataFilter) 
Note: See TracChangeset for help on using the changeset viewer.