本文整理汇总了C++中boost::dynamic_bitset::any方法的典型用法代码示例。如果您正苦于以下问题:C++ dynamic_bitset::any方法的具体用法?C++ dynamic_bitset::any怎么用?C++ dynamic_bitset::any使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::dynamic_bitset
的用法示例。
在下文中一共展示了dynamic_bitset::any方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: branchContext
bool executive::ReconvergenceTFSortedStack::eval_Bra(
executive::CTAContext &context,
const ir::PTXInstruction &instr,
const boost::dynamic_bitset<> & branch,
const boost::dynamic_bitset<> & fallthrough) {
bool divergent = false;
CTAContext branchContext(context), fallthroughContext(context);
stack.back().erase(stack.back().begin());
// TODO: set the check condition correctly
if (branch.any()) {
branchContext.active = branch;
branchContext.PC = instr.branchTargetInstruction;
RuntimeStack::iterator existing = stack.back().find(
branchContext.PC);
if (existing != stack.back().end()) {
existing->second.active |= branchContext.active;
++reconvergeEvents;
}
else {
stack.back().insert(std::make_pair(
branchContext.PC, branchContext));
}
}
if (fallthrough.any())
{
fallthroughContext.active = fallthrough;
fallthroughContext.PC++;
RuntimeStack::iterator existing = stack.back().find(
fallthroughContext.PC);
if (existing != stack.back().end()) {
existing->second.active |= fallthroughContext.active;
++reconvergeEvents;
}
else {
stack.back().insert(std::make_pair(
fallthroughContext.PC, fallthroughContext));
}
}
divergent = true;
return divergent;
}
示例2: if
bool executive::ReconvergenceTFSoftware::eval_Bra(
executive::CTAContext &context,
const ir::PTXInstruction &instr,
const boost::dynamic_bitset<> & branch,
const boost::dynamic_bitset<> & fallthrough) {
if (branch.any()) {
context.PC = instr.branchTargetInstruction;
}
else if (fallthrough.any()) {
context.PC++;
}
return false;
}