Add Value() for CudaMem;  Fix some gcc warning