可能的 OpenMP +在 Xcode 4 (LLVM GCC) 中使用 _mm_shuffle_ps 时出现 SSE 错误
我已将编译器从 GCC 切换到 XCode 4.2 中的 LLVM GCC 4.2,并且在 OpenMP 下的 _mm_shuffle_ps 内在函数中遇到了奇怪的链接器错误。这个函数可以在其他地方工作,但是一旦我把它放在 omp 块中,它就会开始生成以下链接器错误:
"___builtin_ia32_shufps", referenced from:
__ZN7Annulus12traceFactorsEP9PrimitiveP8VFMatrix.omp_fn.0 in Annulus.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
我的代码的基本结构如下:
#pragma omp parallel {
//Some stuff
#pragma omp for {
//Do more stuff including _mm_shuffle_ps
}
}
代码在 GCC 4.2 中工作正常,所以这是 LLVM GCC 实现中的错误OpenMP 还是我需要一个外来的编译器标志?
I have switched my compiler to LLVM GCC 4.2 in XCode 4.2 from GCC and have run into a strange linker error for the _mm_shuffle_ps intrinsic under OpenMP. This function will works else where but once I put it within a omp block it starts generating the following linker error:
"___builtin_ia32_shufps", referenced from:
__ZN7Annulus12traceFactorsEP9PrimitiveP8VFMatrix.omp_fn.0 in Annulus.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
The basic structure of my code is as follows :
#pragma omp parallel {
//Some stuff
#pragma omp for {
//Do more stuff including _mm_shuffle_ps
}
}
The code works fine in GCC 4.2 so is this a bug in the LLVM GCC implementation of OpenMP or do I need an exotic compiler flag?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完全是一个错误。请归档。谢谢。
Totally a bug. Please file it. Thanks.
仅供参考:
我在这里也有同样的问题,但是使用 shuf_pd 指令。其他内在函数工作得很好。我刚刚向 Apple 提交了该错误。
可能有一个我还没有尝试过的解决方法:将所有 SSE 代码放入不同的函数中并从 OpenMP 循环中调用它。
Just FYI:
I have the same problem here, but with the shuf_pd instruction. Other intrinsics work just fine. I just filed that bug to Apple.
There may be a workaround I have not tried yet: Put all the SSE code into a different function and call it from the OpenMP loop.