Removed the defines and replaced them with an enum
Merge branch 'cuda'