Fixed a -Wenum-compare warning in cudev.
Merge pull request #1285 from SpecLad:enum-compare