Add CudaMatrix block, setBlock, setBlockValue.

This commit is contained in:
sunwen
2023-11-09 17:56:13 +08:00
parent 029b86013e
commit d520489823
3 changed files with 271 additions and 7 deletions

View File

@@ -90,3 +90,13 @@ void unaryPow(float* in1, float N,float* out, unsigned long length){
thrust::transform(thrust::device,in1,in1+length,out,PowOperator(N));
}
void thrustFill(float* aBegin, float* aEnd, float aValue)
{
thrust::fill(thrust::device, aBegin, aEnd, aValue);
}
void thrustFill(float* aBegin, float* aEnd, std::complex<float> aValue)
{
thrust::fill(thrust::device, (std::complex<float>*)aBegin, (std::complex<float>*)aEnd, aValue);
}