In the implementation for PTHREADS (I'm not sure about the rest, I haven't checked, although I assume it's the same), the implementation of the PTRCHASE kernel is incorrect. The “start” variable is used to evaluate the loop termination condition. This variable is modified in each iteration of the loop. Therefore, the number of iterations of each thread is arbitrary, and not the one specified when launching the kernel. In fact, many threads may terminate much earlier than others, without executing the specified number of iterations.
In the implementation for PTHREADS (I'm not sure about the rest, I haven't checked, although I assume it's the same), the implementation of the PTRCHASE kernel is incorrect. The “start” variable is used to evaluate the loop termination condition. This variable is modified in each iteration of the loop. Therefore, the number of iterations of each thread is arbitrary, and not the one specified when launching the kernel. In fact, many threads may terminate much earlier than others, without executing the specified number of iterations.