Branch data Line data Source code
1 : : #ifdef HAVE_DFTI
2 : : !Local variables-------------------------------
3 : : !scalars
4 : : integer :: status,arr(4)
5 : : type(DFTI_DESCRIPTOR),pointer :: Desc1
6 : :
7 : : ! *************************************************************************
8 : :
9 [ + + + + ]: 182916 : status = DftiCreateDescriptor(Desc1, DEV_DFTI_PRECISION, DFTI_COMPLEX, 3, (/nx ,ny ,nz/) )
10 [ - + - + ]: 45729 : DFTI_CHECK(status)
11 : :
12 : 45729 : status = DftiSetValue(Desc1, DFTI_NUMBER_OF_TRANSFORMS, ndat)
13 : 45729 : status = DftiSetValue(Desc1, DFTI_INPUT_DISTANCE, ldx*ldy*ldz)
14 : 45729 : arr(1) = 0
15 : 45729 : arr(2) = 1
16 : 45729 : arr(3) = ldx
17 : 45729 : arr(4) = ldx*ldy
18 : 45729 : status = DftiSetValue(Desc1, DFTI_INPUT_STRIDES, arr )
19 [ + + + - : 45729 : if (isign == -1 .and. iscale /= 0) then
+ + + - ]
20 : 22022 : status = DftiSetValue(Desc1, DFTI_FORWARD_SCALE, one / DBLE(nx*ny*nz) )
21 : : end if
22 : :
23 : 45729 : status = DftiCommitDescriptor(Desc1)
24 [ - + - + ]: 45729 : DFTI_CHECK(status)
25 : :
26 [ + + + + ]: 45729 : if (isign==-1) then
27 : 22022 : status = DftiComputeForward(Desc1, ff)
28 [ + - + - ]: 23707 : else if (isign==+1) then
29 : 23707 : status = DftiComputeBackward(Desc1, ff)
30 : : else
31 : 0 : ABI_ERROR("Wrong isign")
32 : : end if
33 [ - + - + ]: 45729 : DFTI_CHECK(status)
34 : :
35 : 45729 : status = DftiFreeDescriptor(Desc1)
36 [ - + - + ]: 45729 : DFTI_CHECK(status)
37 : :
38 : : #else
39 : : ABI_ERROR("FFT_DFTI support not activated")
40 : : ABI_UNUSED((/nx,ny,nz,ldx,ldy,ldz,ndat,iscale,isign/))
41 : : ABI_UNUSED(ff)
42 : : #endif
|