adding cudamat