Add clang-tidy conf
This commit is contained in:
parent
f519003766
commit
48bfa02e1d
17
.clang-tidy
Normal file
17
.clang-tidy
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
Checks: '-*,
|
||||||
|
clang-*,
|
||||||
|
bugprone-*,
|
||||||
|
cppcoreguidelines-*,
|
||||||
|
modernize-*,
|
||||||
|
performance-*,
|
||||||
|
-cppcoreguidelines-pro-type-vararg,
|
||||||
|
-modernize-use-trailing-return-type,
|
||||||
|
-bugprone-exception-escape'
|
||||||
|
|
||||||
|
HeaderFilterRegex: 'src/*'
|
||||||
|
AnalyzeTemporaryDtors: false
|
||||||
|
WarningsAsErrors: ''
|
||||||
|
FormatStyle: file
|
||||||
|
FormatStyleOptions: ''
|
||||||
|
...
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -97,7 +97,8 @@
|
|||||||
"future": "cpp",
|
"future": "cpp",
|
||||||
"queue": "cpp",
|
"queue": "cpp",
|
||||||
"typeindex": "cpp",
|
"typeindex": "cpp",
|
||||||
"shared_mutex": "cpp"
|
"shared_mutex": "cpp",
|
||||||
|
"*.ipp": "cpp"
|
||||||
},
|
},
|
||||||
"cmake.configureOnOpen": false,
|
"cmake.configureOnOpen": false,
|
||||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
|
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
|
||||||
|
@ -23,7 +23,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}")
|
|||||||
|
|
||||||
# Options
|
# Options
|
||||||
# -------
|
# -------
|
||||||
option(ENABLE_CLANG_TIDY "Enable to add clang tidy." OFF)
|
option(ENABLE_CLANG_TIDY "Enable to add clang tidy." ON)
|
||||||
option(ENABLE_TESTING "Unit testing build" ON)
|
option(ENABLE_TESTING "Unit testing build" ON)
|
||||||
option(CODE_COVERAGE "Collect coverage from test library" ON)
|
option(CODE_COVERAGE "Collect coverage from test library" ON)
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@ namespace bayesnet {
|
|||||||
for (auto father : getParents()) {
|
for (auto father : getParents()) {
|
||||||
dimensions.push_back(father->getNumStates());
|
dimensions.push_back(father->getNumStates());
|
||||||
}
|
}
|
||||||
auto length = dimensions.size();
|
|
||||||
// Create a tensor of zeros with the dimensions of the CPT
|
// Create a tensor of zeros with the dimensions of the CPT
|
||||||
cpTable = torch::zeros(dimensions, torch::kFloat) + laplaceSmoothing;
|
cpTable = torch::zeros(dimensions, torch::kFloat) + laplaceSmoothing;
|
||||||
// Fill table with counts
|
// Fill table with counts
|
||||||
|
Loading…
Reference in New Issue
Block a user