Patent ID: 8370845

Claim:
A method for synchronizing a plurality of cooperative thread arrays (CTAs) executing an algorithm within a parallel processing system, wherein the plurality of CTAs includes a first CTA, the method comprising: for a first plurality of threads within the first CTA, performing a first set of computations associated with a first pass of the algorithm; performing a thread synchronization operation across the first plurality of threads to ensure that all threads within the first CTA have completed the first set of computations; and for a first thread within the first CTA, incrementing a value stored in a unique location associated with each CTA in the plurality of CTAs within a semaphore array when all threads within the first CTA have completed the first set of computations, wherein the value stored in the unique location indicates the number of CTAs included in the plurality of CTAs that have completed the first pass of the algorithm, and wherein a subgroup of threads within the first CTA and a subgroup of threads within each of the other CTAs in the plurality of CTAs polls the unique location to determine whether all threads within all CTAs have completed the first set of computations.