dtfft_plan_t Derived Type

type, public, abstract :: dtfft_plan_t

Abstract class for all dtFFT plans


Inherits

type~~dtfft_plan_t~~InheritsGraph type~dtfft_plan_t dtfft_plan_t MPI_Comm MPI_Comm type~dtfft_plan_t->MPI_Comm comm, comms c_ptr c_ptr type~dtfft_plan_t->c_ptr aux_ptr type~dtfft_effort_t dtfft_effort_t type~dtfft_plan_t->type~dtfft_effort_t effort type~dtfft_executor_t dtfft_executor_t type~dtfft_plan_t->type~dtfft_executor_t executor type~dtfft_platform_t dtfft_platform_t type~dtfft_plan_t->type~dtfft_platform_t platform type~dtfft_precision_t dtfft_precision_t type~dtfft_plan_t->type~dtfft_precision_t precision type~dtfft_stream_t dtfft_stream_t type~dtfft_plan_t->type~dtfft_stream_t stream type~fft_executor fft_executor type~dtfft_plan_t->type~fft_executor fft type~pencil pencil type~dtfft_plan_t->type~pencil pencils, bricks type~reshape_plan reshape_plan type~dtfft_plan_t->type~reshape_plan rplan type~transpose_plan transpose_plan type~dtfft_plan_t->type~transpose_plan plan type~dtfft_stream_t->c_ptr stream type~abstract_executor abstract_executor type~fft_executor->type~abstract_executor fft type~reshape_plan->MPI_Comm comms type~reshape_plan_base reshape_plan_base type~reshape_plan->type~reshape_plan_base type~transpose_plan->type~reshape_plan_base type~abstract_executor->c_ptr plan_forward, plan_backward type~reshape_plan_base->type~dtfft_platform_t platform type~reshape_plan_base->type~dtfft_stream_t stream type~backend_helper backend_helper type~reshape_plan_base->type~backend_helper helper type~dtfft_backend_t dtfft_backend_t type~reshape_plan_base->type~dtfft_backend_t backend type~reshape_container reshape_container type~reshape_plan_base->type~reshape_container plans type~string string type~reshape_plan_base->type~string names type~backend_helper->MPI_Comm comms type~backend_helper->c_ptr nccl_register type~backend_helper->type~pencil pencils type~dtfft_reshape_t dtfft_reshape_t type~backend_helper->type~dtfft_reshape_t reshape_type type~dtfft_transpose_t dtfft_transpose_t type~backend_helper->type~dtfft_transpose_t transpose_type type~ncclcomm ncclComm type~backend_helper->type~ncclcomm nccl_comm type~abstract_reshape_handle abstract_reshape_handle type~reshape_container->type~abstract_reshape_handle p type~ncclcomm->c_ptr member

Inherited by

type~~dtfft_plan_t~~InheritedByGraph type~dtfft_plan_t dtfft_plan_t type~dtfft_core_c2c dtfft_core_c2c type~dtfft_core_c2c->type~dtfft_plan_t type~dtfft_plan_r2r_t dtfft_plan_r2r_t type~dtfft_plan_r2r_t->type~dtfft_plan_t type~plan_c plan_c type~plan_c->type~dtfft_plan_t p type~dtfft_plan_c2c_t dtfft_plan_c2c_t type~dtfft_plan_c2c_t->type~dtfft_core_c2c type~dtfft_plan_r2c_t dtfft_plan_r2c_t type~dtfft_plan_r2c_t->type~dtfft_core_c2c

Components

Type Visibility Attributes Name Initial
integer(kind=int8), private :: ndims

Number of global dimensions

integer(kind=int32), private, allocatable :: dims(:)

Global dimensions

integer(kind=int32), private, allocatable :: grid_dims(:)

Grid decomposition dimensions

type(dtfft_precision_t), private :: precision

Precision of transform

logical, private :: is_created = .false.

Plan creation flag

logical, private :: is_transpose_plan = .false.

Plan is transpose only

logical, private :: is_aux_alloc = .false.

Auxiliary buffer is allocated internally

logical, private :: is_z_slab = .false.

Using Z-slab optimization

Only 3D plan.

When .true., then data is distributed only Z direction and it creates a possibility for optimization:

  • 2 dimensional FFT plan is created for both X and Y dimensions
  • Single call to MPI_Alltoall is required to transpose data from X-align to Z-align

For CUDA build this optimization means single CUDA kernel that tranposes data directly from X to Z

logical, private :: is_y_slab = .false.

Using Y-slab optimization

Only 3D plan.

When .true., then data is distributed only Y direction and it creates a possibility for optimization:

  • 2 dimensional FFT plan is created for both Y and Z dimensions
  • Transpose from Y-align to Z-align is skipped
logical, private :: is_reshape_enabled = .false.

Reshape operations from bricks to pencils and vice versa are enabled

logical, private :: is_final_reshape_enabled = .false.

Final reshape from pencils to bricks in fourier space is enabled Default is .false., which means data remains in pencils layout in fourier space

type(dtfft_effort_t), private :: effort

User defined type of effort

integer(kind=int64), private :: storage_size

Single element size in bytes

type(dtfft_executor_t), private :: executor

FFT executor type

type(MPI_Comm), private :: comm

Grid communicator

type(MPI_Comm), private, allocatable :: comms(:)

Local 1d communicators

type(transpose_plan), private :: plan

Transpose plan handle

type(reshape_plan), private :: rplan

Reshape plan handle

type(pencil), private, allocatable :: pencils(:)

Information about data aligment and datatypes

type(pencil), private :: bricks(2)

Pencil decomposition info in bricks layout for both real and fourier spaces

type(dtfft_platform_t), private :: platform

Execution platform

type(dtfft_stream_t), private :: stream

CUDA Stream associated with current plan

type(c_ptr), private :: aux_ptr

Auxiliary pointer

type(fft_executor), private, allocatable :: fft(:)

Internal fft runners

integer(kind=int32), private, allocatable :: fft_mapping(:)

Memory and plan creation optimization. In case same FFTs needs to be run in different dimensions only single FFT plan needs to be created


Type-Bound Procedures

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

Performs single transposition

  • private subroutine transpose(self, in, out, transpose_type, aux, error_code)

    Performs single transposition

    Read more…

    Arguments

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

    Abstract plan

    type(*), intent(inout), target :: in(..)

    Incoming buffer of any rank and kind. Note that this buffer will be modified in GPU build

    type(*), intent(inout), target :: out(..)

    Resulting buffer of any rank and kind

    type(dtfft_transpose_t), intent(in) :: transpose_type

    Type of transposition.

    type(*), intent(inout), optional, target :: aux(..)

    Optional auxiliary buffer. If provided, size of buffer must be at least the value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Performs single transposition using type(c_ptr) pointers instead of buffers

  • private subroutine transpose_ptr(self, in, out, transpose_type, aux, error_code)

    Performs single transposition using type(c_ptr) pointers instead of buffers

    Read more…

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_transpose_t), intent(in) :: transpose_type

    Type of transposition.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Starts an asynchronous transpose operation

  • private function transpose_start(self, in, out, transpose_type, aux, error_code) result(request)

    Starts an asynchronous transpose operation

    Read more…

    Arguments

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

    Abstract plan

    type(*), intent(inout), target :: in(..)

    Incoming buffer of any rank and kind. Note that this buffer will be modified in GPU build

    type(*), intent(inout), target :: out(..)

    Resulting buffer of any rank and kind

    type(dtfft_transpose_t), intent(in) :: transpose_type

    Type of transposition.

    type(*), intent(inout), optional, target :: aux(..)

    Optional auxiliary buffer. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_request_t)

    Asynchronous handle describing started transpose operation

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

Starts an asynchronous transpose operation using type(c_ptr) pointers instead of buffers

  • private function transpose_start_ptr(self, in, out, transpose_type, aux, error_code) result(request)

    Starts an asynchronous transpose operation using type(c_ptr) pointers instead of buffers

    Read more…

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_transpose_t), intent(in) :: transpose_type

    Type of transposition.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_request_t)

    Asynchronous handle describing started transpose operation

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

Ends previously started transposition

  • private subroutine transpose_end(self, request, error_code)

    Ends previously started transposition

    Arguments

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

    Abstract plan

    type(dtfft_request_t), intent(inout) :: request

    Handle obtained from transpose_start or transpose_start_ptr

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Executes plan

  • private subroutine execute(self, in, out, execute_type, aux, error_code)

    Executes plan

    Arguments

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

    Abstract plan

    type(*), intent(inout), target :: in(..)

    Incoming buffer of any rank and kind

    type(*), intent(inout), target :: out(..)

    Resulting buffer of any rank and kind

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

    type(*), intent(inout), optional, target :: aux(..)

    Optional auxiliary buffer. If provided, size of buffer must be at least the value returned by get_aux_size function

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Executes plan using type(c_ptr) pointers instead of buffers

  • private subroutine execute_ptr(self, in, out, execute_type, aux, error_code)

    Executes plan using type(c_ptr) pointers instead of buffers

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Performs reshape from bricks to pencils layout or vice versa

  • private subroutine reshape(self, in, out, reshape_type, aux, error_code)

    Performs reshape from bricks to pencils layout or vice versa

    Read more…

    Arguments

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

    Abstract plan

    type(*), intent(inout), target :: in(..)

    Incoming buffer of any rank and kind. Note that this buffer will be modified in GPU build

    type(*), intent(inout), target :: out(..)

    Resulting buffer of any rank and kind

    type(dtfft_reshape_t), intent(in) :: reshape_type

    Type of reshape.

    type(*), intent(inout), optional, target :: aux(..)

    Optional auxiliary buffer. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Performs reshape from bricks to pencils layout or vice versa using type(c_ptr) pointers instead of buffers

  • private subroutine reshape_ptr(self, in, out, reshape_type, aux, error_code)

    Performs reshape from bricks to pencils layout or vice versa using type(c_ptr) pointers instead of buffers

    Read more…

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_reshape_t), intent(in) :: reshape_type

    Type of reshape.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Starts an asynchronous reshape operation

  • private function reshape_start(self, in, out, reshape_type, aux, error_code) result(request)

    Starts an asynchronous reshape operation

    Read more…

    Arguments

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

    Abstract plan

    type(*), intent(inout), target :: in(..)

    Incoming buffer of any rank and kind. Note that this buffer will be modified in GPU build

    type(*), intent(inout), target :: out(..)

    Resulting buffer of any rank and kind

    type(dtfft_reshape_t), intent(in) :: reshape_type

    Type of reshape.

    type(*), intent(inout), optional, target :: aux(..)

    Optional auxiliary buffer. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_request_t)

    Asynchronous handle describing started reshape operation

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

Starts an asynchronous reshape operation using type(c_ptr) pointers instead of buffers

  • private function reshape_start_ptr(self, in, out, reshape_type, aux, error_code) result(request)

    Starts an asynchronous reshape operation using type(c_ptr) pointers instead of buffers

    Read more…

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_reshape_t), intent(in) :: reshape_type

    Type of reshape.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_request_t)

    Asynchronous handle describing started reshape operation

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

Ends an asynchronous reshape operation

  • private subroutine reshape_end(self, request, error_code)

    Ends an asynchronous reshape operation

    Arguments

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

    Abstract plan

    type(dtfft_request_t), intent(inout) :: request

    Asynchronous handle describing started reshape operation

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Destroys plan

  • private subroutine destroy(self, error_code)

    Destroys plan, frees all memory

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional Error Code returned to user

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

Returns local starts and counts in real and fourier spaces

  • private subroutine get_local_sizes(self, in_starts, in_counts, out_starts, out_counts, alloc_size, error_code)

    Obtain local starts and counts in real and fourier spaces

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: in_starts(:)

    Starts of local portion of data in real space (0-based)

    integer(kind=int32), intent(out), optional :: in_counts(:)

    Number of elements of local portion of data in ‘real’ space

    integer(kind=int32), intent(out), optional :: out_starts(:)

    Starts of local portion of data in fourier space (0-based)

    integer(kind=int32), intent(out), optional :: out_counts(:)

    Number of elements of local portion of data in fourier space

    integer(kind=int64), intent(out), optional :: alloc_size

    Minimal number of elements required to execute plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Wrapper around get_local_sizes to obtain number of elements only

  • private function get_alloc_size(self, error_code) result(alloc_size)

    Wrapper around get_local_sizes to obtain number of elements only

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

    Minimal number of elements required to execute plan

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

Returns logical value is Z-slab optimization is enabled

  • private function get_z_slab_enabled(self, error_code)

    Returns logical value is Z-slab optimization enabled internally

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value logical

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

Returns logical value is Y-slab optimization is enabled

  • private function get_y_slab_enabled(self, error_code)

    Returns logical value is Y-slab optimization enabled internally

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value logical

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

Returns pencil decomposition

  • private function get_pencil(self, layout, error_code)

    Returns pencil decomposition

    Arguments

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

    Abstract plan

    type(dtfft_layout_t), intent(in) :: layout

    Required layout

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_pencil_t)

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

Returns number of bytes required to store single element.

  • private function get_element_size(self, error_code)

    Returns number of bytes required to store single element.

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns minimum number of bytes required to execute plan

  • private function get_alloc_bytes(self, error_code)

    Returns minimum number of bytes required to execute plan

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns size of auxiliary buffer in elements

  • private function get_aux_size(self, error_code)

    Returns minimum number of elements required for auxiliary buffer which may be different from alloc_size when backend is pipelined

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns minimum number of bytes required for auxiliary buffer

  • private function get_aux_bytes(self, error_code)

    Returns minimum number of bytes required for auxiliary buffer which may be different from alloc_bytes when backend is pipelined

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns size of auxiliary buffer for reshape in elements

  • private function get_aux_size_reshape(self, error_code)

    Returns minimum number of elements required for reshape auxiliary buffer

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns minimum number of bytes required for auxiliary buffer for reshape

  • private function get_aux_bytes_reshape(self, error_code)

    Returns minimum number of bytes required for reshape auxiliary buffer

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns size of auxiliary buffer for transpose in elements

  • private function get_aux_size_transpose(self, error_code)

    Returns minimum number of elements required for reshape auxiliary buffer

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns minimum number of bytes required for auxiliary buffer for transpose

  • private function get_aux_bytes_transpose(self, error_code)

    Returns minimum number of bytes required for transpose auxiliary buffer

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value integer(kind=int64)

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

Returns FFT Executor associated with plan

  • private function get_executor(self, error_code)

    Returns FFT Executor associated with plan

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_executor_t)

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

Returns global dimensions

  • private subroutine get_dims(self, dims, error_code)

    Returns global dimensions

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), pointer :: dims(:)

    Global dimensions

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Returns grid decomposition dimensions

  • private subroutine get_grid_dims(self, grid_dims, error_code)

    Returns grid decomposition dimensions

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), pointer :: grid_dims(:)

    Grid dimensions

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Returns precision of plan

  • private function get_precision(self, error_code)

    Returns precision of the plan

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_precision_t)

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

Prints plan details

  • private subroutine report(self, error_code)

    Prints plan-related information to stdout

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Reports compression

  • private subroutine report_compression(self, error_code)

    Report compression ratios for all operations where compression was performed This function can be repeatedly called after plan creation and after execution to see how compression ratios evolve.

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Allocates memory for type(c_ptr)

  • private function mem_alloc_ptr(self, alloc_bytes, error_code) result(ptr)

    Allocates memory specific for this plan

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_bytes

    Number of bytes to allocate

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(c_ptr)

    Allocated pointer

Allocates memory specific for this plan

  • private subroutine mem_alloc_r32_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_r64_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_r32_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_r64_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_r32_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_r64_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c32_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c64_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c32_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c64_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c32_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_alloc_c64_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Frees previously allocated memory for type(c_ptr)

  • private subroutine mem_free_ptr(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

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

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

Frees previously allocated memory specific for this plan

  • private subroutine mem_free_r32_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_r32_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_r32_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_r64_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_r64_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_r64_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c32_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c32_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c32_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c64_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c64_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine mem_free_c64_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

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

Returns selected backend during autotuning

  • private function get_backend(self, error_code)

    Returns selected backend during autotuning

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_backend_t)

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

Returns selected backend for reshape operations during autotuning

  • private function get_reshape_backend(self, error_code)

    Returns selected reshape backend during autotuning

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_backend_t)

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

Returns plan execution platform

  • private function get_platform(self, error_code)

    Returns execution platform of the plan (HOST or CUDA)

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    Return Value type(dtfft_platform_t)

generic, public :: get_stream => get_stream_ptr, get_stream_int64

Returns CUDA stream associated with plan

  • private subroutine get_stream_ptr(self, stream, error_code)

    Returns CUDA stream associated with plan

    Arguments

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

    Abstract plan

    type(dtfft_stream_t), intent(out) :: stream

    dtFFT Stream

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

  • private subroutine get_stream_int64(self, stream, error_code)

    Returns CUDA stream associated with plan

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(out) :: stream

    CUDA-Fortran Stream

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: get_stream_ptr

Returns CUDA stream associated with plan

  • private subroutine get_stream_ptr(self, stream, error_code)

    Returns CUDA stream associated with plan

    Arguments

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

    Abstract plan

    type(dtfft_stream_t), intent(out) :: stream

    dtFFT Stream

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: get_stream_int64

Returns CUDA stream associated with plan

  • private subroutine get_stream_int64(self, stream, error_code)

    Returns CUDA stream associated with plan

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(out) :: stream

    CUDA-Fortran Stream

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: execute_private

Executes plan

  • private subroutine execute_private(self, in, out, execute_type, aux, inplace, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

    logical, intent(in) :: inplace

    Inplace execution flag

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_2d

Executes 2d plan

  • private subroutine execute_2d(self, in, out, execute_type, aux, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_2d_reshape

  • private subroutine execute_2d_reshape(self, in, out, execute_type, aux, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_z_slab

Executes Z slab plan

  • private subroutine execute_z_slab(self, in, out, execute_type, aux, inplace, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

    logical, intent(in) :: inplace

    Inplace execution flag

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_z_slab_reshape

  • private subroutine execute_z_slab_reshape(self, in, out, execute_type, aux, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_generic

Executes plan with specified auxiliary buffer

  • private subroutine execute_generic(self, in, out, execute_type, aux, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: execute_generic_reshape

  • private subroutine execute_generic_reshape(self, in, out, execute_type, aux, aux2)

    Executes plan with specified auxiliary buffer

    Arguments

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

    Abstract plan

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

    Source pointer

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

    Target pointer

    type(dtfft_execute_t), intent(in) :: execute_type

    Type of execution.

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

    Auxiliary pointer.

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

    Second Auxiliary pointer.

procedure, private, pass(self), non_overridable :: transpose_private

Performs single transposition using type(c_ptr) pointers instead of buffers

  • private subroutine transpose_private(self, in, out, aux, transpose_type, exec_type, error_code)

    Performs single transposition using type(c_ptr) pointers instead of buffers

    Read more…

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    type(dtfft_transpose_t), intent(in) :: transpose_type

    Type of transposition.

    type(async_exec_t), intent(in) :: exec_type

    Type of asynchronous execution.

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: reshape_private

Performs reshape from bricks to pencils layout or vice versa using type(c_ptr) pointers instead of buffers

  • private subroutine reshape_private(self, in, out, reshape_type, aux, exec_type, error_code, true_aux)

    Performs reshape from bricks to pencils layout or vice versa using type(c_ptr) pointers instead of buffers

    Arguments

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

    Abstract plan

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

    Incoming pointer. Note that values of this pointer will be modified in GPU build

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

    Resulting pointer

    type(dtfft_reshape_t), intent(in) :: reshape_type

    Type of reshape.

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

    Auxiliary buffer. Not optional. If not required, c_null_ptr must be passed. Size of buffer must be greater than value returned by alloc_size parameter of get_local_sizes subroutine

    type(async_exec_t), intent(in) :: exec_type

    Type of asynchronous execution.

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

    type(c_ptr), intent(out), optional :: true_aux

procedure, private, pass(self), non_overridable :: check_create_args

Check arguments provided to create subroutines

  • private function check_create_args(self, dims, pencil, comm, precision, effort, executor, kinds)

    Check arguments provided by user and sets private variables

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(in), optional :: dims(:)

    Global dimensions of transform

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

    Pencil of local portion of data

    type(MPI_Comm), intent(in), optional :: comm

    Optional MPI Communicator

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

    Precision of transform: DTFFT_SINGLE or DTFFT_DOUBLE

    type(dtfft_effort_t), intent(in), optional :: effort

    Effort level for the plan creation

    type(dtfft_executor_t), intent(in), optional :: executor

    Type of External FFT Executor

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

    Kinds of R2R transform

    Return Value integer(kind=int32)

procedure, private, pass(self), non_overridable :: create_private

Creates core

  • private function create_private(self, sngl_type, sngl_storage_size, dbl_type, dbl_storage_size, dims, pencil, comm, precision, effort, executor, kinds, sngl_type_init, sngl_storage_size_init, dbl_type_init, dbl_storage_size_init)

    Creates core

    Arguments

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

    Abstract plan

    type(MPI_Datatype), intent(in) :: sngl_type

    MPI_Datatype for single precision plan

    integer(kind=int64), intent(in) :: sngl_storage_size

    Number of bytes needed to store single element (single precision)

    type(MPI_Datatype), intent(in) :: dbl_type

    MPI_Datatype for double precision plan

    integer(kind=int64), intent(in) :: dbl_storage_size

    Number of bytes needed to store single element (double precision)

    integer(kind=int32), intent(in), optional :: dims(:)

    Global dimensions of transform

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

    Pencil of local portion of data

    type(MPI_Comm), intent(in), optional :: comm

    User-defined communicator

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

    Precision of transform: DTFFT_SINGLE or DTFFT_DOUBLE

    type(dtfft_effort_t), intent(in), optional :: effort

    Effort level for the plan creation

    type(dtfft_executor_t), intent(in), optional :: executor

    Type of External FFT Executor

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

    Kinds of R2R transform

    type(MPI_Datatype), intent(in), optional :: sngl_type_init

    MPI_Datatype for single precision plan (should be passed only for R2C plans)

    integer(kind=int64), intent(in), optional :: sngl_storage_size_init

    Number of bytes needed to store single element (single precision) (should be passed only for R2C plans)

    type(MPI_Datatype), intent(in), optional :: dbl_type_init

    MPI_Datatype for double precision plan (should be passed only for R2C plans)

    integer(kind=int64), intent(in), optional :: dbl_storage_size_init

    Number of bytes needed to store single element (double precision) (should be passed only for R2C plans)

    Return Value integer(kind=int32)

procedure, private, pass(self), non_overridable :: alloc_fft_plans

Allocates fft_executor classes

procedure, private, pass(self), non_overridable :: check_aux

Checks if aux buffer was passed and if not will allocate one internally

  • private subroutine check_aux(self, aux, called_by, aux_ptr, aux2_ptr)

    Checks if aux buffer was passed by user and if not will allocate one internally

    Arguments

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

    Abstract plan

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

    Optional auxiliary buffer.

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

    Indicates which function called check_aux for correct allocation

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

    Auxiliary buffer pointer

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

    Second Auxiliary buffer pointer (used transpose/reshape operations)

procedure, private, pass(self), non_overridable :: get_local_sizes_internal

  • private subroutine get_local_sizes_internal(self, in_starts, in_counts, out_starts, out_counts, alloc_size)

    Obtain local starts and counts in real and fourier spaces

    Arguments

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

    Abstract plan

    integer(kind=int32), intent(out), optional :: in_starts(:)

    Starts of local portion of data in real space (0-based)

    integer(kind=int32), intent(out), optional :: in_counts(:)

    Number of elements of local portion of data in ‘real’ space

    integer(kind=int32), intent(out), optional :: out_starts(:)

    Starts of local portion of data in fourier space (0-based)

    integer(kind=int32), intent(out), optional :: out_counts(:)

    Number of elements of local portion of data in fourier space

    integer(kind=int64), intent(out), optional :: alloc_size

    Minimal number of elements required to execute plan

procedure, private, pass(self), non_overridable :: mem_alloc_r32_1d

Allocates memory for 1d real32 pointer

  • private subroutine mem_alloc_r32_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_r64_1d

Allocates memory for 1d real64 pointer

  • private subroutine mem_alloc_r64_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_r32_2d

Allocates memory for 2d real32 pointer

  • private subroutine mem_alloc_r32_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_r64_2d

Allocates memory for 2d real64 pointer

  • private subroutine mem_alloc_r64_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_r32_3d

Allocates memory for 2d real32 pointer

  • private subroutine mem_alloc_r32_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real32), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_r64_3d

Allocates memory for 2d real64 pointer

  • private subroutine mem_alloc_r64_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    real(kind=real64), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c32_1d

Allocates memory for 1d complex32 pointer

  • private subroutine mem_alloc_c32_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c64_1d

Allocates memory for 1d complex64 pointer

  • private subroutine mem_alloc_c64_1d(self, alloc_size, ptr, lbound, error_code)

    Allocates pointer of rank 1

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:)

    Allocated pointer

    integer(kind=int32), intent(in), optional :: lbound

    Lower boundary of pointer, default is 1

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c32_2d

Allocates memory for 2d complex32 pointer

  • private subroutine mem_alloc_c32_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c64_2d

Allocates memory for 2d complex64 pointer

  • private subroutine mem_alloc_c64_2d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 2

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(2)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(2)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c32_3d

Allocates memory for 3d complex32 pointer

  • private subroutine mem_alloc_c32_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real32), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_alloc_c64_3d

Allocates memory for 3d complex64 pointer

  • private subroutine mem_alloc_c64_3d(self, alloc_size, ptr, sizes, lbounds, error_code)

    Allocates pointer of rank 3

    Arguments

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

    Abstract plan

    integer(kind=int64), intent(in) :: alloc_size

    Number of elements to allocate

    complex(kind=real64), intent(out), pointer :: ptr(:,:,:)

    Allocated pointer

    integer(kind=int32), intent(in) :: sizes(3)

    Number of elements in each direction

    integer(kind=int32), intent(in), optional :: lbounds(3)

    Lower boundaries of pointer, default is (1, 1)

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r32_1d

Frees real32 1d pointer

  • private subroutine mem_free_r32_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r64_1d

Frees real64 1d pointer

  • private subroutine mem_free_r64_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r32_2d

Frees real32 2d pointer

  • private subroutine mem_free_r32_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r64_2d

Frees real64 2d pointer

  • private subroutine mem_free_r64_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r32_3d

Frees real32 3d pointer

  • private subroutine mem_free_r32_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real32), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_r64_3d

Frees real64 3d pointer

  • private subroutine mem_free_r64_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    real(kind=real64), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c32_1d

Frees complex32 1d pointer

  • private subroutine mem_free_c32_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c64_1d

Frees complex64 1d pointer

  • private subroutine mem_free_c64_1d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c32_2d

Frees complex32 2d pointer

  • private subroutine mem_free_c32_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c64_2d

Frees complex64 2d pointer

  • private subroutine mem_free_c64_2d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c32_3d

Frees complex32 3d pointer

  • private subroutine mem_free_c32_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real32), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user

procedure, private, pass(self), non_overridable :: mem_free_c64_3d

Frees complex64 3d pointer

  • private subroutine mem_free_c64_3d(self, ptr, error_code)

    Frees previously allocated memory specific for this plan

    Arguments

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

    Abstract plan

    complex(kind=real64), intent(inout), target :: ptr(:,:,:)

    Pointer allocated with mem_alloc

    integer(kind=int32), intent(out), optional :: error_code

    Optional error code returned to user