match julia/base/pointer.jl for CudaPtr type