Conversation
…h _ followed by upper case
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #726 +/- ##
==========================================
+ Coverage 32.35% 35.34% +2.99%
==========================================
Files 215 215
Lines 36363 33014 -3349
Branches 14597 13136 -1461
==========================================
- Hits 11764 11670 -94
+ Misses 22659 19430 -3229
+ Partials 1940 1914 -26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
src/linalg/Lanczos_Exp.cpp
Outdated
| UniTensor _invert_biCGSTAB(LinOp *Hop, const UniTensor &b, const UniTensor &Tin, const int &k, | ||
| const double &CvgCrit = 1.0e-12, | ||
| const unsigned int &Maxiter = 10000) { | ||
| static UniTensor invert_biCGSTAB_internal(LinOp *Hop, const UniTensor &b, const UniTensor &Tin, |
There was a problem hiding this comment.
Using unnamed namespace for internal linkage is a preferred style in modern C++.
Example: https://google.github.io/styleguide/cppguide.html#Internal_Linkage
There was a problem hiding this comment.
The internal functions should have access to the namespace cytnx, though. It seems there is no good solution with namespaces for this - if I put an unnamed namespace within the cytnx namespace, then the code is not hidden but visible everywhere in cytnx. Static functions seem the better solution here.
There was a problem hiding this comment.
It would only be visible if the unnamed namespace was in a header that was included elsewhere.
|
|
||
| //_Lanczos_Exp_Ut_positive(out, Hop, v0, _cvgcrit, Maxiter, verbose); | ||
| _Lanczos_Exp_Ut(out, Hop, v0, tau, _cvgcrit, Maxiter, verbose); | ||
| // Lanczos_Exp_Ut_internal_positive(out, Hop, v0, _cvgcrit, Maxiter, verbose); |
b274030 to
8642e78
Compare
|
BTW, if you are modifying all function names in the file, you can just use PascalCase which is requested in the coding style. |
I see that the google style sheet suggests this. However, the current API uses snake_style for all functions, and it would not make sense to change the whole API for this. To me, it makes more sense to stick to this style which is already fixed by the API, instead of mixing with google's style convention. |
Avoids function names starting with _ followed by upper case