libspe 与 libspe2? 有什么区别?
我一直在使用 PS3 中的 Cell 处理器进行一些实验,并且遇到了一个问题。 看来主 SPE 管理库有两个版本:libspe 和 libspe2。 它们之间有什么区别? 据我所知,主要区别在于,在 libspe 中,他们推出了自己的线程代码,而在 libspe2 中,您必须将 libspe 与 pthreads 库集成才能实现多线程。 有什么理由可以证明其中一个比另一个更好吗? 两者之间得到/失去/改变了什么?
I've been doing some experiments with the Cell processor in a PS3 that I have sitting around and I've run across an issue. It appears that there are two versions of the main SPE management library, libspe and libspe2. What is the difference between them? From what I can tell the main difference is that in libspe they rolled their own threading code, whereas in libspe2 you have to integrate the libspe with the pthreads library to achieve multiple threads. Is there any reason that one is better than the other? What is being gained/lossed/changed between the two?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,看来 libspe2 是正确的选择。 我上面提到的关于线程的内容几乎是主要区别,libspe2 提供了更灵活的线程模型。 此外,libspe 从 SDK 2.1 开始已被弃用,当前版本为 3.1,因此使用 libspe 启动任何新项目可能不是一个好主意。
IBM 网站此处上有一篇很好的文章,其中包含示例。
Alright, so it looks like libspe2 is the way to go. What I noted above about threading is pretty much the main difference, libspe2 provides a much more flexible threading model. Also, libspe is deprecated as of SDK 2.1 and 3.1 is the current version, so starting any new projects with libspe is probably a bad idea.
There is a good article with examples on the IBM site here.