From c093a2433600b7666fd8f46aca01f4d5e40b02f6 Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Wed, 14 Jun 2017 11:27:19 +0800 Subject: [PATCH] clang format check --- go/pserver/cclient/test/main.c | 9 ++++++--- go/pserver/cclient/test/test_cclient.c | 2 +- paddle/trainer/NewRemoteParameterUpdater.cpp | 3 +-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/go/pserver/cclient/test/main.c b/go/pserver/cclient/test/main.c index d052f4f5a..07e1b86b4 100644 --- a/go/pserver/cclient/test/main.c +++ b/go/pserver/cclient/test/main.c @@ -11,8 +11,10 @@ void sendGrads(paddle_pserver_client c) { unsigned char grad_a[2000] = {2}; unsigned char grad_b[3000] = {3}; - paddle_gradient grad1 = {"param_a", PADDLE_ELEMENT_TYPE_FLOAT32, grad_a, 2000}; - paddle_gradient grad2 = {"param_b", PADDLE_ELEMENT_TYPE_FLOAT32, grad_b, 3000}; + paddle_gradient grad1 = { + "param_a", PADDLE_ELEMENT_TYPE_FLOAT32, grad_a, 2000}; + paddle_gradient grad2 = { + "param_b", PADDLE_ELEMENT_TYPE_FLOAT32, grad_b, 3000}; paddle_gradient* grads[2] = {&grad1, &grad2}; if (paddle_send_grads(c, grads, 2)) { fail(); @@ -76,7 +78,8 @@ retry: } } - for (int i = 0; i < 100; i++) { + int i; + for (i = 0; i < 100; i++) { sendGrads(c); getParams(c); } diff --git a/go/pserver/cclient/test/test_cclient.c b/go/pserver/cclient/test/test_cclient.c index 6830479fe..0f9c2ef80 100644 --- a/go/pserver/cclient/test/test_cclient.c +++ b/go/pserver/cclient/test/test_cclient.c @@ -40,7 +40,7 @@ retry: real param_content1[] = {0.1, 0.2, 0.3}; real param_content2[] = {0.4, 0.5, 0.6}; paddle_parameter** params = - (paddle_parameter**)malloc(sizeof(paddle_parameter*) * 2); + (paddle_parameter**)malloc(sizeof(paddle_parameter*) * 2); params[0] = (paddle_parameter*)malloc(sizeof(paddle_parameter)); params[0]->name = names[0]; params[0]->content = (unsigned char*)param_content1; diff --git a/paddle/trainer/NewRemoteParameterUpdater.cpp b/paddle/trainer/NewRemoteParameterUpdater.cpp index 3d4d23afc..f25ce2f7f 100644 --- a/paddle/trainer/NewRemoteParameterUpdater.cpp +++ b/paddle/trainer/NewRemoteParameterUpdater.cpp @@ -60,8 +60,7 @@ void NewRemoteParameterUpdater::init( paddle_finish_init_params(parameterClient_); LOG(INFO) << "paddle_begin_init_params done"; } else { - paddle_get_params( - parameterClient_, newParameters_, parameterSize()); + paddle_get_params(parameterClient_, newParameters_, parameterSize()); } LOG(INFO) << "NewRemoteParameterUpdater initialized"; -- GitLab