您好!
对于我项目中的一些计算、我需要使用复数。 我使用的 CCS 版本为11.0.0.00012、其中包含编译器 TI v21.6.0.LTS1。 微控制器 F280049具有96 MHz 的 CPU 时钟。
使用标头 有内置的函数可以计算,例如参数、绝对值或复数的平方根。 但这些函数似乎效率很低。
例如:
当我使用 cargf (x)计算 x 的参数时、我需要围绕13 µs。 但当我改用 atan2f (cimagf (x)、crealf (x))时、它需要的时间不到1 µs。
I get similar results when using cabsf etc.So now I am wondering, why there is such a difference in the time.
Is it wrong to use these functions?
Do I maybe need to set something in the project properties, such that the compiler translates the function calls to the correct instructions?
Kind regards,
Michael
