Issue with __m256 type of intel intrinsics

后端 未结 2 2052
执念已碎
执念已碎 2021-01-13 01:04

I\'m trying to test some of the Intel Intrinsics to see how they work. So, i created a function to do that for me and this is the code:

void test_intel_256()         


        
2条回答
  •  [愿得一人]
    2021-01-13 02:01

    try this out

    res=_MM_ADD_PS(vec1,vec2); because the prototype of the __M256_MM_ADD_PS is

    __m256 _MM_ADD_PS(__m256,__m256);

    it takes two __m256 data types as the parameters and returns their sum as __m256 data, just like

    int add(int , int);

    for initializing

    vec=_MM_setr_PS(7.0,7.0,7.0,7.0,7.0,7.0,7.0,7.0) or

    vec =_MM_LOAD_PS(&arr) or

    vec =_MM_LOAD_PS(ptr)

提交回复
热议问题