By using this site, you agree to our Privacy Policy and our Terms of Use. Close
shams said:
Entroper said:

There is a general C compiler for the SPUs, and it has lots of useful specific functions to program efficiently (like performing SIMD operations and shuffling and what not). What the SPUs are especially bad at is traversing dynamically allocated data structures or accessing random places in memory, which can be important for AI.

With clever programming, you can offload some AI tasks to the SPUs, especially if you can batch them efficiently, put them into lists, that sort of thing.

Cool, thanks for the info.

So it should be possible to offload the same AI to the SPUs - just not particularly efficient (which should matter). Even at 10% efficiency, a couple of SPUs should be able to handle all the AI requirements (constant random main memory accesses might kill the data cache though).

Its just a question of difficulty anyway - as it always is (i.e. you can port anything to any device - just a question of results... i.e. Assassins Creed on the DS, but not on the Wii!). 


Yeah, it is a question of difficulty.  For example, you could create a data structure with a special memory allocator, and allocate, say, a contiguous 100-200kB or so block of memory to be used just by that data structure.  Then the special allocator uses space from that block when you need to create a new node in your structure.  An SPE could then copy the block into its local store, and traverse it quickly and easily.  It would have a limited use, but there are a lot of structures I could see being used this way, especially in a console environment where memory management is so important already.  Like I said, it's all about clever programming and not being afraid to get your hands dirty.

You can't come up with a good SPE code for everything, but you can come up with a good SPE code for more than just the obvious things.