diff --git a/source/api_cc/include/DeepPotPT.h b/source/api_cc/include/DeepPotPT.h index 4c9c81f8f9..c9da731cd4 100644 --- a/source/api_cc/include/DeepPotPT.h +++ b/source/api_cc/include/DeepPotPT.h @@ -34,7 +34,9 @@ class DeepPotPT : public DeepPotBase { * @param[in] file_content The content of the model file. If it is not empty, *DP will read from the string instead of the file. **/ - void init(const std::string& model, const int& gpu_rank = 0, const std::string& file_content = ""); + void init(const std::string& model, + const int& gpu_rank = 0, + const std::string& file_content = ""); private: /** diff --git a/source/api_cc/src/DeepPotPT.cc b/source/api_cc/src/DeepPotPT.cc index 7a1306bece..1aefc1b8d5 100644 --- a/source/api_cc/src/DeepPotPT.cc +++ b/source/api_cc/src/DeepPotPT.cc @@ -9,13 +9,15 @@ DeepPotPT::DeepPotPT(const std::string& model, const std::string& file_content) : inited(false) { try { - init(model, gpu_rank,file_content); + init(model, gpu_rank, file_content); } catch (...) { // Clean up and rethrow, as the destructor will not be called throw; } } -void DeepPotPT::init(const std::string& model, const int& gpu_rank, const std::string& file_content = "") { +void DeepPotPT::init(const std::string& model, + const int& gpu_rank, + const std::string& file_content = "") { if (inited) { std::cerr << "WARNING: deepmd-kit should not be initialized twice, do " "nothing at the second call of initializer"