inlining failed in call to always_inline #39;__m256d _mm256_broadcast_sd(const double*)#39;(内联调用 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;
从这里调用错误:
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*)' 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:内联调用 always_inline '__m256d _mm256_broadcast_sd(const double*)' 失败
基础教程推荐
- CString 到 char* 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- 初始化列表*参数*评估顺序 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
