[gegl/gsoc2011-opencl-2: 19/22] Changes in OpenCL log messages



commit 2a51b89654512128371a23d3c2193e255fa9a453
Author: Victor Oliveira <victormatheus gmail com>
Date:   Mon Nov 21 16:54:29 2011 -0200

    Changes in OpenCL log messages

 gegl/opencl/gegl-cl-init.c                   |   20 ++++++++++----------
 gegl/operation/gegl-operation-point-filter.c |    2 +-
 operations/common/brightness-contrast.c      |    4 ++--
 3 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gegl/opencl/gegl-cl-init.c b/gegl/opencl/gegl-cl-init.c
index 66df431..4828671 100644
--- a/gegl/opencl/gegl-cl-init.c
+++ b/gegl/opencl/gegl-cl-init.c
@@ -178,26 +178,26 @@ gegl_cl_init (GError **error)
       cl_state.max_image_width  = MIN(4096, MIN(cl_state.max_image_width, cl_state.max_image_height));
       cl_state.max_image_height = MIN(4096, MIN(cl_state.max_image_width, cl_state.max_image_height));
 
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Platform Name:%s",       cl_state.platform_name);
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Version:%s",             cl_state.platform_version);
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Extensions:%s",          cl_state.platform_ext);
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Default Device Name:%s", cl_state.device_name);
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Tile Dimensions: (%d, %d)", cl_state.max_image_width, cl_state.max_image_height);
+      g_printf("[OpenCL] Platform Name:%s\n",       cl_state.platform_name);
+      g_printf("[OpenCL] Version:%s\n",             cl_state.platform_version);
+      g_printf("[OpenCL] Extensions:%s\n",          cl_state.platform_ext);
+      g_printf("[OpenCL] Default Device Name:%s\n", cl_state.device_name);
+      g_printf("[OpenCL] Tile Dimensions: (%d, %d)\n", cl_state.max_image_width, cl_state.max_image_height);
 
       if (cl_state.image_support)
         {
-          g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Image Support OK");
+          g_printf("[OpenCL] Image Support OK\n");
         }
       else
         {
-          g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Image Support Error");
+          g_printf("[OpenCL] Image Support Error\n");
           return FALSE;
         }
 
       cl_state.ctx = gegl_clCreateContext(0, 1, &cl_state.device, NULL, NULL, &err);
       if(err != CL_SUCCESS)
         {
-          g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Could not create context");
+          g_printf("[OpenCL] Could not create context\n");
           return FALSE;
         }
 
@@ -205,7 +205,7 @@ gegl_cl_init (GError **error)
 
       if(err != CL_SUCCESS)
         {
-          g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Could not create command queue");
+          g_printf("[OpenCL] Could not create command queue\n");
           return FALSE;
         }
 
@@ -259,7 +259,7 @@ gegl_cl_compile_and_build (const char *program_source, const char *kernel_name[]
         }
       else
         {
-          g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Compiling successful\n");
+          g_printf("[OpenCL] Compiling successful\n");
         }
 
       for (i=0; i<kernel_n; i++)
diff --git a/gegl/operation/gegl-operation-point-filter.c b/gegl/operation/gegl-operation-point-filter.c
index 438c098..c93fcdd 100644
--- a/gegl/operation/gegl-operation-point-filter.c
+++ b/gegl/operation/gegl-operation-point-filter.c
@@ -174,7 +174,7 @@ gegl_operation_point_filter_cl_process (GeglOperation       *operation,
   return TRUE;
 
 error:
-  g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Error: %s", gegl_cl_errstring(errcode));
+  g_warning("[OpenCL] Error: %s", gegl_cl_errstring(errcode));
   if (in_tex)   gegl_clReleaseMemObject (in_tex);
   if (out_tex)  gegl_clReleaseMemObject (out_tex);
   if (in_data)  free (in_data);
diff --git a/operations/common/brightness-contrast.c b/operations/common/brightness-contrast.c
index 402c69a..7d0edf2 100644
--- a/operations/common/brightness-contrast.c
+++ b/operations/common/brightness-contrast.c
@@ -164,11 +164,11 @@ cl_process (GeglOperation       *op,
 
   if (errcode != CL_SUCCESS)
     {
-      g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Error in Brightness-Constrast Kernel\n");
+      g_warning("[OpenCL] Error in Brightness-Constrast Kernel\n");
       return errcode;
     }
 
-  g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, "[OpenCL] Running Brightness-Constrast Kernel in region (%d %d %d %d)", roi->x, roi->y, roi->width, roi->height);
+  g_printf("[OpenCL] Running Brightness-Constrast Kernel in region (%d %d %d %d)\n", roi->x, roi->y, roi->width, roi->height);
   return errcode;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]