All for One, and One for All{}

A topic that has be plaguing my brain for some weeks now is GPU’s I have come to believe they are a very good source of untapped power inside modern computers, and not simply for graphics.

This gist of a modern day GPU which are a specialized processor. Their highly parallel structure makes them more effective than general-purpose CPUs for a range of complex algorithms, particularity that of graphics programming algorithms.

However the range of the algorithms they are good for is not limited only to graphics, their simple highly parallel structure, with multiple cores means they extremely well suited to performing simple operations on very large amounts of data in no particular order.

for example We have an array
int[] a;
of 100 items.

if we assume the i++ operation takes one second, and all other operations take so little time as to be of no consideration.

A normal for each loop

for (int i: a)
{
i++;
}

would take 100 seconds

However if this work could be sent to a GPU with 100 cores and each performed one iteration, it would still use 100 CPU styles but they would be in parallel, and thus the execution of the loop would only take 1 second. I dub this idea the for all loop


for(int i :: a)
{
i++
}

This will allow programmers to deicide between for each and for all loops. The former still being necessary for when the items in the array need to be processed singularly/ in order.

Nivida already have CUDA programming language for the geForce GPU’s , it is my belief that should Sun or another big company chose to implement this idea it would be feasible to make nearly all GPU’s available to a interpreters of many languages.

2 comments

Leave a Reply

Your email address will not be published. Required fields are marked *