本文整理汇总了C++中arraylist::Iterator类的典型用法代码示例。如果您正苦于以下问题:C++ Iterator类的具体用法?C++ Iterator怎么用?C++ Iterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Iterator类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: prepareEmission
void
CodeEmitter::prepareEmission(Program *prog)
{
for (ArrayList::Iterator fi = prog->allFuncs.iterator();
!fi.end(); fi.next()) {
Function *func = reinterpret_cast<Function *>(fi.get());
func->binPos = prog->binSize;
prepareEmission(func);
// adjust sizes & positions for schedulding info:
if (prog->getTarget()->hasSWSched) {
uint32_t adjPos = func->binPos;
BasicBlock *bb = NULL;
for (int i = 0; i < func->bbCount; ++i) {
bb = func->bbArray[i];
int32_t adjSize = bb->binSize;
if (adjPos % 64) {
adjSize -= 64 - adjPos % 64;
if (adjSize < 0)
adjSize = 0;
}
adjSize = bb->binSize + sizeToBundlesNVE4(adjSize) * 8;
bb->binPos = adjPos;
bb->binSize = adjSize;
adjPos += adjSize;
}
if (bb)
func->binSize = adjPos - func->binPos;
}
prog->binSize += func->binSize;
}
}
开发者ID:Sonicadvance1,项目名称:mesa,代码行数:33,代码来源:nv50_ir_target.cpp
示例2: assert
bool
Program::emitBinary(struct nv50_ir_prog_info *info)
{
CodeEmitter *emit = target->getCodeEmitter(progType);
emit->prepareEmission(this);
if (dbgFlags & NV50_IR_DEBUG_BASIC)
this->print();
if (!binSize) {
code = NULL;
return false;
}
code = reinterpret_cast<uint32_t *>(MALLOC(binSize));
if (!code)
return false;
emit->setCodeLocation(code, binSize);
for (ArrayList::Iterator fi = allFuncs.iterator(); !fi.end(); fi.next()) {
Function *fn = reinterpret_cast<Function *>(fi.get());
assert(emit->getCodeSize() == fn->binPos);
for (int b = 0; b < fn->bbCount; ++b)
for (Instruction *i = fn->bbArray[b]->getEntry(); i; i = i->next)
emit->emitInstruction(i);
}
info->bin.relocData = emit->getRelocInfo();
delete emit;
return true;
}
开发者ID:ChillyWillyGuru,项目名称:RSXGL,代码行数:33,代码来源:nv50_ir_target.cpp
示例3: buildDefSetsPreSSA
void
Function::buildDefSets()
{
for (unsigned i = 0; i <= loopNestingBound; ++i)
buildDefSetsPreSSA(BasicBlock::get(cfgExit), cfg.nextSequence());
for (ArrayList::Iterator bi = allBBlocks.iterator(); !bi.end(); bi.next())
BasicBlock::get(bi)->liveSet.marker = false;
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:9,代码来源:nv50_ir_bb.cpp
示例4:
bool
Program::convertToSSA()
{
for (ArrayList::Iterator fi = allFuncs.iterator(); !fi.end(); fi.next()) {
Function *fn = reinterpret_cast<Function *>(fi.get());
if (!fn->convertToSSA())
return false;
}
return true;
}
开发者ID:Distrotech,项目名称:Mesa,代码行数:10,代码来源:nv50_ir_ssa.cpp
示例5: prepareEmission
void
CodeEmitter::prepareEmission(Program *prog)
{
for (ArrayList::Iterator fi = prog->allFuncs.iterator();
!fi.end(); fi.next()) {
Function *func = reinterpret_cast<Function *>(fi.get());
func->binPos = prog->binSize;
prepareEmission(func);
prog->binSize += func->binSize;
}
}
开发者ID:ChillyWillyGuru,项目名称:RSXGL,代码行数:11,代码来源:nv50_ir_target.cpp
示例6: INFO
void
Function::printLiveIntervals() const
{
INFO("printing live intervals ...\n");
for (ArrayList::Iterator it = allLValues.iterator(); !it.end(); it.next()) {
const Value *lval = Value::get(it)->asLValue();
if (lval && !lval->livei.isEmpty()) {
INFO("livei(%%%i): ", lval->id);
lval->livei.print();
}
}
}
开发者ID:skeggsb,项目名称:Mesa,代码行数:13,代码来源:nv50_ir_print.cpp
示例7: releaseValue
Program::~Program()
{
for (ArrayList::Iterator it = allFuncs.iterator(); !it.end(); it.next())
delete reinterpret_cast<Function *>(it.get());
for (ArrayList::Iterator it = allRValues.iterator(); !it.end(); it.next())
releaseValue(reinterpret_cast<Value *>(it.get()));
}
开发者ID:dumbbell,项目名称:mesa,代码行数:8,代码来源:nv50_ir.cpp
示例8: assert
bool
Program::emitBinary(struct nv50_ir_prog_info *info)
{
CodeEmitter *emit = target->getCodeEmitter(progType);
emit->prepareEmission(this);
if (dbgFlags & NV50_IR_DEBUG_BASIC)
this->print();
if (!binSize) {
code = NULL;
return false;
}
code = reinterpret_cast<uint32_t *>(MALLOC(binSize));
if (!code)
return false;
emit->setCodeLocation(code, binSize);
info->bin.instructions = 0;
for (ArrayList::Iterator fi = allFuncs.iterator(); !fi.end(); fi.next()) {
Function *fn = reinterpret_cast<Function *>(fi.get());
assert(emit->getCodeSize() == fn->binPos);
for (int b = 0; b < fn->bbCount; ++b) {
for (Instruction *i = fn->bbArray[b]->getEntry(); i; i = i->next) {
emit->emitInstruction(i);
info->bin.instructions++;
if (i->sType == TYPE_F64 || i->dType == TYPE_F64)
info->io.fp64 = true;
}
}
}
info->bin.relocData = emit->getRelocInfo();
info->bin.interpData = emit->getInterpInfo();
emitSymbolTable(info);
// the nvc0 driver will print the binary iself together with the header
if ((dbgFlags & NV50_IR_DEBUG_BASIC) && getTarget()->getChipset() < 0xc0)
emit->printBinary();
delete emit;
return true;
}
开发者ID:Distrotech,项目名称:Mesa,代码行数:46,代码来源:nv50_ir_target.cpp
示例9: sizeof
void
Program::emitSymbolTable(struct nv50_ir_prog_info *info)
{
unsigned int n = 0, nMax = allFuncs.getSize();
info->bin.syms =
(struct nv50_ir_prog_symbol *)MALLOC(nMax * sizeof(*info->bin.syms));
for (ArrayList::Iterator fi = allFuncs.iterator();
!fi.end();
fi.next(), ++n) {
Function *f = (Function *)fi.get();
assert(n < nMax);
info->bin.syms[n].label = f->getLabel();
info->bin.syms[n].offset = f->binPos;
}
info->bin.numSyms = n;
}
开发者ID:Sonicadvance1,项目名称:mesa,代码行数:20,代码来源:nv50_ir_target.cpp
示例10:
Function::~Function()
{
prog->del(this, id);
if (domTree)
delete domTree;
if (bbArray)
delete[] bbArray;
for (ArrayList::Iterator it = allInsns.iterator(); !it.end(); it.next())
delete_Instruction(prog, reinterpret_cast<Instruction *>(it.get()));
for (ArrayList::Iterator it = allLValues.iterator(); !it.end(); it.next())
delete_Value(prog, reinterpret_cast<LValue *>(it.get()));
for (ArrayList::Iterator BBs = allBBlocks.iterator(); !BBs.end(); BBs.next())
delete reinterpret_cast<BasicBlock *>(BBs.get());
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:18,代码来源:nv50_ir_bb.cpp
注:本文中的arraylist::Iterator类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论