本文整理汇总了C++中MemoryManager::RequestLocation方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryManager::RequestLocation方法的具体用法?C++ MemoryManager::RequestLocation怎么用?C++ MemoryManager::RequestLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemoryManager
的用法示例。
在下文中一共展示了MemoryManager::RequestLocation方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CodeGen
void CodeGen(MemoryManager& mm, handlers::CodeHandler& ch)
{
size_t mem_id = mm.RequestLocation(id);
std::stringstream ss;
ss << "s->Get(" << base_id << ", buff[" << mem_id << "]);";
ch.AddEntry(ss.str());
//ss2 << "s.Get_" << base_id << "(buff[" << mem_id << "]);" << std::endl;
}
示例2: CodeGen
void CodeGen(MemoryManager& mm, handlers::CodeHandler& ch)
{
size_t ml = mm.RequestLocation(id);
std::stringstream* ss = new std::stringstream();
*ss << "buff[" << ml << "] = ";
auto in_id = in_ids.begin();
PrintAccess(*in_id, mm, *ss);
in_id++;
size_t or_count = 0;
for(in_id = in_id;in_id != in_ids.end();in_id++)
{
if(or_count > or_limit)
{
*ss << ";";
ch.AddEntry(ss->str());
delete ss;
ss = new std::stringstream();
*ss << "buff[" << ml << "] = buff[" << ml << "]";
or_count = or_count - 1;
}
*ss << " || ";
PrintAccess(*in_id, mm , *ss);
or_count++;
}
*ss << ";";
ch.AddEntry(ss->str());
delete ss;
}