Commit ec6e903
chore(pt): Change the type of
Fix #4366.
* Update the type of `do_message_passing` to `bool` in the `DeepPotPT`
class and `init` method in `source/api_cc/include/DeepPotPT.h` and
`source/api_cc/src/DeepPotPT.cc`
* Update the type of `do_message_passing` to `bool` in the `DeepSpinPT`
class and `init` method in `source/api_cc/include/DeepSpinPT.h` and
`source/api_cc/src/DeepSpinPT.cc`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced error handling for exceptions from the PyTorch library in
both `DeepPotPT` and `DeepSpinPT` classes.
- Simplified boolean checks for message passing in the `compute` methods
of both classes.
- **Bug Fixes**
- Improved robustness in the `DeepPotPT` constructor to prevent resource
leaks during initialization.
- **Documentation**
- Updated method signatures to reflect changes in parameter types and
structures.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>do_message_passing from int to bool in DeepPotPT and DeepSpinPT classes (#4391)1 parent dbf450f commit ec6e903
File tree
4 files changed
+6
-6
lines changed- source/api_cc
- include
- src
4 files changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| |||
0 commit comments