未验证 提交 4dda54aa 编写于 作者: G gongweibao 提交者: GitHub

Fix unlikely (#11537)

上级 d7345959
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
* big. * big.
*/ */
#pragma once
#include "paddle/fluid/framework/program_desc.h" #include "paddle/fluid/framework/program_desc.h"
#include "paddle/fluid/inference/analysis/data_flow_graph.h" #include "paddle/fluid/inference/analysis/data_flow_graph.h"
...@@ -43,7 +45,7 @@ struct Argument { ...@@ -43,7 +45,7 @@ struct Argument {
#define UNLIKELY(condition) __builtin_expect(static_cast<bool>(condition), 0) #define UNLIKELY(condition) __builtin_expect(static_cast<bool>(condition), 0)
#define ANALYSIS_ARGUMENT_CHECK_FIELD(field__) \ #define ANALYSIS_ARGUMENT_CHECK_FIELD(field__) \
if (!UNLIKELY(field__)) { \ if (UNLIKELY(!(field__))) { \
LOG(ERROR) << "field " << #field__ << " should be set."; \ LOG(ERROR) << "field " << #field__ << " should be set."; \
return false; \ return false; \
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册