added code from Khronos version that marks kernel functions