VM agg 使用方法
Closed this issue · 4 comments
zhaoyiping0622 commented
研究中
zhaoyiping0622 commented
一些东西:
agg:每个vm中有一个,相当于 map<key,vector<Value>>
Aggregator: 相当于上面的vector<value>
Current: 相当于vector<value>*
zhaoyiping0622 commented
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]
zhaoyiping0622 commented
指针什么的理解为迭代器 可以有前后
zhaoyiping0622 commented
之前的理解错了
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))}