• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ defFree函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中defFree函数的典型用法代码示例。如果您正苦于以下问题:C++ defFree函数的具体用法?C++ defFree怎么用?C++ defFree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了defFree函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: defFree

void defiNonDefault::addMinCuts(const char* name, int numCuts) {
  if (numMinCuts_ == minCutsAllocated_) {
    int i;
    char** cln;
    int*   nc;

    if (minCutsAllocated_ == 0)
      minCutsAllocated_ = 2;
    else
      minCutsAllocated_ *= 2;
    cln = (char**)defMalloc(sizeof(char*)* minCutsAllocated_);
    nc = (int*)defMalloc(sizeof(int)* minCutsAllocated_);
    for (i = 0; i < numMinCuts_; i++) {
      cln[i] = cutLayerName_[i];
      nc[i]  = numCuts_[i];
    }
    if (minCutsAllocated_ > 2) {
      defFree((char*)(cutLayerName_));
      defFree((char*)(numCuts_));
    }
    cutLayerName_ = cln;
    numCuts_ = nc;
  } 
  cutLayerName_[numMinCuts_] = (char*)defMalloc(strlen(name)+1);
  strcpy(cutLayerName_[numMinCuts_], DEFCASE(name));
  numCuts_[numMinCuts_] = numCuts;
  numMinCuts_ += 1;
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:28,代码来源:defiNonDefault.cpp


示例2: defFree

void defiGroup::addRegionRect(int xl, int yl, int xh, int yh) {
  int i;
  if (numRects_ == rectsAllocated_) {
    int max = numRects_ * 2;
    int* nxl = (int*)defMalloc(sizeof(int)*max);
    int* nyl = (int*)defMalloc(sizeof(int)*max);
    int* nxh = (int*)defMalloc(sizeof(int)*max);
    int* nyh = (int*)defMalloc(sizeof(int)*max);
    max = numRects_;
    for (i = 0; i < max; i++) {
      nxl[i] = xl_[i];
      nyl[i] = yl_[i];
      nxh[i] = xh_[i];
      nyh[i] = yh_[i];
    }
    defFree((char*)(xl_));
    defFree((char*)(yl_));
    defFree((char*)(xh_));
    defFree((char*)(yh_));
    xl_ = nxl;
    yl_ = nyl;
    xh_ = nxh;
    yh_ = nyh;
    rectsAllocated_ *= 2;
  }

  i = numRects_;
  xl_[i] = xl;
  yl_[i] = yl;
  xh_[i] = xh;
  yh_[i] = yh;
  numRects_ += 1;
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:33,代码来源:defiGroup.cpp


示例3: defFree

void defiComponent::setRegionBounds(int xl, int yl, int xh, int yh) {
  int i;
  i = this->numRects_;
  if (i == this->rectsAllocated_) {
    int max = this->rectsAllocated_ * 2;
    int* nxl = (int*)defMalloc(sizeof(int)*max);
    int* nyl = (int*)defMalloc(sizeof(int)*max);
    int* nxh = (int*)defMalloc(sizeof(int)*max);
    int* nyh = (int*)defMalloc(sizeof(int)*max);
    for (i = 0; i < this->numRects_; i++) {
      nxl[i] = this->rectXl_[i];
      nyl[i] = this->rectYl_[i];
      nxh[i] = this->rectXh_[i];
      nyh[i] = this->rectYh_[i];
    }
    defFree((char*)(this->rectXl_));
    defFree((char*)(this->rectYl_));
    defFree((char*)(this->rectXh_));
    defFree((char*)(this->rectYh_));
    this->rectXl_ = nxl;
    this->rectYl_ = nyl;
    this->rectXh_ = nxh;
    this->rectYh_ = nyh;
    this->rectsAllocated_ = max;
  }
  this->rectXl_[i] = xl;
  this->rectYl_[i] = yl;
  this->rectXh_[i] = xh;
  this->rectYh_[i] = yh;
  this->numRects_ += 1;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:31,代码来源:defiComponent.cpp


示例4: defFree

void defiRegion::addRect(int xl, int yl, int xh, int yh) {
  if (this->numRectangles_ == this->rectanglesAllocated_) {
    int i;
    int max = this->rectanglesAllocated_ = this->rectanglesAllocated_ * 2;
    int* newxl = (int*)defMalloc(sizeof(int)*max);
    int* newyl = (int*)defMalloc(sizeof(int)*max);
    int* newxh = (int*)defMalloc(sizeof(int)*max);
    int* newyh = (int*)defMalloc(sizeof(int)*max);
    for (i = 0; i < this->numRectangles_; i++) {
      newxl[i] = this->xl_[i];
      newyl[i] = this->yl_[i];
      newxh[i] = this->xh_[i];
      newyh[i] = this->yh_[i];
    }
    defFree((char*)(this->xl_));
    defFree((char*)(this->yl_));
    defFree((char*)(this->xh_));
    defFree((char*)(this->yh_));
    this->xl_ = newxl;
    this->yl_ = newyl;
    this->xh_ = newxh;
    this->yh_ = newyh;
  }
  this->xl_[this->numRectangles_] = xl;
  this->yl_[this->numRectangles_] = yl;
  this->xh_[this->numRectangles_] = xh;
  this->yh_[this->numRectangles_] = yh;
  this->numRectangles_ += 1;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:29,代码来源:defiRegion.cpp


示例5: defFree

void defiPath::Destroy() {
  this->defiPath::clear();
  if (this->keys_)
     defFree((char*)(this->keys_));
  if (this->data_)
     defFree((char*)(this->data_));
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:7,代码来源:defiPath.cpp


示例6: defFree

void defiRegion::addRect(int xl, int yl, int xh, int yh) {
  if (numRectangles_ == rectanglesAllocated_) {
    int i;
    int max = rectanglesAllocated_ = rectanglesAllocated_ * 2;
    int* newxl = (int*)defMalloc(sizeof(int)*max);
    int* newyl = (int*)defMalloc(sizeof(int)*max);
    int* newxh = (int*)defMalloc(sizeof(int)*max);
    int* newyh = (int*)defMalloc(sizeof(int)*max);
    for (i = 0; i < numRectangles_; i++) {
      newxl[i] = xl_[i];
      newyl[i] = yl_[i];
      newxh[i] = xh_[i];
      newyh[i] = yh_[i];
    }
    defFree((char*)(xl_));
    defFree((char*)(yl_));
    defFree((char*)(xh_));
    defFree((char*)(yh_));
    xl_ = newxl;
    yl_ = newyl;
    xh_ = newxh;
    yh_ = newyh;
  }
  xl_[numRectangles_] = xl;
  yl_[numRectangles_] = yl;
  xh_[numRectangles_] = xh;
  yh_[numRectangles_] = yh;
  numRectangles_ += 1;
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:29,代码来源:defiRegion.cpp


示例7: strlen

void defiRow::setup(const char* name, const char* macro, double x, double y,
		 int orient) {
  int len = strlen(name) + 1;

  this->defiRow::clear();

  if (len > this->nameLength_) {
    if (this->name_) defFree(this->name_);
    this->nameLength_ = len;
    this->name_ = (char*)defMalloc(len);
  }
  strcpy(this->name_, DEFCASE(name));

  len = strlen(macro) + 1;
  if (len > this->macroLength_) {
    if (this->macro_) defFree(this->macro_);
    this->macroLength_ = len;
    this->macro_ = (char*)defMalloc(len);
  }
  strcpy(this->macro_, DEFCASE(macro));

  this->x_ = x;
  this->y_ = y;
  this->xStep_ = 0.0;
  this->yStep_ = 0.0;
  this->xNum_ = 0.0;
  this->yNum_ = 0.0;
  this->orient_ = orient;

}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:30,代码来源:defiRowTrack.cpp


示例8: strlen

void defiFPC::addItem(char item, const char* name) {
  int len = strlen(name) + 1;

  if (namesUsed_ >= namesAllocated_) {
    char* newR;
    char** newN;
    int i;
    namesAllocated_ =
	namesAllocated_ ? namesAllocated_ * 2 : 8 ;
    newN = (char**) defMalloc(sizeof(char*) * namesAllocated_);
    newR = (char*) defMalloc(sizeof(char) * namesAllocated_);
    for (i = 0; i < namesUsed_; i++) {
      newN[i] = names_[i];
      newR[i] = rowOrComp_[i];
    }
    if (names_) defFree((char*)(names_));
    if (rowOrComp_) defFree(rowOrComp_);
    names_ = newN;
    rowOrComp_ = newR;
  }

  names_[namesUsed_] = (char*)defMalloc(len);
  strcpy(names_[namesUsed_], name);

  // 4 for bottomleft
  // 2 for row
  rowOrComp_[namesUsed_] = 
         (char)(((corner_ == 'B') ? 4 : 0) |
	 (item == 'R' ? 2 : 0));

  namesUsed_ += 1;
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:32,代码来源:defiFPC.cpp


示例9: defFree

void defiPropType::bumpProps() {
    int lim = this->propertiesAllocated_;
    int news ;
    char** newpn;
    char*   newt;

    news = lim ? lim + lim : 2;

    newpn = (char**)defMalloc(sizeof(char*)*news);
    newt = (char*)defMalloc(sizeof(char)*news);

    lim = this->propertiesAllocated_ = news;

    if (lim > 2) {
        int i;
        for (i = 0; i < this->numProperties_; i++) {
            newpn[i] = this->propNames_[i];
            newt[i] = this->propTypes_[i];
        }
        defFree((char*)(this->propNames_));
        defFree((char*)(this->propTypes_));
    }
    this->propNames_ = newpn;
    this->propTypes_ = newt;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:25,代码来源:defiPropType.cpp


示例10: if

void defiBox::addPoint(defiGeometries* geom) {
  struct defiPoints* p;
  struct defiPoints* tp;
  int x, y;
  int i;

  p = (struct defiPoints*)defMalloc(sizeof(struct defiPoints));
  p->numPoints = geom->numPoints();
  p->x = (int*)defMalloc(sizeof(int)*p->numPoints);
  p->y = (int*)defMalloc(sizeof(int)*p->numPoints);
  for (i = 0; i < p->numPoints; i++) {
    geom->points(i, &x, &y);
    p->x[i] = x;
    p->y[i] = y;
    // for backward compatibility assign the first 2 points to xl, yl, xh & yh
    if (i == 0) {
      xl_ = x;
      yl_ = y;
    } else if (i == 1) {
      xh_ = x;
      yh_ = y;
    }
  }
  if (points_) {
     tp = points_;
     defFree((char*)(tp->x));
     defFree((char*)(tp->y));
     defFree((char*)(tp));
  }
  points_ = p;
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:31,代码来源:defiSite.cpp


示例11: defFree

void defiBox::Destroy() {
  struct defiPoints* p;

  p = points_;
  if (p) {
    defFree((char*)(p->x));
    defFree((char*)(p->y));
    defFree((char*)(points_));
  }
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:10,代码来源:defiSite.cpp


示例12: defFree

void defiRow::clear() {
  int i;
  for (i = 0; i < this->numProps_; i++) {
    defFree(this->propNames_[i]);
    defFree(this->propValues_[i]);
    this->propDValues_[i] = 0;
  }
  this->hasDo_ = 0;
  this->hasDoStep_ = 0;
  this->numProps_ = 0;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:11,代码来源:defiRowTrack.cpp


示例13: defFree

void defiFPC::Destroy() {

  this->defiFPC::clear();

  if (this->name_) defFree(this->name_);
  this->name_ = 0;
  this->nameLength_ = 0;

  defFree((char*)(this->names_));
  defFree((char*)(this->rowOrComp_));
  this->namesAllocated_ = 0;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:12,代码来源:defiFPC.cpp


示例14: clear

void defiFPC::Destroy() {

  clear();

  if (name_) defFree(name_);
  name_ = 0;
  nameLength_ = 0;

  defFree((char*)(names_));
  defFree((char*)(rowOrComp_));
  namesAllocated_ = 0;
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:12,代码来源:defiFPC.cpp


示例15: defFree

void defiFill::clearPts() {
  struct defiPoints* p;
  int i;

  for (i = 0; i < numPts_; i++) {
    p = viaPts_[i];
    defFree((char*)(p->x));
    defFree((char*)(p->y));
    defFree((char*)(viaPts_[i]));
  }
  numPts_ = 0;
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:12,代码来源:defiFill.cpp


示例16: defrDisableParserMsgs

void
defrDisableParserMsgs(int   nMsg,
                      int   *msgs)
{
    ASSERT_INIT;
    int i, j;
    int *tmp;

    if (defSettings->nDDMsgs == 0) {
        defSettings->nDDMsgs = nMsg;
        defSettings->disableDMsgs = (int*) defMalloc(sizeof(int) * nMsg);
        for (i = 0; i < nMsg; i++)
            defSettings->disableDMsgs[i] = msgs[i];
    } else {  // add the list to the existing list 
        // 1st check if the msgId is already on the list before adding it on 
        tmp = (int*) defMalloc(sizeof(int) * (nMsg + defSettings->nDDMsgs));
        for (i = 0; i < defSettings->nDDMsgs; i++)  // copy the existing to the new list 
            tmp[i] = defSettings->disableDMsgs[i];
        defFree((int*) (defSettings->disableDMsgs));
        defSettings->disableDMsgs = tmp;           // set disableDMsgs to the new list 
        for (i = 0; i < nMsg; i++) { // merge the new list with the existing 
            for (j = 0; j < defSettings->nDDMsgs; j++) {
                if (defSettings->disableDMsgs[j] == msgs[i])
                    break;             // msgId already on the list 
            }
            if (j == defSettings->nDDMsgs)           // msgId not on the list, add it on 
                defSettings->disableDMsgs[defSettings->nDDMsgs++] = msgs[i];
        }
    }
    return;
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:31,代码来源:defrReader.cpp


示例17: defFree

void defiPartition::clear() {
  int i;

  this->setup_ = ' ';
  this->hold_ = ' ';
  this->direction_ = ' ';
  this->type_ = ' ';
  if (this->name_) *(this->name_) = '\0';
  if (this->pin_) *(this->pin_) = '\0';
  if (this->inst_) *(this->inst_) = '\0';
  this->hasMin_ = 0;
  this->hasMax_ = 0;

  if (this->numPins_) {
    for (i = 0; i < this->numPins_; i++) {
      defFree(this->pins_[i]);
      this->pins_[i] = 0;
    }
    this->numPins_ = 0;
  }
  this->hasRiseMin_ = 0;
  this->hasFallMin_ = 0;
  this->hasRiseMax_ = 0;
  this->hasFallMax_ = 0;
  this->hasRiseMinRange_ = 0;
  this->hasFallMinRange_ = 0;  
  this->hasRiseMaxRange_ = 0;
  this->hasFallMaxRange_ = 0;
}
开发者ID:chuanwj,项目名称:vlsi-experimental,代码行数:29,代码来源:defiPartition.cpp


示例18: Init

void defiIOTiming::Init() {
  inst_ = 0;
  instLength_ = 0;
  pin_ = 0;
  pinLength_ = 0;
  from_ = 0;
  fromLength_ = 0;
  to_ = 0;
  toLength_ = 0;
  driveCell_ = 0;
  driveCellLength_ = 0;
  hasVariableRise_ = 0;
  hasVariableFall_ = 0;
  hasSlewRise_ = 0;
  hasSlewFall_ = 0;
  hasCapacitance_ = 0;
  hasDriveCell_ = 0;
  hasFrom_ = 0;
  if (pin_) defFree(pin_);
  pin_ = 0;
  pinLength_ = 0;

  hasTo_ = 0;
  hasParallel_ = 0;
  variableFallMin_ = 0.0;
  variableRiseMin_ = 0.0;
  variableFallMax_ = 0.0;
  variableRiseMax_ = 0.0;
  slewFallMin_ = 0.0;
  slewRiseMin_ = 0.0;
  slewFallMax_ = 0.0;
  slewRiseMax_ = 0.0;
  capacitance_ = 0.0;
  parallel_ = 0.0;
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:35,代码来源:defiIOTiming.cpp


示例19: defrEnableAllMsgs

void
defrEnableAllMsgs()
{
    ASSERT_INIT;
    defSettings->nDDMsgs = 0;
    defFree((int*) (defSettings->disableDMsgs));
}
开发者ID:xiaoqingxu08,项目名称:ophidian,代码行数:7,代码来源:defrReader.cpp


示例20: setType

void defiRegion::setType(const char* type) {
  int len;
  if (type_) defFree(type_);
  len = strlen(type) + 1;
  type_ = (char*)defMalloc(len);
  strcpy(type_, DEFCASE(type));
}
开发者ID:li3939108,项目名称:DEF-Parser,代码行数:7,代码来源:defiRegion.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ defGetString函数代码示例发布时间:2022-05-30
下一篇:
C++ def函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap