本文整理汇总了C++中AIR_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ AIR_UNUSED函数的具体用法?C++ AIR_UNUSED怎么用?C++ AIR_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AIR_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: _nrrdEncodingUnknown_read
int
_nrrdEncodingUnknown_read(FILE *file, void *data,
size_t elementNum, Nrrd *nrrd,
struct NrrdIoState_t *nio) {
char me[]="_nrrdEncodingUnknown_read", err[BIFF_STRLEN];
/* insert code here, and remove error handling below */
AIR_UNUSED(file);
AIR_UNUSED(data);
AIR_UNUSED(elementNum);
AIR_UNUSED(nrrd);
AIR_UNUSED(nio);
sprintf(err, "%s: ERROR!!! trying to read unknown encoding", me);
biffAdd(NRRD, err);
return 1;
}
开发者ID:SCIInstitute,项目名称:Cleaver,代码行数:17,代码来源:encoding.c
示例17: _coilKind7TensorTangents
void
_coilKind7TensorTangents(coil_t traceGrad[6],
coil_t varianceGrad[6],
coil_t skewGrad[6],
coil_t rot0Grad[6],
coil_t rot1Grad[6],
coil_t rot2Grad[6],
coil_t tensor[7]) {
AIR_UNUSED(traceGrad);
AIR_UNUSED(varianceGrad);
AIR_UNUSED(skewGrad);
AIR_UNUSED(rot0Grad);
AIR_UNUSED(rot1Grad);
AIR_UNUSED(rot2Grad);
AIR_UNUSED(tensor);
/*
coil_t a, b, c, d, e, f;
a = tensor[1];
b = tensor[2];
c = tensor[3];
d = tensor[4];
e = tensor[5];
f = tensor[6];
ELL_6V_SET(traceGrad, 1, 0, 0, 1, 0, 1);
*/
}
开发者ID:SCIInstitute,项目名称:Cleaver,代码行数:28,代码来源:tensorCoil.c
示例18: miteRayBegin
int
miteRayBegin(miteThread *mtt, miteRender *mrr, miteUser *muu,
int uIndex, int vIndex,
double rayLen,
double rayStartWorld[3], double rayStartIndex[3],
double rayDirWorld[3], double rayDirIndex[3]) {
airPtrPtrUnion appu;
AIR_UNUSED(mrr);
AIR_UNUSED(rayStartWorld);
AIR_UNUSED(rayStartIndex);
AIR_UNUSED(rayDirIndex);
mtt->ui = uIndex;
mtt->vi = vIndex;
mtt->rayStep = (muu->rayStep*rayLen /
(muu->hctx->cam->vspFaar - muu->hctx->cam->vspNeer));
if (!uIndex) {
fprintf(stderr, "%d/%d ", vIndex, muu->hctx->imgSize[1]);
fflush(stderr);
}
mtt->verbose = (uIndex == muu->verbUi && vIndex == muu->verbVi);
mtt->skip = (muu->verbUi >= 0 && muu->verbVi >= 0
&& !mtt->verbose);
if (mtt->verbose) {
/* create muu->ndebug */
muu->ndebug = nrrdNew();
/* we want to store the value and index for each txf domain variable,
plus the RGBAZ computed for that sample */
muu->ndebug->axis[0].size = 2*mtt->stageNum + 5;
/* we really do want to associate ndebug with the miteUser's mop,
because the information stored in it has to persist for as long as
the user wants: mite itself doesn't call miteUserNix */
airMopAdd(muu->umop, muu->ndebug, (airMopper)nrrdNuke, airMopAlways);
/* but the scope of the debug array allocation is within this ray */
muu->debugArr = airArrayNew((appu.d = &(muu->debug), appu.v),
NULL, sizeof(double), 128);
}
mtt->raySample = 0;
mtt->RR = mtt->GG = mtt->BB = 0.0;
mtt->TT = 1.0;
mtt->ZZ = AIR_NAN;
ELL_3V_SCALE(mtt->V, -1, rayDirWorld);
return 0;
}
开发者ID:CIBC-Internal,项目名称:teem,代码行数:45,代码来源:ray.c
示例19: _pullBinPointAdd
/*
** this makes the bin the owner of the point
*/
void
_pullBinPointAdd(pullContext *pctx, pullBin *bin, pullPoint *point) {
int pntI;
AIR_UNUSED(pctx);
pntI = airArrayLenIncr(bin->pointArr, 1);
bin->point[pntI] = point;
return;
}
开发者ID:rblake,项目名称:seg3d2,代码行数:12,代码来源:binningPull.c
示例20: _nrrdReadNrrdParse_encoding
int
_nrrdReadNrrdParse_encoding (FILE *file, Nrrd *nrrd,
NrrdIoState *nio, int useBiff) {
char me[]="_nrrdReadNrrdParse_encoding", err[BIFF_STRLEN];
char *info;
int etype;
AIR_UNUSED(file);
AIR_UNUSED(nrrd);
info = nio->line + nio->pos;
if (!(etype = airEnumVal(nrrdEncodingType, info))) {
sprintf(err, "%s: couldn't parse encoding \"%s\"", me, info);
biffMaybeAdd(NRRD, err, useBiff); return 1;
}
nio->encoding = nrrdEncodingArray[etype];
return 0;
}
开发者ID:muyiyangchen,项目名称:3rd-party-lib-for-recheliu,代码行数:18,代码来源:parseNrrd.c
注:本文中的AIR_UNUSED函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论