{"id":160,"date":"2013-05-06T01:41:40","date_gmt":"2013-05-05T23:41:40","guid":{"rendered":"http:\/\/blogs.igalia.com\/elima\/?p=160"},"modified":"2016-10-20T12:58:05","modified_gmt":"2016-10-20T10:58:05","slug":"introducing-gocl-a-gobject-wrapper-to-opencl","status":"publish","type":"post","link":"https:\/\/blogs.igalia.com\/elima\/2013\/05\/06\/introducing-gocl-a-gobject-wrapper-to-opencl\/","title":{"rendered":"Introducing gocl, a gobject wrapper to OpenCL"},"content":{"rendered":"<p>\nFor the past few months I have been working on this project to bring <a href=\"https:\/\/en.wikipedia.org\/wiki\/OpenCL\">OpenCL<\/a> closer to GNOME technologies, and today I&#8217;m glad to make the first public announcement. For the uninformed reader, OpenCL is a framework and language for writing programs that execute across heterogeneous HW pieces like CPUs, GPUs, DSPs, etc. While not applicable to any piece of software, OpenCL can unleash unparalleled performance and power efficiency on specific heavy algorithms like media decoding, cryptography, computer vision, big data indexing and processing, physics simulation, graphics, image compositing, among others.\n<\/p>\n<p>\nGocl is a GLib\/GObject based library that aims at simplifying the use of OpenCL in GNOME software. It is intended to be a lightweight wrapper that adapts OpenCL programming patterns and boilerplate, and expose a simpler API that is known and comfortable to GNOME developers. Examples of such adaptations are the integration with GLib&#8217;s main loop, exposing non-blocking APIs, GError based error reporting and full <a href=\"https:\/\/live.gnome.org\/GObjectIntrospection\/\">gobject-introspection<\/a> support. It will also be including convenient API to simplify code for the most common use patterns.\n<\/p>\n<p>\nGocl started as part of the work and research we do at <a href=\"https:\/\/igalia.com\">Igalia<\/a> on HW acceleration, that I decided to take a bit of, clean it up and release it in a way that can be useful to others. OpenCL is gaining relevance and popularity since the number of implementations and supported chips have grown significantly in recent years. Soon we are going to see OpenCL running anywhere and GNOME technologies should be ready to take advantage of it.\n<\/p>\n<p>\n<a href=\"https:\/\/people.igalia.com\/elima\/gocl\/unstable\/\">Full gtk-doc documentation<\/a> is available, and source code is hosted at <a href=\"https:\/\/github.com\/elima\/gocl\">my GitHub account<\/a>.\n<\/p>\n<p>\nThe API is very simple and limited at this stage, and should be considered very unstable. Although I&#8217;m not currently working on it full time, I do have kind of a roadmap for the API and features that I will prioritize:\n<\/p>\n<ul>\n<li>Completing the missing asynchronous API<\/li>\n<li>Adding API to query available OpencL extensions<\/li>\n<li>Provide API to expose <a href=\"https:\/\/www.khronos.org\/registry\/cl\/sdk\/1.2\/docs\/man\/xhtml\/cl_khr_gl_sharing.html\"><i>cl_khr_gl_sharing<\/i><\/a> extension, for object sharing with OpenGL<\/li>\n<\/ul>\n<p>You are welcome to suggest\/request features that you would like to see in Gocl, as well as propose changes on the API. The GitHub <a href=\"https:\/\/github.com\/elima\/gocl\/issues\/new\">issue tracking at project&#8217;s page<\/a> is available for that, and also to report bugs.<\/p>\n<p>So, do you know of a specific piece of software in GNOME that could potentially benefit from OpenCL? I would love to hear about it.<\/p>\n<p>At <a href=\"https:\/\/igalia.com\">Igalia<\/a>, as part of our strong commitment to make the Web better and faster, we are already looking into ways of applying OpenCL to WebKit and its related technologies, and I&#8217;m personally interested on that line of work.<\/p>\n<p><a href=\"https:\/\/www.khronos.org\/opencl\/\"><img decoding=\"async\" src=\"https:\/\/upload.wikimedia.org\/wikipedia\/en\/5\/57\/OpenCL_Logo.png\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the past few months I have been working on this project to bring OpenCL closer to GNOME technologies, and today I&#8217;m glad to make the first public announcement. For the uninformed reader, OpenCL is a framework and language for writing programs that execute across heterogeneous HW pieces like CPUs, GPUs, DSPs, etc. While not &hellip; <a href=\"https:\/\/blogs.igalia.com\/elima\/2013\/05\/06\/introducing-gocl-a-gobject-wrapper-to-opencl\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Introducing gocl, a gobject wrapper to OpenCL&#8221;<\/span><\/a><\/p>\n","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6,7],"tags":[22,48,54,53,52,51,56,55],"class_list":["post-160","post","type-post","status-publish","format-standard","hentry","category-gnome","category-hacking","category-igalia","tag-glib","tag-gnome-2","tag-gobject","tag-gpu","tag-hw-acceleration","tag-opencl","tag-webkit","tag-wrapper"],"_links":{"self":[{"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/posts\/160","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/comments?post=160"}],"version-history":[{"count":18,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/posts\/160\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/posts\/160\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/categories?post=160"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.igalia.com\/elima\/wp-json\/wp\/v2\/tags?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}