From 639d78f860adf7fdc857c18d20ccd8c33e68de55 Mon Sep 17 00:00:00 2001 From: cc <52520497+juncaipeng@users.noreply.github.com> Date: Thu, 26 Mar 2020 10:37:31 +0800 Subject: [PATCH] Replace std::log2 with log2 for support gnustl, test=develop (#3276) --- lite/kernels/arm/distribute_fpn_proposals_compute.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lite/kernels/arm/distribute_fpn_proposals_compute.cc b/lite/kernels/arm/distribute_fpn_proposals_compute.cc index 0871a3e84b..3621c01a30 100644 --- a/lite/kernels/arm/distribute_fpn_proposals_compute.cc +++ b/lite/kernels/arm/distribute_fpn_proposals_compute.cc @@ -71,9 +71,9 @@ void DistributeFpnProposalsCompute::Run() { for (int j = 0; j < fpn_rois_slice.dims()[0]; ++j) { // get the target level of current rois float roi_scale = std::sqrt(BBoxArea(rois_data, false)); - int tgt_lvl = std::floor( - std::log2(roi_scale / refer_scale + static_cast(1e-6)) + - refer_level); + int tgt_lvl = + std::floor(log2(roi_scale / refer_scale + static_cast(1e-6)) + + refer_level); tgt_lvl = std::min(max_level, std::max(tgt_lvl, min_level)); target_level.push_back(tgt_lvl); num_rois_level[tgt_lvl - min_level]++; -- GitLab