-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
do what the linter says (has already fixed a potential bug with the d…
…evice and scalar type maps in torch-tensor.cpp
- Loading branch information
Showing
11 changed files
with
132 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#pragma once | ||
|
||
#include <math.h> | ||
#include <cmath> | ||
|
||
#include <any> | ||
#include <complex> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
57a6e7a
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.
Cpp-Linter Report⚠️
Some files did not pass the configured checks!
clang-tidy reports: 128 concern(s)
tests/barger-propagator.hpp:6:10: error: [clang-diagnostic-error]
tests/barger-propagator.hpp:38:5: warning: [readability-const-return-type]
tests/barger-propagator.hpp:38:24: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:38:24: warning: [readability-make-member-function-const]
tests/barger-propagator.hpp:44:5: warning: [readability-const-return-type]
tests/barger-propagator.hpp:44:24: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:50:18: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:52:15: warning: [cppcoreguidelines-init-variables]
tests/barger-propagator.hpp:67:18: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:69:15: warning: [cppcoreguidelines-init-variables]
tests/barger-propagator.hpp:85:18: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:99:15: warning: [cppcoreguidelines-init-variables]
float ret; ^ = NAN
tests/barger-propagator.hpp:104:9: warning: [bugprone-branch-clone]
tests/barger-propagator.hpp:131:18: warning: [modernize-use-trailing-return-type]
tests/barger-propagator.hpp:144:15: warning: [cppcoreguidelines-init-variables]
tests/test-utils.hpp:14:7: warning: [modernize-use-trailing-return-type]
tests/test-utils.hpp:28:9: warning: [cppcoreguidelines-macro-usage]
tests/test-utils.hpp:30:57: warning: [bugprone-macro-parentheses]
if (Testing::relativeDiff(value, expectation) > threshold) \ ^ ( )
tests/test-utils.hpp:32:36: warning: [bugprone-macro-parentheses]
std::cerr << "bad " << varName << std::endl; \ ^ ( )
tests/test-utils.hpp:33:37: warning: [bugprone-macro-parentheses]
std::cerr << "Got: " << value; \ ^ ( )
tests/test-utils.hpp:34:44: warning: [bugprone-macro-parentheses]
std::cerr << "; Expected: " << expectation; \ ^ ( )
nuTens/logging.hpp:12:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:13:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:14:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:15:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:16:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:17:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:21:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:41:10: error: [clang-diagnostic-error]
nuTens/logging.hpp:67:23: warning: [cppcoreguidelines-avoid-non-const-global-variables]
static std::once_flag once; ^
nuTens/logging.hpp:84:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:92:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:100:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:108:9: warning: [cppcoreguidelines-macro-usage]
nuTens/logging.hpp:116:9: warning: [cppcoreguidelines-macro-usage]
nuTens/nuTens-pch.hpp:9:10: error: [clang-diagnostic-error]
nuTens/tensors/tensor.hpp:7:10: error: [clang-diagnostic-error]
nuTens/tensors/tensor.hpp:40:5: warning: [modernize-use-using]
nuTens/tensors/tensor.hpp:49:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:54:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:60:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:65:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:73:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:75:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:77:13: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:89:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:94:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:99:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:104:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:109:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:113:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:117:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:123:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:128:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:132:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:189:10: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:190:10: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:191:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:192:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:193:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:197:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:199:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:202:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:204:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:206:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:210:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:213:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:224:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:233:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:237:19: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:243:26: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:249:17: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:255:19: warning: [readability-avoid-const-params-in-decls]
nuTens/tensors/tensor.hpp:261:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:261:21: warning: [readability-avoid-const-params-in-decls]
nuTens/tensors/tensor.hpp:264:12: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:267:9: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:270:22: warning: [modernize-use-trailing-return-type]
nuTens/tensors/tensor.hpp:295:24: warning: [modernize-use-trailing-return-type]
nuTens/propagator/base-matter-solver.hpp:3:10: error: [clang-diagnostic-error]
nuTens/propagator/propagator.hpp:4:10: error: [clang-diagnostic-error]
nuTens/propagator/propagator.hpp:30:5: warning: [cppcoreguidelines-pro-type-member-init]
nuTens/propagator/propagator.hpp:34:12: warning: [modernize-use-trailing-return-type]
nuTens/propagator/propagator.hpp:98:12: warning: [modernize-use-trailing-return-type]
nuTens/propagator/propagator.hpp:100:3: warning: [readability-redundant-access-specifiers]
nuTens/propagator/propagator.hpp:101:12: warning: [bugprone-reserved-identifier]
nuTens/propagator/const-density-solver.hpp:3:10: error: [clang-diagnostic-error]
nuTens/propagator/const-density-solver.hpp:35:5: warning: [cppcoreguidelines-pro-type-member-init]
nuTens/propagator/const-density-solver.hpp:57:17: warning: [readability-make-member-function-const]
tests/two-flavour-const-matter.cpp:1:10: error: [clang-diagnostic-error]
tests/two-flavour-const-matter.cpp:7:5: warning: [modernize-use-trailing-return-type]
tests/two-flavour-const-matter.cpp:15:12: warning: [cppcoreguidelines-init-variables]
Tensor masses; ^ = 0
tests/two-flavour-const-matter.cpp:21:12: warning: [cppcoreguidelines-init-variables]
Tensor energies; ^ = 0
tests/two-flavour-const-matter.cpp:28:30: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-const-matter.cpp:32:22: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-const-matter.cpp:38:15: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-const-matter.cpp:43:16: warning: [cppcoreguidelines-init-variables]
Tensor PMNS; ^ = 0
tests/two-flavour-const-matter.cpp:54:16: warning: [cppcoreguidelines-init-variables]
Tensor eigenVals; ^ = 0
tests/two-flavour-const-matter.cpp:55:16: warning: [cppcoreguidelines-init-variables]
Tensor eigenVecs; ^ = 0
tests/two-flavour-const-matter.cpp:66:15: warning: [cppcoreguidelines-init-variables]
tests/barger.cpp:2:10: error: [clang-diagnostic-error]
tests/barger.cpp:9:5: warning: [modernize-use-trailing-return-type]
tests/barger.cpp:13:22: warning: [cppcoreguidelines-init-variables]
tests/tensor-basic.cpp:2:10: error: [clang-diagnostic-error]
tests/tensor-basic.cpp:10:5: warning: [modernize-use-trailing-return-type]
tests/tensor-basic.cpp:16:12: warning: [cppcoreguidelines-init-variables]
Tensor tensorFloat; ^ = 0
tests/tensor-basic.cpp:33:12: warning: [cppcoreguidelines-init-variables]
Tensor realSquared = Tensor::matmul(tensorFloat, tensorFloat); ^ = 0
tests/tensor-basic.cpp:40:12: warning: [cppcoreguidelines-init-variables]
Tensor tensorComplex; ^ = 0
tests/tensor-basic.cpp:69:12: warning: [cppcoreguidelines-init-variables]
Tensor imagSquared = Tensor::matmul(tensorComplex, tensorComplex); ^ = 0
tests/tensor-basic.cpp:84:12: warning: [cppcoreguidelines-init-variables]
Tensor ones; ^ = 0
tests/tensor-basic.cpp:86:12: warning: [cppcoreguidelines-init-variables]
Tensor twos = ones + ones; ^ = 0
tests/tensor-basic.cpp:103:12: warning: [cppcoreguidelines-init-variables]
Tensor ones_scaleTest; ^ = 0
tests/tensor-basic.cpp:105:12: warning: [cppcoreguidelines-init-variables]
tests/tensor-basic.cpp:107:12: warning: [cppcoreguidelines-init-variables]
Tensor grad = ones_scaleTest.grad(); ^ = 0
tests/tensor-basic.cpp:120:12: warning: [cppcoreguidelines-init-variables]
Tensor complexGradTest; ^ = 0
tests/tensor-basic.cpp:128:12: warning: [cppcoreguidelines-init-variables]
Tensor complexGradSquared = Tensor::matmul(complexGradTest, complexGradTest).sum(); ^ = 0
tests/two-flavour-vacuum.cpp:1:10: error: [clang-diagnostic-error]
tests/two-flavour-vacuum.cpp:7:5: warning: [modernize-use-trailing-return-type]
tests/two-flavour-vacuum.cpp:14:12: warning: [cppcoreguidelines-init-variables]
Tensor masses; ^ = 0
tests/two-flavour-vacuum.cpp:20:12: warning: [cppcoreguidelines-init-variables]
Tensor energies; ^ = 0
tests/two-flavour-vacuum.cpp:25:16: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-vacuum.cpp:29:22: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-vacuum.cpp:35:15: warning: [cppcoreguidelines-init-variables]
tests/two-flavour-vacuum.cpp:40:16: warning: [cppcoreguidelines-init-variables]
Tensor PMNS; ^ = 0
tests/two-flavour-vacuum.cpp:50:16: warning: [cppcoreguidelines-init-variables]
Tensor probabilities = tensorPropagator.calculateProbs(energies); ^ = 0
nuTens/tensors/torch-tensor.cpp:2:10: error: [clang-diagnostic-error]
nuTens/propagator/propagator.cpp:1:10: error: [clang-diagnostic-error]
nuTens/propagator/const-density-solver.cpp:1:10: error: [clang-diagnostic-error]
Have any feedback or feature suggestions? Share it here.