Fix compiling errors of cuda code with clang.
Still does not run in MAC rMBP GPU. cudaMemGetInfo return error 63.