Skip to content

Commit ec486e8

Browse files
committed
Fix wsave in fftf/fftb`: intent(inout) -> intent(in).
1 parent 0c4ecc4 commit ec486e8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

doc/specs/fftpack.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ for j=1,...,n
9999
```
100100

101101
`wsave`: Shall be a `real` array.
102-
This argument is `intent(inout)`.
102+
This argument is `intent(in)`.
103103
A `real` work array which must be dimensioned at least `4n+15` in the program that calls `zfftf`.
104104
The wsave array must be initialized by calling subroutine `zffti(n,wsave)` and a different `wsave` array must be used for each different value of `n`.
105105
This initialization does not have to be repeated so long as `n` remains unchanged thus subsequent transforms can be obtained faster than the first.
@@ -169,7 +169,7 @@ for j=1,...,n
169169
```
170170

171171
`wsave`: Shall be a `real` array.
172-
This argument is `intent(inout)`.
172+
This argument is `intent(in)`.
173173
A `real` work array which must be dimensioned at least `4n+15` in the program that calls `zfftf`. The `wsave` array must be initialized by calling subroutine `zffti(n,wsave)` and a different `wsave` array must be used for each different value of `n`. This initialization does not have to be repeated so long as `n` remains unchanged thus subsequent transforms can be obtained faster than the first. The same `wsave` array can be used by `zfftf` and `zfftb`.
174174
Contains initialization calculations which must not be destroyed between calls of subroutine `zfftf` or `zfftb`.
175175

@@ -385,7 +385,7 @@ if n is even
385385
```
386386

387387
`wsave`: Shall be a `real` array.
388-
This argument is `intent(inout)`.
388+
This argument is `intent(in)`.
389389
A `real` work array which must be dimensioned at least `4n+15` in the program that calls `dfftf`.
390390
The wsave array must be initialized by calling subroutine `dffti(n,wsave)` and a different `wsave` array must be used for each different value of `n`.
391391
This initialization does not have to be repeated so long as `n` remains unchanged thus subsequent transforms can be obtained faster than the first.
@@ -464,7 +464,7 @@ for n odd and for i = 1,...,n
464464
```
465465

466466
`wsave`: Shall be a `real` array.
467-
This argument is `intent(inout)`.
467+
This argument is `intent(in)`.
468468
A `real` work array which must be dimensioned at least `2n+15` in the program that calls `dfftf`. The `wsave` array must be initialized by calling subroutine `dffti(n,wsave)` and a different `wsave` array must be used for each different value of `n`. This initialization does not have to be repeated so long as `n` remains unchanged thus subsequent transforms can be obtained faster than the first. The same `wsave` array can be used by `dfftf` and `dfftb`.
469469
Contains initialization calculations which must not be destroyed between calls of subroutine `dfftf` or `dfftb`.
470470

src/fftpack.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pure subroutine zfftf(n, c, wsave)
3131
import dp
3232
integer, intent(in) :: n
3333
complex(kind=dp), intent(inout) :: c(*)
34-
real(kind=dp), intent(inout) :: wsave(*)
34+
real(kind=dp), intent(in) :: wsave(*)
3535
end subroutine zfftf
3636

3737
!> Version: experimental
@@ -42,7 +42,7 @@ pure subroutine zfftb(n, c, wsave)
4242
import dp
4343
integer, intent(in) :: n
4444
complex(kind=dp), intent(inout) :: c(*)
45-
real(kind=dp), intent(inout) :: wsave(*)
45+
real(kind=dp), intent(in) :: wsave(*)
4646
end subroutine zfftb
4747

4848
!> Version: experimental
@@ -63,7 +63,7 @@ pure subroutine dfftf(n, r, wsave)
6363
import dp
6464
integer, intent(in) :: n
6565
real(kind=dp), intent(inout) :: r(*)
66-
real(kind=dp), intent(inout) :: wsave(*)
66+
real(kind=dp), intent(in) :: wsave(*)
6767
end subroutine dfftf
6868

6969
!> Version: experimental
@@ -74,7 +74,7 @@ pure subroutine dfftb(n, r, wsave)
7474
import dp
7575
integer, intent(in) :: n
7676
real(kind=dp), intent(inout) :: r(*)
77-
real(kind=dp), intent(inout) :: wsave(*)
77+
real(kind=dp), intent(in) :: wsave(*)
7878
end subroutine dfftb
7979

8080
end interface

0 commit comments

Comments
 (0)