class_docstr: CUFFT plan class.
  
  This class represents an FFT plan for CUFFT.
  
  Parameters
  ----------
  shape : tuple of ints
      Transform shape. May contain more than 3 elements.
  in_dtype : { numpy.float32, numpy.float64, numpy.complex64, numpy.complex128 }
      Type of input data.
  out_dtype : { numpy.float32, numpy.float64, numpy.complex64, numpy.complex128 }
      Type of output data.
  batch : int
      Number of FFTs to configure in parallel (default is 1).
  stream : pycuda.driver.Stream
      Stream with which to associate the plan. If no stream is specified,
      the default stream is used.
  mode : int
      FFTW compatibility mode. Ignored in CUDA 9.2 and later.
  inembed : numpy.array with dtype=numpy.int32
      number of elements in each dimension of the input array
  istride : int
      distance between two successive input elements in the least significant
      (innermost) dimension
  idist : int
      distance between the first element of two consective batches in the
      input data
  onembed : numpy.array with dtype=numpy.int32
      number of elements in each dimension of the output array
  ostride : int
      distance between two successive output elements in the least significant
      (innermost) dimension
  odist : int
      distance between the first element of two consective batches in the
      output data
  auto_allocate : bool
      indicates whether the caller intends to allocate and manage the work area
class_docstr_tok: ["CUFFT","plan","class",".","This","class","represents","an","FFT","plan","for","CUFFT",".","Parameters","--","--","--","--","--","shape",":","tuple","of","ints","Transform","shape",".","May","contain","more","than","3","elements",".","in_dtype",":","{","numpy.float32",",","numpy.float64",",","numpy.complex64",",","numpy.complex128","}","Type","of","input","data",".","out_dtype",":","{","numpy.float32",",","numpy.float64",",","numpy.complex64",",","numpy.complex128","}","Type","of","output","data",".","batch",":","int","Number","of","FFTs","to","configure","in","parallel","(","default","is","1",")",".","stream",":","pycuda.driver.Stream","Stream","with","which","to","associate","the","plan",".","If","no","stream","is","specified",",","the","default","stream","is","used",".","mode",":","int","FFTW","compatibility","mode",".","Ignored","in","CUDA","9.2","and","later",".","inembed",":","numpy.array","with","dtype=numpy.int32","number","of","elements","in","each","dimension","of","the","input","array","istride",":","int","distance","between","two","successive","input","elements","in","the","least","significant","(","innermost",")","dimension","idist",":","int","distance","between","the","first","element","of","two","consective","batches","in","the","input","data","onembed",":","numpy.array","with","dtype=numpy.int32","number","of","elements","in","each","dimension","of","the","output","array","ostride",":","int","distance","between","two","successive","output","elements","in","the","least","significant","(","innermost",")","dimension","odist",":","int","distance","between","the","first","element","of","two","consective","batches","in","the","output","data","auto_allocate",":","bool","indicates","whether","the","caller","intends","to","allocate","and","manage","the","work","area"]
code: def __init__(
      self,
      shape,
      in_dtype,
      out_dtype,
      batch=1,
      stream=None,
      mode=0x01,
      inembed=None,
      istride=1,
      idist=0,
      onembed=None,
      ostride=1,
      odist=0,
      auto_allocate=True,
  ):
      if np.isscalar(shape):
          self.shape = (shape,)
      else:
          self.shape = shape
  
      self.in_dtype = in_dtype
      self.out_dtype = out_dtype
  
      if batch <= 0:
          raise ValueError("batch size must be greater than 0")
      self.batch = batch
  
      # Determine type of transformation:
      if in_dtype == np.float32 and out_dtype == np.complex64:
          self.fft_type = cufft.CUFFT_R2C
          self.fft_func = cufft.cufftExecR2C
      elif in_dtype == np.complex64 and out_dtype == np.float32:
          self.fft_type = cufft.CUFFT_C2R
          self.fft_func = cufft.cufftExecC2R
      elif in_dtype == np.complex64 and out_dtype == np.complex64:
          self.fft_type = cufft.CUFFT_C2C
          self.fft_func = cufft.cufftExecC2C
      elif in_dtype == np.float64 and out_dtype == np.complex128:
          self.fft_type = cufft.CUFFT_D2Z
          self.fft_func = cufft.cufftExecD2Z
      elif in_dtype == np.complex128 and out_dtype == np.float64:
          self.fft_type = cufft.CUFFT_Z2D
          self.fft_func = cufft.cufftExecZ2D
      elif in_dtype == np.complex128 and out_dtype == np.complex128:
          self.fft_type = cufft.CUFFT_Z2Z
          self.fft_func = cufft.cufftExecZ2Z
      else:
          raise ValueError("unsupported input/output type combination")
  
      # Check for double precision support:
      capability = misc.get_compute_capability(
          misc.get_current_device()
      )
      if capability < 1.3 and (
          misc.isdoubletype(in_dtype) or misc.isdoubletype(out_dtype)
      ):
          raise RuntimeError(
              "double precision requires compute capability "
              ">= 1.3 (you have %g)" % capability
          )
  
      if inembed is not None:
          inembed = inembed.ctypes.data
      if onembed is not None:
          onembed = onembed.ctypes.data
  
      # Set up plan:
      if len(self.shape) <= 0:
          raise ValueError("invalid transform size")
      n = np.asarray(self.shape, np.int32)
      self.handle = cufft.cufftCreate()
  
      # Set FFTW compatibility mode:
      if cufft._cufft_version <= 9010:
          cufft.cufftSetCompatibilityMode(self.handle, mode)
  
      # Set auto-allocate mode
      cufft.cufftSetAutoAllocation(self.handle, auto_allocate)
      self.worksize = cufft.cufftMakePlanMany(
          self.handle,
          len(self.shape),
          n.ctypes.data,
          inembed,
          istride,
          idist,
          onembed,
          ostride,
          odist,
          self.fft_type,
          self.batch,
      )
  
      # Associate stream with plan:
      if stream != None:
          cufft.cufftSetStream(self.handle, stream.handle)
  
file_path: scikit-cuda/skcuda/fft.py
imports: import pycuda.driver
  import pycuda.gpuarray
  import pycuda.elementwise
  from pycuda.tools import context_dependent_memoize
  import pycuda.tools
  import numpy
  from .None import cufft
  from .cufft import CUFFT_COMPATIBILITY_NATIVE, CUFFT_COMPATIBILITY_FFTW_PADDING, CUFFT_COMPATIBILITY_FFTW_ASYMMETRIC, CUFFT_COMPATIBILITY_FFTW_ALL
  from .None import cudart
  from .None import misc
label_desc: Use image node_id 1 to create a new Plan object  with example: obj = Plan(shape, in_dtype, out_dtype, batch, stream, mode, inembed, istride, idist, onembed, ostride, odist, auto_allocate)