QingQiz/NMSqL

VM agg 使用方法

Closed this issue · 4 comments

研究中

一些东西:

agg:每个vm中有一个,相当于 map<key,vector<Value>>
Aggregator: 相当于上面的vector<value>
Current: 相当于vector<value>*

IR:

aggreset: current->clear();current->resize(p2)
Aggfocus: pop; if poped in agg { current=&agg[poped]; jump to p2} else {agg.insert(poped,new vector<value>)}
Aggincr: current[p2]+=p1
Aggnext: if current->next == agg.end() {jump to p2} else {current = current->next;delete current->prev}
Aggset: pop; current[p2]=poped;
Aggget: push current[p2]

指针什么的理解为迭代器 可以有前后

之前的理解错了

aggreset: agg->clear();size=p2
Aggfocus: pop; if poped in agg { current=&agg[poped]; jump to p2} else {agg.insert(poped,new vector<value>(size))}