-
Notifications
You must be signed in to change notification settings - Fork 81
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
Conversation
NamespaceIndentation: Inner | ||
|
||
# Scaled by a factor of 2 such that the base indent is 4 | ||
AccessModifierOffset: -3 |
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.
Why not -2?
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.
dimod/include/dimod/adjvectorbqm.h
Outdated
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 { |
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.
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(); } |
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.
Did not expect function folding like this. 😕
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 Report
@@ 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.
|
dense_diagonal[v] = dense[v * (num_variables + 1)]; | ||
dense[v * (num_variables + 1)] = 0; | ||
if (!ignore_diagonal) { | ||
#pragma omp parallel for |
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.
Annoys me that it cannot handle #pragma omp parallel for
etc. There are solutions but probably not common enough to require.
See dwavesystems/dwave-ocean-sdk#90 and dwavesystems/dwave-ocean-sdk#103