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


C++ AIR_UNUSED函数代码示例

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


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

示例1: main

int
main(int argc, char *argv[]) {
  Nrrd *map, *ppm;
  NrrdRange *range;

  AIR_UNUSED(argc);
  me = argv[0];

  if (limnEnvMapFill(map=nrrdNew(), cb, limnQN16checker, NULL)) {
    fprintf(stderr, "%s: trouble:\n%s", me, biffGet(LIMN));
    exit(1);
  }
  range = nrrdRangeNew(0, 1);
  if (nrrdQuantize(ppm=nrrdNew(), map, range, 8)) {
    fprintf(stderr, "%s: trouble:\n%s", me, biffGet(NRRD));
    exit(1);
  }
  if (nrrdSave("map.ppm", ppm, NULL)) {
    fprintf(stderr, "%s: trouble:\n%s", me, biffGet(NRRD));
    exit(1);
  }

  nrrdNuke(map);
  nrrdNuke(ppm);
  nrrdRangeNix(range);
  exit(0);
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:27,代码来源:map.c

示例2: _tenLevmarPeledCB

/* vector pp of parameters is as follows:
** pp[0]: principal eigenvalue 
** pp[1]: fraction of 1st tensor
** pp[2]: phi for 1st tensor
** pp[3]: phi for 2nd tensor
*/
void
_tenLevmarPeledCB(double *pp, double *xx, int mm, int nn, void *_pvlData) {
  /* char me[]="_tenLevmarPeledCB"; */
  double tenA[7], tenB[7];
  int ii;
  tenDwiGagePvlData *pvlData;
  double *egrad;
 
  AIR_UNUSED(mm);
  pvlData = AIR_CAST(tenDwiGagePvlData *, _pvlData);

  /* Form the tensors using the estimated parms */
  _tenPeledRotate2D(tenA, pp[0], pvlData->ten1Eval[2], pp[2]);
  _tenPeledRotate2D(tenB, pp[0], pvlData->ten1Eval[2], pp[3]);

  egrad = AIR_CAST(double *, pvlData->nten1EigenGrads->data);
  /* skip past b0 gradient, HEY: not general purpose */
  egrad += 3; 
  for (ii=0; ii<nn; ii++) {
    double argA, argB, sigA, sigB;
    argA = -pvlData->tec2->bValue*TEN_T3V_CONTR(tenA, egrad + 3*ii);
    argB = -pvlData->tec2->bValue*TEN_T3V_CONTR(tenB, egrad + 3*ii);
    if (pvlData->levmarUseFastExp) {
      sigA = airFastExp(argA);
      sigB = airFastExp(argB);
    } else {
      sigA = exp(argA);
      sigB = exp(argB);
    }
    xx[ii] = pvlData->tec2->knownB0*(pp[1]*sigA + (1-pp[1])*sigB);
  }
  return;
}
开发者ID:ryanfb,项目名称:teem-parallel,代码行数:39,代码来源:tenDwiGage.c

示例3: _nrrdFormatPNM_contentStartsLike

int
_nrrdFormatPNM_contentStartsLike(NrrdIoState *nio) {

  AIR_UNUSED(nio);
  return AIR_FALSE;

}
开发者ID:CapeDrew,项目名称:DITK,代码行数:7,代码来源:formatPNM.c

示例4: parmSprint

static char *
parmSprint(char str[AIR_STRLEN_MED], const double *parm) {

  AIR_UNUSED(parm);
  sprintf(str, "constant 0");
  return str;
}
开发者ID:CIBC-Internal,项目名称:teem,代码行数:7,代码来源:modelZero.c

示例5: _pullEnergyGaussEval

double
_pullEnergyGaussEval(double *frc, double dist, const double *parm) {

  AIR_UNUSED(parm);
  *frc = _DGAUSS(dist, 0.25, 4);
  return _GAUSS(dist, 0.25, 4);
}
开发者ID:rblake,项目名称:seg3d2,代码行数:7,代码来源:energy.c

示例6: _baneClipAnswer_Absolute

int
_baneClipAnswer_Absolute(int *countP, Nrrd *hvol, double *clipParm) {

  AIR_UNUSED(hvol);
  *countP = (int)(clipParm[0]);
  return 0;
}
开发者ID:CIBC-Internal,项目名称:teem,代码行数:7,代码来源:clip.c

示例7: _nrrdEncodingZRL_read

static int
_nrrdEncodingZRL_read(FILE *file, void *data, size_t elementNum,
                      Nrrd *nrrd, NrrdIoState *nio) {

  AIR_UNUSED(nio);
  unsigned char *output_buffer = (unsigned char *) data;
  size_t toread = elementNum*nrrdElementSize(nrrd);
  /*
  static const char me[]="_nrrdEncodingZRL_read";
  printf("!%s: looking for %u values (%u bytes) of type %s\n", me,
         (unsigned int)elementNum, (unsigned int)toread,
         airEnumStr(nrrdType, nrrd->type)); */
  int cc, dd;
  unsigned int j = 0;
  while (j < toread) {
    cc = fgetc(file);
    if (cc == 0) {
      dd = fgetc(file);
      if (dd == 0) {
        dd = fgetc(file);
        j += dd + fgetc(file)*256;
      } else {
        j += (unsigned char)dd;
      }
    } else {
      output_buffer[j] = (unsigned char)cc;
      j++;
    }
  }

  return 0;
}
开发者ID:BRAINSia,项目名称:teem,代码行数:32,代码来源:encodingZRL.c

示例8: _nrrdEncodingUnknown_write

static int
_nrrdEncodingUnknown_write(FILE *file, const void *data,
                           size_t elementNum, const Nrrd *nrrd,
                           struct NrrdIoState_t *nio) {
  static const char me[]="_nrrdEncodingUnknown_write";

  /* insert code here, and remove error handling below */
  AIR_UNUSED(file);
  AIR_UNUSED(data);
  AIR_UNUSED(elementNum);
  AIR_UNUSED(nrrd);
  AIR_UNUSED(nio);

  biffAddf(NRRD, "%s: ERROR!!! trying to write unknown encoding", me);
  return 1;
}
开发者ID:BishopWolf,项目名称:ITK,代码行数:16,代码来源:encoding.c

示例9: main

int
main(int argc, char *argv[]) {
    char *me, *err;

    FILE *file;
    limnPolyData *lmpd;

    AIR_UNUSED(argc);
    me = argv[0];
    lmpd = limnPolyDataNew();
    file = fopen("in.lmpd", "r");
    if (limnPolyDataReadLMPD(lmpd, file)) {
        err = biffGetDone(LIMN),
        fprintf(stderr, "%s: trouble:\n%s\n", me, err);
        return 1;
    }
    fclose(file);

    file = fopen("out.vtk", "w");
    if (limnPolyDataWriteVTK(file, lmpd)) {
        err = biffGetDone(LIMN);
        fprintf(stderr, "%s: trouble:\n%s\n", me, err);
        return 1;
    }
    fclose(file);


    return 0;
}
开发者ID:ryanfb,项目名称:teem-parallel,代码行数:29,代码来源:tio.c

示例10: _tenDwiGageAnswer

void
_tenDwiGageAnswer(gageContext *ctx, gagePerVolume *pvl) {
  AIR_UNUSED(ctx);
  AIR_UNUSED(pvl);

#if 0
  char me[]="_tenDwiGageAnswer";
  unsigned int dwiIdx;
  tenDwiGageKindData *kindData;
  gage_t *dwiAll, dwiMean=0;

  kindData = AIR_CAST(tenDwiGageKindData *, pvl->kind->data);

  dwiAll = pvl->directAnswer[tenDwiGageAll];
  if (GAGE_QUERY_ITEM_TEST(pvl->query, tenDwiGageAll)) {
    /* done if doV */
    if (ctx->verbose) {
      for (dwiIdx=0; dwiIdx<kindData->num; dwiIdx++) {
        fprintf(stderr, "%s: dwi[%u] = %g\n", me, dwiIdx, dwiAll[dwiIdx]);
      }
    }
  }
  /*
  if (GAGE_QUERY_ITEM_TEST(pvl->query, tenDwiGageB0)) {
    done if doV
  }
  */
  if (GAGE_QUERY_ITEM_TEST(pvl->query, tenDwiGageMeanDwiValue)) {
    dwiMean = 0;
    for (dwiIdx=1; dwiIdx<kindData->num; dwiIdx++) {
      dwiMean += dwiAll[dwiIdx];
    }
    dwiMean /= 1.0f/(kindData->num - 1);
    pvl->directAnswer[tenDwiGageMeanDwiValue][0] = dwiMean;
  }
  if (GAGE_QUERY_ITEM_TEST(pvl->query, tenDwiGageTensorLLS)) {
#if GAGE_TYPE_FLOAT
    tenEstimateLinearSingle_f
#else
    tenEstimateLinearSingle_d
#endif    
      (pvl->directAnswer[tenDwiGageTensorLLS], NULL,
       dwiAll, AIR_CAST(double *, kindData->nemat->data),
       /* pvlData->vbuf */ NULL, kindData->num,
       AIR_TRUE, kindData->dwiConfThresh,
       kindData->dwiConfSoft, kindData->bval);
  }
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:47,代码来源:tenDwiGage.c

示例11: _nrrdFormatUnknown_nameLooksLike

int
_nrrdFormatUnknown_nameLooksLike(const char *filename) {
  
  /* insert code here */
  AIR_UNUSED(filename);

  return AIR_FALSE;
}
开发者ID:rblake,项目名称:seg3d2,代码行数:8,代码来源:format.c

示例12: _pushEnergyUnknownSupport

double
_pushEnergyUnknownSupport(const double *parm) {
    char me[]="_pushEnergyUnknownSupport";

    AIR_UNUSED(parm);
    fprintf(stderr, "%s: ERROR- using unknown energy.\n", me);
    return AIR_NAN;
}
开发者ID:rblake,项目名称:seg3d2,代码行数:8,代码来源:forces.c

示例13: _pullBinPointRemove

/*
** the bin loses track of the point, caller responsible for ownership,
** even though caller never identifies it by pointer, which is weird
*/
void
_pullBinPointRemove(pullContext *pctx, pullBin *bin, int loseIdx) {

  AIR_UNUSED(pctx);
  bin->point[loseIdx] = bin->point[bin->pointNum-1];
  airArrayLenIncr(bin->pointArr, -1);
  return;
}
开发者ID:rblake,项目名称:seg3d2,代码行数:12,代码来源:binningPull.c

示例14: _gageStandardNixer

/*
** _gageStandardNixer()
**
*********************************************************
** as of about Wed Apr 20 19:32:54 EDT 2005, this is moot
*********************************************************
**
** the usual/default nixer used in gage, which is a simple wrapper
** around nrrdNuke at this point, although other things could be
** implemented later ...
**
** The "kind" and "_info" pointers are ignored.
**
** Nixers must gracefully handle being handed a NULL npad.
**
** The intention is that nixers cannot generate errors, so the return
** is void, and no nixer should accumulate errors in biff.  This nixer
** is a shining example of this.
*/
void
_gageStandardNixer (Nrrd *npad, gageKind *kind, gagePerVolume *pvl) {

  AIR_UNUSED(kind);
  if (npad != pvl->nin) {
    nrrdNuke(npad);
  }
}
开发者ID:HarinarayanKrishnan,项目名称:VisIt28RC_Trunk,代码行数:27,代码来源:miscGage.c

示例15: _nrrdWindSincInt

double
_nrrdWindSincInt(const double *parm) {

  AIR_UNUSED(parm);
  /* This isn't true, but there aren't good accurate, closed-form
     approximations for these integrals ... */
  return 1.0;
}
开发者ID:rblake,项目名称:seg3d2,代码行数:8,代码来源:winKernel.c


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