fix compilation bugs (cudacc stricter than gccwq)