Hi Victor,
Thank you for clarifying, I was on the right track but didn't have a good example to compare against when using the gegl_buffer_get and gegl_buffer_set functions. I now have the desired results I need. As for the tiling, I understand the reasoning behind the need for such an architecture, but for the purposes of this tutorial it would be better to have the participants work on a whole contiguous chunk first, and let them understand the need for tiling as they advance and how they could perhaps optimize the tiling operations in GEGL for OpenCL. Once the tutorial is underway, and we have a better understanding of the operations, we can certainly discuss on such improvements for the OpenCL side. Thank you, And Best Regards, Adel From: victormatheus gmail com Date: Mon, 19 Oct 2015 16:05:49 -0700 Subject: Re: [Gegl-developer] OpenCL support To: adeljo hotmail com CC: gegl-developer-list gnome org Hi Adel, GEGL is a tiled engine and there's reasons for that, such as being able to manipulate large images that would use too much memory otherwise. Because of that, tiles are not contiguous in memory so there's no way of accessing this data without an extra copy. For that, you would use: - gegl_buffer_get (http://www.gegl.org/api.html#gegl_buffer_get) to copy the geglbuffer image data to a contiguous memory chunk of yours - do your processing - gegl_buffer_set to update the buffer with the new data Because that is an expensive copying operation we prefer that filters use the iterator unless global access to the image data is required in the filter. If you give a look at motion-blur-zoom.c, it does something like that (though it doesn't use CL). Hope that clears it up, let me know if you have any more questions. Victor On Tue, Oct 13, 2015 at 10:14 AM, Adel Johar <adeljo hotmail com> wrote:
|