Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

C++ error: intrinsic function was not declared in scope

$
0
0

I want to compile code that uses the intrinsic function _mm256_undefined_si256() (returns a vector of 8 packed double word integers). Here is the reduced snipped of the affected function from the header file:

// test.hpp#include "immintrin.h"namespace {    inline __m256i foo(__m256i a, __m256i b) {        __m256i res = _mm256_undefined_si256();        // some inline asm stuff        // __asm__(...);        return res;    }}

Compiling via gcc -march=native -mavx2 -O3 -std=c++11 test.cpp -o app throws the following error >>_mm256_undefined_si256<< was not declared in this scope.

I can not explain why this intrinsic function is not defined, since there are other intrinsics used in the header file which work properly.


Viewing all articles
Browse latest Browse all 22113

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>