void SvnDiffJob::start() { disconnect( m_job, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(internalJobDone(ThreadWeaver::Job*)) ); if( !m_job->source().isValid() || ( !m_job->destination().isValid() && ( m_job->srcRevision().revisionType() == KDevelop::VcsRevision::Invalid || m_job->dstRevision().revisionType() == KDevelop::VcsRevision::Invalid ) ) ) { internalJobFailed( m_job ); setErrorText( i18n( "Not enough information given to execute diff" ) ); }else { connect( m_job, SIGNAL(gotDiff(QString)), this, SLOT(setDiff(QString)), Qt::QueuedConnection ); ThreadWeaver::Weaver::instance()->enqueue( m_job ); } }
int LightingDlg::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = LightingBase::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: setDistance((*reinterpret_cast< int(*)>(_a[1]))); break; case 1: setEmission((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: setDiff((*reinterpret_cast< int(*)>(_a[1]))); break; case 3: setSpec((*reinterpret_cast< int(*)>(_a[1]))); break; case 4: setShin((*reinterpret_cast< int(*)>(_a[1]))); break; case 5: reset(); break; case 6: setRotation((*reinterpret_cast< double(*)>(_a[1])),(*reinterpret_cast< double(*)>(_a[2])),(*reinterpret_cast< double(*)>(_a[3]))); break; default: ; } _id -= 7; } return _id; }
void OsuUISongBrowserInfoLabel::setFromMissingBeatmap(long beatmapId) { m_iBeatmapId = beatmapId; setArtist(m_iBeatmapId > 0 ? "CLICK HERE TO DOWNLOAD" : "MISSING BEATMAP!"); setTitle(""); setDiff("no map"); setMapper("MISSING BEATMAP!"); setLengthMS(0); setBPM(0, 0); setNumObjects(0); setCS(0); setAR(0); setOD(0); setHP(0); setStars(0); setLocalOffset(0); setOnlineOffset(0); }
void OsuUISongBrowserInfoLabel::setFromBeatmap(OsuBeatmap *beatmap, OsuBeatmapDifficulty *diff) { m_iBeatmapId = diff->beatmapId; setArtist(diff->artist); setTitle(diff->title); setDiff(diff->name); setMapper(diff->creator); setLengthMS(beatmap->getLength()); setBPM(diff->minBPM, diff->maxBPM); setNumObjects(diff->numObjects); setCS(diff->CS); setAR(diff->AR); setOD(diff->OD); setHP(diff->HP); setStars(diff->starsNoMod); setLocalOffset(diff->localoffset); setOnlineOffset(diff->onlineOffset); }
inline unsigned int FMPWPartTmpl<GainTmpl>:: doPartitionInternal(vector<unsigned char>& part) { typedef FMPartTmpl<FMBiPartCore, GainTmpl> PWPartMgrType; typedef FMPartTmpl4<FMKWayPartCore4, FMKWayGainMgr2> RefineType; unsigned int cost1 = _initCost; unsigned int cost = _initCost; RefineType rfMgr(getParam()); rfMgr.setBalanceTol(getBalanceTol()); rfMgr.setPValue(1); rfMgr.setQValue(10); rfMgr.setVerbosity(getVerbosity()); rfMgr.setBoundType(getBoundType()); rfMgr.noNeedSetHighFanoutNets(); while (1) { initGrouping2(); getNetlist().pairWisePhase1(part, _groupMap, _sGVec); //xxx int cost3 = cost; cost = cost1; for (unsigned int j=0; j<_numGroups; ++j) { const FMParam param(*_sGVec[j]); PWPartMgrType PWMgr(param); //xxx PWMgr.setBalanceTol(getBalanceTol()); PWMgr.setUpperBound(getUpperBound()); PWMgr.setLowerBound(getLowerBound()); // PWMgr.setPValue(_pvalue); // PWMgr.setQValue(_qvalue); PWMgr.setVerbosity(getVerbosity()); //xxx PWMgr.setBoundType(getBoundType()); PWMgr.noNeedSetHighFanoutNets(); PWMgr.setNoInit(cost); vector<unsigned char> pw_part; projectUp(part, pw_part, j); // cost = PWMgr.doPartitionOne(pw_part); boost::array<int, 64>& diff = getDiff(); const unsigned int part0 = _groupInvMap[j]; const unsigned int part1 = _moveTo[part0]; int diff2[2]; diff2[0] = diff[part0]; diff2[1] = diff[part1]; PWMgr.setDiff(diff2); cost = PWMgr.doPartitionOne4(pw_part); // PWMgr.doPartition(pw_part, 1); // cost = PWMgr.getBestCost(); projectDown(part, pw_part, j); int* diff3 = PWMgr.getDiff(); diff[part0] = diff3[0]; diff[part1] = diff3[1]; delete _sGVec[j]; } // printDiff(); // std::cout << "cost = " << cost << std::endl; assert(cost == getNetlist().cutCost(part, getNumPartitions())); //xxx initDiff(part); rfMgr.setNoInit(cost); // only refine the solution rfMgr.setDiff(getDiff()); cost1 = rfMgr.doPartitionOne4(part); // rfMgr.doPartition(part, 1); // cost1 = rfMgr.getBestCost(); assert(cost1 == getNetlist().cutCost(part, getNumPartitions())); setDiff(rfMgr.getDiff()); // printDiff(); // std::cout << "cost1 = " << cost1 << std::endl; if (cost1 >= cost) break; } return cost1; }