#include "weight_transform_connector.hpp" namespace xios { CWeightTransformConnector::CWeightTransformConnector(shared_ptr srcView, shared_ptr dstView, unordered_map>& indexMap, unordered_map>& weightMap, bool detectMissingValue, bool renormalize) : srcView_(srcView), dstView_(dstView), detectMissingValue_(detectMissingValue), renormalize_(renormalize) { computeConnector(indexMap, weightMap) ; } void CWeightTransformConnector::computeConnector(unordered_map>& indexMap, unordered_map>& weightMap) { CArray dstGlobalIndex ; CArray srcGlobalIndex ; dstView_->getGlobalIndexView(dstGlobalIndex) ; srcView_->getGlobalIndexView(srcGlobalIndex) ; unordered_map srcMapIndex ; srcSize_ = srcGlobalIndex.numElements() ; dstSize_ = dstGlobalIndex.numElements() ; for(int i=0;i