| 638 | } |
| 639 | |
| 640 | void HighsCutPool::syncCutPool(const HighsMipSolver& mipsolver, |
| 641 | HighsCutPool& syncpool) { |
| 642 | HighsInt cutIndexEnd = matrix_.getNumRows(); |
| 643 | std::vector<HighsInt> idxs; |
| 644 | std::vector<double> vals; |
| 645 | |
| 646 | for (HighsInt i = 0; i != cutIndexEnd; ++i) { |
| 647 | // Only sync cuts in the LP that are not already synced |
| 648 | if ((numLps_[i] > 0 || |
| 649 | ageResetWhileLocked_[i].load(std::memory_order_relaxed) == 1) && |
| 650 | !hasSynced_[i]) { |
| 651 | HighsInt Rlen; |
| 652 | const HighsInt* Rindex; |
| 653 | const double* Rvalue; |
| 654 | getCut(i, Rlen, Rindex, Rvalue); |
| 655 | // copy cut into something mutable (addCut reorders so can't take const) |
| 656 | idxs.assign(Rindex, Rindex + Rlen); |
| 657 | vals.assign(Rvalue, Rvalue + Rlen); |
| 658 | syncpool.addCut(mipsolver, idxs.data(), vals.data(), Rlen, rhs_[i], |
| 659 | rowintegral[i]); |
| 660 | hasSynced_[i] = true; |
| 661 | } |
| 662 | } |
| 663 | |
| 664 | assert((HighsInt)propRows.size() == numPropRows); |
| 665 | } |