Fast arithmetic using the flash 3d api?
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 t开发者_运维技巧o 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
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.
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:
- http://labs.adobe.com/technologies/flashplatformruntimes/incubator/features/molehill.html
- http://blog.theflashblog.com/?p=2607
- http://labs.jam3.ca/2011/03/molehill-getting-started/
and especially
- http://iflash3d.com/shaders/my-name-is-agal-i-come-from-adobe-1/
- http://blog.flash-core.com/?p=245
- http://blog.flash-core.com/?p=271
Edit: Adding more links as I find good ones.
精彩评论