! This file was automatically generated by SWIG (http://www.swig.org).
! Version 4.0.2+fortran
!
! Do not make changes to this file unless you know what you are doing--modify
! the SWIG interface file instead.

! heFFTe project, https://bitbucket.org/icl/heffte/
! Copyright (c) 2020, University of Tennessee.
! Distributed under a BSD 3-Clause license: see LICENSE for details.

module heffte_cufft
 use, intrinsic :: ISO_C_BINDING
 implicit none
 private

 ! DECLARATION CONSTRUCTS
 integer(C_INT), public, &
   bind(C, name="heffte_cufft_ierr") :: ierr
 type, bind(C) :: SwigArrayWrapper
  type(C_PTR), public :: data = C_NULL_PTR
  integer(C_SIZE_T), public :: size = 0
 end type
 public :: get_serr
 integer(C_INT), parameter, public :: SWIG_UnknownError = -1_C_INT
 integer(C_INT), parameter, public :: SWIG_IOError = -2_C_INT
 integer(C_INT), parameter, public :: SWIG_RuntimeError = -3_C_INT
 integer(C_INT), parameter, public :: SWIG_IndexError = -4_C_INT
 integer(C_INT), parameter, public :: SWIG_TypeError = -5_C_INT
 integer(C_INT), parameter, public :: SWIG_DivisionByZero = -6_C_INT
 integer(C_INT), parameter, public :: SWIG_OverflowError = -7_C_INT
 integer(C_INT), parameter, public :: SWIG_SyntaxError = -8_C_INT
 integer(C_INT), parameter, public :: SWIG_ValueError = -9_C_INT
 integer(C_INT), parameter, public :: SWIG_SystemError = -10_C_INT
 integer(C_INT), parameter, public :: SWIG_AttributeError = -11_C_INT
 integer(C_INT), parameter, public :: SWIG_MemoryError = -12_C_INT
 integer(C_INT), parameter, public :: SWIG_NullReferenceError = -13_C_INT
 ! enum class heffte::scale
 integer(C_INT), protected, public, &
   bind(C, name="_wrap_scale_cufft_none") :: scale_cufft_none
 integer(C_INT), protected, public, &
   bind(C, name="_wrap_scale_cufft_full") :: scale_cufft_full
 integer(C_INT), protected, public, &
   bind(C, name="_wrap_scale_cufft_symmetric") :: scale_cufft_symmetric
 integer, parameter, public :: scale = C_INT

 integer, parameter :: swig_cmem_own_bit = 0
 integer, parameter :: swig_cmem_rvalue_bit = 1
 type, bind(C) :: SwigClassWrapper
  type(C_PTR), public :: cptr = C_NULL_PTR
  integer(C_INT), public :: cmemflags = 0
 end type
 ! class heffte::fft3d< heffte::backend::cufft >
 type, public :: heffte_fft3d_cufft
  type(SwigClassWrapper), public :: swigdata
 contains
  procedure :: size_inbox => swigf_heffte_fft3d_cufft_size_inbox
  procedure :: size_outbox => swigf_heffte_fft3d_cufft_size_outbox
  procedure :: get_scale_factor => swigf_heffte_fft3d_cufft_get_scale_factor
  procedure :: size_workspace => swigf_heffte_fft3d_cufft_size_workspace
  procedure :: size_comm_buffers => swigf_heffte_fft3d_cufft_size_comm_buffers
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_6
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_7
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_8
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_9
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_10
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_11
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_12
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_13
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_14
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_15
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_16
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_17
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_18
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_19
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_20
  procedure, private :: swigf_heffte_fft3d_cufft_forward__SWIG_21
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_6
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_7
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_8
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_9
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_10
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_11
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_12
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_13
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_14
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_15
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_16
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_17
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_18
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_19
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_20
  procedure, private :: swigf_heffte_fft3d_cufft_backward__SWIG_21
  procedure :: release => swigf_heffte_fft3d_cufft_release
  procedure, private :: swigf_heffte_fft3d_cufft_op_assign__
  generic :: assignment(=) => swigf_heffte_fft3d_cufft_op_assign__
  generic :: backward => swigf_heffte_fft3d_cufft_backward__SWIG_6, swigf_heffte_fft3d_cufft_backward__SWIG_7, &
    swigf_heffte_fft3d_cufft_backward__SWIG_8, swigf_heffte_fft3d_cufft_backward__SWIG_9, &
    swigf_heffte_fft3d_cufft_backward__SWIG_10, swigf_heffte_fft3d_cufft_backward__SWIG_11, &
    swigf_heffte_fft3d_cufft_backward__SWIG_12, swigf_heffte_fft3d_cufft_backward__SWIG_13, &
    swigf_heffte_fft3d_cufft_backward__SWIG_14, swigf_heffte_fft3d_cufft_backward__SWIG_15, &
    swigf_heffte_fft3d_cufft_backward__SWIG_16, swigf_heffte_fft3d_cufft_backward__SWIG_17, &
    swigf_heffte_fft3d_cufft_backward__SWIG_18, swigf_heffte_fft3d_cufft_backward__SWIG_19, &
    swigf_heffte_fft3d_cufft_backward__SWIG_20, swigf_heffte_fft3d_cufft_backward__SWIG_21
  generic :: forward => swigf_heffte_fft3d_cufft_forward__SWIG_6, swigf_heffte_fft3d_cufft_forward__SWIG_7, &
    swigf_heffte_fft3d_cufft_forward__SWIG_8, swigf_heffte_fft3d_cufft_forward__SWIG_9, &
    swigf_heffte_fft3d_cufft_forward__SWIG_10, swigf_heffte_fft3d_cufft_forward__SWIG_11, &
    swigf_heffte_fft3d_cufft_forward__SWIG_12, swigf_heffte_fft3d_cufft_forward__SWIG_13, &
    swigf_heffte_fft3d_cufft_forward__SWIG_14, swigf_heffte_fft3d_cufft_forward__SWIG_15, &
    swigf_heffte_fft3d_cufft_forward__SWIG_16, swigf_heffte_fft3d_cufft_forward__SWIG_17, &
    swigf_heffte_fft3d_cufft_forward__SWIG_18, swigf_heffte_fft3d_cufft_forward__SWIG_19, &
    swigf_heffte_fft3d_cufft_forward__SWIG_20, swigf_heffte_fft3d_cufft_forward__SWIG_21
 end type heffte_fft3d_cufft
 ! class heffte::fft3d_r2c< heffte::backend::cufft >
 type, public :: heffte_fft3d_r2c_cufft
  type(SwigClassWrapper), public :: swigdata
 contains
  procedure :: size_inbox => swigf_heffte_fft3d_r2c_cufft_size_inbox
  procedure :: size_outbox => swigf_heffte_fft3d_r2c_cufft_size_outbox
  procedure :: size_workspace => swigf_heffte_fft3d_r2c_cufft_size_workspace
  procedure :: size_comm_buffers => swigf_heffte_fft3d_r2c_cufft_size_comm_buffers
  procedure :: get_scale_factor => swigf_heffte_fft3d_r2c_cufft_get_scale_factor
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_6
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_7
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_8
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_9
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_10
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_11
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_12
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_forward__SWIG_13
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_6
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_7
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_8
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_9
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_10
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_11
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_12
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_backward__SWIG_13
  procedure :: release => swigf_heffte_fft3d_r2c_cufft_release
  procedure, private :: swigf_heffte_fft3d_r2c_cufft_op_assign__
  generic :: assignment(=) => swigf_heffte_fft3d_r2c_cufft_op_assign__
  generic :: backward => swigf_heffte_fft3d_r2c_cufft_backward__SWIG_6, swigf_heffte_fft3d_r2c_cufft_backward__SWIG_7, &
    swigf_heffte_fft3d_r2c_cufft_backward__SWIG_8, swigf_heffte_fft3d_r2c_cufft_backward__SWIG_9, &
    swigf_heffte_fft3d_r2c_cufft_backward__SWIG_10, swigf_heffte_fft3d_r2c_cufft_backward__SWIG_11, &
    swigf_heffte_fft3d_r2c_cufft_backward__SWIG_12, swigf_heffte_fft3d_r2c_cufft_backward__SWIG_13
  generic :: forward => swigf_heffte_fft3d_r2c_cufft_forward__SWIG_6, swigf_heffte_fft3d_r2c_cufft_forward__SWIG_7, &
    swigf_heffte_fft3d_r2c_cufft_forward__SWIG_8, swigf_heffte_fft3d_r2c_cufft_forward__SWIG_9, &
    swigf_heffte_fft3d_r2c_cufft_forward__SWIG_10, swigf_heffte_fft3d_r2c_cufft_forward__SWIG_11, &
    swigf_heffte_fft3d_r2c_cufft_forward__SWIG_12, swigf_heffte_fft3d_r2c_cufft_forward__SWIG_13
 end type heffte_fft3d_r2c_cufft
 interface heffte_fft3d_r2c_cufft
  module procedure swigf_new_heffte_fft3d_r2c_cufft__SWIG_4, swigf_new_heffte_fft3d_r2c_cufft__SWIG_5, &
    swigf_new_heffte_fft3d_r2c_cufft__SWIG_6
 end interface
 interface heffte_fft3d_cufft
  module procedure swigf_new_heffte_fft3d_cufft__SWIG_4, swigf_new_heffte_fft3d_cufft__SWIG_5, &
    swigf_new_heffte_fft3d_cufft__SWIG_6
 end interface

! WRAPPER DECLARATIONS
interface
 subroutine SWIG_free(cptr) &
  bind(C, name="free")
 use, intrinsic :: ISO_C_BINDING
 type(C_PTR), value :: cptr
end subroutine
function swigc_get_serr() &
bind(C, name="_wrap_get_serr") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigarraywrapper
type(SwigArrayWrapper) :: fresult
end function

function swigc_new_heffte_fft3d_cufft__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20, farg21, farg22) &
bind(C, name="_wrap_new_heffte_fft3d_cufft__SWIG_4") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
integer(C_INT), intent(in) :: farg14
integer(C_INT), intent(in) :: farg15
integer(C_INT), intent(in) :: farg16
integer(C_INT), intent(in) :: farg17
integer(C_INT), intent(in) :: farg18
integer(C_INT), intent(in) :: farg19
integer(C_INT), intent(in) :: farg20
integer(C_INT), intent(in) :: farg21
integer(C_INT), intent(in) :: farg22
type(SwigClassWrapper) :: fresult
end function

function swigc_new_heffte_fft3d_cufft__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19) &
bind(C, name="_wrap_new_heffte_fft3d_cufft__SWIG_5") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
integer(C_INT), intent(in) :: farg14
integer(C_INT), intent(in) :: farg15
integer(C_INT), intent(in) :: farg16
integer(C_INT), intent(in) :: farg17
integer(C_INT), intent(in) :: farg18
integer(C_INT), intent(in) :: farg19
type(SwigClassWrapper) :: fresult
end function

function swigc_new_heffte_fft3d_cufft__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13) &
bind(C, name="_wrap_new_heffte_fft3d_cufft__SWIG_6") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
type(SwigClassWrapper) :: fresult
end function

function swigc_heffte_fft3d_cufft_size_inbox(farg1) &
bind(C, name="_wrap_heffte_fft3d_cufft_size_inbox") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_LONG_LONG) :: fresult
end function

function swigc_heffte_fft3d_cufft_size_outbox(farg1) &
bind(C, name="_wrap_heffte_fft3d_cufft_size_outbox") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_LONG_LONG) :: fresult
end function

function swigc_heffte_fft3d_cufft_get_scale_factor(farg1, farg2) &
bind(C, name="_wrap_heffte_fft3d_cufft_get_scale_factor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
real(C_DOUBLE) :: fresult
end function

function swigc_heffte_fft3d_cufft_size_workspace(farg1) &
bind(C, name="_wrap_heffte_fft3d_cufft_size_workspace") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_SIZE_T) :: fresult
end function

function swigc_heffte_fft3d_cufft_size_comm_buffers(farg1) &
bind(C, name="_wrap_heffte_fft3d_cufft_size_comm_buffers") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_SIZE_T) :: fresult
end function

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_6(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_7(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_7")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_8(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_8")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_9(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_9")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_10(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_10")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_11(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_11")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_12(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_12")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_13(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_13")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_14(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_14")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_15(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_15")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_16(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_16")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_17(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_17")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_18(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_18")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_19(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_19")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_20(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_20")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_forward__SWIG_21(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_forward__SWIG_21")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_6(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_7(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_7")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_8(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_8")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_9(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_9")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_10(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_10")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_11(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_11")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_12(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_12")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_13(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_13")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_14(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_14")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_15(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_15")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_16(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_16")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_17(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_17")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_18(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_18")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_19(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_19")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_20(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_20")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_cufft_backward__SWIG_21(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_cufft_backward__SWIG_21")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_delete_heffte_fft3d_cufft(farg1) &
bind(C, name="_wrap_delete_heffte_fft3d_cufft")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
end subroutine

subroutine swigc_heffte_fft3d_cufft_op_assign__(farg1, farg2) &
bind(C, name="_wrap_heffte_fft3d_cufft_op_assign__")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
end subroutine

function swigc_new_heffte_fft3d_r2c_cufft__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20, farg21, farg22, farg23) &
bind(C, name="_wrap_new_heffte_fft3d_r2c_cufft__SWIG_4") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
integer(C_INT), intent(in) :: farg14
integer(C_INT), intent(in) :: farg15
integer(C_INT), intent(in) :: farg16
integer(C_INT), intent(in) :: farg17
integer(C_INT), intent(in) :: farg18
integer(C_INT), intent(in) :: farg19
integer(C_INT), intent(in) :: farg20
integer(C_INT), intent(in) :: farg21
integer(C_INT), intent(in) :: farg22
integer(C_INT), intent(in) :: farg23
type(SwigClassWrapper) :: fresult
end function

function swigc_new_heffte_fft3d_r2c_cufft__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20) &
bind(C, name="_wrap_new_heffte_fft3d_r2c_cufft__SWIG_5") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
integer(C_INT), intent(in) :: farg14
integer(C_INT), intent(in) :: farg15
integer(C_INT), intent(in) :: farg16
integer(C_INT), intent(in) :: farg17
integer(C_INT), intent(in) :: farg18
integer(C_INT), intent(in) :: farg19
integer(C_INT), intent(in) :: farg20
type(SwigClassWrapper) :: fresult
end function

function swigc_new_heffte_fft3d_r2c_cufft__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14) &
bind(C, name="_wrap_new_heffte_fft3d_r2c_cufft__SWIG_6") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
integer(C_INT), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
integer(C_INT), intent(in) :: farg3
integer(C_INT), intent(in) :: farg4
integer(C_INT), intent(in) :: farg5
integer(C_INT), intent(in) :: farg6
integer(C_INT), intent(in) :: farg7
integer(C_INT), intent(in) :: farg8
integer(C_INT), intent(in) :: farg9
integer(C_INT), intent(in) :: farg10
integer(C_INT), intent(in) :: farg11
integer(C_INT), intent(in) :: farg12
integer(C_INT), intent(in) :: farg13
integer(C_INT), intent(in) :: farg14
type(SwigClassWrapper) :: fresult
end function

function swigc_heffte_fft3d_r2c_cufft_size_inbox(farg1) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_size_inbox") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_LONG_LONG) :: fresult
end function

function swigc_heffte_fft3d_r2c_cufft_size_outbox(farg1) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_size_outbox") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_LONG_LONG) :: fresult
end function

function swigc_heffte_fft3d_r2c_cufft_size_workspace(farg1) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_size_workspace") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_SIZE_T) :: fresult
end function

function swigc_heffte_fft3d_r2c_cufft_size_comm_buffers(farg1) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_size_comm_buffers") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_SIZE_T) :: fresult
end function

function swigc_heffte_fft3d_r2c_cufft_get_scale_factor(farg1, farg2) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_get_scale_factor") &
result(fresult)
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
integer(C_INT), intent(in) :: farg2
real(C_DOUBLE) :: fresult
end function

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_6(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_7(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_7")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_8(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_8")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_9(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_9")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_10(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_10")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_11(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_11")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_12(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_12")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_forward__SWIG_13(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_forward__SWIG_13")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_6(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_6")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_7(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_7")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_8(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_8")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_9(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_9")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_10(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_10")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
integer(C_INT), intent(in) :: farg4
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_11(farg1, farg2, farg3) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_11")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_12(farg1, farg2, farg3, farg4, farg5) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_12")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
integer(C_INT), intent(in) :: farg5
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_backward__SWIG_13(farg1, farg2, farg3, farg4) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_backward__SWIG_13")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(in) :: farg1
type(C_PTR), value :: farg2
type(C_PTR), value :: farg3
type(C_PTR), value :: farg4
end subroutine

subroutine swigc_delete_heffte_fft3d_r2c_cufft(farg1) &
bind(C, name="_wrap_delete_heffte_fft3d_r2c_cufft")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
end subroutine

subroutine swigc_heffte_fft3d_r2c_cufft_op_assign__(farg1, farg2) &
bind(C, name="_wrap_heffte_fft3d_r2c_cufft_op_assign__")
use, intrinsic :: ISO_C_BINDING
import :: swigclasswrapper
type(SwigClassWrapper), intent(inout) :: farg1
type(SwigClassWrapper), intent(in) :: farg2
end subroutine

end interface


contains
 ! MODULE SUBPROGRAMS

subroutine SWIGTM_fout_char_Sm_(imout, fout)
  use, intrinsic :: ISO_C_BINDING
  type(SwigArrayWrapper), intent(in) :: imout
  character(len=:), allocatable, intent(out) :: fout
  character(kind=C_CHAR), dimension(:), pointer :: chars
  integer(kind=C_SIZE_T) :: i
  call c_f_pointer(imout%data, chars, [imout%size])
  allocate(character(len=imout%size) :: fout)
  do i=1, imout%size
    fout(i:i) = char(ichar(chars(i)))
  end do
end subroutine

function get_serr() &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
character(len=:), allocatable :: swig_result
type(SwigArrayWrapper) :: fresult 

fresult = swigc_get_serr()
call SWIGTM_fout_char_Sm_(fresult, swig_result)
if (.false.) call SWIG_free(fresult%data)
end function


subroutine SWIGTM_fin_bool(finp, iminp)
  use, intrinsic :: ISO_C_BINDING
  logical, intent(in) :: finp
  integer(kind=C_INT), intent(out) :: iminp
  if (finp .eqv. .true.) then
    iminp = 1
  else
    iminp = 0
  end if
end subroutine

function swigf_new_heffte_fft3d_cufft__SWIG_4(il0, il1, il2, ih0, ih1, ih2, io0, io1, io2, ol0, ol1, ol2, oh0, oh1, oh2, oo0, &
  oo1, oo2, comm, use_reorder, algorithm, use_pencils) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: io0
integer(C_INT), intent(in) :: io1
integer(C_INT), intent(in) :: io2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer(C_INT), intent(in) :: oo0
integer(C_INT), intent(in) :: oo1
integer(C_INT), intent(in) :: oo2
integer :: comm
logical, intent(in) :: use_reorder
integer(C_INT), intent(in) :: algorithm
logical, intent(in) :: use_pencils
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 
integer(C_INT) :: farg14 
integer(C_INT) :: farg15 
integer(C_INT) :: farg16 
integer(C_INT) :: farg17 
integer(C_INT) :: farg18 
integer(C_INT) :: farg19 
integer(C_INT) :: farg20 
integer(C_INT) :: farg21 
integer(C_INT) :: farg22 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = io0
farg8 = io1
farg9 = io2
farg10 = ol0
farg11 = ol1
farg12 = ol2
farg13 = oh0
farg14 = oh1
farg15 = oh2
farg16 = oo0
farg17 = oo1
farg18 = oo2
farg19 = int(comm, C_INT)
call SWIGTM_fin_bool(use_reorder, farg20)
farg21 = algorithm
call SWIGTM_fin_bool(use_pencils, farg22)
fresult = swigc_new_heffte_fft3d_cufft__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20, farg21, farg22)
self%swigdata = fresult
end function

function swigf_new_heffte_fft3d_cufft__SWIG_5(il0, il1, il2, ih0, ih1, ih2, io0, io1, io2, ol0, ol1, ol2, oh0, oh1, oh2, oo0, &
  oo1, oo2, comm) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: io0
integer(C_INT), intent(in) :: io1
integer(C_INT), intent(in) :: io2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer(C_INT), intent(in) :: oo0
integer(C_INT), intent(in) :: oo1
integer(C_INT), intent(in) :: oo2
integer :: comm
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 
integer(C_INT) :: farg14 
integer(C_INT) :: farg15 
integer(C_INT) :: farg16 
integer(C_INT) :: farg17 
integer(C_INT) :: farg18 
integer(C_INT) :: farg19 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = io0
farg8 = io1
farg9 = io2
farg10 = ol0
farg11 = ol1
farg12 = ol2
farg13 = oh0
farg14 = oh1
farg15 = oh2
farg16 = oo0
farg17 = oo1
farg18 = oo2
farg19 = int(comm, C_INT)
fresult = swigc_new_heffte_fft3d_cufft__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19)
self%swigdata = fresult
end function

function swigf_new_heffte_fft3d_cufft__SWIG_6(il0, il1, il2, ih0, ih1, ih2, ol0, ol1, ol2, oh0, oh1, oh2, comm) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer :: comm
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = ol0
farg8 = ol1
farg9 = ol2
farg10 = oh0
farg11 = oh1
farg12 = oh2
farg13 = int(comm, C_INT)
fresult = swigc_new_heffte_fft3d_cufft__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, farg11, &
  farg12, farg13)
self%swigdata = fresult
end function

function swigf_heffte_fft3d_cufft_size_inbox(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_LONG_LONG) :: swig_result
class(heffte_fft3d_cufft), intent(in) :: self
integer(C_LONG_LONG) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_cufft_size_inbox(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_cufft_size_outbox(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_LONG_LONG) :: swig_result
class(heffte_fft3d_cufft), intent(in) :: self
integer(C_LONG_LONG) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_cufft_size_outbox(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_cufft_get_scale_factor(self, scaling) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
class(heffte_fft3d_cufft), intent(in) :: self
integer(scale), intent(in) :: scaling
real(C_DOUBLE) :: fresult 
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
farg2 = scaling
fresult = swigc_heffte_fft3d_cufft_get_scale_factor(farg1, farg2)
swig_result = fresult
end function

function swigf_heffte_fft3d_cufft_size_workspace(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_SIZE_T) :: swig_result
class(heffte_fft3d_cufft), intent(in) :: self
integer(C_SIZE_T) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_cufft_size_workspace(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_cufft_size_comm_buffers(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_SIZE_T) :: swig_result
class(heffte_fft3d_cufft), intent(in) :: self
integer(C_SIZE_T) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_cufft_size_comm_buffers(farg1)
swig_result = fresult
end function

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_6(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_6(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_7(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_forward__SWIG_7(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_8(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_8(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_9(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_forward__SWIG_9(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_10(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_10(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_11(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_forward__SWIG_11(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_12(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_12(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_13(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_forward__SWIG_13(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_14(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_14(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_15(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_forward__SWIG_15(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_16(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_16(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_17(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_forward__SWIG_17(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_18(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_18(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_19(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_forward__SWIG_19(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_20(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_forward__SWIG_20(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_forward__SWIG_21(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_forward__SWIG_21(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_6(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_6(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_7(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_backward__SWIG_7(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_8(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_8(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_9(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_backward__SWIG_9(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_10(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_10(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_11(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_backward__SWIG_11(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_12(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_12(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_13(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_backward__SWIG_13(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_14(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_14(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_15(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_backward__SWIG_15(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_16(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_16(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_17(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_backward__SWIG_17(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_18(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_18(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_19(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_cufft_backward__SWIG_19(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_20(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_cufft_backward__SWIG_20(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_cufft_backward__SWIG_21(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_cufft_backward__SWIG_21(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_cufft_release(self)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(inout) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
if (btest(farg1%cmemflags, swig_cmem_own_bit)) then
call swigc_delete_heffte_fft3d_cufft(farg1)
endif
farg1%cptr = C_NULL_PTR
farg1%cmemflags = 0
self%swigdata = farg1
end subroutine

subroutine swigf_heffte_fft3d_cufft_op_assign__(self, other)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_cufft), intent(inout) :: self
type(heffte_fft3d_cufft), intent(in) :: other
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 

farg1 = self%swigdata
farg2 = other%swigdata
call swigc_heffte_fft3d_cufft_op_assign__(farg1, farg2)
self%swigdata = farg1
end subroutine

function swigf_new_heffte_fft3d_r2c_cufft__SWIG_4(il0, il1, il2, ih0, ih1, ih2, io0, io1, io2, ol0, ol1, ol2, oh0, oh1, oh2, &
  oo0, oo1, oo2, r2c_direction, comm, use_reorder, algorithm, use_pencils) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_r2c_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: io0
integer(C_INT), intent(in) :: io1
integer(C_INT), intent(in) :: io2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer(C_INT), intent(in) :: oo0
integer(C_INT), intent(in) :: oo1
integer(C_INT), intent(in) :: oo2
integer(C_INT), intent(in) :: r2c_direction
integer :: comm
logical, intent(in) :: use_reorder
integer(C_INT), intent(in) :: algorithm
logical, intent(in) :: use_pencils
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 
integer(C_INT) :: farg14 
integer(C_INT) :: farg15 
integer(C_INT) :: farg16 
integer(C_INT) :: farg17 
integer(C_INT) :: farg18 
integer(C_INT) :: farg19 
integer(C_INT) :: farg20 
integer(C_INT) :: farg21 
integer(C_INT) :: farg22 
integer(C_INT) :: farg23 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = io0
farg8 = io1
farg9 = io2
farg10 = ol0
farg11 = ol1
farg12 = ol2
farg13 = oh0
farg14 = oh1
farg15 = oh2
farg16 = oo0
farg17 = oo1
farg18 = oo2
farg19 = r2c_direction
farg20 = int(comm, C_INT)
call SWIGTM_fin_bool(use_reorder, farg21)
farg22 = algorithm
call SWIGTM_fin_bool(use_pencils, farg23)
fresult = swigc_new_heffte_fft3d_r2c_cufft__SWIG_4(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20, farg21, farg22, farg23)
self%swigdata = fresult
end function

function swigf_new_heffte_fft3d_r2c_cufft__SWIG_5(il0, il1, il2, ih0, ih1, ih2, io0, io1, io2, ol0, ol1, ol2, oh0, oh1, oh2, &
  oo0, oo1, oo2, r2c_direction, comm) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_r2c_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: io0
integer(C_INT), intent(in) :: io1
integer(C_INT), intent(in) :: io2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer(C_INT), intent(in) :: oo0
integer(C_INT), intent(in) :: oo1
integer(C_INT), intent(in) :: oo2
integer(C_INT), intent(in) :: r2c_direction
integer :: comm
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 
integer(C_INT) :: farg14 
integer(C_INT) :: farg15 
integer(C_INT) :: farg16 
integer(C_INT) :: farg17 
integer(C_INT) :: farg18 
integer(C_INT) :: farg19 
integer(C_INT) :: farg20 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = io0
farg8 = io1
farg9 = io2
farg10 = ol0
farg11 = ol1
farg12 = ol2
farg13 = oh0
farg14 = oh1
farg15 = oh2
farg16 = oo0
farg17 = oo1
farg18 = oo2
farg19 = r2c_direction
farg20 = int(comm, C_INT)
fresult = swigc_new_heffte_fft3d_r2c_cufft__SWIG_5(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14, farg15, farg16, farg17, farg18, farg19, farg20)
self%swigdata = fresult
end function

function swigf_new_heffte_fft3d_r2c_cufft__SWIG_6(il0, il1, il2, ih0, ih1, ih2, ol0, ol1, ol2, oh0, oh1, oh2, r2c_direction, &
  comm) &
result(self)
use, intrinsic :: ISO_C_BINDING
type(heffte_fft3d_r2c_cufft) :: self
integer(C_INT), intent(in) :: il0
integer(C_INT), intent(in) :: il1
integer(C_INT), intent(in) :: il2
integer(C_INT), intent(in) :: ih0
integer(C_INT), intent(in) :: ih1
integer(C_INT), intent(in) :: ih2
integer(C_INT), intent(in) :: ol0
integer(C_INT), intent(in) :: ol1
integer(C_INT), intent(in) :: ol2
integer(C_INT), intent(in) :: oh0
integer(C_INT), intent(in) :: oh1
integer(C_INT), intent(in) :: oh2
integer(C_INT), intent(in) :: r2c_direction
integer :: comm
type(SwigClassWrapper) :: fresult 
integer(C_INT) :: farg1 
integer(C_INT) :: farg2 
integer(C_INT) :: farg3 
integer(C_INT) :: farg4 
integer(C_INT) :: farg5 
integer(C_INT) :: farg6 
integer(C_INT) :: farg7 
integer(C_INT) :: farg8 
integer(C_INT) :: farg9 
integer(C_INT) :: farg10 
integer(C_INT) :: farg11 
integer(C_INT) :: farg12 
integer(C_INT) :: farg13 
integer(C_INT) :: farg14 

farg1 = il0
farg2 = il1
farg3 = il2
farg4 = ih0
farg5 = ih1
farg6 = ih2
farg7 = ol0
farg8 = ol1
farg9 = ol2
farg10 = oh0
farg11 = oh1
farg12 = oh2
farg13 = r2c_direction
farg14 = int(comm, C_INT)
fresult = swigc_new_heffte_fft3d_r2c_cufft__SWIG_6(farg1, farg2, farg3, farg4, farg5, farg6, farg7, farg8, farg9, farg10, &
  farg11, farg12, farg13, farg14)
self%swigdata = fresult
end function

function swigf_heffte_fft3d_r2c_cufft_size_inbox(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_LONG_LONG) :: swig_result
class(heffte_fft3d_r2c_cufft), intent(in) :: self
integer(C_LONG_LONG) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_r2c_cufft_size_inbox(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_r2c_cufft_size_outbox(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_LONG_LONG) :: swig_result
class(heffte_fft3d_r2c_cufft), intent(in) :: self
integer(C_LONG_LONG) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_r2c_cufft_size_outbox(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_r2c_cufft_size_workspace(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_SIZE_T) :: swig_result
class(heffte_fft3d_r2c_cufft), intent(in) :: self
integer(C_SIZE_T) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_r2c_cufft_size_workspace(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_r2c_cufft_size_comm_buffers(self) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
integer(C_SIZE_T) :: swig_result
class(heffte_fft3d_r2c_cufft), intent(in) :: self
integer(C_SIZE_T) :: fresult 
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
fresult = swigc_heffte_fft3d_r2c_cufft_size_comm_buffers(farg1)
swig_result = fresult
end function

function swigf_heffte_fft3d_r2c_cufft_get_scale_factor(self, scaling) &
result(swig_result)
use, intrinsic :: ISO_C_BINDING
real(C_DOUBLE) :: swig_result
class(heffte_fft3d_r2c_cufft), intent(in) :: self
integer(scale), intent(in) :: scaling
real(C_DOUBLE) :: fresult 
type(SwigClassWrapper) :: farg1 
integer(C_INT) :: farg2 

farg1 = self%swigdata
farg2 = scaling
fresult = swigc_heffte_fft3d_r2c_cufft_get_scale_factor(farg1, farg2)
swig_result = fresult
end function

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_6(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_6(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_7(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_7(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_8(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_8(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_9(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_FLOAT), dimension(*), target :: input
complex(C_FLOAT_COMPLEX), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_9(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_10(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_10(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_11(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_11(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_12(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_12(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_forward__SWIG_13(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
real(C_DOUBLE), dimension(*), target :: input
complex(C_DOUBLE_COMPLEX), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_r2c_cufft_forward__SWIG_13(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_6(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_6(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_7(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_7(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_8(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_8(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_9(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_FLOAT_COMPLEX), dimension(*), target :: input
real(C_FLOAT), dimension(*), target :: output
complex(C_FLOAT_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_9(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_10(self, input, output, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
integer(C_INT) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = scaling
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_10(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_11(self, input, output)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_11(farg1, farg2, farg3)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_12(self, input, output, workspace, scaling)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
integer(scale), intent(in) :: scaling
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 
integer(C_INT) :: farg5 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
farg5 = scaling
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_12(farg1, farg2, farg3, farg4, farg5)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_backward__SWIG_13(self, input, output, workspace)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(in) :: self
complex(C_DOUBLE_COMPLEX), dimension(*), target :: input
real(C_DOUBLE), dimension(*), target :: output
complex(C_DOUBLE_COMPLEX), dimension(*), target :: workspace
type(SwigClassWrapper) :: farg1 
type(C_PTR) :: farg2 
type(C_PTR) :: farg3 
type(C_PTR) :: farg4 

farg1 = self%swigdata
farg2 = c_loc(input)
farg3 = c_loc(output)
farg4 = c_loc(workspace)
call swigc_heffte_fft3d_r2c_cufft_backward__SWIG_13(farg1, farg2, farg3, farg4)
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_release(self)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(inout) :: self
type(SwigClassWrapper) :: farg1 

farg1 = self%swigdata
if (btest(farg1%cmemflags, swig_cmem_own_bit)) then
call swigc_delete_heffte_fft3d_r2c_cufft(farg1)
endif
farg1%cptr = C_NULL_PTR
farg1%cmemflags = 0
self%swigdata = farg1
end subroutine

subroutine swigf_heffte_fft3d_r2c_cufft_op_assign__(self, other)
use, intrinsic :: ISO_C_BINDING
class(heffte_fft3d_r2c_cufft), intent(inout) :: self
type(heffte_fft3d_r2c_cufft), intent(in) :: other
type(SwigClassWrapper) :: farg1 
type(SwigClassWrapper) :: farg2 

farg1 = self%swigdata
farg2 = other%swigdata
call swigc_heffte_fft3d_r2c_cufft_op_assign__(farg1, farg2)
self%swigdata = farg1
end subroutine


end module
