Skip to content

Commit

Permalink
Last moment SRGR kernel indexing fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
priit111 committed Mar 18, 2024
1 parent d9cae2c commit 459bb4d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sar/srgr.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ __global__ void SrGrInterpolation(const float* data_in, KernelArgs args, float*
const int x = threadIdx.x + blockDim.x * blockIdx.x;
const int y = threadIdx.y + blockDim.y * blockIdx.y;

if (x >= args.out_x_size || y >= args.y_size) {
return;
}

const int out_idx = y * args.out_x_size + x;

const float ground_distance = x * args.ground_spacing;
Expand Down Expand Up @@ -80,7 +84,7 @@ void SlantRangeToGroundRangeInterpolation(SARMetadata& sar_meta, const float* d_
std::vector<double> grsr_poly = Polyfit(ground_distances, slant_ranges, 4);

std::string coeff_str = "[";
for(const auto& e : grsr_poly) {
for (const auto& e : grsr_poly) {
coeff_str += fmt::format("{} ", e);
}
coeff_str += " ]";
Expand Down

0 comments on commit 459bb4d

Please sign in to comment.