Add cuda compile define and cmake setting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#ifdef USE_CUDA
|
||||
#include "CudaMatrix.h"
|
||||
|
||||
#include "Function.h"
|
||||
@@ -218,6 +219,7 @@ CudaMatrix CudaMatrix::block(int aDim,int aBeginIndex, int aEndIndex) const
|
||||
return CudaMatrix::fromRawData(dataOutput,getDimSize(0),dimLength,getDimSize(2),getValueType());
|
||||
}
|
||||
case 2:
|
||||
default:
|
||||
{
|
||||
int copySize = dimLength*sliceStride;
|
||||
cudaMemcpy(dataOutput,
|
||||
@@ -235,4 +237,6 @@ bool CudaMatrix::setBlockValue(int aDim,int aBeginIndx, int aEndIndex,float valu
|
||||
std::cerr<<"CudaMatrix block only support 1D-3D data!"<<std::endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // USE_CUDA
|
||||
Reference in New Issue
Block a user