implemented mark for CUDA