How to use CUDA API