diff --git a/cxx/isce3/cuda/image/Resample.cu b/cxx/isce3/cuda/image/Resample.cu index 87f8747b7..407b74c16 100644 --- a/cxx/isce3/cuda/image/Resample.cu +++ b/cxx/isce3/cuda/image/Resample.cu @@ -53,7 +53,7 @@ void _resampleToCoordsGlobal( // done with a multiple of the thrd_per_block pixels, but the output data size will // typically be smaller than this multiple. So, some calls to this function on // the device will be for non-existent pixels which must be discarded. - if (pixel_index > resampled_block_width * resampled_block_length) return; + if (pixel_index >= resampled_block_width * resampled_block_length) return; const auto chip_size = static_cast(SINC_ONE); diff --git a/cxx/isce3/cuda/image/gpuResampSlc.cu b/cxx/isce3/cuda/image/gpuResampSlc.cu index ebd55ab7c..198c65d04 100644 --- a/cxx/isce3/cuda/image/gpuResampSlc.cu +++ b/cxx/isce3/cuda/image/gpuResampSlc.cu @@ -125,7 +125,7 @@ void transformTile(thrust::complex *resampledSlc, // Check if resampling possible at the starting rows of a tile. (iRowResamp < chipHalf) // Check if resampling possible at the ending rows of a tile. - || (iRowResamp + chipHalf > inReadableLength); + || (iRowResamp + chipHalf >= inReadableLength); // Check if resampled column index is in bounds by checking if chip // used to resample can be populated. @@ -133,7 +133,7 @@ void transformTile(thrust::complex *resampledSlc, // Check if resampling possible at starting columns of a tile. (iColResamp - chipHalf < 0) // Check if resampling possible at the ending columns of a tile. - || (iColResamp + chipHalf > inWidth); + || (iColResamp + chipHalf >= (long long int)inWidth); // Skip computations if indices out of bound or az/rng not in doppler if (rowOutOfBounds || colOutOfBounds || iRowResamp < 0 || iColResamp < 0)