Skip to content
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

Open
wants to merge 83 commits into
base: main
Choose a base branch
from

Conversation

Grufoony
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 97.77778% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.69%. Comparing base (03a0785) to head (ea79a82).

Files with missing lines Patch % Lines
src/dsm/headers/RoadDynamics.hpp 96.87% 1 Missing ⚠️
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     
Flag Coverage Δ
unittests 90.69% <97.77%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20).
Copy link

@github-advanced-security github-advanced-security bot left a 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.

@Grufoony Grufoony marked this pull request as ready for review February 17, 2025 09:29
@@ -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

MISRA 14.4 rule
@@ -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

MISRA 12.3 rule
}
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

MISRA 14.4 rule
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

MISRA 13.1 rule
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

MISRA 12.1 rule
}
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

MISRA 13.1 rule
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

MISRA 14.4 rule
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant