Use one of the following techniques to parallelize your application:
You specify the parallel mode within the FFT module of Intel MKL instead of creating threads in your application. See Intel MKL User's Guide for more information on how to do this. See also Example "Using Intel MKL Internal Threading Mode".
You create threads in the application yourself and have each thread perform all stages of FFT implementation, including descriptor initialization, FFT computation, and descriptor deallocation. In this case, each descriptor is used only within its corresponding thread. In this case, set single-threaded mode for Intel MKL. See Example "Using Parallel Mode with Multiple Descriptors Initialized in a Parallel Region".
You create threads in the application yourself after initializing all FFT descriptors. This implies that threading is employed for parallel FFT computation only, and the descriptors are released upon return from the parallel region. In this case, each descriptor is used only within its corresponding thread. You must explicitly set the single-threaded mode for Intel MKL, otherwise, the actual number of threads may differ from one, because the DftiCommitDescriptor function is not in a parallel region. See Example "Using Parallel Mode with Multiple Descriptors Initialized in One Thread".
In cases "a", "b", and "c", listed above, set the parameter DFTI_NUMBER_OF_USER_THREADS to 1 (its default value), since each particular descriptor instance is used only in a single thread.
In case "d", use the DftiSetValue() function to set the DFTI_NUMBER_OF_USER_THREADS to the actual number of FFT computation threads, because multiple threads will be using the same descriptor. If this setting is not done, your program will work incorrectly or fail, since the descriptor contains individual data for each thread.
Avoid parallelizing your program and employing the Intel MKL internal threading simultaneously because this will slow down the performance. Note that in case "d" above, FFT computation is automatically initiated in a single-threading mode.
Do not change the number of threads after the DftiCommitDescriptor() function completes FFT initialization.
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804 |