Paraffin 2.0 for GNAT and ICC Ada compilers

Fresh from the hands of Brad Moore comes version 2.0 of his Paraffin library.

A suite of Ada 2005 generics to facilitate iterative and recursive parallelism for multicore systems and provide safer recursion for single and multicore systems.

New stuff in version 2.0 includes:

  • Paraffin has been compiled and tested using the Irvine ICC Ada compiler, running on both Windows and Linux.
  • Paraffin has been compiled and tested using GNAT AUX on an Android Samsung Galaxy S II Smart phone.
  • Paraffin has been compiled and tested using GNAT 2010 and 2011 GPL versions of the compiler on both Windows and Linux.
  • Paraffin now includes generics that allow deep recursion using a small stack. The generics feature parallel work seeking that monitors the usage of each workers stack, and defers work if the stack resource is approaching depletion. This allows idle worker tasks to resume the deferred work with a fresh stack, in a safe manner until all the work has been completed. Testing has shown that the overhead associated with the stack monitoring is minimal, and that the performance is such that it can also be attractive to consider using on systems that only have a single core.
  • Generics have been added that filter out poor work offers based on the depth of the recursion.
  • The optimal worker count is calculated by default for iterative looping, based on the number of available cores, and the number of iterations.
  • Increased portability, by providing the “Any” target, which does not use any OS services or vendor specific libraries.
  • Numerous performance improvements, particularly for the recursive generics, which were significantly improved.
  • Various bug fixes.

I’ll gladly admit that a lot of those items are far above my paygrade – I wouldn’t even know what to do with “deep recursion using a small stack”, but I do understand the significance of such a complicated piece of software running on Android, and combined with Stephen Leake’s Ada “Hello World” on Android success this seems like another great step towards being able to use Ada to build Android applications.

You can download Paraffin here and you can read Brad’s full announcement here.

Leave a Reply