/* * SumUpPerLevel.hpp * * Created on: Aug 27, 2012 * Author: heber */ #ifndef SUMUPPERLEVEL_HPP_ #define SUMUPPERLEVEL_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include "Fragmentation/Summation/Converter/DataConverter.hpp" #include "Fragmentation/Summation/AllLevelSummator.hpp" #include "Fragmentation/Summation/IndexSet.hpp" #include "Fragmentation/Summation/IndexSetContainer.hpp" #include "Fragmentation/Summation/Containers/MPQCData.hpp" #include template void SumUpPerLevel( const std::map &fragmentData, const std::map< JobId_t, size_t > &MatrixNrLookup, const IndexSetContainer::ptr &container, SubsetMap::ptr &subsetmap, std::vector &levelresults, std::map > &keysetresults ) { // place data into boost::fusion::map instance std::map Data_fused; convertDataTo(fragmentData, Data_fused); // instantiate summator levelresults.resize(subsetmap->getMaximumSetLevel()); AllLevelSummator Summer( subsetmap, Data_fused, container->getContainer(), MatrixNrLookup, levelresults, keysetresults); // sum up for each type key in TypeVector boost::mpl::for_each(boost::ref(Summer)); } #endif /* SUMUPPERLEVEL_HPP_ */