本文整理汇总了C++中Var::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ Var::getId方法的具体用法?C++ Var::getId怎么用?C++ Var::getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Var
的用法示例。
在下文中一共展示了Var::getId方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPriority
uint32_t Compiler::getPriority(Var& var) const noexcept {
if (var.getId() == kInvalidValue)
return kInvalidValue;
VarData* vd = getVdById(var.getId());
return vd->getPriority();
}
示例2: getSaveOnUnuse
bool Compiler::getSaveOnUnuse(Var& var) const noexcept {
if (var.getId() == kInvalidValue)
return false;
VarData* vd = getVdById(var.getId());
return static_cast<bool>(vd->_saveOnUnuse);
}
示例3: setSaveOnUnuse
void Compiler::setSaveOnUnuse(Var& var, bool value) noexcept {
if (var.getId() == kInvalidValue)
return;
VarData* vd = getVdById(var.getId());
vd->_saveOnUnuse = value;
}
示例4:
void X86Compiler::rename(Var& var, const char* name)
{
if (var.getId() == kInvalidValue)
return;
X86CompilerVar* vdata = _getVar(var.getId());
ASMJIT_ASSERT(vdata != NULL);
vdata->_name = _zoneMemory.sdup(name);
}
示例5: return
bool X86Compiler::getSaveOnUnuse(Var& var) const
{
if (var.getId() == kInvalidValue)
return false;
X86CompilerVar* vdata = _getVar(var.getId());
ASMJIT_ASSERT(vdata != NULL);
return (bool)vdata->saveOnUnuse;
}
示例6: setPriority
void Compiler::setPriority(Var& var, uint32_t priority) noexcept {
if (var.getId() == kInvalidValue)
return;
if (priority > 255)
priority = 255;
VarData* vd = getVdById(var.getId());
vd->_priority = static_cast<uint8_t>(priority);
}
示例7: rename
void Compiler::rename(Var& var, const char* name) {
if (var.getId() == kInvalidValue)
return;
VarData* vd = getVdById(var.getId());
vd->_name = noName;
if (name != NULL && name[0] != '\0') {
vd->_name = _stringZone.sdup(name);
}
}
示例8: addItem
void X86Compiler::_vhint(Var& var, uint32_t hintId, uint32_t hintValue)
{
if (var.getId() == kInvalidValue)
return;
X86CompilerVar* cv = _getVar(var.getId());
ASMJIT_ASSERT(cv != NULL);
X86CompilerHint* item = Compiler_newItem<X86CompilerHint>(this, cv, hintId, hintValue);
addItem(item);
}
示例9: C
void bi::InputNetCDFBuffer::readMask0(const VarType type,
Mask<ON_HOST>& mask) {
typedef temp_host_matrix<real>::type temp_matrix_type;
mask.resize(m.getNumVars(type), false);
Var* var;
int r;
long start, len;
/* sparse masks */
for (r = 0; r < int(recDims.size()); ++r) {
if (timeVars[r] < 0) {
BOOST_AUTO(range, modelVars.equal_range(r));
BOOST_AUTO(iter, range.first);
BOOST_AUTO(end, range.second);
start = 0;
len = nc_inq_dimlen(ncid, recDims[r]);
temp_matrix_type C(iter->second->getNumDims(), len);
readCoords(coordVars[r], start, len, C);
for (; iter != end; ++iter) {
var = iter->second;
if (var->getType() == type) {
mask.addSparseMask(var->getId(), C.size2());
serialiseCoords(var, C, mask.getIndices(var->getId()));
}
}
}
}
/* dense masks */
r = -1; // for those vars not associated with a record dimension
BOOST_AUTO(range, modelVars.equal_range(r));
BOOST_AUTO(iter, range.first);
BOOST_AUTO(end, range.second);
for (; iter != end; ++iter) {
var = iter->second;
if (var->getType() == type) {
mask.addDenseMask(var->getId(), var->getSize());
}
}
}
示例10: rename
void Compiler::rename(Var& var, const char* fmt, ...) noexcept {
if (var.getId() == kInvalidValue)
return;
VarData* vd = getVdById(var.getId());
vd->_name = noName;
if (fmt != nullptr && fmt[0] != '\0') {
char buf[64];
va_list ap;
va_start(ap, fmt);
vsnprintf(buf, ASMJIT_ARRAY_SIZE(buf), fmt, ap);
buf[ASMJIT_ARRAY_SIZE(buf) - 1] = '\0';
vd->_name = _stringAllocator.sdup(buf);
va_end(ap);
}
}
示例11: _hint
Error Compiler::_hint(Var& var, uint32_t hint, uint32_t value) noexcept {
if (var.getId() == kInvalidValue)
return kErrorOk;
HLHint* node = newHintNode(var, hint, value);
if (node == nullptr)
return setLastError(kErrorNoHeapMemory);
addNode(node);
return kErrorOk;
}
示例12: alloc
Error Compiler::alloc(Var& var) noexcept {
if (var.getId() == kInvalidValue)
return kErrorOk;
return _hint(var, kVarHintAlloc, kInvalidValue);
}
示例13: unuse
Error Compiler::unuse(Var& var) noexcept {
if (var.getId() == kInvalidValue)
return kErrorOk;
return _hint(var, kVarHintUnuse, kInvalidValue);
}
示例14: spill
Error Compiler::spill(Var& var) noexcept {
if (var.getId() == kInvalidValue)
return kErrorOk;
return _hint(var, kVarHintSpill, kInvalidValue);
}