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


C++ START_PROFILE函数代码示例

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


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

示例1: 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

示例2: ReOneStep

static void
ReOneStep(double deltaTimeIncrement)
{
	int i;
	tRobotItf *robot;
	tSituation *s = ReInfo->s;

	if (floor(s->currentTime) == -2.0) {
		ReRaceBigMsgSet("Ready", 1.0);
	} else if (floor(s->currentTime) == -1.0) {
		ReRaceBigMsgSet("Set", 1.0);
	} else if (floor(s->currentTime) == 0.0) {
		ReRaceBigMsgSet("Go", 1.0);
	}

	ReInfo->_reCurTime += deltaTimeIncrement * ReInfo->_reTimeMult; /* "Real" time */
	s->currentTime += deltaTimeIncrement; /* Simulated time */

	if (s->currentTime < 0) {
		/* no simu yet */
		ReInfo->s->_raceState = RM_RACE_PRESTART;
	} else if (ReInfo->s->_raceState == RM_RACE_PRESTART) {
		ReInfo->s->_raceState = RM_RACE_RUNNING;
		s->currentTime = 0.0; /* resynchronize */
		ReInfo->_reLastTime = 0.0;
	}

	START_PROFILE("rbDrive*");
	if ((s->currentTime - ReInfo->_reLastTime) >= RCM_MAX_DT_ROBOTS) {
		s->deltaTime = s->currentTime - ReInfo->_reLastTime;
		for (i = 0; i < s->_ncars; i++) {
			if ((s->cars[i]->_state & RM_CAR_STATE_NO_SIMU) == 0) {
				robot = s->cars[i]->robot;
				robot->rbDrive(robot->index, s->cars[i], s);
			}
		}
		ReInfo->_reLastTime = s->currentTime;
	}
	STOP_PROFILE("rbDrive*");

	START_PROFILE("_reSimItf.update*");
	ReInfo->_reSimItf.update(s, deltaTimeIncrement, -1);
	for (i = 0; i < s->_ncars; i++) {
		ReManage(s->cars[i]);
	}
	STOP_PROFILE("_reSimItf.update*");

	ReRaceMsgUpdate();
	ReSortCars();
}
开发者ID:702nADOS-archive,项目名称:AutoPlug-3.0,代码行数:50,代码来源:raceengine.cpp

示例3: ReUpdate

int
ReUpdate(void)
{
    double 		t;
    tRmMovieCapture	*capture;
    

    START_PROFILE("ReUpdate");
    ReInfo->_refreshDisplay = 0;
    switch (ReInfo->_displayMode) {
    case RM_DISP_MODE_NORMAL:
	t = GfTimeClock();

	START_PROFILE("ReOneStep*");
	while (ReInfo->_reRunning && ((t - ReInfo->_reCurTime) > RCM_MAX_DT_SIMU)) {
	    ReOneStep(RCM_MAX_DT_SIMU);
	}
	STOP_PROFILE("ReOneStep*");

	GfuiDisplay();
	ReInfo->_reGraphicItf.refresh(ReInfo->s);
	glutPostRedisplay();	/* Callback -> reDisplay */
	break;
	
    case RM_DISP_MODE_NONE:
	ReOneStep(RCM_MAX_DT_SIMU);
	if (ReInfo->_refreshDisplay) {
	    GfuiDisplay();
	}
	glutPostRedisplay();	/* Callback -> reDisplay */
	break;

    case RM_DISP_MODE_CAPTURE:
	capture = &(ReInfo->movieCapture);
	while ((ReInfo->_reCurTime - capture->lastFrame) < capture->deltaFrame) {
	    ReOneStep(capture->deltaSimu);
	}
	capture->lastFrame = ReInfo->_reCurTime;
	
	GfuiDisplay();
	ReInfo->_reGraphicItf.refresh(ReInfo->s);
	reCapture();
	glutPostRedisplay();	/* Callback -> reDisplay */
	break;
	
    }
    STOP_PROFILE("ReUpdate");

    return RM_ASYNC;
}
开发者ID:702nADOS-archive,项目名称:AutoPlug-3.0,代码行数:50,代码来源:raceengine.cpp

示例4: START_PROFILE

bool CSpaceRestrictionBridge::on_border					(const Fvector &position) const
{
	START_PROFILE("Restricted Object/Bridge/On Border");
	
	VERIFY					(ai().level_graph().valid_vertex_position(position));

	CLevelGraph::CPosition	pos = ai().level_graph().vertex_position(position);

	xr_vector<u32>::const_iterator E = object().border().end();
	xr_vector<u32>::const_iterator I = std::lower_bound	(
		object().border().begin(),
		object().border().end(),
		pos.xz(),
		CFindByXZ_predicate()
	);

	if ((I == E) || (ai().level_graph().vertex(*I)->position().xz() != pos.xz()))
		return			(false);

	for (I ; I != E; ++I) {
		if (ai().level_graph().vertex(*I)->position().xz() != pos.xz())
			break;

		if (_abs(ai().level_graph().vertex_plane_y(*I) - position.y) < 2.f)
			return	(true);
	}	

	return				(false);

	STOP_PROFILE;
}
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:31,代码来源:space_restriction_bridge.cpp

示例5: START_PROFILE

bool CRestrictedObject::accessible			(u32 level_vertex_id, float radius) const
{
	START_PROFILE("Restricted Object/Accessible");
	VERIFY						(ai().level_graph().valid_vertex_id(level_vertex_id));
	return						(Level().space_restriction_manager().accessible(object().ID(),level_vertex_id,radius));
	STOP_PROFILE;
}
开发者ID:AntonioModer,项目名称:xray-16,代码行数:7,代码来源:restricted_object.cpp

示例6: 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

示例7: START_PROFILE

void CSpaceRestriction::merge_free_in_retrictions	()
{
	START_PROFILE("Restricted Object/Merge Free In");
	string256								temp;
	for (u32 i=0, n=_GetItemCount(*m_in_restrictions); i<n ;++i) {
		SpaceRestrictionHolder::CBaseRestrictionPtr bridge = m_space_restriction_manager->restriction(shared_str(_GetItem(*m_in_restrictions,i,temp)));
		m_free_in_restrictions.push_back	(CFreeInRestriction(bridge,false));
	}

	RESTRICTIONS					temp_restrictions;
	for (bool ok = false; !ok; ) {
		ok							= true;
		temp_restrictions.clear		();
		
		FREE_IN_RESTRICTIONS::iterator	I = m_free_in_restrictions.begin(), J;
		FREE_IN_RESTRICTIONS::iterator	E = m_free_in_restrictions.end();
		for ( ; I != E; ++I) {
			for (J = I + 1; J != E; ++J)
				if (intersects((*I).m_restriction,(*J).m_restriction))
					temp_restrictions.push_back	((*J).m_restriction);

			if (!temp_restrictions.empty()) {
				J					= remove_if(m_free_in_restrictions.begin(),m_free_in_restrictions.end(),CRemoveMergedFreeInRestrictions(temp_restrictions));
				m_free_in_restrictions.erase	(J,m_free_in_restrictions.end());
				(*I).m_restriction	= merge((*I).m_restriction,temp_restrictions);
				ok					= false;
				break;
			}
		}
	}
	STOP_PROFILE;
}
开发者ID:OLR-xray,项目名称:XRay-NEW,代码行数:32,代码来源:space_restriction.cpp

示例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: 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

示例10: 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

示例11: START_PROFILE

void SoundSystem::TriggerEvent( char *_type, char *_eventName, Vector3<float> const &_pos )
{
    if( !m_channels ) return;

	START_PROFILE("TriggerEvent");
    
    SoundEventBlueprint *seb = m_blueprints.GetBlueprint(_type);
    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 )
            {
                SoundInstance *instance = new SoundInstance();
                instance->Copy( sib->m_instance );
                instance->m_pos = _pos;
                bool success = InitialiseSound  ( instance );                
                if( !success ) ShutdownSound    ( instance );                
            }
        }
    }

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

示例12: 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

示例13: START_PROFILE

void CMovementManager::move_along_path	(CPHMovementControl *movement_control, Fvector &dest_position, float time_delta)
{
	START_PROFILE("Build Path/Move Along Path")
	VERIFY(movement_control);
	Fvector				motion;
	dest_position		= object().Position();

	float				precision = 0.5f;
	
	
	// Если нет движения по пути
	if (	!enabled() || 
			!actual()  ||
//			path_completed() || 
			detail().path().empty() ||
			detail().completed(dest_position,true) || 
			(detail().curr_travel_point_index() >= detail().path().size() - 1) ||
			fis_zero(old_desirable_speed())
		)
	{
		m_speed			= 0.f;
		

		DBG_PH_MOVE_CONDITIONS( if(ph_dbg_draw_mask.test(phDbgNeverUseAiPhMove)){movement_control->SetPosition(dest_position);movement_control->DisableCharacter();})
		if(movement_control->IsCharacterEnabled()) {
开发者ID:OLR-xray,项目名称:OLR-3.0,代码行数:25,代码来源:movement_manager_physic.cpp

示例14: START_PROFILE

void CHitMemoryManager::update()
{
	START_PROFILE("Memory Manager/hits::update")

	clear_delayed_objects		();

	VERIFY						(m_hits);
	m_hits->erase				(
		std::remove_if(	
			m_hits->begin(),
			m_hits->end(),
			CRemoveOfflinePredicate()
		),
		m_hits->end()
	);

#ifdef USE_SELECTED_HIT
	xr_delete					(m_selected_hit);
	u32							level_time = 0;
	HITS::const_iterator		I = m_hits->begin();
	HITS::const_iterator		E = m_hits->end();
	for ( ; I != E; ++I) {
		if ((*I).m_level_time > level_time) {
			xr_delete			(m_selected_hit);
			m_selected_hit		= new CHitObject(*I);
			level_time			= (*I).m_level_time;
		}
	}
#endif
	STOP_PROFILE
}
开发者ID:2asoft,项目名称:xray,代码行数:31,代码来源:hit_memory_manager.cpp

示例15: ocrAffinityGet

//BUG #606/#VV4 Neighbors/affinities:  This call returns affinities with identical mapping across PDs.
u8 ocrAffinityGet(ocrAffinityKind kind, u64 * count, ocrGuid_t * affinities) {
    START_PROFILE(api_ocrAffinityGet);
    ocrPolicyDomain_t * pd = NULL;
    getCurrentEnv(&pd, NULL, NULL, NULL);
    ocrPlatformModelAffinity_t * platformModel = ((ocrPlatformModelAffinity_t*)pd->platformModel);
    if(platformModel == NULL) {
        ASSERT(*count > 0);
        *count = 1;
        affinities[0] = NULL_GUID;
        RETURN_PROFILE(0);
    }

    if (kind == AFFINITY_PD) {
        ASSERT(*count <= (pd->neighborCount + 1));
        u64 i = 0;
        while(i < *count) {
            affinities[i] = platformModel->pdLocAffinities[i];
            i++;
        }
    } else if (kind == AFFINITY_PD_MASTER) {
        //BUG #610 Master PD: This should likely come from the INI file
        affinities[0] = platformModel->pdLocAffinities[0];
    } else if (kind == AFFINITY_CURRENT) {
        affinities[0] = platformModel->pdLocAffinities[platformModel->current];
    } else {
        ASSERT(false && "Unknown affinity kind");
    }
    RETURN_PROFILE(0);
}
开发者ID:shamouda,项目名称:ocr,代码行数:30,代码来源:ocr-affinity.c


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