Patent ID: 8312254

Claim:
A method for executing indirect function calls in a synchronous parallel thread processor, the method comprising: receiving a first control instruction that references a set of pointers to one or more functions, the pointers specifying addresses of the one or more functions; determining that two of the pointers corresponding to different active threads in a thread group differ from one another, thereby indicating that the active threads are to diverge and are to execute different functions included in the one or more functions in the synchronous parallel thread processor; in response, pushing a first token onto an execution stack, the first token including an address of the first control instruction, a token type, and a mask that indicates each thread in the thread group that is active and is to execute a function included in the one or more functions that is different than a first function included in the one or more functions; and updating an active program counter to specify an address of a first function included in the one or more functions; modifying an active mask to disable the processing of any thread in the thread group that is execute a function included in the one or more functions that is different than the first function; and executing the first function.