MikeB said:
Deneidez said:
Blaa... Blaa... Tell me something I don't know already. More concrete example? Uhm, how about fibonacci numbers in parallel? Yes, (easiest) answer is functional programming, but but... SPUs don't support functional programming. Too bad... Oh well, you can always use PPE only. :)
|
Of course such high level programming languages can be ported. I know some people who have created their own programming languages.
|
Ok, can I now ask for concrete example of functional programming language that has been made for SPUs and working program that calculates fibonacci numbers? :)
You want more concrete examples or easier to understand examples? Ok, here we go...
How about example of that 10MB blocks & 200MB program with depencies on previous results and whole 10MB block.
So for every integer you must randomly choose one another integer from the same 10MB block you got the integer and randomly choose the way(add, substract, derivate function depending on those two integers, integrate function etc. up to 50 possible branches) you calculate the sub result.
1. Get one integer from 10MB block, calculate sub result and save it.
After getting sub result you must randomly decide do you need more subresults. For every sub result you will have to lower the possibility of need of new sub result(means go to step 1) by 1% and it starts from 99%. (So after first sub result theres 99% chance to be one more sub result. After that 98% etc.)
2. Randomly choose is there need for more calculations, if there is go to step 1 and substract 1% from chance of more calculations.
And to confirm that you do understand what I mean, heres pseudocode:
while(there is still integers in current 10MB block)
{
integerToProcess=currentIntegerInFirstWhile;
while(continue)
{
possibilityToContinue=99;
foo=randomlyChooseOneIntegerFrom10MBBlock();
bar=someRandomFunctionFrom50DifferentFunctions(integerToProcess,foo);
if((random(1-100)-possibilityToContinue)>0)
continue=false;
possibilityToContinue--;
}
}
You do know what happens when all of those SPUs(and PPU) must get their stuff from main mem? You cannot store 10MB into SPUs memories. Neither you can store results of every branch and use them. You could of course make datastreams of what to do for SPUs but that would mean too much work for PPU, because those streams could be veeery long and of course they could be way too large for mem in some cases. You do know how this would work on X360, don't you? :)
Others:
Sorry if you didn't understand anything. ^^