Part Number: PROCESSOR-SDK-J784S4
Other Parts Discussed in Thread: MATHLIB
Tool/software:
Hi TI,
In the same C++ source file (around 800 lines), I have :
- a C7X kernel code inside a C++ kernel() function,
- and an init() function to prepare a context for that kernel.
The init() function evaluates an array of constants for the kernel, and prepares a bunch of SE/SA templates. (FFTlib-like pattern of API)
The init() function also uses something like a kernel loop, to evaluate the array of constants. And this uses some sort of sin/cos inlines from MATHlib.
The execution time of the kernel() function is 67 units of time.
If I put the part of the init() function dealing with the array of constants calculation, inside another source file (separate compilation), without changing the kernel() function, then the execution time of kernel() is better, down to 58 units.
I suspect that the compiler/optimizer codes differently the kernel(), depending of the amount of code it has in the same source file. Despite it is in independant functions.
Does it sounds possible to you ?
I see in MATHlib inline functions that their code is put in a dedicated text section. (something like "text;optci"). What is the reason for that, shall I do the same ?