本文整理匯總了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);
}
示例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;
}
示例3: _nrrdFormatPNM_contentStartsLike
int
_nrrdFormatPNM_contentStartsLike(NrrdIoState *nio) {
AIR_UNUSED(nio);
return AIR_FALSE;
}
示例4: parmSprint
static char *
parmSprint(char str[AIR_STRLEN_MED], const double *parm) {
AIR_UNUSED(parm);
sprintf(str, "constant 0");
return str;
}
示例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);
}
示例6: _baneClipAnswer_Absolute
int
_baneClipAnswer_Absolute(int *countP, Nrrd *hvol, double *clipParm) {
AIR_UNUSED(hvol);
*countP = (int)(clipParm[0]);
return 0;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例11: _nrrdFormatUnknown_nameLooksLike
int
_nrrdFormatUnknown_nameLooksLike(const char *filename) {
/* insert code here */
AIR_UNUSED(filename);
return AIR_FALSE;
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}