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


Supersimple - Deep Insights From Data
02/04/2024

Announcing $2.2 Million in pre-seed funding, the Estonian startup Supersimple has launched an AI-native data analytics platform which combines a semantic data modeling layer with the ability to answer [ ... ]



JetBrains Updates IDEs With AI Code Completion
04/04/2024

JetBrains has launched the first set of updates for 2024 of its JetBrains IDEs. The new versions include full-line code autocompletion powered by locally run AI models.


More News

Last Updated ( Tuesday, 12 July 2011 )