Added missing ifdef for compilation without cuda