• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ END_PROFILE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getDispatchInfo

void	btCollisionWorld::performDiscreteCollisionDetection()
{
	btDispatcherInfo& dispatchInfo = getDispatchInfo();

	BEGIN_PROFILE("perform Broadphase Collision Detection");


	//update aabb (of all moved objects)

	btVector3 aabbMin,aabbMax;
	for (int i=0;i<m_collisionObjects.size();i++)
	{
		m_collisionObjects[i]->getCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),aabbMin,aabbMax);
		m_broadphasePairCache->setAabb(m_collisionObjects[i]->getBroadphaseHandle(),aabbMin,aabbMax);
	}

	m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1);
	
	END_PROFILE("perform Broadphase Collision Detection");

	BEGIN_PROFILE("performDiscreteCollisionDetection");

	btDispatcher* dispatcher = getDispatcher();
	if (dispatcher)
		dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1);

	END_PROFILE("performDiscreteCollisionDetection");

}
开发者ID:gitrider,项目名称:wxsj2,代码行数:29,代码来源:btCollisionWorld.cpp


示例2: ATLASSERT

LRESULT CVariablePage::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
	ATLASSERT(m_piCurrentClass);
	START_PROFILE(VarInit);
	CreateControls();
	
	m_DDXManager.SetGlobalParams(m_hWnd, m_pModifications, m_pResManager);

	CRect r;
	m_Variables.GetClientRect(r);
	m_Variables.InsertColumn(0, _T("ID"), LVCFMT_LEFT, m_WindowSettings.m_VariableWidth, 0);
	m_Variables.InsertColumn(1, _T("Variable"), LVCFMT_LEFT, r.Width() - m_WindowSettings.m_VariableWidth - 5, 1);
	m_Variables.SetExtendedListViewStyle(LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
	START_PROFILE(VarDlg);
	for (size_t i = 0; i < m_pClassVector->GetCount(); i++)
	{
		VSClass* pCurClass = (*m_pClassVector)[i];
		if (!m_bOnlyDlgs ||
			(pCurClass->IsDialog() && !(pCurClass->m_DialogID.IsEmpty())))
		{
			int iItem = m_Classes.AddString(pCurClass->Name);
			m_Classes.SetItemData(iItem, i);
		}

	}
	END_PROFILE(VarDlg, _T("CVariablePage::OnInitDialog check dialog classes"));
	m_Classes.SetCurSel(0);
	m_ToolbarImgList.CreateFromImage(IDB_BITMAP_DDX, 18, 1, RGB(197, 200,201), IMAGE_BITMAP, LR_CREATEDIBSECTION);
	InitToolTip();
	END_PROFILE(VarInit, _T("CVariablePage::OnInitDialog"));

	return 0;
}
开发者ID:axxapp,项目名称:winxgui,代码行数:33,代码来源:VariablePage.cpp


示例3: reply_sendtxt

/****************************************************************************
  reply to a sendtxt
****************************************************************************/
int reply_sendtxt(connection_struct *conn,
		  char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
  int len;
  int outsize = 0;
  char *msg;
  START_PROFILE(SMBsendtxt);

  if (! (*lp_msg_command())) {
    END_PROFILE(SMBsendtxt);
    return(ERROR_DOS(ERRSRV,ERRmsgoff));
  }

  outsize = set_message(outbuf,0,0,True);

  msg = smb_buf(inbuf) + 1;

  len = SVAL(msg,0);
  len = MIN(len,sizeof(msgbuf)-msgpos);

  memcpy(&msgbuf[msgpos],msg+2,len);
  msgpos += len;

  DEBUG( 3, ( "SMBsendtxt\n" ) );

  END_PROFILE(SMBsendtxt);
  return(outsize);
}
开发者ID:cmtsij,项目名称:Vizio_XWR100_GPL,代码行数:31,代码来源:message.c


示例4: reply_sendstrt

/****************************************************************************
  reply to a sendstrt
****************************************************************************/
int reply_sendstrt(connection_struct *conn,
		   char *inbuf,char *outbuf, int dum_size, int dum_buffsize)
{
  int outsize = 0;
  char *p;

  START_PROFILE(SMBsendstrt);

  if (! (*lp_msg_command())) {
    END_PROFILE(SMBsendstrt);
    return(ERROR_DOS(ERRSRV,ERRmsgoff));
  }

  outsize = set_message(outbuf,1,0,True);

  memset(msgbuf,'\0',sizeof(msgbuf));
  msgpos = 0;

  p = smb_buf(inbuf)+1;
  p += srvstr_pull_buf(inbuf, msgfrom, p, sizeof(msgfrom), STR_TERMINATE) + 1;
  p += srvstr_pull_buf(inbuf, msgto, p, sizeof(msgto), STR_TERMINATE) + 1;

  DEBUG( 3, ( "SMBsendstrt (from %s to %s)\n", msgfrom, msgto ) );

  END_PROFILE(SMBsendstrt);
  return(outsize);
}
开发者ID:cmtsij,项目名称:Vizio_XWR100_GPL,代码行数:30,代码来源:message.c


示例5: START_PROFILE

void Tripod::AdvancePreAttack()
{
	START_PROFILE(g_app->m_profiler, "AdvancePreAttack");

	// Exit if we haven't come to a stop yet
	if (m_vel.Mag() > 0.05f)
	{
		END_PROFILE(g_app->m_profiler, "AdvancePreAttack");
		return;
	}

	m_targetHoverHeight = ATTACK_HOVER_HEIGHT;

	// See if we have achieved a full crouch yet
	float height = m_pos.y - g_app->m_location->m_landscape.m_heightMap->GetValue(m_pos.x, m_pos.z);
	if (height < ATTACK_HOVER_HEIGHT + 0.5f)
	{
		m_mode = ModeAttacking;
		m_modeStartTime = g_gameTime;
	}

	// Blend into attack orientation
	Vector3 desiredUp = CalcAttackUpVector();
	float factor1 = 0.8f * SERVER_ADVANCE_PERIOD;
	float factor2 = 1.0f - factor1;
	m_up = factor1 * desiredUp + factor2 * m_up;
	Vector3 right = m_up ^ m_front;
	m_front = right ^ m_up;
	m_front.Normalise();

	END_PROFILE(g_app->m_profiler, "AdvancePreAttack");
}
开发者ID:gene9,项目名称:Darwinia-and-Multiwinia-Source-Code,代码行数:32,代码来源:tripod.cpp


示例6: sync_browse_lists

void sync_browse_lists(struct work_record *work,
		       char *name, int nm_type, 
		       struct in_addr ip, bool local, bool servers)
{
	struct sync_record *s;
	static int counter;

	START_PROFILE(sync_browse_lists);
	/* Check we're not trying to sync with ourselves. This can
	   happen if we are a domain *and* a local master browser. */
	if (ismyip_v4(ip)) {
done:
		END_PROFILE(sync_browse_lists);
		return;
	}

	s = SMB_MALLOC_P(struct sync_record);
	if (!s) goto done;

	ZERO_STRUCTP(s);

	unstrcpy(s->workgroup, work->work_group);
	unstrcpy(s->server, name);
	s->ip = ip;

	if (asprintf(&s->fname, "%s/sync.%d", lp_lockdir(), counter++) < 0) {
		SAFE_FREE(s);
		goto done;
	}
	/* Safe to use as 0 means no size change. */
	all_string_sub(s->fname,"//", "/", 0);

	DLIST_ADD(syncs, s);

	/* the parent forks and returns, leaving the child to do the
	   actual sync and call END_PROFILE*/
	CatchChild();
	if ((s->pid = sys_fork())) return;

	BlockSignals( False, SIGTERM );

	DEBUG(2,("Initiating browse sync for %s to %s(%s)\n",
		 work->work_group, name, inet_ntoa(ip)));

	fp = x_fopen(s->fname,O_WRONLY|O_CREAT|O_TRUNC, 0644);
	if (!fp) {
		END_PROFILE(sync_browse_lists);
		_exit(1);
	}

	sync_child(name, nm_type, work->work_group, ip, local, servers,
		   s->fname);

	x_fclose(fp);
	END_PROFILE(sync_browse_lists);
	_exit(0);
}
开发者ID:Alexandr-Galko,项目名称:samba,代码行数:57,代码来源:nmbd_synclists.c


示例7: vfswrap_ntimes

static int vfswrap_ntimes(vfs_handle_struct *handle, const char *path, const struct timespec ts[2])
{
	int result;

	START_PROFILE(syscall_ntimes);
#if defined(HAVE_UTIMES)
	{
		struct timeval tv[2];
		tv[0] = convert_timespec_to_timeval(ts[0]);
		tv[1] = convert_timespec_to_timeval(ts[1]);
		result = utimes(path, tv);
	}
#elif defined(HAVE_UTIME)
	{
		struct utimbuf times;
		times.actime = convert_timespec_to_time_t(ts[0]);
		times.modtime = convert_timespec_to_time_t(ts[1]);
		result = utime(path, times);
	}
#else
	errno = ENOSYS;
	result = -1;
#endif
	END_PROFILE(syscall_ntimes);
	return result;
}
开发者ID:edwacode,项目名称:r6300v2,代码行数:26,代码来源:vfs_default.c


示例8: onefs_get_alloc_size

static uint64_t onefs_get_alloc_size(struct vfs_handle_struct *handle,
				     files_struct *fsp,
				     const SMB_STRUCT_STAT *sbuf)
{
	uint64_t result;

	START_PROFILE(syscall_get_alloc_size);

	if(S_ISDIR(sbuf->st_mode)) {
		result = 0;
		goto out;
	}

	/* Just use the file size since st_blocks is unreliable on OneFS. */
	result = get_file_size_stat(sbuf);

	if (fsp && fsp->initial_allocation_size)
		result = MAX(result,fsp->initial_allocation_size);

	result = smb_roundup(handle->conn, result);

 out:
	END_PROFILE(syscall_get_alloc_size);
	return result;
}
开发者ID:gojdic,项目名称:samba,代码行数:25,代码来源:vfs_onefs.c


示例9: START_PROFILE

void SoundSystem::TriggerEvent( SoundObjectId _objId, char *_eventName )
{
    if( !m_channels ) return;

	START_PROFILE("TriggerEvent");
    
    char *objectType = m_interface->GetObjectType(_objId);
    if( objectType )
    {
        SoundEventBlueprint *seb = m_blueprints.GetBlueprint(objectType);
        if( seb )
        {
            for( int i = 0; i < seb->m_events.Size(); ++i )
            {
                SoundInstanceBlueprint *sib = seb->m_events[i];
                if( stricmp( sib->m_eventName, _eventName ) == 0 )
                {
                    Vector3<float> pos, vel;
                    m_interface->GetObjectPosition( _objId, pos, vel );

                    SoundInstance *instance = new SoundInstance();
                    instance->Copy( sib->m_instance );
                    instance->m_objIds.PutData( _objId );
                    instance->m_pos = pos;
                    instance->m_vel = vel;
                    bool success = InitialiseSound  ( instance );                
                    if( !success ) ShutdownSound    ( instance );                
                }
            }
        }
    }

	END_PROFILE("TriggerEvent");
}
开发者ID:cahocachi,项目名称:DEFCON,代码行数:34,代码来源:soundsystem.cpp


示例10: START_PROFILE

void LandscapeRenderer::Render()
{
	if (m_verts.Size() <= 0)
		return;

    g_app->m_location->SetupFog();
	glEnable		(GL_FOG);

	START_PROFILE( "Render Landscape Main");

	switch (m_renderMode) {
		case RenderModeDisplayList:
			{
				int id = g_app->m_resource->GetDisplayList(MAIN_DISPLAY_LIST_NAME);
				AppDebugAssert(id != -1);
				glCallList(id);
			}
			break;

		default:
			RenderMainSlow();
			break;
	}
	END_PROFILE( "Render Landscape Main");

    int landscapeDetail = 1;//g_prefsManager->GetInt( "RenderLandscapeDetail", 1 );
    if( landscapeDetail < 4 )
    {
	    START_PROFILE( "Render Landscape Overlay");
		switch (m_renderMode) {
			case RenderModeDisplayList:
				{
					int id = g_app->m_resource->GetDisplayList(OVERLAY_DISPLAY_LIST_NAME);
					AppDebugAssert(id != -1);
					glCallList(id);
				}
				break;

			default:
			    RenderOverlaySlow();
				;
	    }
	    END_PROFILE( "Render Landscape Overlay");
    }
    
    glDisable		(GL_FOG);
}
开发者ID:gene9,项目名称:Darwinia-and-Multiwinia-Source-Code,代码行数:47,代码来源:landscape_renderer.cpp


示例11: vfswrap_kernel_flock

static int vfswrap_kernel_flock(vfs_handle_struct *handle, files_struct *fsp, int fd,
				uint32 share_mode)
{
	START_PROFILE(syscall_kernel_flock);
	kernel_flock(fd, share_mode);
	END_PROFILE(syscall_kernel_flock);
	return 0;
}
开发者ID:edwacode,项目名称:r6300v2,代码行数:8,代码来源:vfs_default.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ END_TEST函数代码示例发布时间:2022-05-30
下一篇:
C++ END_OF_LIST函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap