Rate This Document
Findability
Accuracy
Completeness
Readability

Replaceability

The KML_FFT and MKL interfaces are different. Therefore, you need to replace the code based on the code logic. For details, see Kunpeng Math Library Developer Guide.

Table 1 describes the mapping between replaceable interfaces and MKL interfaces.

Table 1 FFT replacement mapping

MKL Interface

KML Interface

Description

DftiCreateDescriptor

DftiSetValue

DftiCommitDescriptor

kml_fft_plan_dft

kml_fft_plan_dft_1d

kml_fft_plan_dft_2d

kml_fft_plan_dft_3d

kml_fft_plan_dft_c2r

kml_fft_plan_dft_c2r_1d

kml_fft_plan_dft_c2r_2d

kml_fft_plan_dft_c2r_3d

kml_fft_plan_dft_r2c

kml_fft_plan_dft_r2c_1d

kml_fft_plan_dft_r2c_2d

kml_fft_plan_dft_r2c_3d

kml_fft_plan_guru64_dft

kml_fft_plan_guru64_dft_c2r

kml_fft_plan_guru64_dft_r2c

kml_fft_plan_guru64_r2r

kml_fft_plan_guru64_split_dft

kml_fft_plan_guru64_split_dft_c2r

kml_fft_plan_guru64_split_dft_r2c

kml_fft_plan_guru_dft

kml_fft_plan_guru_dft_c2r

kml_fft_plan_guru_dft_r2c

kml_fft_plan_guru_r2r

kml_fft_plan_guru_split_dft

kml_fft_plan_guru_split_dft_c2r

kml_fft_plan_guru_split_dft_r2c

kml_fft_plan_many_dft

kml_fft_plan_many_dft_c2r

kml_fft_plan_many_dft_r2c

kml_fft_plan_many_r2r

kml_fft_plan_r2r

kml_fft_plan_r2r_1d

kml_fft_plan_r2r_2d

kml_fft_plan_r2r_3d

kml_fft_plan_with_nthreads

kml_fft_init_threads

kml_fft_cleanup_threads

MKL builds an FFT model in three steps:

  1. Call the DftiCreateDescriptor interface to create a descriptor.
  2. Call the DftiSetValue interface to set parameters.
  3. Call DftiCommitDescriptor to complete the creation.

KML uses different plan interfaces based on the problem type. Different plan interfaces require different parameter configurations, which are transferred to the plan interface through parameters. You need to replace them separately during the migration.

For details, see the three code samples provided in Migration Procedure.

DftiFreeDescriptor

kml_fft_destroy_plan

kml_fft_free

This interface is used to release resources associated with a model.

DftiCopyDescriptor

N/A

-

DftiComputeForward

kml_fft_execute

kml_fft_execute_dft

kml_fft_execute_split_dft

kml_fft_execute_dft_r2c

kml_fft_execute_split_dft_r2c

DftiComputeForward is used for the C2C and R2C problems in MKL while the execution functions related to C2C and R2C in KML are used.

DftiComputeBackward

kml_fft_execute

kml_fft_execute_dft

kml_fft_execute_split_dft

kml_fft_execute_dft_c2r

kml_fft_execute_split_dft_c2

DftiComputeBackward is used for the C2C and C2R problems in MKL while the execution functions related to C2C and C2R in KML are used.

DftiGetValue

N/A

-

DftiErrorClass

N/A

-

DftiErrorMessage

N/A

-