feat: fit to new cuda version

This commit is contained in:
kradchen
2025-03-27 09:06:13 +08:00
parent 6460267889
commit ed10e822ec

View File

@@ -1,5 +1,6 @@
#include "CudaMatrix.h" #include "CudaMatrix.h"
#include "detection.cuh" #include "detection.cuh"
#include "float.h"
#include <math.h> #include <math.h>
#include <thrust/transform.h> #include <thrust/transform.h>
#include <thrust/execution_policy.h> #include <thrust/execution_policy.h>
@@ -288,16 +289,7 @@ Recon::DetectResultC Recon::detectTofAndAtt(
auto ceilLog2 = nextpow2(2 * m - 1); auto ceilLog2 = nextpow2(2 * m - 1);
auto m2 = pow(2, ceilLog2); auto m2 = pow(2, ceilLog2);
{ {
CudaMatrix c_1_2; CudaMatrix c_1_2 = ifft(conj(fft(_AscanRefBlock, m2))*fft(_AscanBlock, m2));
{
CudaMatrix c_1_1;
{
auto x = fft(_AscanBlock, m2);
auto y = conj(fft(_AscanRefBlock, m2));
c_1_1 = x * y;
}
c_1_2 = ifft(c_1_1);
}
c1 = real(c_1_2); c1 = real(c_1_2);
} }
c = zerosCuda(mxl + mxl + 1, c1.getDimSize(1)); c = zerosCuda(mxl + mxl + 1, c1.getDimSize(1));