本文介绍了工作窃取队列中的C / C实现++?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个合适的实施C / CPP工作窃取队列。我环顾四周,谷歌,但没有发现任何有用的。

I'm looking for a proper implementation of a work stealing queue in C/CPP. I've looked around Google but haven't found anything useful.

也许有人熟悉一个很好的开放源代码实现? (我preFER不执行从原来的学术论文采取伪code)。

Perhaps someone is familiar with a good open-source implementation? (I prefer not to implement the pseudo-code taken from the original academic papers).

推荐答案

没有免费的午餐。

请看看原来的工作窃取纸。本文是很难理解的。我知道,纸中含有的理论依据,而不是伪code。然而,根本就没有这样的更多的简单版本比TBB。如果有的话,它不会给最佳性能。工作窃取本身会带来开销一定量,从而优化和技巧是非常重要的。特别是,出队都必须是线程安全的。实现高​​度可扩展和低开销的同步是具有挑战性的。

Please take a look the original work stealing paper. This paper is hard to understand. I know that paper contains theoretical proof rather than pseudo code. However, there is simply no such much more simple version than TBB. If any, it won't give optimal performance. Work stealing itself incurs some amount of overhead, so optimizations and tricks are quite important. Especially, dequeues are must be thread-safe. Implementing highly scalable and low-overhead synchronizations are challenging.

我真的不知道为什么你需要它。我认为的正确实施的意思是这样TBB和的Cilk。此外,工作窃取是很难实现的。

I'm really wondering why you need it. I think that proper implementation means something like TBB and Cilk. Again, work stealing is hard to implement.

这篇关于工作窃取队列中的C / C实现++?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-26 01:45