code: public static int cufftPlan2d(cufftHandle plan, int nx, int ny, int type)
      {
          plan.setDimension(2);
          plan.setType(type);
          plan.setSize(nx, ny, 0);
          return checkResult(cufftPlan2dNative(plan, nx, ny, type));
      }
docs: <pre>
  Creates a 2D FFT plan configuration according to specified signal sizes
  and data type.
  
  cufftResult cufftPlan2d( cufftHandle *plan, int nx, int ny, cufftType type );
  
  This function is the same as cufftPlan1d() except that
  it takes a second size parameter, ny, and does not support batching.
  
  Input
  ----
  plan Pointer to a cufftHandle object
  nx   The transform size in the X dimension (number of rows)
  ny   The transform size in the Y dimension (number of columns)
  type The transform data type (e.g., CUFFT_C2R for complex to real)
  
  Output
  ----
  plan Contains a CUFFT 2D plan handle value
  
  Return Values
  ----
  CUFFT_SETUP_FAILED CUFFT library failed to initialize.
  CUFFT_INVALID_SIZE The nx or ny parameter is not a supported size.
  CUFFT_INVALID_TYPE The type parameter is not supported.
  CUFFT_ALLOC_FAILED Allocation of GPU resources for the plan failed.
  CUFFT_SUCCESS      CUFFT successfully created the FFT plan.
  
  JCUFFT_INTERNAL_ERROR If an internal JCufft error occurred
  <pre>