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


C++ STOP_PROFILING函数代码示例

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


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

示例1: START_PROFILING_IO

sp_read_ret_t *sp_read_1_svc(sp_read_arg_t * args, struct svc_req * req) {
    static sp_read_ret_t ret;
    uint32_t psize;
    storage_t *st = 0;
    DEBUG_FUNCTION;

    START_PROFILING_IO(read,
            args->nrb * rozofs_psizes[args->tid] * sizeof (bin_t));

    xdr_free((xdrproc_t) xdr_sp_read_ret_t, (char *) &ret);
    ret.status = SP_FAILURE;

    if ((st = storaged_lookup(args->sid)) == 0) {
        ret.sp_read_ret_t_u.error = errno;
        goto out;
    }
    psize = rozofs_psizes[args->tid];
    ret.sp_read_ret_t_u.bins.bins_len = args->nrb * psize * sizeof (bin_t);
    ret.sp_read_ret_t_u.bins.bins_val =
        (char *) xmalloc(args->nrb * psize * sizeof (bin_t));
    if (storage_read
        (st, args->fid, args->tid, args->bid, args->nrb,
         (bin_t *) ret.sp_read_ret_t_u.bins.bins_val) != 0) {
        ret.sp_read_ret_t_u.error = errno;
        goto out;
    }
    ret.status = SP_SUCCESS;

out:
    STOP_PROFILING(read);
    return &ret;
}
开发者ID:weixu8,项目名称:rozofs,代码行数:32,代码来源:sproto.c

示例2: run_copy_u

// Shared solver kernels
void run_copy_u(Chunk* chunk, Settings* settings)
{
    START_PROFILING(settings->kernel_profile);
    copy_u(
            chunk->x, chunk->y, settings->halo_depth, chunk->u0, chunk->u);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.c

示例3: ext_cg_calc_p_

// Entry point for calculating p
void ext_cg_calc_p_(
        const int* chunk,
        double* p,
        double* r,
        double* z,
        const double* beta)
{
    START_PROFILING;

#pragma omp target if(_chunk.is_offload) device(_chunk.device_id)
#pragma omp parallel for
    for(int ii = HALO_PAD; ii < _chunk.z-HALO_PAD; ++ii)
    {
        for(int jj = HALO_PAD; jj < _chunk.y-HALO_PAD; ++jj)
        {
            for(int kk = HALO_PAD; kk < _chunk.x-HALO_PAD; ++kk)
            {
                const int index = ii*_chunk.x*_chunk.y+jj*_chunk.x+kk;
                p[index] = *beta*p[index] + r[index];
            }
        }
    }

    STOP_PROFILING(__func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf-OpenMP4,代码行数:26,代码来源:ext_cg_kernel.c

示例4: SMVP

// Initialises the Chebyshev solver.
void TeaLeafChunk::ChebyInit(
		double* alphas, 
		double* betas,
		const double theta,
		const bool preconditionerOn)
{
	preconditioner = preconditionerOn;
	this->alphas = alphas;
	this->betas = betas;

	START_PROFILING;
#pragma omp parallel for
	for(int jj = HALO_PAD; jj < yCells-HALO_PAD; ++jj)
	{
		for(int kk = HALO_PAD; kk < xCells-HALO_PAD; ++kk)
		{
			const int index = jj*xCells+kk;
			const double smvp = SMVP(u);
			w[index] = smvp;
			r[index] = u0[index]-w[index];
			p[index] = (preconditioner ? mi[index]*r[index] : r[index])/theta;
		}
	}
	STOP_PROFILING("Cheby Init");

	ChebyCalcU();
}
开发者ID:UoB-HPC,项目名称:TeaLeaf-OpenMP,代码行数:28,代码来源:ext_cheby_kernel.cpp

示例5: ext_cg_calc_w_

// Entry point for calculating w
void ext_cg_calc_w_(
        const int* chunk,
        double* p,
        double* w,
        double* kx,
        double* ky,
        double* kz,
        double* pw)
{
    START_PROFILING;

    double pwTemp = 0.0;

#pragma omp target if(_chunk.is_offload) device(_chunk.device_id)
#pragma omp parallel for reduction(+:pwTemp)
    for(int ii = HALO_PAD; ii < _chunk.z-HALO_PAD; ++ii)
    {
        for(int jj = HALO_PAD; jj < _chunk.y-HALO_PAD; ++jj)
        {
            for(int kk = HALO_PAD; kk < _chunk.x-HALO_PAD; ++kk)
            {
                const int index = ii*_chunk.x*_chunk.y+jj*_chunk.x+kk;
                const double smvp = SMVP(p);
                w[index] = smvp;
                pwTemp += w[index]*p[index];
            }
        }
    }

    *pw = pwTemp;

    STOP_PROFILING(__func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf-OpenMP4,代码行数:34,代码来源:ext_cg_kernel.c

示例6: calc_scattering_cross_section

void calc_scattering_cross_section(void)
{
    START_PROFILING;

#pragma acc kernels \
    present(scat_cs[:scat_cs_len], gg_cs[:gg_cs_len], mat[:mat_len])
#pragma acc loop collapse(5) independent
    for(unsigned int g = 0; g < ng; ++g)
    {
        for (unsigned int k = 0; k < nz; k++)
        {
            for (unsigned int j = 0; j < ny; j++)
            {
                for (unsigned int i = 0; i < nx; i++)
                {
                    for (unsigned int l = 0; l < nmom; l++)
                    {
                        scat_cs(l,i,j,k,g) = gg_cs(mat(i,j,k)-1,l,g,g);
                    }
                }
            }
        }
    }

    STOP_PROFILING(__func__);
}
开发者ID:UoB-HPC,项目名称:SNAP-OpenACC,代码行数:26,代码来源:ext_kernels.c

示例7: calc_inner_source

// Calculate the inner source
void calc_inner_source(void)
{
    START_PROFILING;

#pragma acc kernels \
    present(source[:source_len], g2g_source[:g2g_source_len], scat_cs[:scat_cs_len], \
            scalar_flux[:scalar_flux_len], lma[:lma_len], scalar_mom[:scalar_mom_len])
#pragma acc loop collapse(4) independent
    for (unsigned int g = 0; g < ng; g++)
    {
        for(int k = 0; k < nz; ++k)
        {
            for(int j = 0; j < ny; ++j)
            {
                for(int i = 0; i < nx; ++i)
                {
                    source(0,i,j,k,g) = g2g_source(0,i,j,k,g) + scat_cs(0,i,j,k,g) * scalar_flux(g,i,j,k);

                    unsigned int mom = 1;
                    for (unsigned int l = 1; l < nmom; l++)
                    {
                        for (int m = 0; m < lma(l); m++)
                        {
                            source(mom,i,j,k,g) = g2g_source(mom,i,j,k,g) + scat_cs(l,i,j,k,g) * scalar_mom(g,mom-1,i,j,k);
                            mom++;
                        }
                    }
                }
            }
        }
    }

    STOP_PROFILING(__func__);
}
开发者ID:UoB-HPC,项目名称:SNAP-OpenACC,代码行数:35,代码来源:ext_kernels.c

示例8: reduction

// Calculates key values from the current field.
void TeaLeafChunk::FieldSummary(
		double* volOut,
		double* massOut,
		double* ieOut,
		double* tempOut)
{
	double vol = 0.0;
	double mass = 0.0;
	double ie = 0.0;
	double temp = 0.0;

	START_PROFILING;
#pragma omp parallel for reduction(+:vol,mass,ie,temp)
	for(int jj = HALO_PAD; jj < yCells-HALO_PAD; ++jj)
	{
		for(int kk = HALO_PAD; kk < xCells-HALO_PAD; ++kk)
		{
			int index = jj*xCells+kk;
			double cellVol = volume[index];
			double cellMass = cellVol*density[index];
			vol += cellVol;
			mass += cellMass;
			ie += cellMass*energy0[index];
			temp += cellMass*u[index];
		}
	}
	STOP_PROFILING("Field Summary");

	*volOut = vol;
	*massOut = mass;
	*ieOut = ie;
	*tempOut = temp;
}
开发者ID:UoB-HPC,项目名称:TeaLeaf-OpenMP,代码行数:34,代码来源:ext_field_summary.cpp

示例9: run_store_energy

void run_store_energy(Chunk* chunk, Settings* settings)
{
    START_PROFILING(settings->kernel_profile);
    store_energy(
            chunk->ext->raja_lists, chunk->energy0, chunk->energy);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:7,代码来源:kernel_interface.cpp

示例10: run_calculate_2norm

void run_calculate_2norm(
        Chunk* chunk, Settings* settings, double* buffer, double* norm)
{
    START_PROFILING(settings->kernel_profile);
    calculate_2norm(
            chunk->x, chunk->y, settings->halo_depth, buffer, norm);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.c

示例11: run_ppcg_init

// PPCG solver kernels
void run_ppcg_init(Chunk* chunk, Settings* settings)
{
    START_PROFILING(settings->kernel_profile);
    ppcg_init(
            chunk->x, chunk->y, settings->halo_depth, chunk->theta, chunk->r,
            chunk->sd);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:9,代码来源:kernel_interface.c

示例12: run_cg_calc_w

void run_cg_calc_w(Chunk* chunk, Settings* settings, double* pw)
{
    START_PROFILING(settings->kernel_profile);
    cg_calc_w(
            chunk->ext->raja_lists, chunk->x, chunk->y, settings->halo_depth, 
            pw, chunk->p, chunk->w, chunk->kx, chunk->ky);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.cpp

示例13: run_finalise

void run_finalise(Chunk* chunk, Settings* settings)
{
    START_PROFILING(settings->kernel_profile);
    finalise(
            chunk->x, chunk->y, settings->halo_depth, chunk->energy, 
            chunk->density, chunk->u);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.c

示例14: run_calculate_residual

void run_calculate_residual(Chunk* chunk, Settings* settings)
{
    START_PROFILING(settings->kernel_profile);
    calculate_residual(
            chunk->x, chunk->y, settings->halo_depth, chunk->u, chunk->u0, 
            chunk->r, chunk->kx, chunk->ky);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.c

示例15: run_cg_calc_p

void run_cg_calc_p(Chunk* chunk, Settings* settings, double beta)
{
    START_PROFILING(settings->kernel_profile);
    cg_calc_p(chunk->x, chunk->y, 
            settings->halo_depth, beta, chunk->p, 
            chunk->r);
    STOP_PROFILING(settings->kernel_profile, __func__);
}
开发者ID:UoB-HPC,项目名称:TeaLeaf,代码行数:8,代码来源:kernel_interface.c


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