#ifndef __LOCAL_VIEW_HPP__ #define __LOCAL_VIEW_HPP__ #include "xios_spl.hpp" #include "array_new.hpp" #include "distributed_view.hpp" #include "context_client.hpp" namespace xios { class CLocalElement ; class CRemoteConnector ; class CGridTransformConnector; class CLocalView : public CDistributedView, public std::enable_shared_from_this { public: CLocalView(shared_ptr parent, CElementView::type type, const CArray& indexView) ; CLocalView(shared_ptr parent, CElementView::type type, const CArray& maskView) ; const CArray& getIndex(void) { return index_ ;} const CArray& getGlobalIndex(void) { return globalIndex_ ;} void getGlobalIndexView(CArray& globalIndexView) { globalIndexView.resize(size_) ; int pos=0 ; for(int i=0 ; i=0 && index_(i)& globalIndex, size_t sliceIndex, size_t* sliceSize, shared_ptr* localView, int pos) { if (pos==0) { for(int i=0;i=0 && index_(i)=0 && index_(i)getGlobalIndex(globalIndex, sliceIndex + globalIndex_(index_(i))*sliceSize[pos], sliceSize, localView, pos-1) ; } } void createWithoutRedundancyFullViewConnector( int globalSize, MPI_Comm comm_file, shared_ptr& gridTransformConnector, CArray& globalIndex ); int getLocalSize(void) {return localSize_ ;} int getSize(void) {return size_;} void sendRemoteElement(shared_ptr connector, CContextClient* client, CEventClient& event, const CMessage& messageHeader) ; CArray& globalIndex_ ; CArray& index_ ; int& size_ ; /** The number of index composing the view, ie the size of the corresponding data, ie the size of index_ */ int& localRank_ ; int& localSize_ ; /** The local size of the element, ie the size of globalIndex_ */ } ; } #endif