码迷,mamicode.com
首页 >  
搜索关键字:gevent queue    ( 9314个结果
广度优先(BFS) ------- 模板1:-----模板2:--------模板3:
//使用数组queue[ ]存放结点队列void BFS( ) { head=0; tail=1; queue[head]=首结点的值; while (head<tail) //队列不空 { temp=tail; for (k=head; k<=ta...
分类:其他好文   时间:2014-08-03 23:03:16    阅读次数:250
STL容器
在stl中容器分为两大类,序列式容器和关联式容器。序列式容器:array、vector、heap、priority-queue、list、slist、deque、(stack、queue)最后两个是配接器关联式容器:RB-tree、set、map、multiset、multimap、hashtabl...
分类:其他好文   时间:2014-08-03 17:50:15    阅读次数:232
接口层报文输出
每个CPU有一个单独的softnet_data实例,用来存储与网络中断处理相关的报文输出和输出队列。在输出过程中会用到softnet_data中的output_queue和completion_queue队列。 /* * Incoming packets are placed on per-cpu queues so that * no locking is needed. */ stru...
分类:其他好文   时间:2014-08-03 10:19:35    阅读次数:378
priority_queue c++
C++优先队列类似队列,但是在这个数据结构中的元素按照一定的断言排列有序。它的头文件为。由于适配器不支持迭代,一个 priority_queue 将有没有关联的迭代器。函数列表:empty() 如果优先队列为空,则返回真 pop() 删除第一个元素 push() 加入一个元素 size() 返回优先...
分类:编程语言   时间:2014-08-02 17:55:53    阅读次数:243
HDU2647 Reward 【拓扑排序】
#include #include #define maxn 10002 int ans, queue[maxn]; struct Node{ int to, next, val; } map[maxn << 1]; struct node{ int first, money, indegree; } head[maxn]; bool topoSort(int n) {...
分类:其他好文   时间:2014-08-02 10:07:43    阅读次数:196
TI C66x DSP 系统events及其应用 - 5.1(QM accumulator的配置)
以下解说在详细应用中,event与中断ISR的设置。以对QM的queue监控产生中断(不是EXCEP)为例,主要包含配置QM accumulator(用于监控QM queue)与配置ISR(ISR与event配置)。首先介绍QM accumulator的配置,QM模块中QMSS(包括QMSS Tx ...
分类:其他好文   时间:2014-08-02 09:58:43    阅读次数:249
hdu 1297 Children’s Queue
Children’s Queue Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 10540    Accepted Submission(s): 3390 Problem Description There ar...
分类:其他好文   时间:2014-08-01 19:51:15    阅读次数:264
用队列打印杨辉三角
#include#include#include#includeusing namespace std;queue Q;int temp;void tringle(const int n){ Q.push(1); for(int i=2;i<=n;i++) { Q.p...
分类:其他好文   时间:2014-08-01 18:31:12    阅读次数:146
POJ - 2828 Buy Tickets (线段树单点更新)
Description Railway tickets were difficult to buy around the Lunar New Year in China, so we must get up early and join a long queue… The Lunar New Year was approaching, but unluckily the Little ...
分类:其他好文   时间:2014-08-01 13:43:42    阅读次数:193
线程邮箱
在多线程开发中,消息队列是一种有效的线程间通讯方式.我在开发KendyNet的过程中一直在寻找一种高效而易用的消息队列实现.期间使用过的一种实现可参考message queue的设计。这个实现的消息队列是相当高效的,但其存在的一个问题是,如果发送方相对较慢,则需要一个定时机制以固定间隔将本线程中缓存...
分类:编程语言   时间:2014-07-31 23:15:40    阅读次数:317
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!