Skip to content

Commit

Permalink
fixed compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nkolot committed Aug 20, 2018
1 parent b067de5 commit a5d870c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neural_renderer/cuda/load_textures_cuda_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ __global__ void load_textures_cuda_kernel(
if (texture_wrapping != CLAMP_TO_BORDER) {
scalar_t c = 0;
c += image[((int)pos_y * image_width + (int)pos_x) * 3 + k] * (weight_x0 * weight_y0);
c += image[((int)min((pos_y + 1), image_height-1) * image_width + (int)pos_x) * 3 + k] * (weight_x0 * weight_y1);
c += image[((int)pos_y * image_width + (min((int)pos_x) + 1, image_width-1)) * 3 + k] * (weight_x1 * weight_y0);
c += image[(min((int)(pos_y + 1), image_height-1)* image_width + min(((int)pos_x) + 1), image_width-1) * 3 + k] * (weight_x1 * weight_y1);
c += image[(min((int)(pos_y + 1), image_height-1) * image_width + (int)pos_x) * 3 + k] * (weight_x0 * weight_y1);
c += image[((int)pos_y * image_width + (min((int)pos_x + 1, image_width-1))) * 3 + k] * (weight_x1 * weight_y0);
c += image[(min((int)(pos_y + 1), image_height-1)* image_width + min((int)pos_x + 1, image_width-1)) * 3 + k] * (weight_x1 * weight_y1);
texture_[k] = c;
}
else {
Expand Down

0 comments on commit a5d870c

Please sign in to comment.