Refactor the CUBLAS wrappers.