Skip to content

Commit

Permalink
Avoid arithmetic on void pointer in multilevelProposeROIPlugin.cpp #1028
Browse files Browse the repository at this point in the history


Signed-off-by: Rajeev Rao <rajeevrao@nvidia.com>
  • Loading branch information
rajeevsrao committed Apr 12, 2021
1 parent 1fe5532 commit 932bcd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/multilevelProposeROI/multilevelProposeROIPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ int MultilevelProposeROI::enqueue(
static_cast<float>(mImageSize.d[1]), // Input Height
static_cast<float>(mImageSize.d[2]),
DataType::kFLOAT, // mType,
mParam, proposal_ws, workspace + kernel_workspace_offset,
mParam, proposal_ws, static_cast<uint8_t*>(workspace) + kernel_workspace_offset,
inputs[2 * i + 1], // inputs[object_score],
inputs[2 * i], // inputs[bbox_delta]
mValidCnt->mPtr,
Expand All @@ -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<void**>(mDeviceScores),
static_cast<uint8_t*>(workspace) + kernel_workspace_offset, ctopk_ws, reinterpret_cast<void**>(mDeviceScores),
reinterpret_cast<void**>(mDeviceBboxes), final_proposals);

assert(status == cudaSuccess);
Expand Down

0 comments on commit 932bcd6

Please sign in to comment.