2

Some computationally intensive software are now using the GPU to solve mathematical problems. Now that flash has GPU support, is it possible to use flash to crunch math problems? How would it be done.

In other words, does flash expose sufficient low level API to control the behavior of the GPU sufficiently to perform such a task?

Example of problems; Find a message with the following hash: 2987432847298374298374982374

Jacob Eggers
  • 9,062
  • 2
  • 25
  • 43
Anon21
  • 2,961
  • 6
  • 37
  • 46

2 Answers2

1

It's not the current Flash Player, but the Flash Player Molehill which is still in development that has gpu api access. See the following links:

and especially


Edit: Adding more links as I find good ones.

Jacob Eggers
  • 9,062
  • 2
  • 25
  • 43
  • +1 thankfully there are layers of abstraction between us and AGAL (away3d, flare etc). But that we'll have access to it is spectacular. – Bosworth99 Jun 28 '11 at 23:49
  • Yes the abstraction is nice. Unfortunately, I haven't seen any layers of abstraction for fast math functions yet. If that's what Alexandre wants, this is what he'll need to do. – Jacob Eggers Jun 29 '11 at 00:06
1

Yes, since you can provide textures for random access input (if they provide constant buffers that would be nicer) and render to BitmapData for output, which are the minimum operations you need for GPGPU. There's not too much information on how complete the API, or AGAL's instruction set, is - I haven't seen any examples of integer registers or bitwise operations which would be incredibly useful for your example problem, so the potential performance might be far worse than a DirectX or OpenGL implementation could get, but it should still be far better than ActionScript!

I should note, however, that this would be old-school GPGPU, which is even harder to do than it currently is with the new OpenCL and DirectCompute APIs.

Simon Buchan
  • 12,707
  • 2
  • 48
  • 55
  • Here's a good reference for the instruction set: [Program3D.upload()](http://labs.jam3.ca/asdocs/incubatorAsDoc/flash/display3D/Program3D.html#upload()) – Jacob Eggers Jun 29 '11 at 18:05
  • @Jacob: Thanks, that's great. (Adobe have had much better documenters than Macromedia were). Doesn't look very GPGPU friendly - low variable counts and no integer types. – Simon Buchan Jun 30 '11 at 02:14