Refactored cublas and curand methods into C++ class.