#ifndef __XIOS_ALGORITHM_TRANSFORMATION_REDUCE_HPP__ #define __XIOS_ALGORITHM_TRANSFORMATION_REDUCE_HPP__ #include "generic_algorithm_transformation.hpp" #include "array_new.hpp" #include "local_view.hpp" #include "transform_connector.hpp" #include "reduce_transform_connector.hpp" namespace xios { class CAlgorithmTransformationReduce : public CGenericAlgorithmTransformation { public: CAlgorithmTransformationReduce(bool isSource) : CGenericAlgorithmTransformation(isSource) {} virtual ~CAlgorithmTransformationReduce() {}; virtual void apply(int dimBefore, int dimAfter, const CArray& dataIn, CArray& dataOut); virtual void computeRecvElement(shared_ptr srcView, shared_ptr dstView) ; protected: virtual void computeAlgorithm(shared_ptr srcView, shared_ptr dstView) ; //! Map between global index of destination element and source element EReduction operator_ ; TransformationIndexMap transformationMapping_; shared_ptr reduceTransformConnector_ ; bool detectMissingValue_=true ; }; } #endif //__XIOS_ALGORITHM_TRANSFORMATION_REDUCE_HPP__