diff --git a/core/predictor/framework/bsf.h b/core/predictor/framework/bsf.h old mode 100644 new mode 100755 index 3cf7e13ad573cc99f4a11cd4fb84e5974e78c80a..c32745fbe464c1b0b4271c286c5a23e65b1499b0 --- a/core/predictor/framework/bsf.h +++ b/core/predictor/framework/bsf.h @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -65,7 +64,7 @@ struct Task { typedef InItemT InType; typedef OutItemT OutType; typedef Task TaskT; - typedef std::vector ShapeVector; + typedef std::vector ShapeVector; typedef std::vector VectorOfShapeVector; typedef baidu::paddle_serving::predictor::MempoolWrapper MempoolWrapper; @@ -497,7 +496,7 @@ class BatchTasks { typedef typename TaskT::InType InType; typedef typename TaskT::OutType OutType; typedef TaskMeta TaskMetaT; - typedef std::vector ShapeVector; + typedef std::vector ShapeVector; typedef std::vector VectorOfShapeVector; typedef std::vector LodVector; typedef std::vector PaddleTensorLod; @@ -567,9 +566,9 @@ class BatchTasks { return 2; } - vector multiplies_1(vector_of_max_shape.size()); - vector multiplies_2(vector_of_max_shape.size()); - vector temp_multiplies(vector_of_max_shape.size()); + std::vector multiplies_1(vector_of_max_shape.size()); + std::vector multiplies_2(vector_of_max_shape.size()); + std::vector temp_multiplies(vector_of_max_shape.size()); VectorOfShapeVector temp_vector_max_shape(vector_of_max_shape.size()); for (size_t i = 0; i < vector_of_max_shape.size(); ++i) { if (vector_of_max_shape[i].size() != task_vector_shape[i].size()) @@ -590,8 +589,8 @@ class BatchTasks { task_vector_shape[i].end(), 1, std::multiplies()); - if ((abs(temp_multiplies[i] - multiplies_1[i]) <= ABSOLUTE_ERROR && - abs(temp_multiplies[i] - multiplies_2[i]) <= ABSOLUTE_ERROR) || + if ((labs(temp_multiplies[i] - multiplies_1[i]) <= ABSOLUTE_ERROR && + labs(temp_multiplies[i] - multiplies_2[i]) <= ABSOLUTE_ERROR) || (temp_multiplies[i] / multiplies_1[i] >= RELATIVE_ERROR && temp_multiplies[i] / multiplies_2[i] >= RELATIVE_ERROR)) { continue; @@ -698,7 +697,7 @@ class BatchTasks { // batch.merge_tasks() is thread-safe function // cause batch is a local variable and Task is just read, not written. - void copy_element_value(size_t) void merge_tasks() { + void merge_tasks() { if (_taskmeta_vector.size() <= 0) { return; } @@ -1396,7 +1395,7 @@ class TaskExecutor { typedef typename TaskT::OutVectorT OutVectorT; typedef std::vector TaskArrayT; typedef baidu::paddle_serving::predictor::MempoolWrapper MempoolWrapper; - typedef std::vector ShapeVector; + typedef std::vector ShapeVector; typedef std::vector VectorOfShapeVector; TaskExecutor()