TI工程师您好,有个疑问,代码中以感叹号形式提示如下内容是什么原因,请指教:fp_mode=relaxed to enableTMU hardware support for FP division?
Susan Yang:关于 fp_mode 您可以参考下
processors.wiki.ti.com/…/Floating_Point_Optimization
Relaxed mode prioritizes speed over strict correctness. In relaxed mode, the compiler may perform speed optimizations at the expense of reducing the precision of some calculations, typically a tiny amount. For instance, (X/3) is not precisely equivalent to (X*(1.0/3)), but in relaxed mode, the compiler is allowed to make this transformation anyway, as multiplication is much faster than division.
在Relaxed 模式下优先考虑速度而不是严格的正确性,编译器可以执行速度优化,但代价是降低某些计算的精度,不过通常都是很小的量。