You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/aspire/abinitio/commonline_base.cu
+7-19Lines changed: 7 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
+
#include<cupy/complex.cuh>
1
2
2
3
extern"C"__global__
3
-
voidbuild_clmatrix_kernel(int n, int m, int r, double* pf, double* clmatrix, double* cl_dist, double* shifts_1d, int n_shifts, int* shifts, double* shift_phases)
4
+
voidbuild_clmatrix_kernel(int n, int m, int r, constcomplex<double>* __restrict__pf, double* __restrict__clmatrix, double* __restrict__cl_dist, double* __restrict__shifts_1d, int n_shifts, int* __restrict__shifts, constcomplex<double>* __restrict__ shift_phases)
4
5
{
5
6
/* n n_img */
6
7
/* m,r st (n, m, r) = pf.shape, ie len(pf[i]) */
@@ -22,12 +23,7 @@ void build_clmatrix_kernel(int n, int m, int r, double* pf, double* clmatrix, do
22
23
int best_cl1, best_cl2, best_s;
23
24
double dist, best_cl_dist;
24
25
double p1, p2;
25
-
26
-
double p1_realk, p1_imagk;
27
-
double p2conj_realk, p2conj_imagk;
28
-
double p2_realk, p2_imagk;
29
-
double shift_phases_real, shift_phases_imag;
30
-
26
+
complex<double> pfik, pfjk;
31
27
32
28
best_s = -99999;
33
29
best_cl1 = -1;
@@ -41,18 +37,10 @@ void build_clmatrix_kernel(int n, int m, int r, double* pf, double* clmatrix, do
0 commit comments