File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
paddle/fluid/inference/api/demo_ci Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ limitations under the License. */
18
18
19
19
#include < gflags/gflags.h>
20
20
#include < glog/logging.h>
21
+
22
+ #include < algorithm>
21
23
#include < memory>
22
24
#include < thread> // NOLINT
23
25
#include " paddle/fluid/inference/paddle_inference_api.h"
@@ -67,7 +69,8 @@ void Main(bool use_gpu) {
67
69
0.000932706 };
68
70
const size_t num_elements = outputs.front ().data .length () / sizeof (float );
69
71
// The outputs' buffers are in CPU memory.
70
- for (size_t i = 0 ; i < std::min (5UL , num_elements); i++) {
72
+ for (size_t i = 0 ; i < std::min (static_cast <size_t >(5 ), num_elements);
73
+ i++) {
71
74
PADDLE_ENFORCE (static_cast <float *>(outputs.front ().data .data ())[i],
72
75
result[i]);
73
76
}
@@ -113,7 +116,8 @@ void MainThreads(int num_threads, bool use_gpu) {
113
116
const size_t num_elements =
114
117
outputs.front ().data .length () / sizeof (float );
115
118
// The outputs' buffers are in CPU memory.
116
- for (size_t i = 0 ; i < std::min (5UL , num_elements); i++) {
119
+ for (size_t i = 0 ; i < std::min (static_cast <size_t >(5 ), num_elements);
120
+ i++) {
117
121
PADDLE_ENFORCE (static_cast <float *>(outputs.front ().data .data ())[i],
118
122
result[i]);
119
123
}
You can’t perform that action at this time.
0 commit comments