本文整理汇总了C++中ProfileMap::end方法的典型用法代码示例。如果您正苦于以下问题:C++ ProfileMap::end方法的具体用法?C++ ProfileMap::end怎么用?C++ ProfileMap::end使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProfileMap
的用法示例。
在下文中一共展示了ProfileMap::end方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateProfileReportsFromProfileMap
//creates a sorted list of profile reports to work with
bool CreateProfileReportsFromProfileMap(ProfileReports& outProfileReports, bool sortReports) {
outProfileReports.clear();
for (ProfileMapIterator it = s_profileMap.begin(); it != s_profileMap.end(); ++it) {
ProfileReport& report = (it->second);
outProfileReports.push_back(report);
}
if (sortReports) {
QuickSort(outProfileReports, outProfileReports.size(), 0);
}
return (!outProfileReports.empty());
}
示例2: createDrawable
static void createDrawable(unsigned long long orig_config, unsigned long long orig_surface)
{
ProfileMap::iterator it = profile_map.find(orig_config);
glprofile::Profile profile;
// If the requested config is associated with a profile, use that
// profile. Otherwise, assume that the last used profile is what
// the user wants.
if (it != profile_map.end()) {
profile = it->second;
} else {
profile = last_profile;
}
glws::Drawable *drawable = glretrace::createDrawable(profile);
drawable_map[orig_surface] = drawable;
}
示例3: AddProfileToMap
void ProfileSection::AddProfileToMap(const std::string& profileName){
profileCritSec.Enter();
ProfileMapIterator profileEntry = s_profileMap.find(profileName);
//if entry exists, increment existing entry
if (profileEntry != s_profileMap.end()){
ProfileReport& existingProfile = (profileEntry->second);
//assumes elapsed time already set
existingProfile.m_totalElapsedTime += elapsedTime;
existingProfile.m_numCalls++;//= numCalls;
existingProfile.SetAverageElapsedTime();
}
else{
//numCalls++;
//add entry
s_profileMap.insert(ProfileEntry(profileName, ProfileReport(profileName, totalElapsedTime, numCalls)));
//Access violation reading location 0xBAADF00D. serious memory corruption here O.o
}
profileCritSec.Exit();
}