Small refactoring in CUDA code to guess which tools are needed.