Ignore:
Timestamp:
09/10/20 13:51:02 (4 years ago)
Author:
ymipsl
Message:

Big update on on going work related to data distribution and transfer between clients and servers.
Revisite of the source and store filter using "connectors".

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/distributed_view.hpp

    r1918 r1930  
    1515 
    1616      CDistributedView(CDistributedElement* parent, CElementView::type type, const std::map<int,CArray<int,1>>& indexView) ; 
     17      CDistributedView(CDistributedElement* parent, CElementView::type type, const std::map<int,CArray<bool,1>>& maskView) ; 
    1718       
    1819      std::map<int,CArray<int,1>>&  getIndex(void) { return index_ ;} 
     
    2122      std::map<int, int>& getLocalSize(void) { return localSize_ ;} 
    2223      size_t getGlobalSize(void) { return globalSize_ ;} 
     24 
     25      void getGlobalIndexView(map<int,CArray<size_t,1>>& globalIndexView) 
     26      { 
     27        for(auto& it : globalIndex_) 
     28        { 
     29          int rank=it.first ; 
     30          auto& globalIndex = it.second; 
     31          auto& globalIndView = globalIndexView[rank] ; 
     32          auto& index = index_[rank] ; 
     33          auto& size = size_[rank] ; 
     34          auto& localSize = localSize_[rank] ; 
     35          globalIndView.resize(size) ; 
     36          int pos=0 ; 
     37          for(int i=0 ; i<size ; i++) 
     38          { 
     39            if (index(i)>=0 && index(i)<localSize)  
     40            { 
     41              globalIndView(i) = globalIndex(index(i)) ; 
     42              pos++ ; 
     43            } 
     44          } 
     45          globalIndView.resizeAndPreserve(pos) ; 
     46      } 
     47    }    
    2348 
    2449      void getGlobalIndex(int rank, vector<size_t>& globalIndex, size_t sliceIndex, size_t* sliceSize, CDistributedView** view, int pos) 
Note: See TracChangeset for help on using the changeset viewer.