Joseph Redmon
2015-08-11 d0b9326a352ed2fbc3ae66fdef40b4533a2f211d
src/crop_layer_kernels.cu
@@ -5,8 +5,6 @@
#include "image.h"
}
#define BLOCK 256
__device__ float get_pixel_kernel(float *image, int w, int h, int x, int y, int c)
{
    if(x < 0 || x >= w || y < 0 || y >= h) return 0;
@@ -78,7 +76,7 @@
    return make_float3(r, g, b);
}
__device__ float billinear_interpolate_kernel(float *image, int w, int h, float x, float y, int c)
__device__ float bilinear_interpolate_kernel(float *image, int w, int h, float x, float y, int c)
{
    int ix = (int) floorf(x);
    int iy = (int) floorf(y);
@@ -170,7 +168,7 @@
    float rx = cos(angle)*(x-cx) - sin(angle)*(y-cy) + cx;
    float ry = sin(angle)*(x-cx) + cos(angle)*(y-cy) + cy;
    output[count] = billinear_interpolate_kernel(input, w, h, rx, ry, k);
    output[count] = bilinear_interpolate_kernel(input, w, h, rx, ry, k);
}
extern "C" void forward_crop_layer_gpu(crop_layer layer, network_state state)