From c2f95cc5bb8e33a9ad3a813e0fa3b9180d87f948 Mon Sep 17 00:00:00 2001 From: Rajeev Rao Date: Thu, 18 Mar 2021 22:29:54 -0700 Subject: [PATCH] Avoid arithmetic on void pointer in multilevelProposeROIPlugin.cpp #1028 Signed-off-by: Rajeev Rao --- plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp b/plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp index 4693d958..dda1486e 100644 --- a/plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp +++ b/plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp @@ -406,7 +406,7 @@ int MultilevelProposeROI::enqueue( static_cast(mImageSize.d[1]), // Input Height static_cast(mImageSize.d[2]), DataType::kFLOAT, // mType, - mParam, proposal_ws, workspace + kernel_workspace_offset, + mParam, proposal_ws, static_cast(workspace) + kernel_workspace_offset, inputs[2 * i + 1], // inputs[object_score], inputs[2 * i], // inputs[bbox_delta] mValidCnt->mPtr, @@ -419,7 +419,7 @@ int MultilevelProposeROI::enqueue( ConcatTopKWorkSpace ctopk_ws(batch_size, mFeatureCnt, mKeepTopK, mType); status = ConcatTopK(stream, batch_size, mFeatureCnt, mKeepTopK, DataType::kFLOAT, - workspace + kernel_workspace_offset, ctopk_ws, reinterpret_cast(mDeviceScores), + static_cast(workspace) + kernel_workspace_offset, ctopk_ws, reinterpret_cast(mDeviceScores), reinterpret_cast(mDeviceBboxes), final_proposals); assert(status == cudaSuccess);