def get_kernel_header_template():
    """
    Returns the OpenCL kernel header template,
    where constants and macros are defined.
    """
    return """
    #pragma OPENCL EXTENSION cl_khr_fp64 : enable
    #define DATA_TYPE_%(DATA_TYPE)s
    #define INIT_MAXVAL %(INIT_MAXVAL)i
    #define ITERATIONS %(ITERATIONS)i
    #define FILTER_HALF_Y_SIZE %(FILTER_HALF_Y_SIZE)i
    #define FILTER_HALF_Y_SIZE_PLUS_ONE %(FILTER_HALF_Y_SIZE_PLUS_ONE)i
    #define FILTER_HALF_X_SIZE %(FILTER_HALF_X_SIZE)i
    #define FILTER_HALF_X_SIZE_PLUS_ONE %(FILTER_HALF_X_SIZE_PLUS_ONE)i
    #define MEDIAN_PIVOT_SIZE %(MEDIAN_PIVOT_SIZE)i
    #define SHARED_WINDOW_WIDTH %(SHARED_WINDOW_WIDTH)i
    #define SHARED_WINDOW_HEIGHT %(SHARED_WINDOW_HEIGHT)i
    #define DATA_W %(DATA_W)i
    #define DATA_H %(DATA_H)i
    #define WORK_GROUP_W %(WORK_GROUP_W)i
    #define WORK_GROUP_H %(WORK_GROUP_H)i

    #define SHARED_WINDOW(y,x)  shared_window[(y)+FILTER_HALF_Y_SIZE][(x)+FILTER_HALF_X_SIZE]
    #define INPUT(y,x)          input[(y)*DATA_W + (x)]
    #define RESULT(y,x)         result[(y)*DATA_W + (x)]
    
    """
