提交 09d669ba 编写于 作者: H heqiaozhi

fix static_cast to const_cast

上级 d94f4235
...@@ -138,7 +138,7 @@ nv_test(op_registry_test SRCS op_registry_test.cc DEPS op_registry) ...@@ -138,7 +138,7 @@ nv_test(op_registry_test SRCS op_registry_test.cc DEPS op_registry)
py_proto_compile(framework_py_proto SRCS framework.proto data_feed.proto) py_proto_compile(framework_py_proto SRCS framework.proto data_feed.proto)
#Generate an empty \ #Generate an empty \
__init__.py to make framework_py_proto as a valid python module. #__init__.py to make framework_py_proto as a valid python module.
add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py) add_custom_target(framework_py_proto_init ALL COMMAND ${CMAKE_COMMAND} -E touch __init__.py)
add_dependencies(framework_py_proto framework_py_proto_init) add_dependencies(framework_py_proto framework_py_proto_init)
if (NOT WIN32) if (NOT WIN32)
......
...@@ -81,9 +81,8 @@ void AsyncExecutor::InitWorker(const std::string& dist_desc, ...@@ -81,9 +81,8 @@ void AsyncExecutor::InitWorker(const std::string& dist_desc,
int node_num, int index) { int node_num, int index) {
_pslib_ptr = std::shared_ptr<paddle::distributed::PSlib>( _pslib_ptr = std::shared_ptr<paddle::distributed::PSlib>(
new paddle::distributed::PSlib()); new paddle::distributed::PSlib());
_pslib_ptr->init_worker(dist_desc, _pslib_ptr->init_worker(
static_cast<uint64_t*>(host_sign_list.data()), dist_desc, const_cast<uint64_t*>(host_sign_list.data()), node_num, index);
node_num, index);
InitParamConfig(); InitParamConfig();
} }
...@@ -94,7 +93,7 @@ void AsyncExecutor::StopServer() { _pslib_ptr->stop_server(); } ...@@ -94,7 +93,7 @@ void AsyncExecutor::StopServer() { _pslib_ptr->stop_server(); }
void AsyncExecutor::GatherServers(const std::vector<uint64_t>& host_sign_list, void AsyncExecutor::GatherServers(const std::vector<uint64_t>& host_sign_list,
int node_num) { int node_num) {
_pslib_ptr->gather_servers(static_cast<uint64_t*>(host_sign_list.data()), _pslib_ptr->gather_servers(const_cast<uint64_t*>(host_sign_list.data()),
node_num); node_num);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册