Skip to content

Commit ec0e7e6

Browse files
Koichi98pre-commit-ci[bot]
authored andcommitted
fix(tensorrt_yolox): fix cstyleCast to reinterpret_cast (autowarefoundation#7873)
* fix(tensorrt_yolox): fix cstyleCast to reinterpret_cast Signed-off-by: Koichi Imai <kotty.0704@gmail.com> * style(pre-commit): autofix * fix(tensorrt_yolox): fix cstyleCast to reinterpret_cast Signed-off-by: Koichi Imai <kotty.0704@gmail.com> * style(pre-commit): autofix --------- Signed-off-by: Koichi Imai <kotty.0704@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent ca4579f commit ec0e7e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

perception/tensorrt_yolox/src/tensorrt_yolox.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,8 @@ cv::Mat TrtYoloX::getMaskImageGpu(float * d_prob, nvinfer1::Dims dims, int out_w
12051205
cv::Mat mask = cv::Mat::zeros(out_h, out_w, CV_8UC1);
12061206
int index = b * out_w * out_h;
12071207
argmax_gpu(
1208-
(unsigned char *)argmax_buf_d_.get() + index, d_prob, out_w, out_h, width, height, classes, 1,
1209-
*stream_);
1208+
reinterpret_cast<unsigned char *>(argmax_buf_d_.get()) + index, d_prob, out_w, out_h, width,
1209+
height, classes, 1, *stream_);
12101210
CHECK_CUDA_ERROR(cudaMemcpyAsync(
12111211
argmax_buf_h_.get(), argmax_buf_d_.get(), sizeof(unsigned char) * 1 * out_w * out_h,
12121212
cudaMemcpyDeviceToHost, *stream_));

0 commit comments

Comments
 (0)