abstracted cublas matrix multiply function