Patent ID: 8468509

Claim:
A method of parallelizing execution of a computer program, comprising: determining a trip count for a loop of the computer program in advance of executing the loop, the determining including: identifying, for the loop, a first index value, a first condition value associated with a first condition, a first step size, and a first modulus; if the first index value does not satisfy the first condition, then setting the trip count to zero; if the first index value satisfies the first condition, and the first step size is equal to zero, then setting the trip count to infinity; if the first index value satisfies the first condition, and the first step size is not equal zero and is greater than half of the first modulus, then modifying the first index value and the first step size; and if the first index value satisfies the first condition, and the first step size is not equal to zero and is less than or equal to a difference between the first modulus and the first condition value, then setting the trip count to a value that is based on a difference between the first condition value and the first index value divided by the first step size and rounded up to a next integer when there is a non-zero remainder, else: calculating a zone based on the first step size and the first modulus; recursively performing the determining a trip count using a second index value, a second condition value associated with a second condition, a second step size, and a second modulus, each based on the zone, to return a recursive trip count value; and updating the trip count based on the returned, recursive trip count value; parallelizing the loop of the computer program based on the trip count; and executing the parallelized loop on multiple computer processors.