本文整理汇总了C++中Timing::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Timing::clear方法的具体用法?C++ Timing::clear怎么用?C++ Timing::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timing
的用法示例。
在下文中一共展示了Timing::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mexFunction
void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] )
{
if(nrhs != 7 && nrhs != 8) {
printf(" wrong usage!!!.\n\n");
return;
} else if(nlhs>3) {
printf("Too many output arguments\n");
return;
}
int pcnt = 0;
const mxArray *Points;
Points = prhs[pcnt++];
int numPoints = mxGetN(Points);
REAL *points = (REAL*) mxGetData(Points);
const mxArray *DataImg;
DataImg = prhs[pcnt++];
REAL *dimg = (REAL*) mxGetData(DataImg);
const int *dsize = mxGetDimensions(DataImg);
const mxArray *Mask;
Mask = prhs[pcnt++];
REAL *mask = (REAL*) mxGetData(Mask);
const int *dmsize = mxGetDimensions(Mask);
int mask_oversamp_mult = dmsize[0]/dsize[1];
const mxArray *VoxSize;
VoxSize = prhs[pcnt++];
double *voxsize = (double*) mxGetPr(VoxSize);
const mxArray *Params;
Params = prhs[pcnt++];
double *params = (double*) mxGetPr(Params);
REAL Temp = (REAL) params[0];
REAL numit = (REAL) params[1];
REAL conprob = (REAL) params[2];
REAL particle_weight = (REAL) params[3];
REAL particle_width = (REAL) params[4];
REAL particle_len = (REAL) params[5];
REAL chempot_connection = (REAL) params[6];
REAL chempot_particle = (REAL) params[7];
REAL inex_balance = (REAL) params[8];
REAL chempot2 = (REAL) params[9];
REAL meanval_sq = (REAL) params[10];
const mxArray *BesselExpansion;
BesselExpansion = prhs[pcnt++];
BESSEL_APPROXCOEFF = (REAL*) mxGetData(BesselExpansion);
// read spherical-interpolator data
const mxArray *sinterpstruct = prhs[pcnt++];
mxArray *Indices = mxGetField(sinterpstruct,0,"indices");
mxArray *BaryCoords = mxGetField(sinterpstruct,0,"barycoords");
mxArray *Beta = mxGetField(sinterpstruct,0,"beta");
mxArray *NumInterpPoints = mxGetField(sinterpstruct,0,"numpoints");
REAL *indimg = (REAL*) mxGetData(Indices);
const int *isize = mxGetDimensions(Indices);
int totsz = isize[0]*isize[1]*isize[2]*isize[3];
int *indeximg = (int*) malloc(sizeof(int)*totsz);
for (int k =0;k < totsz;k++)
indeximg[k] = int(indimg[k])-1;
REAL *barycoords = (REAL*) mxGetData(BaryCoords);
REAL *beta = (REAL*) mxGetData(Beta);
int nip = int(*((REAL*)mxGetData(NumInterpPoints)));
SphereInterpolator *sinterp = new SphereInterpolator(barycoords,indeximg,nip,isize[2],beta[0]);
const mxArray *BreakHandle;
if (nrhs == 8)
{
BreakHandle = prhs[pcnt++];
}
#ifdef TIMING
externalenergy_time.clear();
internalenergy_time.clear();
odfeval_time.clear();
total_time.clear();
shiftproposal_time.clear();
birthproposal_time.clear();
deathproposal_time.clear();
capproposal_time.clear();
lenproposal_time.clear();
connproposal_time.clear();
deathstats.clear();
birthstats.clear();
//.........这里部分代码省略.........