当前位置: 首页>>代码示例>>C++>>正文


C++ Var::getId方法代码示例

本文整理汇总了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();
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:7,代码来源:compiler.cpp

示例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);
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:7,代码来源:compiler.cpp

示例3: setSaveOnUnuse

void Compiler::setSaveOnUnuse(Var& var, bool value) noexcept {
  if (var.getId() == kInvalidValue)
    return;

  VarData* vd = getVdById(var.getId());
  vd->_saveOnUnuse = value;
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:7,代码来源:compiler.cpp

示例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);
}
开发者ID:0ryuO,项目名称:desmume-libretro,代码行数:10,代码来源:x86compiler.cpp

示例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;
}
开发者ID:0ryuO,项目名称:desmume-libretro,代码行数:10,代码来源:x86compiler.cpp

示例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);
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:10,代码来源:compiler.cpp

示例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);
  }
}
开发者ID:CauldronDevelopmentLLC,项目名称:openmm,代码行数:11,代码来源:compiler.cpp

示例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);
}
开发者ID:0ryuO,项目名称:desmume-libretro,代码行数:11,代码来源:x86compiler.cpp

示例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());
    }
  }
}
开发者ID:sbfnk,项目名称:LibBi,代码行数:44,代码来源:InputNetCDFBuffer.cpp

示例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);
  }
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:20,代码来源:compiler.cpp

示例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;
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:11,代码来源:compiler.cpp

示例12: alloc

Error Compiler::alloc(Var& var) noexcept {
  if (var.getId() == kInvalidValue)
    return kErrorOk;
  return _hint(var, kVarHintAlloc, kInvalidValue);
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:5,代码来源:compiler.cpp

示例13: unuse

Error Compiler::unuse(Var& var) noexcept {
  if (var.getId() == kInvalidValue)
    return kErrorOk;
  return _hint(var, kVarHintUnuse, kInvalidValue);
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:5,代码来源:compiler.cpp

示例14: spill

Error Compiler::spill(Var& var) noexcept {
  if (var.getId() == kInvalidValue)
    return kErrorOk;
  return _hint(var, kVarHintSpill, kInvalidValue);
}
开发者ID:AmesianX,项目名称:asmjit,代码行数:5,代码来源:compiler.cpp


注:本文中的Var::getId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。