Reusing BuffersSome Intel® IPP functions require internal memory for various optimization strategies. At the same time you should be well aware that memory allocation inside of the function may have a negative impact on performance in some situations, for example, in the case of cache misses. To avoid or minimize memory allocation and keep your data in warm cache, some functions, for example, FFT and DFT transform, can use or reuse memory given as a parameter to the function.
If you have to call a FFT function many times, the reuse of an external buffer results in better performance. A simple example of this kind of processing is perform filtering using FFT transform or computing FFT as two FFT in two separate threads:
The external buffer is not necessary. If the pointer to the buffer is 0, the function allocates memory inside.