mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
fix uninitialized read errors reported by CUDA-INITCHECK
This commit is contained in:
parent
c35c5a47df
commit
8f78a1123b
@ -223,11 +223,7 @@ namespace cv { namespace cuda { namespace device
|
|||||||
if (x_shifted + ft::smart_shift - 1 < src_.cols)
|
if (x_shifted + ft::smart_shift - 1 < src_.cols)
|
||||||
{
|
{
|
||||||
const read_type src_n_el = ((const read_type*)src)[x];
|
const read_type src_n_el = ((const read_type*)src)[x];
|
||||||
write_type dst_n_el = ((const write_type*)dst)[x];
|
OpUnroller<ft::smart_shift>::unroll(src_n_el, ((write_type*)dst)[x], mask, op, x_shifted, y);
|
||||||
|
|
||||||
OpUnroller<ft::smart_shift>::unroll(src_n_el, dst_n_el, mask, op, x_shifted, y);
|
|
||||||
|
|
||||||
((write_type*)dst)[x] = dst_n_el;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -275,11 +271,8 @@ namespace cv { namespace cuda { namespace device
|
|||||||
{
|
{
|
||||||
const read_type1 src1_n_el = ((const read_type1*)src1)[x];
|
const read_type1 src1_n_el = ((const read_type1*)src1)[x];
|
||||||
const read_type2 src2_n_el = ((const read_type2*)src2)[x];
|
const read_type2 src2_n_el = ((const read_type2*)src2)[x];
|
||||||
write_type dst_n_el = ((const write_type*)dst)[x];
|
|
||||||
|
|
||||||
OpUnroller<ft::smart_shift>::unroll(src1_n_el, src2_n_el, dst_n_el, mask, op, x_shifted, y);
|
OpUnroller<ft::smart_shift>::unroll(src1_n_el, src2_n_el, ((write_type*)dst)[x], mask, op, x_shifted, y);
|
||||||
|
|
||||||
((write_type*)dst)[x] = dst_n_el;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -199,11 +199,8 @@ namespace grid_transform_detail
|
|||||||
if (x_shifted + SHIFT - 1 < cols)
|
if (x_shifted + SHIFT - 1 < cols)
|
||||||
{
|
{
|
||||||
const read_type src_n_el = ((const read_type*)src)[x];
|
const read_type src_n_el = ((const read_type*)src)[x];
|
||||||
write_type dst_n_el = ((const write_type*)dst)[x];
|
|
||||||
|
|
||||||
OpUnroller<SHIFT>::unroll(src_n_el, dst_n_el, op, mask, x_shifted, y);
|
OpUnroller<SHIFT>::unroll(src_n_el, ((write_type*)dst)[x], op, mask, x_shifted, y);
|
||||||
|
|
||||||
((write_type*)dst)[x] = dst_n_el;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -237,11 +234,8 @@ namespace grid_transform_detail
|
|||||||
{
|
{
|
||||||
const read_type1 src1_n_el = ((const read_type1*)src1)[x];
|
const read_type1 src1_n_el = ((const read_type1*)src1)[x];
|
||||||
const read_type2 src2_n_el = ((const read_type2*)src2)[x];
|
const read_type2 src2_n_el = ((const read_type2*)src2)[x];
|
||||||
write_type dst_n_el = ((const write_type*)dst)[x];
|
|
||||||
|
|
||||||
OpUnroller<SHIFT>::unroll(src1_n_el, src2_n_el, dst_n_el, op, mask, x_shifted, y);
|
OpUnroller<SHIFT>::unroll(src1_n_el, src2_n_el, ((write_type*)dst)[x], op, mask, x_shifted, y);
|
||||||
|
|
||||||
((write_type*)dst)[x] = dst_n_el;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user