Hello everyone
When I use the function "DSPF_sp_dotp_cplx" from TI DSP library 3.4 on C6678, I found that the elapsed cycles can be reduced by using the fixed value.
The definition of function is: void DSPF_sp_dotp_cplx(const float * x, const float * y, int nx, float * restrict re, float * restrict im);
* @param x Pointer to array holding the first floating-point vector
* @param y Pointer to array holding the second floating-point vector
* @param nx Number of values in the x and y vectors
* @param re Pointer to the location storing the real part of the result
* @param im Pointer to the location storing the imaginary part of the result
If I use predefined value for "nx" as input, the performance of function can be increased by 24%~28%. For example:
If I use the function like this: DSPF_sp_dotp_cplx(ptr_x1, ptr_x2, 32, re_opt, im_opt);
The elapsed cycles is 93
If I use the function like this: n= 32; DSPF_sp_dotp_cplx(ptr_x1, ptr_x2, n, re_opt, im_opt);
the elapsed cycles is 129.
When n=64. the cycles of fixed value scenario is 133. Another scenario is 176.
I had check the assemble file. I did not see different between two files. Can you tell me how the performance can be improved by using predefined value?
I set opt_level at 3, opt_for_space at 1, and --symdebug:none
Thanks
Xining Yu