CUDA device/host memory buffer abstraction class in C++