| 608 | } |
| 609 | |
| 610 | void HEkkDual::majorUpdateFtranParallel() { |
| 611 | analysis->simplexTimerStart(FtranMixParClock); |
| 612 | |
| 613 | // Prepare buffers |
| 614 | HighsInt multi_ntasks = 0; |
| 615 | double multi_density[kSimplexConcurrencyLimit * 2 + 1]; |
| 616 | HVector_ptr multi_vector[kSimplexConcurrencyLimit * 2 + 1]; |
| 617 | // BFRT first |
| 618 | if (analysis->analyse_simplex_summary_data) |
| 619 | analysis->operationRecordBefore(kSimplexNlaFtranBfrt, col_BFRT.count, |
| 620 | ekk_instance_.info_.col_aq_density); |
| 621 | multi_density[multi_ntasks] = ekk_instance_.info_.col_aq_density; |
| 622 | multi_vector[multi_ntasks] = &col_BFRT; |
| 623 | multi_ntasks++; |
| 624 | if (edge_weight_mode == EdgeWeightMode::kSteepestEdge) { |
| 625 | // Then DSE |
| 626 | for (HighsInt iFn = 0; iFn < multi_nFinish; iFn++) { |
| 627 | if (analysis->analyse_simplex_summary_data) |
| 628 | analysis->operationRecordBefore(kSimplexNlaFtranDse, |
| 629 | multi_finish[iFn].row_ep->count, |
| 630 | ekk_instance_.info_.row_DSE_density); |
| 631 | multi_density[multi_ntasks] = ekk_instance_.info_.row_DSE_density; |
| 632 | multi_vector[multi_ntasks] = multi_finish[iFn].row_ep; |
| 633 | multi_ntasks++; |
| 634 | } |
| 635 | } |
| 636 | // Then Column |
| 637 | for (HighsInt iFn = 0; iFn < multi_nFinish; iFn++) { |
| 638 | if (analysis->analyse_simplex_summary_data) |
| 639 | analysis->operationRecordBefore(kSimplexNlaFtran, |
| 640 | multi_finish[iFn].col_aq->count, |
| 641 | ekk_instance_.info_.col_aq_density); |
| 642 | multi_density[multi_ntasks] = ekk_instance_.info_.col_aq_density; |
| 643 | multi_vector[multi_ntasks] = multi_finish[iFn].col_aq; |
| 644 | multi_ntasks++; |
| 645 | } |
| 646 | |
| 647 | // Perform FTRAN |
| 648 | // #pragma omp parallel for schedule(dynamic, 1) |
| 649 | // printf("majorUpdateFtranParallel: starting %d tasks\n", multi_ntasks); |
| 650 | highs::parallel::for_each(0, multi_ntasks, [&](HighsInt start, HighsInt end) { |
| 651 | for (HighsInt i = start; i < end; i++) { |
| 652 | HVector_ptr rhs = multi_vector[i]; |
| 653 | double density = multi_density[i]; |
| 654 | HighsTimerClock* factor_timer_clock_pointer = |
| 655 | analysis->getThreadFactorTimerClockPointer(); |
| 656 | ekk_instance_.simplex_nla_.ftran(*rhs, density, |
| 657 | factor_timer_clock_pointer); |
| 658 | } |
| 659 | }); |
| 660 | |
| 661 | // Update ticks |
| 662 | for (HighsInt iFn = 0; iFn < multi_nFinish; iFn++) { |
| 663 | MFinish* finish = &multi_finish[iFn]; |
| 664 | HVector* Col = finish->col_aq; |
| 665 | HVector* Row = finish->row_ep; |
| 666 | ekk_instance_.total_synthetic_tick_ += Col->synthetic_tick; |
| 667 | ekk_instance_.total_synthetic_tick_ += Row->synthetic_tick; |
nothing calls this directly
no test coverage detected