You need to sign in or sign up before continuing.
未验证 提交 5ce57555 编写于 作者: A Abhinav Arora 提交者: GitHub

Fix CPPLint issues in init.cc, init.h and library_type.h (#10148)

* Fix CPPLint issues in init

* Fix compilation

* Fix typo in init.cc

* Fix CPPLint issues in library_type.h

* Fix compilation in init.h
上级 ba97194c
......@@ -15,6 +15,7 @@ limitations under the License. */
#include <algorithm>
#include <stdexcept>
#include <string>
#include <vector>
#include "paddle/fluid/framework/init.h"
#include "paddle/fluid/framework/operator.h"
......@@ -28,7 +29,7 @@ namespace framework {
std::once_flag gflags_init_flag;
std::once_flag p2p_init_flag;
void InitGflags(std::vector<std::string> &argv) {
void InitGflags(std::vector<std::string> argv) {
std::call_once(gflags_init_flag, [&]() {
int argc = argv.size();
char **arr = new char *[argv.size()];
......@@ -65,7 +66,7 @@ void InitP2P(int count) {
}
void InitDevices(bool init_p2p) {
/*Init all avaiable devices by default */
/*Init all available devices by default */
std::vector<platform::Place> places;
places.emplace_back(platform::CPUPlace());
......
......@@ -12,7 +12,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
#include <mutex>
#include <mutex> // NOLINT
#include <string>
#include <vector>
#include "gflags/gflags.h"
#include "glog/logging.h"
......@@ -20,7 +22,7 @@ limitations under the License. */
namespace paddle {
namespace framework {
void InitGflags(std::vector<std::string> &argv);
void InitGflags(std::vector<std::string> argv);
void InitGLOG(const std::string &prog_name);
......
......@@ -14,6 +14,7 @@ limitations under the License. */
#pragma once
#include <cctype>
#include <string>
namespace paddle {
namespace framework {
......@@ -67,5 +68,5 @@ inline std::ostream& operator<<(std::ostream& out, LibraryType l) {
return out;
}
} // namespace
} // framework
} // namespace framework
} // namespace paddle
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册