fixed unused function in case of unavailable CUDA
Merge pull request #2253 from ilya-lavrenov:cuda