Commit 57a192e5 authored by Victor Oliveira's avatar Victor Oliveira

CamelCase in type names and removing warnings

parent 158dbdd9
......@@ -52,7 +52,7 @@ typedef struct GeglBufferClIterators
/* format */
size_t op_cl_format_size [GEGL_CL_BUFFER_MAX_ITERATORS];
gegl_cl_color_op conv [GEGL_CL_BUFFER_MAX_ITERATORS];
GeglClColorOp conv [GEGL_CL_BUFFER_MAX_ITERATORS];
/* total iteration */
gint rois;
......
......@@ -6,7 +6,7 @@
#include "gegl-cl-color-kernel.h"
static gegl_cl_run_data *kernels_color = NULL;
static GeglClRunData *kernels_color = NULL;
#define CL_FORMAT_N 11
......@@ -235,7 +235,7 @@ gegl_cl_color_babl (const Babl *buffer_format, size_t *bytes)
return TRUE;
}
gegl_cl_color_op
GeglClColorOp
gegl_cl_color_supported (const Babl *in_format, const Babl *out_format)
{
if (in_format == out_format)
......
......@@ -9,13 +9,13 @@ typedef enum
GEGL_CL_COLOR_NOT_SUPPORTED = 0,
GEGL_CL_COLOR_EQUAL = 1,
GEGL_CL_COLOR_CONVERT = 2
} gegl_cl_color_op;
} GeglClColorOp;
void gegl_cl_color_compile_kernels(void);
gboolean gegl_cl_color_babl (const Babl *buffer_format, size_t *bytes);
gegl_cl_color_op gegl_cl_color_supported (const Babl *in_format, const Babl *out_format);
GeglClColorOp gegl_cl_color_supported (const Babl *in_format, const Babl *out_format);
gboolean gegl_cl_color_conv (cl_mem in_tex, cl_mem aux_tex, const size_t size,
const Babl *in_format, const Babl *out_format);
......
......@@ -85,7 +85,7 @@ const char *gegl_cl_errstring(cl_int err) {
return strings[-err];
}
static gegl_cl_state cl_state = {FALSE, NULL, NULL, NULL, NULL, FALSE, 0, 0, 0, 0, "", "", "", ""};
static GeglClState cl_state = {FALSE, NULL, NULL, NULL, NULL, FALSE, 0, 0, 0, 0, "", "", "", ""};
static GHashTable *cl_program_hash = NULL;
gboolean
......@@ -325,15 +325,15 @@ gegl_cl_init (GError **error)
/* XXX: same program_source with different kernel_name[], context or device
* will retrieve the same key
*/
gegl_cl_run_data *
GeglClRunData *
gegl_cl_compile_and_build (const char *program_source, const char *kernel_name[])
{
gint errcode;
gegl_cl_run_data *cl_data = NULL;
GeglClRunData *cl_data = NULL;
if (!gegl_cl_is_accelerated ())
return NULL;
if ((cl_data = (gegl_cl_run_data *)g_hash_table_lookup(cl_program_hash, program_source)) == NULL)
if ((cl_data = (GeglClRunData *)g_hash_table_lookup(cl_program_hash, program_source)) == NULL)
{
size_t length = strlen(program_source);
......@@ -341,7 +341,7 @@ gegl_cl_compile_and_build (const char *program_source, const char *kernel_name[]
guint kernel_n = 0;
while (kernel_name[++kernel_n] != NULL);
cl_data = (gegl_cl_run_data *) g_new(gegl_cl_run_data, 1);
cl_data = (GeglClRunData *) g_new(GeglClRunData, 1);
CL_SAFE_CALL( cl_data->program = gegl_clCreateProgramWithSource(gegl_cl_get_context(), 1, &program_source,
&length, &errcode) );
......
......@@ -29,7 +29,7 @@ typedef struct
char platform_ext [1024];
char device_name [1024];
}
gegl_cl_state;
GeglClState;
const char *gegl_cl_errstring(cl_int err);
......@@ -56,9 +56,9 @@ typedef struct
cl_program program;
cl_kernel *kernel;
size_t *work_group_size;
} gegl_cl_run_data;
} GeglClRunData;
gegl_cl_run_data *gegl_cl_compile_and_build (const char *program_source,
GeglClRunData *gegl_cl_compile_and_build (const char *program_source,
const char *kernel_name[]);
#define GEGL_CL_CHUNK_SIZE 1024 * 1024
......
......@@ -159,7 +159,7 @@ gegl_operation_point_composer_cl_process (GeglOperation *operation,
cl_int cl_err = 0;
gboolean err;
gint foo;
gint foo = -1;
/* non-texturizable format! */
if (!gegl_cl_color_babl (in_format, NULL) ||
......@@ -193,7 +193,7 @@ gegl_operation_point_composer_cl_process (GeglOperation *operation,
else if (operation_class->cl_data)
{
gint p = 0;
gegl_cl_run_data *cl_data = operation_class->cl_data;
GeglClRunData *cl_data = operation_class->cl_data;
cl_err = gegl_clSetKernelArg(cl_data->kernel[0], p++, sizeof(cl_mem), (void*)&i->tex[read][j]);
cl_err = gegl_clSetKernelArg(cl_data->kernel[0], p++, sizeof(cl_mem), (aux)? (void*)&i->tex[foo][j] : NULL);
......
......@@ -119,7 +119,7 @@ gegl_operation_point_filter_cl_process (GeglOperation *operation,
else if (operation_class->cl_data)
{
gint p = 0;
gegl_cl_run_data *cl_data = operation_class->cl_data;
GeglClRunData *cl_data = operation_class->cl_data;
cl_err = gegl_clSetKernelArg(cl_data->kernel[0], p++, sizeof(cl_mem), (void*)&i->tex[read][j]);
cl_err = gegl_clSetKernelArg(cl_data->kernel[0], p++, sizeof(cl_mem), (void*)&i->tex[ 0 ][j]);
......
......@@ -141,7 +141,7 @@ struct _GeglOperationClass
gint x,
gint y);
gegl_cl_run_data *cl_data;
GeglClRunData *cl_data;
gpointer pad[9];
};
......
......@@ -109,7 +109,7 @@ static const char* kernel_source =
" out[gidx + gidy * dst_width] = accumulated / count; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_bilateral_filter (cl_mem in_tex,
......
......@@ -273,7 +273,7 @@ static const char* kernel_source =
" out[out_index] = mean / (2 * radius + 1); \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_box_blur (cl_mem in_tex,
......
......@@ -315,7 +315,7 @@ static const char* kernel_source =
"} \n"
" \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_c2g (cl_mem in_tex,
......
......@@ -188,7 +188,7 @@ static const char* kernel_source =
" out[gid] = out_v; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
/* OpenCL processing function */
static cl_int
......
......@@ -419,7 +419,7 @@ static const char* kernel_source =
" (value[0], value[1], value[2], value[3]); \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_edge_laplace (cl_mem in_tex,
......
......@@ -134,7 +134,7 @@ static const char* kernel_source =
" out[gidx + gidy * dst_width] = gradient; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_edge_sobel (cl_mem in_tex,
......
......@@ -472,7 +472,7 @@ static const char* kernel_source =
" src_buf, src_offset, 1, cmatrix, matrix_length); \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_gaussian_blur (cl_mem in_tex,
......
......@@ -102,7 +102,7 @@ static const char* kernel_source =
" out[gid] = out_v; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
/* OpenCL processing function */
static cl_int
......
......@@ -135,7 +135,7 @@ static const char* kernel_source =
" sum / num_steps; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_motion_blur (cl_mem in_tex,
......
......@@ -231,7 +231,7 @@ static const char* kernel_source =
" out[gidy * width + gidx] = in[gidy * in_width + gidx]; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_noise_reduction (cl_mem in_tex,
......
......@@ -185,7 +185,7 @@ static const char* kernel_source =
" out[gidx + gidy * src_width] = in[cx + cy * block_count_x]; \n"
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_pixelise (cl_mem in_tex,
......
......@@ -340,7 +340,7 @@ static const char* kernel_source =
"} \n";
static gegl_cl_run_data *cl_data = NULL;
static GeglClRunData *cl_data = NULL;
static cl_int
cl_snn_mean (cl_mem in_tex,
......
......@@ -146,7 +146,7 @@ static const char* kernel_source =
" out[gid] = in[gid]*(1.0f-strength) + color * strength; \n"
"} \n";
static gegl_cl_run_data * cl_data = NULL;
static GeglClRunData * cl_data = NULL;
static cl_int
cl_process (GeglOperation *operation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment