Fix the external definition of the cuda functions