Added early cuda version that uses cudamat