Skip to content

Commit 979dcd4

Browse files
committed
Re-norm rotated & convolved template
1 parent ad9d768 commit 979dcd4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

NativeAcceleration/gtom/src/Correlation/SubTomograms.cu

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ namespace gtom
4343
d_ValueFill(d_bestangle, Elements(dimsvolume) * nvolumes, (float)0);
4444

4545
tcomplex* d_projectedftctf;
46-
cudaMalloc((void**)&d_projectedftctf, ElementsFFT(dimsvolume) * tmax(nvolumes, batchsize) * sizeof(tcomplex));
46+
cudaMalloc((void**)&d_projectedftctf, ElementsFFT(dimsvolume) * batchsize * sizeof(tcomplex));
4747
tcomplex* d_projectedftctfcorr;
48-
cudaMalloc((void**)&d_projectedftctfcorr, ElementsFFT(dimsvolume) * tmax(nvolumes, batchsize) * sizeof(tcomplex));
48+
cudaMalloc((void**)&d_projectedftctfcorr, ElementsFFT(dimsvolume) * batchsize * sizeof(tcomplex));
4949
tfloat* d_projected;
50-
cudaMalloc((void**)&d_projected, Elements(dimsvolume) * tmax(nvolumes, batchsize) * sizeof(tfloat));
50+
cudaMalloc((void**)&d_projected, Elements(dimsvolume) * batchsize * sizeof(tfloat));
5151

5252
cufftHandle planback = d_IFFTC2RGetPlan(ndims, dimsvolume, batchsize);
5353

@@ -60,6 +60,8 @@ namespace gtom
6060
// d_projectedftctf will contain rotated reference volume multiplied by CTF
6161
d_rlnProjectCTFMult(t_projectordataRe, t_projectordataIm, d_ctf, dimsprojector, d_projectedftctf, dimsvolume, h_angles + b, projectoroversample, curbatch);
6262

63+
d_NormFTMonolithic(d_projectedftctf, d_projectedftctf, ElementsFFT(dimsvolume), curbatch);
64+
6365
for (uint v = 0; v < nvolumes; v++)
6466
{
6567
// Multiply current experimental volume by conjugate references

0 commit comments

Comments
 (0)