Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tensorrt_yolox): fix cstyleCast to reinterpret_cast #7873

Merged
merged 5 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions perception/tensorrt_yolox/src/tensorrt_yolox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,8 @@
cv::Mat mask = cv::Mat::zeros(out_h, out_w, CV_8UC1);
int index = b * out_w * out_h;
argmax_gpu(
(unsigned char *)argmax_buf_d_.get() + index, d_prob, out_w, out_h, width, height, classes, 1,
*stream_);
reinterpret_cast<unsigned char *>(argmax_buf_d_.get()) + index, d_prob, out_w, out_h, width,

Check warning on line 1208 in perception/tensorrt_yolox/src/tensorrt_yolox.cpp

View check run for this annotation

Codecov / codecov/patch

perception/tensorrt_yolox/src/tensorrt_yolox.cpp#L1208

Added line #L1208 was not covered by tests
height, classes, 1, *stream_);
CHECK_CUDA_ERROR(cudaMemcpyAsync(
argmax_buf_h_.get(), argmax_buf_d_.get(), sizeof(unsigned char) * 1 * out_w * out_h,
cudaMemcpyDeviceToHost, *stream_));
Expand Down
Loading