Various C++ and CUDA Snippets