WebCL implementation for WebKit
WebCL implementation for WebKit
Written by Alex Denham   
Tuesday, 12 July 2011

WebCL is important because it not only brings supercomputing to the desktop but into the web page. Samsung has a first release for WebKit and some impressive demos of its potential.

WebCL is a new standard that is being developed by the Khronos group, the people who make WebGL the web based 3D graphics standard a reality.

WebCL is being designed as a way to make use of OpenCL on the Web. OpenCL is a framework, developed mostly by Apple and later NVIDIA, that lets software make use of a GPU for normal computing operations. Both OpenCL and WebCL are open standards.

In short WebCL will provide the JavaScript bindings for OpenCL. What this means is that you can make use of the multiprocessor inherent in modern GPUs to do general purpose computing not just graphics. Put OpenCL together with OpenGL and realtime 3D simulations within a web page become a real possibility. 

The WebCL specification is still under development, but JavaScript APIs have already been proposed based on the current draft specification. Alongside Samsung, Nokia is also building a prototype showing how WebCL can be integrated in mainstream browsers. The Nokia version of WebCL assumes the use of Mozilla Firefox as the web browser.

The video below shows the amazing speedup in moving from a CPU based implementation of a simulation through a CPU/GPU and finally GPU/GPU based simulation. Notice that this isn't just a matter of making a minor change. To make use of the GPU the computational code had to be re-written in a parallel form.

    

 

The video compares using conventional JavaScript for the computations, producing a frame rate of between five and six frames per second, whereas the WebCL version achieved frame rates of between 78 and 114 frames per second.

 

webclsim

 

You can download the code for the Samsung WebCL implementation, along with examples of how WebCL might be used in JavaScript.

WebCL for Webkit

At the moment the only problem with the move to parallel code based on the GPU in web browsers is the simple fact that Microsoft refuses to include even the WebGL standard on security grounds in IE9 or IE10. It is likely that Microsoft is working on its own 3D and GPU computational system based on DirectX but at the moment there is no real information apart from the lack of support for WebGL and WebCL.

 

Banner


Libraries For Learning To Code
18/01/2017

Google has announced funding for an initiative that aims to equip librarians with the skills needed to deliver coding programs in public and school libraries across the USA.



Facebook Hacker Cup 2017 Kicks Off
07/01/2017

Of all the coding competitions, the Facebook Hacker Cup seems the most exciting. It is accessible to almost everybody and while you have to be an elite coder to get to the finals there's a lot along t [ ... ]


More News

Last Updated ( Tuesday, 12 July 2011 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
Banner