内联调用always_inline'__m256d _mm256_broadcast_sd(const double *)'失败 [英] inlining failed in call to always_inline '__m256d _mm256_broadcast_sd(const double*)'
问题描述
我正在尝试运行由我的一个朋友创建的Visual Studio cpp项目.我正在尝试在没有VS的情况下运行文件.但是我得到了所有相同格式的错误列表:
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|
它在带有释放模式的VS中正常运行,并且在调试模式下运行时中断.
It runs correctly in VS with release mode and breaks when run in debug mode.
include
如下:
#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);
更新:
我正在使用以下命令来运行它:g++ -std=c++0x multip.cpp -o multip
,是否还有其他参数可将-mavx添加到编译器调用中?
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?
推荐答案
特定于目标的选项不匹配" 意味着您在GCC调用中缺少功能标记.您可能需要在编译器调用中添加-mavx
.
"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.
如果仅打算在计算机上运行此功能,则-march=native
将打开您自己的计算机支持的所有功能标志.
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.
这篇关于内联调用always_inline'__m256d _mm256_broadcast_sd(const double *)'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!