I am trying to compile this project from github, which is implemented in C ++ with built-in SIMD (SSE4.1). The project on github is listed as a Visual Studio solution, but I'm trying to put it in Qtcreator using cmake. While I try to compile it, I get the following error:
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/include/smmintrin.h:520:1: error: inlining failed in call to always_inline '__m128i _mm_cvtepu8_epi32(__m128i)': target specific option mismatch
_mm_cvtepu8_epi32 (__m128i __X)
which, I am sure, is related to the part of SSE optimization, but since I am not familiar with this topic, I do not know what this means and how I can solve it, and on the network I was looking for, I couldn’t useful. The code that gives the following problem is the following:
static void cvt8u32f(const Mat& src, Mat& dest, const float amp)
{
const int imsize = src.size().area()/8;
const int nn = src.size().area()- imsize*8 ;
uchar* s = (uchar*)src.ptr(0);
float* d = dest.ptr<float>(0);
const __m128 mamp = _mm_set_ps1(amp);
const __m128i zero = _mm_setzero_si128();
for(int i=imsize;i--;)
{
__m128i s1 = _mm_loadl_epi64((__m128i*)s);
_mm_store_ps(d,_mm_mul_ps(mamp,_mm_cvtepi32_ps(_mm_cvtepu8_epi32(s1))));
_mm_store_ps(d+4,_mm_mul_ps(mamp,_mm_cvtepi32_ps(_mm_cvtepu8_epi32(_mm_srli_si128(s1,4)))));
s+=8;
d+=8;
}
for(int i=0;i<nn;i++)
{
*d = (float)*s * amp;
s++,d++;
}
}
can someone explain to me what the problem is and what i don't see. Thanks in advance.