fold_index Function

public function fold_index(i, n) result(src)

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.

Arguments

Type IntentOptional Attributes Name
integer, intent(in), value :: i
integer, intent(in), value :: n

Return Value real


Called by

proc~~fold_index~~CalledByGraph proc~fold_index m_cuda_spectral::fold_index proc~enforce_periodicity_x m_cuda_spectral::enforce_periodicity_x proc~enforce_periodicity_x->proc~fold_index proc~enforce_periodicity_xy m_cuda_spectral::enforce_periodicity_xy proc~enforce_periodicity_xy->proc~fold_index proc~enforce_periodicity_y m_cuda_spectral::enforce_periodicity_y proc~enforce_periodicity_y->proc~fold_index proc~undo_periodicity_x m_cuda_spectral::undo_periodicity_x proc~undo_periodicity_x->proc~fold_index proc~undo_periodicity_xy m_cuda_spectral::undo_periodicity_xy proc~undo_periodicity_xy->proc~fold_index proc~undo_periodicity_y m_cuda_spectral::undo_periodicity_y proc~undo_periodicity_y->proc~fold_index proc~enforce_periodicity_x_cuda m_cuda_poisson_fft::cuda_poisson_100_t%enforce_periodicity_x_cuda proc~enforce_periodicity_x_cuda->proc~enforce_periodicity_x proc~enforce_periodicity_xy_cuda m_cuda_poisson_fft::cuda_poisson_110_t%enforce_periodicity_xy_cuda proc~enforce_periodicity_xy_cuda->proc~enforce_periodicity_xy proc~enforce_periodicity_y_cuda m_cuda_poisson_fft::cuda_poisson_010_t%enforce_periodicity_y_cuda proc~enforce_periodicity_y_cuda->proc~enforce_periodicity_y proc~undo_periodicity_x_cuda m_cuda_poisson_fft::cuda_poisson_100_t%undo_periodicity_x_cuda proc~undo_periodicity_x_cuda->proc~undo_periodicity_x proc~undo_periodicity_xy_cuda m_cuda_poisson_fft::cuda_poisson_110_t%undo_periodicity_xy_cuda proc~undo_periodicity_xy_cuda->proc~undo_periodicity_xy proc~undo_periodicity_y_cuda m_cuda_poisson_fft::cuda_poisson_010_t%undo_periodicity_y_cuda proc~undo_periodicity_y_cuda->proc~undo_periodicity_y