W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: API for matrix manipulation

From: Chris Marrin <cmarrin@apple.com>
Date: Mon, 14 Mar 2011 16:27:51 -0700
Cc: Joćo Eiras <joao.eiras@gmail.com>, public-webapps <public-webapps@w3.org>
Message-id: <6C962B6C-5361-4D69-BFA2-7FEB82BB1E50@apple.com>
To: Lars Knudsen <larsgk@gmail.com>

On Mar 14, 2011, at 12:19 PM, Lars Knudsen wrote:

> Hi,
> related to this:  Is there any work ongoing to tie these (or more generic vector / matrix) classes to OpenCL / WebCL for faster computation across CPUs and GPUs?

On WebKit I've experimented with an API to copy a CSSMatrix to an Float32Array, which can be directly uploaded to the GPU. It's surprising how much more efficient this was than copying the 16 floating point values out of the CSSMatrix using JS. But I've hesitated proposing such an API while WebGL and Typed Arrays were still in draft. Now that they're not, maybe it's time to discuss it.

I've also experimented with API in CSSMatrix to do in-place operations, rather than creating a new CSSMatrix to hold the results. This too was a big win, mostly I think because you get rid of all the churn of creating and collecting CSSMatrix objects.

Received on Monday, 14 March 2011 23:28:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:16 UTC