StatsAnalyzer::StatsAnalyzer(const SpirvStats& stats) : stats_(stats) { num_modules_ = 0; for (const auto& pair : stats_.version_hist) { num_modules_ += pair.second; } version_freq_ = GetRecall(stats_.version_hist, num_modules_); generator_freq_ = GetRecall(stats_.generator_hist, num_modules_); capability_freq_ = GetRecall(stats_.capability_hist, num_modules_); extension_freq_ = GetRecall(stats_.extension_hist, num_modules_); opcode_freq_ = GetPrevalence(stats_.opcode_hist); }
void LocationDlg::RefreshButtons() { int num = m_pLocList->GetSelection(); GetStore()->Enable(num != -1); GetRecall()->Enable(num != -1); GetRemove()->Enable(num != -1); }