dtfft_api Module

This module is a Fortran part of C/C++ interface


Uses

  • module~~dtfft_api~~UsesGraph module~dtfft_api dtfft_api iso_c_binding iso_c_binding module~dtfft_api->iso_c_binding iso_fortran_env iso_fortran_env module~dtfft_api->iso_fortran_env module~dtfft_config dtfft_config module~dtfft_api->module~dtfft_config module~dtfft_parameters dtfft_parameters module~dtfft_api->module~dtfft_parameters module~dtfft_pencil dtfft_pencil module~dtfft_api->module~dtfft_pencil module~dtfft_plan dtfft_plan module~dtfft_api->module~dtfft_plan module~dtfft_utils dtfft_utils module~dtfft_api->module~dtfft_utils mpi_f08 mpi_f08 module~dtfft_api->mpi_f08 module~dtfft_config->iso_c_binding module~dtfft_config->iso_fortran_env module~dtfft_config->module~dtfft_parameters module~dtfft_config->module~dtfft_utils module~dtfft_config->mpi_f08 module~dtfft_interface_cuda_runtime dtfft_interface_cuda_runtime module~dtfft_config->module~dtfft_interface_cuda_runtime module~dtfft_parameters->iso_c_binding module~dtfft_parameters->iso_fortran_env module~dtfft_parameters->mpi_f08 module~dtfft_pencil->iso_c_binding module~dtfft_pencil->iso_fortran_env module~dtfft_pencil->module~dtfft_parameters module~dtfft_pencil->module~dtfft_utils module~dtfft_pencil->mpi_f08 module~dtfft_pencil->module~dtfft_interface_cuda_runtime module~dtfft_plan->iso_c_binding module~dtfft_plan->iso_fortran_env module~dtfft_plan->module~dtfft_config module~dtfft_plan->module~dtfft_parameters module~dtfft_plan->module~dtfft_pencil module~dtfft_plan->module~dtfft_utils module~dtfft_plan->mpi_f08 module~dtfft_abstract_executor dtfft_abstract_executor module~dtfft_plan->module~dtfft_abstract_executor module~dtfft_abstract_transpose_plan dtfft_abstract_transpose_plan module~dtfft_plan->module~dtfft_abstract_transpose_plan module~dtfft_executor_cufft_m dtfft_executor_cufft_m module~dtfft_plan->module~dtfft_executor_cufft_m module~dtfft_executor_fftw_m dtfft_executor_fftw_m module~dtfft_plan->module~dtfft_executor_fftw_m module~dtfft_executor_mkl_m dtfft_executor_mkl_m module~dtfft_plan->module~dtfft_executor_mkl_m module~dtfft_executor_vkfft_m dtfft_executor_vkfft_m module~dtfft_plan->module~dtfft_executor_vkfft_m module~dtfft_plan->module~dtfft_interface_cuda_runtime module~dtfft_interface_nvshmem dtfft_interface_nvshmem module~dtfft_plan->module~dtfft_interface_nvshmem module~dtfft_interface_nvtx dtfft_interface_nvtx module~dtfft_plan->module~dtfft_interface_nvtx module~dtfft_nvrtc_kernel dtfft_nvrtc_kernel module~dtfft_plan->module~dtfft_nvrtc_kernel module~dtfft_transpose_plan_cuda dtfft_transpose_plan_cuda module~dtfft_plan->module~dtfft_transpose_plan_cuda module~dtfft_transpose_plan_host dtfft_transpose_plan_host module~dtfft_plan->module~dtfft_transpose_plan_host module~dtfft_utils->iso_c_binding module~dtfft_utils->iso_fortran_env module~dtfft_utils->module~dtfft_parameters module~dtfft_utils->mpi_f08 module~dtfft_abstract_executor->iso_c_binding module~dtfft_abstract_executor->iso_fortran_env module~dtfft_abstract_executor->module~dtfft_parameters module~dtfft_abstract_executor->module~dtfft_pencil module~dtfft_abstract_executor->module~dtfft_utils module~dtfft_abstract_executor->module~dtfft_interface_nvtx module~dtfft_abstract_transpose_plan->iso_c_binding module~dtfft_abstract_transpose_plan->iso_fortran_env module~dtfft_abstract_transpose_plan->module~dtfft_config module~dtfft_abstract_transpose_plan->module~dtfft_parameters module~dtfft_abstract_transpose_plan->module~dtfft_pencil module~dtfft_abstract_transpose_plan->module~dtfft_utils module~dtfft_abstract_transpose_plan->mpi_f08 module~dtfft_abstract_transpose_plan->module~dtfft_interface_cuda_runtime module~dtfft_abstract_transpose_plan->module~dtfft_interface_nvshmem module~dtfft_abstract_transpose_plan->module~dtfft_interface_nvtx module~dtfft_abstract_transpose_plan->module~dtfft_nvrtc_kernel module~dtfft_abstract_backend dtfft_abstract_backend module~dtfft_abstract_transpose_plan->module~dtfft_abstract_backend module~dtfft_interface_nccl dtfft_interface_nccl module~dtfft_abstract_transpose_plan->module~dtfft_interface_nccl module~dtfft_executor_cufft_m->iso_c_binding module~dtfft_executor_cufft_m->iso_fortran_env module~dtfft_executor_cufft_m->module~dtfft_config module~dtfft_executor_cufft_m->module~dtfft_parameters module~dtfft_executor_cufft_m->module~dtfft_utils module~dtfft_executor_cufft_m->mpi_f08 module~dtfft_executor_cufft_m->module~dtfft_abstract_executor module~dtfft_executor_cufft_m->module~dtfft_interface_cuda_runtime module~dtfft_interface_cufft dtfft_interface_cufft module~dtfft_executor_cufft_m->module~dtfft_interface_cufft module~dtfft_executor_fftw_m->iso_c_binding module~dtfft_executor_fftw_m->iso_fortran_env module~dtfft_executor_fftw_m->module~dtfft_parameters module~dtfft_executor_fftw_m->module~dtfft_pencil module~dtfft_executor_fftw_m->module~dtfft_utils module~dtfft_executor_fftw_m->module~dtfft_abstract_executor module~dtfft_interface_fftw_m dtfft_interface_fftw_m module~dtfft_executor_fftw_m->module~dtfft_interface_fftw_m module~dtfft_executor_mkl_m->iso_c_binding module~dtfft_executor_mkl_m->iso_fortran_env module~dtfft_executor_mkl_m->module~dtfft_parameters module~dtfft_executor_mkl_m->module~dtfft_utils module~dtfft_executor_mkl_m->mpi_f08 module~dtfft_executor_mkl_m->module~dtfft_abstract_executor module~dtfft_interface_mkl_m dtfft_interface_mkl_m module~dtfft_executor_mkl_m->module~dtfft_interface_mkl_m module~dtfft_interface_mkl_native_m dtfft_interface_mkl_native_m module~dtfft_executor_mkl_m->module~dtfft_interface_mkl_native_m module~dtfft_executor_vkfft_m->iso_c_binding module~dtfft_executor_vkfft_m->iso_fortran_env module~dtfft_executor_vkfft_m->module~dtfft_config module~dtfft_executor_vkfft_m->module~dtfft_parameters module~dtfft_executor_vkfft_m->module~dtfft_abstract_executor module~dtfft_interface_vkfft_m dtfft_interface_vkfft_m module~dtfft_executor_vkfft_m->module~dtfft_interface_vkfft_m module~dtfft_interface_cuda_runtime->iso_c_binding module~dtfft_interface_cuda_runtime->module~dtfft_parameters module~dtfft_interface_cuda_runtime->module~dtfft_utils module~dtfft_interface_nvshmem->iso_c_binding module~dtfft_interface_nvshmem->iso_fortran_env module~dtfft_interface_nvshmem->module~dtfft_parameters module~dtfft_interface_nvshmem->module~dtfft_utils module~dtfft_interface_nvtx->iso_c_binding module~dtfft_interface_nvtx->module~dtfft_utils module~dtfft_nvrtc_kernel->iso_c_binding module~dtfft_nvrtc_kernel->iso_fortran_env module~dtfft_nvrtc_kernel->module~dtfft_parameters module~dtfft_nvrtc_kernel->module~dtfft_utils module~dtfft_nvrtc_kernel->mpi_f08 module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda_runtime module~dtfft_nvrtc_kernel->module~dtfft_interface_nvtx module~dtfft_interface_cuda dtfft_interface_cuda module~dtfft_nvrtc_kernel->module~dtfft_interface_cuda module~dtfft_interface_nvrtc dtfft_interface_nvrtc module~dtfft_nvrtc_kernel->module~dtfft_interface_nvrtc module~dtfft_transpose_plan_cuda->iso_c_binding module~dtfft_transpose_plan_cuda->iso_fortran_env module~dtfft_transpose_plan_cuda->module~dtfft_config module~dtfft_transpose_plan_cuda->module~dtfft_parameters module~dtfft_transpose_plan_cuda->module~dtfft_pencil module~dtfft_transpose_plan_cuda->module~dtfft_utils module~dtfft_transpose_plan_cuda->mpi_f08 module~dtfft_transpose_plan_cuda->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_cuda->module~dtfft_interface_cuda_runtime module~dtfft_transpose_plan_cuda->module~dtfft_interface_nvtx module~dtfft_transpose_plan_cuda->module~dtfft_nvrtc_kernel module~dtfft_transpose_plan_cuda->module~dtfft_abstract_backend module~dtfft_transpose_plan_cuda->module~dtfft_interface_cuda module~dtfft_transpose_plan_cuda->module~dtfft_interface_nvrtc module~dtfft_transpose_handle_cuda dtfft_transpose_handle_cuda module~dtfft_transpose_plan_cuda->module~dtfft_transpose_handle_cuda module~dtfft_transpose_plan_host->iso_fortran_env module~dtfft_transpose_plan_host->module~dtfft_parameters module~dtfft_transpose_plan_host->module~dtfft_pencil module~dtfft_transpose_plan_host->module~dtfft_utils module~dtfft_transpose_plan_host->mpi_f08 module~dtfft_transpose_plan_host->module~dtfft_abstract_transpose_plan module~dtfft_transpose_plan_host->module~dtfft_interface_nvtx module~dtfft_transpose_handle_host dtfft_transpose_handle_host module~dtfft_transpose_plan_host->module~dtfft_transpose_handle_host module~dtfft_abstract_backend->iso_c_binding module~dtfft_abstract_backend->iso_fortran_env module~dtfft_abstract_backend->module~dtfft_parameters module~dtfft_abstract_backend->module~dtfft_pencil module~dtfft_abstract_backend->module~dtfft_utils module~dtfft_abstract_backend->mpi_f08 module~dtfft_abstract_backend->module~dtfft_interface_cuda_runtime module~dtfft_abstract_backend->module~dtfft_nvrtc_kernel module~dtfft_abstract_backend->module~dtfft_interface_nccl module~dtfft_interface_cuda->iso_c_binding module~dtfft_interface_cuda->iso_fortran_env module~dtfft_interface_cuda->module~dtfft_parameters module~dtfft_interface_cuda->module~dtfft_utils module~dtfft_interface_cuda->module~dtfft_interface_cuda_runtime module~dtfft_interface_cufft->iso_c_binding module~dtfft_interface_cufft->iso_fortran_env module~dtfft_interface_cufft->module~dtfft_parameters module~dtfft_interface_cufft->module~dtfft_utils module~dtfft_interface_fftw_m->iso_c_binding dtfft_interface_fftw_native_m dtfft_interface_fftw_native_m module~dtfft_interface_fftw_m->dtfft_interface_fftw_native_m module~dtfft_interface_mkl_m->iso_c_binding module~dtfft_interface_mkl_m->module~dtfft_utils MKL_DFTI MKL_DFTI module~dtfft_interface_mkl_native_m->MKL_DFTI module~dtfft_interface_nccl->iso_c_binding module~dtfft_interface_nccl->module~dtfft_parameters module~dtfft_interface_nccl->module~dtfft_utils module~dtfft_interface_nvrtc->iso_c_binding module~dtfft_interface_nvrtc->iso_fortran_env module~dtfft_interface_nvrtc->module~dtfft_parameters module~dtfft_interface_nvrtc->module~dtfft_utils module~dtfft_interface_nvrtc->module~dtfft_interface_cuda_runtime module~dtfft_interface_vkfft_m->iso_c_binding module~dtfft_interface_vkfft_m->iso_fortran_env module~dtfft_interface_vkfft_m->module~dtfft_parameters module~dtfft_interface_vkfft_m->module~dtfft_utils module~dtfft_transpose_handle_cuda->iso_c_binding module~dtfft_transpose_handle_cuda->iso_fortran_env module~dtfft_transpose_handle_cuda->module~dtfft_parameters module~dtfft_transpose_handle_cuda->module~dtfft_pencil module~dtfft_transpose_handle_cuda->module~dtfft_utils module~dtfft_transpose_handle_cuda->mpi_f08 module~dtfft_transpose_handle_cuda->module~dtfft_interface_cuda_runtime module~dtfft_transpose_handle_cuda->module~dtfft_interface_nvtx module~dtfft_transpose_handle_cuda->module~dtfft_nvrtc_kernel module~dtfft_transpose_handle_cuda->module~dtfft_abstract_backend module~dtfft_backend_cufftmp_m dtfft_backend_cufftmp_m module~dtfft_transpose_handle_cuda->module~dtfft_backend_cufftmp_m module~dtfft_backend_mpi dtfft_backend_mpi module~dtfft_transpose_handle_cuda->module~dtfft_backend_mpi module~dtfft_backend_nccl_m dtfft_backend_nccl_m module~dtfft_transpose_handle_cuda->module~dtfft_backend_nccl_m module~dtfft_transpose_handle_host->iso_fortran_env module~dtfft_transpose_handle_host->module~dtfft_parameters module~dtfft_transpose_handle_host->module~dtfft_pencil module~dtfft_transpose_handle_host->mpi_f08 module~dtfft_transpose_handle_host->module~dtfft_interface_nvtx module~dtfft_backend_cufftmp_m->iso_c_binding module~dtfft_backend_cufftmp_m->iso_fortran_env module~dtfft_backend_cufftmp_m->module~dtfft_parameters module~dtfft_backend_cufftmp_m->module~dtfft_pencil module~dtfft_backend_cufftmp_m->module~dtfft_utils module~dtfft_backend_cufftmp_m->mpi_f08 module~dtfft_backend_cufftmp_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_cufftmp_m->module~dtfft_interface_nvshmem module~dtfft_backend_cufftmp_m->module~dtfft_abstract_backend module~dtfft_backend_cufftmp_m->module~dtfft_interface_cufft module~dtfft_backend_mpi->iso_c_binding module~dtfft_backend_mpi->iso_fortran_env module~dtfft_backend_mpi->module~dtfft_parameters module~dtfft_backend_mpi->module~dtfft_utils module~dtfft_backend_mpi->mpi_f08 module~dtfft_backend_mpi->module~dtfft_interface_cuda_runtime module~dtfft_backend_mpi->module~dtfft_abstract_backend module~dtfft_backend_nccl_m->iso_c_binding module~dtfft_backend_nccl_m->iso_fortran_env module~dtfft_backend_nccl_m->module~dtfft_parameters module~dtfft_backend_nccl_m->module~dtfft_utils module~dtfft_backend_nccl_m->mpi_f08 module~dtfft_backend_nccl_m->module~dtfft_interface_cuda_runtime module~dtfft_backend_nccl_m->module~dtfft_abstract_backend module~dtfft_backend_nccl_m->module~dtfft_interface_nccl

Derived Types

type, private ::  plan_c

C pointer to Fortran plan

Components

Type Visibility Attributes Name Initial
class(dtfft_plan_t), public, allocatable :: p

Actual Fortran plan

type, private, bind(C) ::  pencil_c

Structure to hold pencil decomposition info

Components

Type Visibility Attributes Name Initial
integer(kind=c_int8_t), public :: dim

Aligned dimension id

integer(kind=c_int8_t), public :: ndims

Number of dimensions

integer(kind=c_int32_t), public :: starts(3)

Local starts, starting from 0 for both C and Fortran

integer(kind=c_int32_t), public :: counts(3)

Local counts of data, in elements

integer(kind=c_size_t), public :: size

Total number of elements in a pencil


Functions

private pure function get_comm(c_comm)

Arguments

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

Return Value type(mpi_comm)

private function dtfft_create_plan_r2r_c(ndims, dims, kinds, comm, precision, effort, executor, plan_ptr) result(error_code) bind(C)

Creates R2R dtFFT Plan, allocates all structures and prepares FFT, C/C++/Python interface

Arguments

Type IntentOptional Attributes Name
integer(kind=c_int8_t), intent(in) :: ndims

Rank of transform. Can be 2 or 3.

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

Global sizes of transform

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

FFT R2R kinds

integer(kind=c_int32_t), intent(in), value :: comm

Communicator

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

Precision of transform

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

dtFFT planner effort type

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

Type of External FFT Executor

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

C pointer to Fortran plan

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_create_plan_c2c_c(ndims, dims, comm, precision, effort, executor, plan_ptr) result(error_code) bind(C)

Creates C2C dtFFT Plan, allocates all structures and prepares FFT, C/C++ interface

Arguments

Type IntentOptional Attributes Name
integer(kind=c_int8_t), intent(in) :: ndims

Rank of transform. Can be 2 or 3.

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

Global sizes of transform

integer(kind=c_int32_t), intent(in), value :: comm

Communicator

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

Precision of transform

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

dtFFT planner effort type

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

Type of External FFT Executor

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

C pointer to Fortran plan

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_z_slab_enabled_c(plan_ptr, is_z_slab_enabled) result(error_code) bind(C)

Checks if dtFFT Plan is using Z-slab optimization

Arguments

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

C pointer to Fortran plan

logical(kind=c_bool), intent(out) :: is_z_slab_enabled

Is plan internally using Z-slab optimization

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_execute_c(plan_ptr, in, out, execute_type, aux) result(error_code) bind(C)

Executes dtFFT Plan, C/C++ interface. aux can be NULL.

Arguments

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

C pointer to Fortran plan

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

Incomming pointer, not NULL

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

Outgoing buffer, not NULL

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

Type of execution

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

Aux buffer, can be NULL

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_transpose_c(plan_ptr, in, out, transpose_type) result(error_code) bind(C)

Executes single transposition, C/C++ interface.

Arguments

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

C pointer to Fortran plan

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

Incomming pointer, not NULL

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

Outgoing buffer, not NULL

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

Type of transposition.

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_destroy_c(plan_ptr) result(error_code) bind(C)

Destroys dtFFT Plan, C/C++ interface

Arguments

Type IntentOptional Attributes Name
type(c_ptr) :: plan_ptr

C pointer to Fortran plan

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_local_sizes_c(plan_ptr, in_starts, in_counts, out_starts, out_counts, alloc_size) result(error_code) bind(C)

Returns local sizes, counts in real and Fourier spaces and number of elements to be allocated for in and out buffers, C/C++ interface.

Arguments

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

C pointer to Fortran plan

integer(kind=c_int32_t), intent(out), optional :: in_starts(3)

Starts of local portion of data in ‘real’ space

integer(kind=c_int32_t), intent(out), optional :: in_counts(3)

Counts of local portion of data in ‘real’ space

integer(kind=c_int32_t), intent(out), optional :: out_starts(3)

Starts of local portion of data in ‘fourier’ space

integer(kind=c_int32_t), intent(out), optional :: out_counts(3)

Counts of local portion of data in ‘fourier’ space

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

Minimum data needs to be allocated

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_alloc_size_c(plan_ptr, alloc_size) result(error_code) bind(C)

Returns minimum number of bytes to be allocated for in and out buffers, C/C++ interface

Arguments

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

C pointer to Fortran plan

integer(kind=c_size_t), intent(out) :: alloc_size

Minimum data needs to be allocated

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_pencil_c(plan_ptr, dim, pencil) result(error_code) bind(C)

Returns pencil decomposition info, C/C++ interface

Arguments

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

C pointer to Fortran plan

integer(kind=c_int32_t), intent(in) :: dim

Dimension requested

type(pencil_c) :: pencil

Pencil pointer

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_element_size_c(plan_ptr, element_size) result(error_code) bind(C)

Returns size of element in bytes, C/C++ interface

Arguments

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

C pointer to Fortran plan

integer(kind=c_size_t), intent(out) :: element_size

Size of element in bytes

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_alloc_bytes_c(plan_ptr, alloc_bytes) result(error_code) bind(C)

Returns minimum number of bytes required to execute plan, C/C++ interface

Arguments

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

C pointer to Fortran plan

integer(kind=c_size_t), intent(out) :: alloc_bytes

Number of bytes required

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_set_config_c(config) result(error_code) bind(C)

Sets dtFFT configuration, C/C++ interface

Arguments

Type IntentOptional Attributes Name
type(dtfft_config_t), intent(in) :: config

Configuration to set

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_report_c(plan_ptr) result(error_code) bind(C)

Reports dtFFT Plan, C/C++ interface

Arguments

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

C pointer to Fortran plan

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_mem_alloc_c(plan_ptr, alloc_bytes, ptr) result(error_code) bind(C)

Allocates memory for dtFFT Plan, C/C++ interface

Arguments

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

C pointer to Fortran plan

integer(kind=c_size_t), value :: alloc_bytes

Number of bytes to allocate

type(c_ptr) :: ptr

Allocated pointer

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_mem_free_c(plan_ptr, ptr) result(error_code) bind(C)

Frees memory for dtFFT Plan, C/C++ interface

Arguments

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

C pointer to Fortran plan

type(c_ptr), value :: ptr

Pointer to deallocate

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_stream_c(plan_ptr, stream) result(error_code) bind(C)

Returns Stream associated with plan

Arguments

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

C pointer to Fortran plan

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

CUDA stream

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_backend_c(plan_ptr, backend) result(error_code) bind(C)

Returns selected dtfft_backend_t during autotuning

Arguments

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

C pointer to Fortran plan

type(dtfft_backend_t), intent(out) :: backend

The enumerated type dtfft_backend_t

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.

private function dtfft_get_platform_c(plan_ptr, platform) result(error_code) bind(C)

Returns selected dtfft_platform_t during autotuning

Arguments

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

C pointer to Fortran plan

type(dtfft_platform_t), intent(out) :: platform

The enumerated type dtfft_platform_t

Return Value integer(kind=c_int32_t)

The enumerated type dtfft_error_t defines API call result codes.


Subroutines

private subroutine dtfft_get_error_string_c(error_code, error_string, error_string_size) bind(C)

Returns an explaination of error_code that could have been previously returned by one of dtFFT API calls, C/C++ interface

Arguments

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

The enumerated type dtfft_error_t defines API call result codes.

character(len=c_char), intent(out) :: error_string(*)

Explanation of error

integer(kind=c_size_t), intent(out) :: error_string_size

Size of error_string

private subroutine dtfft_get_backend_string_c(backend, backend_string, backend_string_size) bind(C)

Returns string representation of dtfft_backend_t

Arguments

Type IntentOptional Attributes Name
type(dtfft_backend_t), intent(in) :: backend

The enumerated type dtfft_backend_t

character(len=c_char), intent(out) :: backend_string(*)

Resulting string

integer(kind=c_size_t), intent(out) :: backend_string_size

Size of string