本文整理汇总了C++中Condition::expression方法的典型用法代码示例。如果您正苦于以下问题:C++ Condition::expression方法的具体用法?C++ Condition::expression怎么用?C++ Condition::expression使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Condition
的用法示例。
在下文中一共展示了Condition::expression方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: visit
void Census::visit(const std::shared_ptr<Instruction> &instruction) {
instructions_.push_back(instruction.get());
unique_ = false;
switch (instruction->mnemonic()) {
case Instruction::READ: {
Read *read = instruction->as<Read>();
visit(read->reg());
visit(read->address());
spaces_.push_back(read->space());
break;
}
case Instruction::WRITE: {
Write *write = instruction->as<Write>();
visit(write->value());
visit(write->address());
spaces_.push_back(write->space());
break;
}
case Instruction::MFENCE: {
break;
}
case Instruction::LOCAL: {
Local *local = instruction->as<Local>();
visit(local->reg());
visit(local->value());
break;
}
case Instruction::CONDITION: {
Condition *condition = instruction->as<Condition>();
visit(condition->expression());
break;
}
case Instruction::ATOMIC: {
Atomic *atomic = instruction->as<Atomic>();
for (const auto &instr : atomic->instructions()) {
visit(instr);
}
break;
}
case Instruction::NOOP: /* FALLTHROUGH */
case Instruction::LOCK: /* FALLTHROUGH */
case Instruction::UNLOCK:
break;
default: {
assert(!"NEVER REACHED");
}
}
}