text:
! 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

max_stars_repo_name: daboehme/heffte

max_issues_repo_name: daboehme/heffte

max_forks_repo_name: daboehme/heffte


text:
! fortranmodule.f95
module fortranmodule
use omp_lib

contains
    subroutine test(x, y)
        real(8), dimension(:), intent(in)  :: x
        real(8), dimension(:), intent(out) :: y
        ! Code begins
        integer :: i, n
        integer :: num_threads
        n = size(x, 1)

        !$omp parallel do private(i) firstprivate(n) shared(x, y)
        do i = 1, n
            if (i == 1) then
                ! The if clause can be removed for serious use.
                ! It is here for debugging only.
                num_threads = OMP_get_num_threads()
                print *, 'num_threads running:', num_threads
            end if
            y(i) = sin(x(i)) + cos(x(i) + exp(x(i))) + log(x(i))
        end do
        !$omp end parallel do
    end subroutine test

	subroutine ftdc_omp(grid1,step1,origin1,rho1,grid2,step2,origin2,rho2,x) ! Posunuti molekul zahrnuto v posunuti origin
		IMPLICIT NONE
		integer,dimension(3), intent(in)        :: grid1,grid2         ! velikost mrize pro vypis hustoty
		real(8),dimension(3), intent(in)        :: origin1,origin2       ! pocatek mrize
		real(8),dimension(3,3), intent(in)      :: step1,step2         ! step(1,:) krok ve smeru prvni dimenze gridu (ve smeru X) atd.
		real(8),dimension(:,:,:), intent(in)	:: rho1,rho2          ! nabojova hustota
		real(8),intent(out)                     :: x                    ! interaction energy
		real(8),allocatable,dimension(:,:,:)	:: RR2X,RR2Y,RR2Z,Norm_mat

		integer :: i,j,k, m,n,o
		real(8) :: norm,dV1,dV2
		real(8), dimension(3) :: drr,rr1,rr2,VecX,VecY,VecZ
		real(8), parameter :: MinDistance=0.001_8               ! Minimalni vzdalenost jednotlivych bodu pro vypocet interakcni energie

		Print *,'Starting fortran calculation: '
		allocate(RR2X(grid2(1),grid2(2),grid2(3)),RR2Y(grid2(1),grid2(2),grid2(3)),RR2Z(grid2(1),grid2(2),grid2(3)))

		do m=1,grid2(1)
		    do n=1,grid2(2)
		        do o=1,grid2(3)
		            rr2=origin2+(m-1)*step2(1,:)+(n-1)*step2(2,:)+(o-1)*step2(3,:)
					RR2X(m,n,o)=rr2(1)
					RR2Y(m,n,o)=rr2(2)
					RR2Z(m,n,o)=rr2(3)
		        enddo
		    enddo
		enddo

		Print *,'Starting parallel calculation: '
		Print *,'Pocet jader je: ',OMP_GET_NUM_THREADS()

		!$OMP PARALLEL DEFAULT(NONE) PRIVATE(i,j,k,rr1,m,n,o,Norm_mat) FIRSTPRIVATE(RR2X,RR2Y,RR2Z) SHARED(x,grid1,grid2,step1,step2,origin1,origin2,rho1,rho2)
		x=0.0_8
		allocate(Norm_mat(grid2(1),grid2(2),grid2(3)))
		Print *,'Pocet jader je: ',OMP_GET_NUM_THREADS()
		!$OMP DO SCHEDULE(DYNAMIC) REDUCTION (+:x)
		do i=1,grid1(1)
		    do j=1,grid1(2)
		        do k=1,grid1(3)
		            rr1=origin1+(i-1)*step1(1,:)+(j-1)*step1(2,:)+(k-1)*step1(3,:)
		            Norm_mat=sqrt( (RR2X-rr1(1))**2 + (RR2Y-rr1(2))**2 + (RR2Z-rr1(3))**2 )
					x = x + rho1(i,j,k)*sum(rho2/Norm_mat)
		        enddo
		    enddo
		    print '(I0,a,I0,a,I0)',i,'/',grid1(1),' From thread: ',OMP_GET_THREAD_NUM()

		enddo
		!$OMP END DO
		!$OMP END PARALLEL

		vecX=step1(1,:)
		vecY=step1(2,:)
		VecZ=(/VecX(2)*VecY(3)-VecX(3)*VecY(2),VecX(3)*VecY(1)-VecX(1)*VecY(3),VecX(1)*VecY(2)-VecX(2)*VecY(1)/)
		dV1=dot_product(VecZ,step1(3,:))
		vecX=step2(1,:)
		vecY=step2(2,:)
		VecZ=(/VecX(2)*VecY(3)-VecX(3)*VecY(2),VecX(3)*VecY(1)-VecX(1)*VecY(3),VecX(1)*VecY(2)-VecX(2)*VecY(1)/)
		dV2=dot_product(VecZ,step2(3,:))
		x=x*dV1*dV2
	end subroutine ftdc_omp

	subroutine fTDC_old_omp(grid1,step1,origin1,rho1,grid2,step2,origin2,rho2,x) ! Posunuti molekul zahrnuto v posunuti origin
		IMPLICIT NONE
		integer,dimension(3), intent(in)        :: grid1,grid2         ! velikost mrize pro vypis hustoty
		real(8),dimension(3), intent(in)        :: origin1,origin2       ! pocatek mrize
		real(8),dimension(3,3), intent(in)      :: step1,step2         ! step(1,:) krok ve smeru prvni dimenze gridu (ve smeru X) atd.
		real(8),dimension(:,:,:), intent(in)	:: rho1,rho2          ! nabojova hustota
		real(8),intent(out)                     :: x                    ! interaction energy

		integer :: i,j,k, m,n,o
		real(8) :: norm,dV1,dV2
		real(8), dimension(3) :: drr,rr1,rr2,VecX,VecY,VecZ
		real(8), parameter :: MinDistance=0.001_8               ! Minimalni vzdalenost jednotlivych bodu pro vypocet interakcni energie

		Print *,'Starting parallel calculation: '
		Print *,'Pocet jader je: ',OMP_GET_NUM_THREADS()
		!$OMP PARALLEL DEFAULT(NONE) PRIVATE(i,j,k,rr1,m,n,o,rr2,drr,norm) SHARED (x,grid1,grid2,step1,step2,origin1,origin2,rho1,rho2)
		x=0.0_8
		Print *,'Pocet jader je: ',OMP_GET_NUM_THREADS()
		!$OMP DO SCHEDULE(DYNAMIC) REDUCTION (+:x)
		do i=1,grid1(1)
		    do j=1,grid1(2)
		        do k=1,grid1(3)
		            rr1=origin1+(i-1)*step1(1,:)+(j-1)*step1(2,:)+(k-1)*step1(3,:)
		            do m=1,grid2(1)
		                do n=1,grid2(2)
		                    do o=1,grid2(3)
		                        rr2=origin2+(m-1)*step2(1,:)+(n-1)*step2(2,:)+(o-1)*step2(3,:)
		                        drr=rr2-rr1
		                        norm=sqrt(dot_product(drr,drr))
		                        if (norm<=MinDistance) CYCLE
		                        x = x + rho1(i,j,k)*rho2(m,n,o)/norm
		                    enddo
		                enddo
		            enddo
		        enddo
		    enddo
		    print '(I0,a,I0,a,I0)',i,'/',grid1(1),' From thread: ',OMP_GET_THREAD_NUM()

		enddo
		!$OMP END DO
		!$OMP END PARALLEL

		vecX=step1(1,:)
		vecY=step1(2,:)
		VecZ=(/VecX(2)*VecY(3)-VecX(3)*VecY(2),VecX(3)*VecY(1)-VecX(1)*VecY(3),VecX(1)*VecY(2)-VecX(2)*VecY(1)/)
		dV1=dot_product(VecZ,step1(3,:))
		vecX=step2(1,:)
		vecY=step2(2,:)
		VecZ=(/VecX(2)*VecY(3)-VecX(3)*VecY(2),VecX(3)*VecY(1)-VecX(1)*VecY(3),VecX(1)*VecY(2)-VecX(2)*VecY(1)/)
		dV2=dot_product(VecZ,step2(3,:))
		x=x*dV1*dV2
	end subroutine fTDC_old_OMP

end module fortranmodule

max_stars_repo_name: slamavl/QChemTool

max_issues_repo_name: slamavl/QChemTool

max_forks_repo_name: slamavl/QChemTool


text:
module logic
  implicit none

contains

function xor(a, b)
  logical :: xor
  logical, intent(in) :: a, b

  xor = (a .and. .not. b) .or. (b .and. .not. a)
end function xor

function halfadder(a, b, c)
  logical :: halfadder
  logical, intent(in)  :: a, b
  logical, intent(out) :: c

  halfadder = xor(a, b)
  c = a .and. b
end function halfadder

function fulladder(a, b, c0, c1)
  logical :: fulladder
  logical, intent(in)  :: a, b, c0
  logical, intent(out) :: c1
  logical :: c2, c3

  fulladder = halfadder(halfadder(c0, a, c2), b, c3)
  c1 = c2 .or. c3
end function fulladder

subroutine fourbitadder(a, b, s)
  logical, intent(in)  :: a(0:3), b(0:3)
  logical, intent(out) :: s(0:4)
  logical :: c0, c1, c2

  s(0) = fulladder(a(0), b(0), .false., c0)
  s(1) = fulladder(a(1), b(1), c0, c1)
  s(2) = fulladder(a(2), b(2), c1, c2)
  s(3) = fulladder(a(3), b(3), c2, s(4))
end subroutine fourbitadder
end module

program Four_bit_adder
  use logic
  implicit none

  logical, dimension(0:3) :: a, b
  logical, dimension(0:4) :: s
  integer, dimension(0:3) :: ai, bi
  integer, dimension(0:4) :: si
  integer :: i, j

  do i = 0, 15
    a(0) = btest(i, 0); a(1) = btest(i, 1); a(2) = btest(i, 2); a(3) = btest(i, 3)
    where(a)
      ai = 1
    else where
      ai = 0
    end where
    do j = 0, 15
      b(0) = btest(j, 0); b(1) = btest(j, 1); b(2) = btest(j, 2); b(3) = btest(j, 3)
      where(b)
        bi = 1
      else where
        bi = 0
      end where
      call fourbitadder(a, b, s)
      where (s)
        si = 1
      elsewhere
        si = 0
      end where
      write(*, "(4i1,a,4i1,a,5i1)") ai(3:0:-1), " + ", bi(3:0:-1), " = ", si(4:0:-1)
    end do
  end do
end program

ext: f

max_issues_repo_name: seanwallawalla-forks/RosettaCodeData

max_forks_repo_name: seanwallawalla-forks/RosettaCodeData