提交 44b74de1 编写于 作者: D dolphin8

clang-format fix style

上级 6bf7b5a0
...@@ -346,24 +346,24 @@ std::shared_ptr<framework::Tensor> Executor<Dtype, P>::Predict( ...@@ -346,24 +346,24 @@ std::shared_ptr<framework::Tensor> Executor<Dtype, P>::Predict(
for (int j = 0; j < ops_of_block_[*to_predict_block.get()].size(); ++j) { for (int j = 0; j < ops_of_block_[*to_predict_block.get()].size(); ++j) {
auto op = ops_of_block_[*to_predict_block.get()][j]; auto op = ops_of_block_[*to_predict_block.get()][j];
#ifdef PADDLE_MOBILE_PROFILE #ifdef PADDLE_MOBILE_PROFILE
_profile[op->Type()] = clock(); _profile[op->Type()] = clock();
#endif #endif
op->Run(); op->Run();
#ifdef PADDLE_MOBILE_PROFILE #ifdef PADDLE_MOBILE_PROFILE
_profile[op->Type()] = clock() - _profile[op->Type()]; _profile[op->Type()] = clock() - _profile[op->Type()];
#endif #endif
} }
#ifdef PADDLE_MOBILE_PROFILE #ifdef PADDLE_MOBILE_PROFILE
{ {
DLOG << "========================[ profile ]=========================="; DLOG << "========================[ profile ]==========================";
clock_t _ptotal = 0; clock_t _ptotal = 0;
for (auto const & p : _profile) { for (auto const &p : _profile) {
_ptotal += p.second; _ptotal += p.second;
} }
for (auto const & p : _profile) { for (auto const &p : _profile) {
DLOG << p.first << std::string(16-p.first.size(), ' ') DLOG << p.first << std::string(16 - p.first.size(), ' ') << "\t"
<< "\t" << (float)p.second << (float)p.second << "\t\t"
<< "\t\t" << (float)p.second / (float)_ptotal * 100.0; << (float)p.second / (float)_ptotal * 100.0;
} }
DLOG << "========================[ ]=========================="; DLOG << "========================[ ]==========================";
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册