编译器浏览器说程序调用
frexp
这是不是意味着编译器没有为
弗雷克斯
?
代码是用
g++ -Ofast -march=native
Code at compiler explorer
测试(c++):
#include <Eigen/Eigen>
using namespace Eigen;
void log2_extract_mantissa(ArrayXXf& x) {
// rip mantissa out of floats and store the result as int in-place.
std::int32_t* int_data = reinterpret_cast<std::int32_t*>(x.data());
for(Index i = 0; i < x.size(); ++i) {
std::frexp(x.data()[i], int_data + i);
}
}
...
.L3:
vmovss xmm0, DWORD PTR [rax+rbx*4]
lea rdi, [r12+rbx*4]
call frexpf
mov rax, QWORD PTR [rbp+16]
inc rbx
imul rax, QWORD PTR [rbp+8]
cmp rbx, rax
jl .L7
...