GPU Programming thoughts

As I discussed in All for One, and One for All{} I am becoming increasingly obsessed with GPU’s I do truely believe they hold the greatest untapped power in most modern computers. No only this as we are seeing a rising trend in multi-core CPU’s, these ideas may become more relevant to CPU programming.

Further thus to my Idea of the ‘For all’ loop I considers some other ways in which native parallel computing could be put to use in a 3rd-level Language.

  • For All Loop
    A alternative to the ‘For Each’ where work could be sent to a GPU with multiple cores and each core performed one or more of the iterations.
  • Distribute Statement
    An alternative to the ‘Switch’ statement where you expect 2 or more cases to be true, thus the code for each case when resolved to true would be run on one of the GPU’s cores.
  • Independent method
    This would be work like a static method, but would be completely independent of the class(no reference to non final static variable’s).This would allow the safe running of this method, on multiple core in parallel. This could be very useful in recursive algorithums were the methods make multiple calls to its self. eg in a quick sort
    return quickSort(left[]) + pivit +quickSort(right[]);

    there is no reason why the left and right quicksorts could not be run in parallel.

These ideas still contain many problems eg. an Independent method, containing a forall loop, containing a distribute statement. Not to mention how to keep it all ‘thread safe’. However I have ideas on how these problems may one day be solved, it is my intention to use these as the basis of my dissertation, with a view to possibly even designing a language witch implements some if not all of them.

Leave a Reply

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