-
Notifications
You must be signed in to change notification settings - Fork 4
Parallelize evolve function
#284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 2d7c0bb.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
- Coverage 91.51% 91.39% -0.12%
==========================================
Files 38 38
Lines 5223 5244 +21
Branches 455 459 +4
==========================================
+ Hits 4780 4793 +13
- Misses 443 451 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| std::unordered_map<Id, std::array<long, 4>> m_turnMapping; | ||
| std::unordered_map<Id, double> m_streetTails; | ||
| std::vector<std::pair<double, double>> m_travelDTs; | ||
| tbb::concurrent_vector<std::pair<double, double>> m_travelDTs; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| const TContainer& src_weights, | ||
| const TContainer& dst_weights, | ||
| const size_t minNodeDistance = 0); | ||
| const std::variant<std::monostate, size_t, double> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| sum = 0.; | ||
| for (const auto& [id, weight] : dst_weights) { | ||
| // if the node is at a minimum distance from the destination, skip it | ||
| if (this->itineraries().at(id)->path()->getRow(srcId).empty()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| Logger::debug( | ||
| std::format("Skipping node {} because the distance from the source " | ||
| "is less than {}", | ||
| id, |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| } | ||
| } | ||
|
|
||
| template <typename delay_t> |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
| if (nLanes == 1) { | ||
| pStreet->enqueue(0); | ||
| continue; | ||
| } |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
| if (!pStreet->isSpire()) { | ||
| continue; | ||
| } | ||
| auto& spire = dynamic_cast<SpireStreet&>(*pStreet); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| continue; | ||
| } | ||
| auto& spire = dynamic_cast<SpireStreet&>(*pStreet); | ||
| file << separator << spire.code(); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 13.1 rule Note
| } | ||
| m_travelDTs.clear(); | ||
| file.close(); | ||
| } |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.3 rule Note
| 0.0, // Initial value (double) | ||
| std::plus<double>(), // Reduction function (addition) | ||
| [](const TrafficLightCycle& cycle) -> double { | ||
| return static_cast<double>(cycle.greenTime()); |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 15.5 rule Note
evolvefunction #223