cufft_executor Derived Type

type, public, extends(abstract_executor) :: cufft_executor

cuFFT FFT Executor


Inherits

type~~cufft_executor~~InheritsGraph type~cufft_executor cufft_executor type~abstract_executor abstract_executor type~cufft_executor->type~abstract_executor c_ptr c_ptr type~abstract_executor->c_ptr plan_forward, plan_backward

Components

Type Visibility Attributes Name Initial
type(c_ptr), public :: plan_forward

Pointer to forward plan

type(c_ptr), public :: plan_backward

Pointer to backward plan

logical, public :: is_inverse_copied = .false.

Is inverse plan copied?


Type-Bound Procedures

procedure, public, non_overridable, pass(self) :: create

Creates FFT plan

  • private function create(self, fft_rank, fft_type, precision, real_pencil, complex_pencil, r2r_kinds)

    Creates FFT plan

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_executor), intent(inout) :: self

    FFT Executor

    integer(kind=int8), intent(in) :: fft_rank

    Rank of fft: 1 or 2

    integer(kind=int8), intent(in) :: fft_type

    Type of fft: r2r, r2c, c2c

    type(dtfft_precision_t), intent(in) :: precision

    Precision of fft: DTFFT_SINGLE or DTFFT_DOUBLE

    type(pencil), intent(in), optional :: real_pencil

    Real data layout

    type(pencil), intent(in), optional :: complex_pencil

    Complex data layout

    type(dtfft_r2r_kind_t), intent(in), optional :: r2r_kinds(:)

    Kinds of r2r transform

    Return Value integer(kind=int32)

procedure, public, non_overridable, pass(self) :: execute

Executes plan

  • private subroutine execute(self, in, out, sign)

    Executes plan

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_executor), intent(in) :: self

    FFT Executor

    type(c_ptr), intent(in) :: in

    Source buffer

    type(c_ptr), intent(in) :: out

    Target buffer

    integer(kind=int8), intent(in) :: sign

    Sign of transform

procedure, public, non_overridable, pass(self) :: destroy

Destroys plan

  • private subroutine destroy(self)

    Destroys plan

    Arguments

    Type IntentOptional Attributes Name
    class(abstract_executor), intent(inout) :: self

    FFT Executor

procedure, public :: create_private => create

Creates FFT plan via cuFFT Interface

  • private subroutine create(self, fft_rank, fft_type, precision, idist, odist, how_many, fft_sizes, inembed, onembed, error_code, r2r_kinds)

    Creates FFT plan via cuFFT Interface

    Arguments

    Type IntentOptional Attributes Name
    class(cufft_executor), intent(inout) :: self

    cuFFT FFT Executor

    integer(kind=int8), intent(in) :: fft_rank

    Rank of fft: 1 or 2

    integer(kind=int8), intent(in) :: fft_type

    Type of fft: r2r, r2c, c2c

    type(dtfft_precision_t), intent(in) :: precision

    Precision of fft: DTFFT_SINGLE or DTFFT_DOUBLE

    integer(kind=int32), intent(in) :: idist

    Distance between the first element of two consecutive signals in a batch of the input data.

    integer(kind=int32), intent(in) :: odist

    Distance between the first element of two consecutive signals in a batch of the output data.

    integer(kind=int32), intent(in) :: how_many

    Number of transforms to create

    integer(kind=int32), intent(in) :: fft_sizes(:)

    Dimensions of transform

    integer(kind=int32), intent(in) :: inembed(:)

    Storage dimensions of the input data in memory.

    integer(kind=int32), intent(in) :: onembed(:)

    Storage dimensions of the output data in memory.

    integer(kind=int32), intent(inout) :: error_code

    Error code to be returned to user

    type(dtfft_r2r_kind_t), intent(in), optional :: r2r_kinds(:)

    Kinds of r2r transform

procedure, public :: execute_private => execute

Executes cuFFT plan

  • private subroutine execute(self, a, b, sign)

    Executes cuFFT plan

    Arguments

    Type IntentOptional Attributes Name
    class(cufft_executor), intent(in) :: self

    cuFFT FFT Executor

    type(c_ptr), intent(in) :: a

    Source pointer

    type(c_ptr), intent(in) :: b

    Target pointer

    integer(kind=int8), intent(in) :: sign

    Sign of transform

procedure, public :: destroy_private => destroy

Destroys cuFFT plan

  • private subroutine destroy(self)

    Destroys cuFFT plan

    Arguments

    Type IntentOptional Attributes Name
    class(cufft_executor), intent(inout) :: self

    cuFFT FFT Executor

procedure, public, nopass :: mem_alloc

Dummy method. Raises error stop

  • private subroutine mem_alloc(alloc_bytes, ptr)

    Dummy method. Raises error stop

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int64), intent(in) :: alloc_bytes

    Number of bytes to allocate

    type(c_ptr), intent(out) :: ptr

    Allocated pointer

procedure, public, nopass :: mem_free

Dummy method. Raises error stop

  • private subroutine mem_free(ptr)

    Dummy method. Raises error stop

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), intent(in) :: ptr

    Pointer to free