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

Add .clang-format and apply to dimod/include/* #742

Merged
merged 3 commits into from
Nov 19, 2020

Conversation

arcondello
Copy link
Member

NamespaceIndentation: Inner

# Scaled by a factor of 2 such that the base indent is 4
AccessModifierOffset: -3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not -2?

Copy link
Member Author

@arcondello arcondello Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::pair<const_outvars_iterator, const_outvars_iterator>
neighborhood(variable_type u) const {
std::pair<const_outvars_iterator, const_outvars_iterator> neighborhood(
variable_type u) const {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it should be indented 8 spaces. Not sure is that due to ContinuationIndentWidth or ConstructorInitializerIndentWidth not scaled with IndentWidth in dwave-ocean-sdk#90.

size_type degree(variable_type v) const {
return adj[v].first.size();
}
size_type degree(variable_type v) const { return adj[v].first.size(); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not expect function folding like this. 😕

@arcondello
Copy link
Member Author

Ok, scaled the indent. @randomir , can you take another look? Figure it's better to iterate here than on dwavesystems/dwave-ocean-sdk#103

@codecov-io
Copy link

codecov-io commented Oct 29, 2020

Codecov Report

Merging #742 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #742   +/-   ##
=======================================
  Coverage   92.02%   92.02%           
=======================================
  Files          63       63           
  Lines        4567     4567           
=======================================
  Hits         4203     4203           
  Misses        364      364           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4941d23...b6bb5ae. Read the comment docs.

dense_diagonal[v] = dense[v * (num_variables + 1)];
dense[v * (num_variables + 1)] = 0;
if (!ignore_diagonal) {
#pragma omp parallel for
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoys me that it cannot handle #pragma omp parallel for etc. There are solutions but probably not common enough to require.

@arcondello arcondello merged commit 1978cfc into dwavesystems:master Nov 19, 2020
@arcondello arcondello deleted the clang-format branch November 19, 2020 21:12
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.

3 participants