Source index of entry i of a non-periodic line of n points gathered into a periodic one: the odd entries ascending, then the even entries descending, so that a plain FFT can stand in for the cosine transform. For an odd n the last entry lands at the centre, n/2 + 1. The single definition of the fold for the periodicity kernels: the enforce kernels gather through it and the undo kernels scatter through it, which keeps their reads contiguous. The OpenMP backend has the same function.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | value | :: | i | ||
| integer, | intent(in), | value | :: | n |