inlining failed in call to always_inline '__m256d _mm256_broadcast_sd(const double*)'

和自甴很熟 提交于 2019-11-28 09:00:00

问题


I'm trying to run a Visual Studio cpp project created by a friend of mine. I'm trying to run the file without VS. But I'm getting a list of errors, all in the same format:

inlining failed in call to always_inline '__m256d _mm256_broadcast_sd(const double*)': target specific option mismatch|

It runs correctly in VS with release mode and breaks when run in debug mode.

The includes are as follows:

#include "stdafx.h"
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <vector>
# include <omp.h>
#include <chrono>
#include <fstream>
#include <algorithm>

#include <immintrin.h>

using namespace std::chrono;
using namespace std;

and the error is called from here:

double zero = 0;
__m256d acc = _mm256_broadcast_sd(&zero);

Update:

I'm using the this command to run it: g++ -std=c++0x multip.cpp -o multip, is there an additional parameter to add -mavx to the compiler invocation?


回答1:


"Target specific option mismatch" means that you're missing a feature flag from your GCC invocation. You probably need to add -mavx to your compiler invocation.

If you're intending to run this on your computer only, -march=native will turn on all the feature flags that your own machine supports.



来源:https://stackoverflow.com/questions/44962849/inlining-failed-in-call-to-always-inline-m256d-mm256-broadcast-sdconst-doub

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!