// FIXME: move this to tree void BHTreeCZBuilder::sumCZcosts() { #ifdef SPHLATCH_MPI /// /// CZ cell list -> vector /// czllPtrListT::const_iterator CZlistCItr = treePtr->CZbottom.begin(); czllPtrListT::const_iterator CZlistEnd = treePtr->CZbottom.end(); size_t i = 0; while (CZlistCItr != CZlistEnd) { CZcosts[i] = (*CZlistCItr)->relCost; CZparts[i] = (*CZlistCItr)->noParts; i++; CZlistCItr++; } /// /// sum up vector /// CommManager.sum(CZcosts); CommManager.sumUpCounts(CZparts); /// /// vector -> CZ cell list /// czllPtrListT::iterator CZlistItr = treePtr->CZbottom.begin(); i = 0; while (CZlistItr != CZlistEnd) { (*CZlistItr)->relCost = CZcosts[i]; (*CZlistItr)->noParts = CZparts[i]; i++; CZlistItr++; } #endif /// /// make sure the costs of all CZ cells is added up /// goRoot(); sumCostRecursor(); goRoot(); }
void FileSystem::chmkdir(FSPath &path) { goRoot(); for (FSPath::iterator it = path.begin(); it != path.end(); it++) chmkdir(it->c_str()); }
/* ******************************************************************** * * public: jump to an item of this menu if exists * @param * item name (uint8) * @return * ******************************************************************** */ void LCDMenuLib::jumpToElement(uint8_t p_element) /* ******************************************************************** */ { // check if function is active if(function == p_element) { return; } Button_quit(); function = _LCDML_NO_FUNC; goRoot(); bitSet(control, _LCDML_control_disable_hidden); if(selectElementDirect(*rootMenu, p_element)) { //search element //open this element goEnter(); //Button_enter(); } bitClear(control, _LCDML_control_disable_hidden); bitClear(control, _LCDML_control_search_display); }