protecting cuda  with #ifdef