dtfft_interface_cufft Module

cuFFT Interfaces


Uses

  • module~~dtfft_interface_cufft~~UsesGraph module~dtfft_interface_cufft dtfft_interface_cufft iso_c_binding iso_c_binding module~dtfft_interface_cufft->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_interface_cufft->iso_fortran_env module~dtfft_parameters dtfft_parameters module~dtfft_interface_cufft->module~dtfft_parameters module~dtfft_utils dtfft_utils module~dtfft_interface_cufft->module~dtfft_utils module~dtfft_parameters->iso_c_binding module~dtfft_parameters->iso_fortran_env mpi_f08 mpi_f08 module~dtfft_parameters->mpi_f08 module~dtfft_utils->iso_c_binding module~dtfft_utils->iso_fortran_env module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08

Used by

  • module~~dtfft_interface_cufft~~UsedByGraph module~dtfft_interface_cufft dtfft_interface_cufft module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_backend_cufftmp_m->module~dtfft_interface_cufft module~dtfft_executor_cufft_m dtfft_executor_cufft_m module~dtfft_executor_cufft_m->module~dtfft_interface_cufft module~dtfft_plan dtfft_plan module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_transpose_plan_cuda dtfft_transpose_plan_cuda module~dtfft_plan->module~dtfft_transpose_plan_cuda module~dtfft_transpose_handle_cuda dtfft_transpose_handle_cuda module~dtfft_transpose_handle_cuda->module~dtfft_backend_cufftmp_m module~dtfft dtfft module~dtfft->module~dtfft_plan module~dtfft_api dtfft_api module~dtfft_api->module~dtfft_plan module~dtfft_transpose_plan_cuda->module~dtfft_transpose_handle_cuda

Variables

Type Visibility Attributes Name Initial
integer(kind=c_int), public, parameter :: CUFFT_COMM_MPI = 0

Enumerations

enum, bind(c)

Enumerators

enumerator:: CUFFT_R2C = 42
enumerator:: CUFFT_C2R = 44
enumerator:: CUFFT_C2C = 41
enumerator:: CUFFT_D2Z = 106
enumerator:: CUFFT_Z2D = 108
enumerator:: CUFFT_Z2Z = 105

enum, bind(c)

Enumerators

enumerator:: CUFFT_SUCCESS = 0
enumerator:: CUFFT_INVALID_PLAN = 1
enumerator:: CUFFT_ALLOC_FAILED = 2
enumerator:: CUFFT_INVALID_TYPE = 3
enumerator:: CUFFT_INVALID_VALUE = 4
enumerator:: CUFFT_INTERNAL_ERROR = 5
enumerator:: CUFFT_EXEC_FAILED = 6
enumerator:: CUFFT_SETUP_FAILED = 7
enumerator:: CUFFT_INVALID_SIZE = 8
enumerator:: CUFFT_UNALIGNED_DATA = 9
enumerator:: CUFFT_INCOMPLETE_PARAMETER_LIST = 10
enumerator:: CUFFT_INVALID_DEVICE = 11
enumerator:: CUFFT_PARSE_ERROR = 12
enumerator:: CUFFT_NO_WORKSPACE = 13
enumerator:: CUFFT_NOT_IMPLEMENTED = 14
enumerator:: CUFFT_LICENSE_ERROR = 15
enumerator:: CUFFT_NOT_SUPPORTED = 16

Interfaces

interface

Creates a FFT plan configuration of dimension rank, with sizes specified in the array n.

  • public function cufftPlanMany(plan, rank, n, inembed, istride, idist, onembed, ostride, odist, ffttype, batch) result(cufftResult) bind(C, name="cufftPlanMany")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr) :: plan

    Pointer to an uninitialized cufftHandle object.

    integer(kind=c_int), value :: rank

    Dimensionality of the transform (1, 2, or 3).

    integer(kind=c_int) :: n(*)

    Array of size rank, describing the size of each dimension, n[0] being the size of the outermost and n[rank-1] innermost (contiguous) dimension of a transform.

    integer(kind=c_int) :: inembed(*)

    Pointer of size rank that indicates the storage dimensions of the input data in memory. If set to NULL, all other advanced data layout parameters are ignored.

    integer(kind=c_int), value :: istride

    Indicates the distance between two successive input elements in the least significant (i.e., innermost) dimension.

    integer(kind=c_int), value :: idist

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

    integer(kind=c_int) :: onembed(*)

    Pointer of size rank that indicates the storage dimensions of the output data in memory. If set to NULL, all other advanced data layout parameters are ignored.

    integer(kind=c_int), value :: ostride

    Indicates the distance between two successive output elements in the output array in the least significant (i.e., innermost) dimension.

    integer(kind=c_int), value :: odist

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

    integer(kind=c_int), value :: ffttype

    The transform data type (e.g., CUFFT_R2C for single precision real to complex).

    integer(kind=c_int), value :: batch

    Batch size for this transform.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Executes any cuFFT transform regardless of precision and type. In case of complex-to-real and real-to-complex transforms, the direction parameter is ignored.

  • public function cufftXtExec(plan, input, output, direction) result(cufftResult) bind(C, name="cufftXtExec")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: plan

    cufftHandle returned by cufftCreate.

    type(c_ptr), value :: input

    Pointer to the input data (in GPU memory) to transform.

    type(c_ptr), value :: output

    Pointer to the output data (in GPU memory).

    integer(kind=c_int), value :: direction

    The transform direction: CUFFT_FORWARD or CUFFT_INVERSE. Ignored for complex-to-real and real-to-complex transforms.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Frees all GPU resources associated with a cuFFT plan and destroys the internal plan data structure.

  • public function cufftDestroy(plan) result(cufftResult) bind(C, name="cufftDestroy")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: plan

    Object of the plan to be destroyed.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Associates a CUDA stream with a cuFFT plan.

  • public function cufftSetStream(plan, stream) result(cufftResult) bind(C, name="cufftSetStream")

    Arguments

    Type IntentOptional Attributes Name
    type(c_ptr), value :: plan

    Object to associate with the stream.

    type(dtfft_stream_t), value :: stream

    A valid CUDA stream.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Initializes a reshape handle for future use. This function is not collective.

  • public function cufftMpCreateReshape(reshapeHandle) result(cufftResult) bind(C, name="cufftMpCreateReshape")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle) :: reshapeHandle

    The reshape handle.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Attaches a communication handle to a reshape. This function is not collective.

  • public function cufftMpAttachReshapeComm(reshapeHandle, commType, comm) result(cufftResult) bind(C, name="cufftMpAttachReshapeComm")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle), value :: reshapeHandle

    The reshape handle.

    integer(kind=c_int), value :: commType

    An enum describing the communication type of the handle.

    type(c_ptr) :: comm

    If commType is CUFFT_COMM_MPI, this should be a pointer to an MPI communicator. The pointer should remain valid until destruction of the handle. Otherwise, this should be NULL.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Returns the amount (in bytes) of workspace required to execute the handle.

  • public function cufftMpGetReshapeSize(reshapeHandle, workSize) result(cufftResult) bind(C, name="cufftMpGetReshapeSize")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle), value :: reshapeHandle

    The reshape handle.

    integer(kind=c_size_t) :: workSize

    The size, in bytes, of the workspace required during reshape execution.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Creates a reshape intended to re-distribute a global array of 3D data.

  • public function cufftMpMakeReshape(reshapeHandle, elementSize, rank, lower_input, upper_input, lower_output, upper_output, strides_input, strides_output) result(cufftResult) bind(C, name="cufftMpMakeReshape")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle), value :: reshapeHandle

    The reshape handle.

    integer(kind=c_long_long), value :: elementSize

    The size of the individual elements, in bytes. Allowed values are 4, 8, and 16.

    integer(kind=c_int), value :: rank

    The length of the lower_input, upper_input, lower_output, upper_output, strides_input, and strides_output arrays. rank should be 3.

    integer(kind=c_long_long) :: lower_input(*)

    An array of length rank, representing the lower-corner of the portion of the global nx * ny * nz array owned by the current process in the input descriptor.

    integer(kind=c_long_long) :: upper_input(*)

    An array of length rank, representing the upper-corner of the portion of the global nx * ny * nz array owned by the current process in the input descriptor.

    integer(kind=c_long_long) :: lower_output(*)

    An array of length rank, representing the lower-corner of the portion of the global nx * ny * nz array owned by the current process in the output descriptor.

    integer(kind=c_long_long) :: upper_output(*)

    An array of length rank, representing the upper-corner of the portion of the global nx * ny * nz array owned by the current process in the output descriptor.

    integer(kind=c_long_long) :: strides_input(*)

    An array of length rank, representing the local data layout of the input descriptor in memory. All entries must be decreasing and positive.

    integer(kind=c_long_long) :: strides_output(*)

    An array of length rank, representing the local data layout of the output descriptor in memory. All entries must be decreasing and positive.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Executes the reshape, redistributing data_in into data_out using the workspace in workspace.

  • public function cufftMpExecReshapeAsync(reshapeHandle, dataOut, dataIn, workSpace, stream) result(cufftResult) bind(C, name="cufftMpExecReshapeAsync")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle), value :: reshapeHandle

    The reshape handle.

    type(c_ptr), value :: dataOut

    A symmetric-heap pointer to the output data. This memory should be NVSHMEM allocated and identical on all processes.

    type(c_ptr), value :: dataIn

    A symmetric-heap pointer to the input data. This memory should be NVSHMEM allocated and identical on all processes.

    type(c_ptr), value :: workSpace

    A symmetric-heap pointer to the workspace data. This memory should be NVSHMEM allocated and identical on all processes.

    type(dtfft_stream_t), value :: stream

    The CUDA stream in which to run the reshape operation.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.

interface

Destroys a reshape and all its associated data.

  • public function cufftMpDestroyReshape(reshapeHandle) result(cufftResult) bind(C, name="cufftMpDestroyReshape")

    Arguments

    Type IntentOptional Attributes Name
    type(cufftReshapeHandle), value :: reshapeHandle

    The reshape handle.

    Return Value integer(kind=c_int)

    The enumerated type cufftResult defines API call result codes.


Derived Types

type, public, bind(C) ::  cufftReshapeHandle

An opaque handle to a reshape operation.

Components

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

Functions

public function cufftGetErrorString(error_code) result(string)

Returns a string representation of the cuFFT error code.

Arguments

Type IntentOptional Attributes Name
integer(kind=c_int32_t), intent(in) :: error_code

cuFFT error code

Return Value character(len=:), allocatable

String representation of the cuFFT error code