__kernel void lkSparse_C4_D5(image2d_t I, image2d_t J,
__global const float2* prevPts, int prevPtsStep, __global float2* nextPts, int nextPtsStep, __global uchar* status/*, __global float* err*/, const int level, const int rows, const int cols, int PATCH_X, int PATCH_Y, int cn, int c_winSize_x, int c_winSize_y, int c_iters, char calcErr, char GET_MIN_EIGENVALS)
__global const float2* prevPts, int prevPtsStep, __global float2* nextPts, int nextPtsStep, __global uchar* status, __global float* err,
const int level, const int rows, const int cols, int PATCH_X, int PATCH_Y, int cn, int c_winSize_x, int c_winSize_y, int c_iters, char calcErr)
{
__local float smem1[256];
__local float smem2[256];
__local float smem3[256];
__local float smem1[BUFFER];
__local float smem2[BUFFER];
__local float smem3[BUFFER];
int c_halfWin_x = (c_winSize_x - 1) / 2;
int c_halfWin_y = (c_winSize_y - 1) / 2;
unsigned int xid=get_local_id(0);
unsigned int yid=get_local_id(1);
unsigned int gid=get_group_id(0);
unsigned int xsize=get_local_size(0);
unsigned int ysize=get_local_size(1);
int xBase, yBase, i, j, k;
const int tid = get_local_id(1) * get_local_size(0) + get_local_id(0);