InOMPDeviceContext may be greater than 1. It needs to be clamp to 0 and 1 to be used as index for DoneMap.