Many processing systems include multi-core processors in order to decrease the processing time to perform a task. A multi-core processor includes two or more cores coupled together. Hence, by dividing the operations of a processing task between the multiple cores, an improvement in the time required to complete the processing task can be achieved. However, this improvement is limited by the number of operations in the processing task that can be performed in parallel. For example, commutative operations, such as addition or multiplication of a series of numbers, can be performed in parallel to improve the processing time. However, other operations are serial in nature and cannot be substantially improved through parallel processing. For example, calculating a running total based on user input requires the processor to wait for the user input prior to performing each calculation. Thus, the operation is serial in nature and will not benefit substantially from parallel processing on a multi-core processor.
Parallel performance is also limited by the amount of communications overhead required to integrate the partial results that are computed on different cores. For example, in the case of adding n numbers together, each of p cores can add n/p of the numbers together in parallel. However, after this parallel step, there is a communications step in which the cores exchange the partial sums that have been computed. This is a communications overhead that does not occur when adding the numbers on a single core.
In order to benefit from the improvements offered by a multi-core processor, application code is often parallelized, where appropriate, such that each core is assigned a portion of the processing tasks that can be performed in parallel. However, current techniques for producing parallelized or concurrent application code suffer from various limitations. For example, one technique involves having a programmer write the application code using a parallel language designed for multi-core processing. However, manually producing the code using a parallel language is more prone to human error and places an additional burden on the programmer.