Merge branch 'dtof' of http://192.168.1.9:3000/Bug/Aurora into dtof

This commit is contained in:
kradchen
2023-11-27 10:19:52 +08:00
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);