-
Notifications
You must be signed in to change notification settings - Fork 3
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
Evolve parallelization and I/O config from OSM files #267
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #267 +/- ##
==========================================
- Coverage 90.71% 90.69% -0.02%
==========================================
Files 35 35
Lines 4976 4987 +11
Branches 459 451 -8
==========================================
+ Hits 4514 4523 +9
- Misses 462 464 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
src/dsm/sources/AdjacencyMatrix.cpp
Outdated
inStream.read(reinterpret_cast<char*>(&m_nCols), sizeof(size_t)); | ||
m_rowOffsets.resize(m_nRows + 1); | ||
m_columnIndices.resize(m_nCols); | ||
inStream.read(reinterpret_cast<char*>(&m_n), sizeof(size_t)); |
Check warning
Code scanning / Flawfinder (reported by Codacy)
Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). Warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cppcheck (reported by Codacy) found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
@@ -546,7 +546,7 @@ | |||
|
|||
template <typename agent_t> | |||
Measurement<double> Dynamics<agent_t>::streetMeanDensity(bool normalized) const { | |||
if (m_graph.streetSet().size() == 0) { | |||
if (m_graph.streetSet().empty()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
@@ -50,12 +51,13 @@ | |||
std::optional<double> m_passageProbability; | |||
|
|||
protected: | |||
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
} | ||
tbb::parallel_for_each( | ||
this->m_graph.nodeSet().cbegin(), | ||
this->m_graph.nodeSet().cend(), |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
tbb::parallel_for_each( | ||
this->m_graph.nodeSet().cbegin(), | ||
this->m_graph.nodeSet().cend(), | ||
[&](const auto& pair) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 13.1 rule Note
this->m_graph.nodeSet().cend(), | ||
[&](const auto& pair) { | ||
for (auto const& sourceId : this->m_graph.adjMatrix().getCol(pair.first)) { | ||
auto const streetId = sourceId * N + pair.first; |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 12.1 rule Note
} | ||
tbb::parallel_for_each(this->m_graph.nodeSet().cbegin(), | ||
this->m_graph.nodeSet().cend(), | ||
[&](const auto& pair) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 13.1 rule Note
for (auto i = 0; i < pair.second->transportCapacity(); ++i) { | ||
this->m_evolveNode(pair.second); | ||
} | ||
if (pair.second->isTrafficLight()) { |
Check notice
Code scanning / Cppcheck (reported by Codacy)
MISRA 14.4 rule Note
No description provided.