Previous | Next --- Slide 35 of 83
Back to Lecture Thumbnails
xiyan

If the ISPC code block is executed sequentially in a loop, we would have a deterministic behavior where if y[i] would be set to x[i] if x[i] is positive, and y[i-1] would be set to x[i] if x[i] is negative. However, the ISPC specify that loop body is independent and can be executed in parallel. A problem here is that it is possible that different values (x[i] or x[i+1]) could be written to the same y[i] location. Since the data-parallel model do not have any specification of the order of which the write occurs, the ISPC code have no deterministic output.

Please log in to leave a comment.