Add repmat and repmat3d, Fix sqrt with complex.

This commit is contained in:
sunwen
2023-11-27 09:47:59 +08:00
parent 3d68171394
commit fc9b6be9e8
4 changed files with 161 additions and 2 deletions

View File

@@ -147,6 +147,10 @@ CudaMatrix CudaMatrix::deepCopy() const
Matrix CudaMatrix::toHostMatrix() const
{
if(!mData.get())
{
return Matrix();
}
unsigned long long size = getDataSize() * getValueType();
float* data = new float[size];
cudaMemcpy(data, mData.get(), sizeof(float) * size, cudaMemcpyDeviceToHost);