Parallel Template Library (PTL)
for .NET and Java

PTL offers powerful components to efficiently implement high-level parallelism and take advantage of multicore processors.

Try now Learn More


Quickly add parallelism to your application by maintaining your sequential thinking and use of high-level programming languages.

PTL was built on top of existing platforms, and its interfaces are similar to the .NET and Java standard libraries. Developers don't need to learn or use a new programming language, syntax or code annotations to use PTL.

PTL isolates developers from the complexities of parallelism (e.g. threads, locking, synchronization, cache coherency), so they can focus on the business logic of their application. The sequential and parallel versions for the majority of PTL's methods have the exact same usage and parameters; only their method names differ because parallel methods are prefixed with a "P" as shown in the following code example:

using Progeneric.PTL.Algorithms.Array;
int[] x = new int[50000000];
// PTL Sequential Sort
SortOper.Sort(x, 0, x.Length);
// PTL Parallel Sort
SortOper.PSort(x, 0, x.Length);


Prepare your application to automatically take advantage of future multicore and many-core processor systems.

PTL's innovative load balancing techniques allow it to scale dynamically with the number of available processor cores and are designed with heterogeneous computing devices in mind to adapt to different computing devices with different speeds. Developers won't need to change their code for systems with different hardware or more processor cores.

The majority of load balancing algorithms today require very complicated logic to steal work items from concurrent queues, and they advise to leave one or two cores free for the operating system in order for the balancing to perform well. PTL's superior load balancing algorithms guarantee that all available hardware resources are utilized to their full potential as shown in this quad-core CPU example:

PTL Scalable Parallel Functions


Easily extend PTL for more specific needs by taking advantage of its generic methods and decoupled components.

PTL's components are completely decoupled from each other, so developers can design custom containers that work with PTL's parallel algorithms and custom algorithms that work with PTL's containers.

PTL's generic methods work with any type of data, and they don't sacrifice performance to achieve this flexibility. For example, the Scalable section above already showed the parallel performance of this generic Parallel Sort method:

PTL Generic Parallel Sort Method