可能的 OpenMP +在 Xcode 4 (LLVM GCC) 中使用 _mm_shuffle_ps 时出现 SSE 错误

发布于 2024-12-14 21:38:25 字数 601 浏览 3 评论 0原文

我已将编译器从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

锦欢 2024-12-21 21:38:25

完全是一个错误。请归档。谢谢。

Totally a bug. Please file it. Thanks.

滴情不沾 2024-12-21 21:38:25

仅供参考:

我在这里也有同样的问题,但是使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文