Fixed build
Added specific code path to isnan and isinf for CUDA, issue #35