Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/view/src/compute/legacy/rocprofvis_compute_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ ComputeBlockViewLegacy::ComputeBlockViewLegacy(std::string owner_id, std::shared
, m_block_diagram_region(ImVec2(-1, -1))
, m_block_diagram_center(ImVec2(-1, -1))
, m_navigation_changed(true)
, m_navigation_event_token(-1)
, m_navigation_event_token(static_cast<EventManager::SubscriptionToken>(-1))
, m_owner_id(owner_id)
{
m_navigation = std::make_unique<ComputeBlockDiagramNavHelper>();
Expand Down Expand Up @@ -252,6 +252,7 @@ ComputeBlockViewLegacy::ComputeBlockViewLegacy(std::string owner_id, std::shared

auto navigation_changed_handler = [this](std::shared_ptr<RocEvent> event)
{
(void)event;
m_navigation_changed = true;
};
m_navigation_event_token = EventManager::GetInstance()->Subscribe(static_cast<int>(RocEvents::kComputeBlockNavigationChanged), navigation_changed_handler);
Expand Down
2 changes: 1 addition & 1 deletion src/view/src/compute/legacy/rocprofvis_compute_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const std::array TAB_DEFINITIONS {
};

ComputeTableCategory::ComputeTableCategory(std::shared_ptr<ComputeDataProvider> data_provider, table_view_category_t category)
: m_search_event_token(-1)
: m_search_event_token(static_cast<EventManager::SubscriptionToken>(-1))
{
for (const rocprofvis_controller_compute_table_types_t& table : TAB_DEFINITIONS[category].m_table_types)
{
Expand Down
20 changes: 10 additions & 10 deletions src/view/src/compute/rocprofvis_compute_roofline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,15 +390,15 @@ Roofline::Render()
display &= m_items[i].visible;
if(display)
{
ImGui::PushID(i);
ImGui::PushID(static_cast<int>(i));
bool hovered =
m_hovered_item_idx && m_hovered_item_idx.value() == i;
switch(m_items[i].type)
{
case ItemModel::Type::CeilingCompute:
case ItemModel::Type::CeilingBandwidth:
{
ImPlot::SetNextLineStyle(ImPlot::GetColormapColor(i),
ImPlot::SetNextLineStyle(ImPlot::GetColormapColor(static_cast<int>(i)),
hovered ? plot_style.LineWeight *
3.0f
: plot_style.LineWeight);
Expand Down Expand Up @@ -436,8 +436,8 @@ Roofline::Render()
(m_scale_intensity ? m_items[i].weight : 0.0f) *
2.0f * plot_style.MarkerSize +
(hovered ? plot_style.MarkerSize : 0.0f),
ImPlot::GetColormapColor(i), IMPLOT_AUTO,
ImPlot::GetColormapColor(i));
ImPlot::GetColormapColor(static_cast<int>(i)), IMPLOT_AUTO,
ImPlot::GetColormapColor(static_cast<int>(i)));
ImPlot::PlotScatter(
"", &m_items[i].info.intensity->position.x,
&m_items[i].info.intensity->position.y, 1);
Expand All @@ -464,7 +464,7 @@ Roofline::Render()
ImGui::CalcTextSize(
m_items[i].label.c_str()),
ImGui::GetColorU32(
ImPlot::GetColormapColor(i)));
ImPlot::GetColormapColor(static_cast<int>(i))));
ImGui::TextUnformatted(m_items[i].label.c_str());
ImGui::Text(
"%.0f GFLOP/s",
Expand All @@ -480,7 +480,7 @@ Roofline::Render()
ImGui::CalcTextSize(
m_items[i].label.c_str()),
ImGui::GetColorU32(
ImPlot::GetColormapColor(i)));
ImPlot::GetColormapColor(static_cast<int>(i))));
ImGui::TextUnformatted(m_items[i].label.c_str());
ImGui::Text(
"%.0f GB/s",
Expand All @@ -498,7 +498,7 @@ Roofline::Render()
DISPLAY_NAMES_KERNEL_INTENSITY
[m_items[i].subtype.intensity]),
ImGui::GetColorU32(
ImPlot::GetColormapColor(i)));
ImPlot::GetColormapColor(static_cast<int>(i))));
ImGui::TextUnformatted(
DISPLAY_NAMES_KERNEL_INTENSITY
[m_items[i].subtype.intensity]);
Expand Down Expand Up @@ -672,7 +672,7 @@ Roofline::RenderMenus(const ImVec2 region, const ImGuiStyle& style,
(m_menus_mode == Legend && m_items[i].visible || m_menus_mode == Options))
{
empty = false;
ImGui::PushID(i);
ImGui::PushID(static_cast<int>(i));
ImVec2 pos = ImGui::GetCursorPos();
bool row_clicked = ImGui::Selectable(
"", false,
Expand All @@ -697,7 +697,7 @@ Roofline::RenderMenus(const ImVec2 region, const ImGuiStyle& style,
ImVec2(icon_width - 2 * IMPLOT_LEGEND_ICON_SHRINK,
icon_width - 2 * IMPLOT_LEGEND_ICON_SHRINK),
ImGui::GetColorU32(
ImGui::GetColorU32(ImPlot::GetColormapColor(i)),
ImGui::GetColorU32(ImPlot::GetColormapColor(static_cast<int>(i))),
row_hovered ? 0.75f : 1.0f));
break;
}
Expand All @@ -708,7 +708,7 @@ Roofline::RenderMenus(const ImVec2 region, const ImGuiStyle& style,
ImVec2(icon_width, icon_width) * 0.5f,
icon_width * 0.5f - 2 * IMPLOT_LEGEND_ICON_SHRINK,
ImGui::GetColorU32(
ImGui::GetColorU32(ImPlot::GetColormapColor(i)),
ImGui::GetColorU32(ImPlot::GetColormapColor(static_cast<int>(i))),
row_hovered ? 0.75f : 1.0f),
10);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/view/src/compute/rocprofvis_compute_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ ComputeTester::RenderKernelSelectionTable()

if(!header.empty() && !data.empty())
{
if(ImGui::BeginTable("kernel_selection_table", header.size(),
if(ImGui::BeginTable("kernel_selection_table", static_cast<int>(header.size()),
ImGuiTableFlags_RowBg | ImGuiTableFlags_Borders |
ImGuiTableFlags_SizingStretchSame | ImGuiTableFlags_Sortable,
ImVec2(0.0f, data.empty()
Expand Down
4 changes: 2 additions & 2 deletions src/view/src/compute/rocprofvis_compute_workload_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ComputeWorkloadView::RenderSystemInfo(const WorkloadInfo& workload_info)
{
for(size_t i = 0; i < workload_info.system_info[0].size(); i++)
{
ImGui::PushID(i);
ImGui::PushID(static_cast<int>(i));
ImGui::TableNextRow();
ImGui::TableNextColumn();
CopyableTextUnformatted(workload_info.system_info[0][i].c_str(), "",
Expand Down Expand Up @@ -167,7 +167,7 @@ ComputeWorkloadView::RenderProfilingConfig(const WorkloadInfo& workload_info)
{
for(size_t i = 0; i < workload_info.profiling_config[0].size(); i++)
{
ImGui::PushID(i);
ImGui::PushID(static_cast<int>(i));
ImGui::TableNextRow();
ImGui::TableNextColumn();
CopyableTextUnformatted(workload_info.profiling_config[0][i].c_str(),
Expand Down
2 changes: 0 additions & 2 deletions src/view/src/rocprofvis_annotation_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ AnnotationView::Render()
ImGui::TableSetupColumn("Visibility");
ImGui::TableHeadersRow();

double trace_start_time =
m_data_provider.DataModel().GetTimeline().GetStartTime();
const auto& time_format =
SettingsManager::GetInstance().GetUserSettings().unit_settings.time_format;
std::string time_label;
Expand Down
7 changes: 3 additions & 4 deletions src/view/src/rocprofvis_minimap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ Minimap::SetData(const std::vector<std::vector<double>>& data)
return;
}

const size_t height = data.size();
const size_t width = data.front().size();
const size_t width = data.front().size();
for(const auto& row : data)
{
if(row.size() != width)
Expand Down Expand Up @@ -379,8 +378,8 @@ Minimap::RenderViewport(ImDrawList* drawlist, ImVec2 map_pos, ImVec2 map_size)
double start_time = m_data_provider.DataModel().GetTimeline().GetStartTime();
double duration = m_data_provider.DataModel().GetTimeline().GetEndTime() - start_time;

float start_ratio = (view_coords.v_min_x - start_time) / duration;
float end_ratio = (view_coords.v_max_x - start_time) / duration;
float start_ratio = static_cast<float>((view_coords.v_min_x - start_time) / duration);
float end_ratio = static_cast<float>((view_coords.v_max_x - start_time) / duration);
float x_start = map_pos.x + std::clamp(start_ratio, 0.0f, 1.0f) * map_size.x;
float x_end = map_pos.x + std::clamp(end_ratio, 0.0f, 1.0f) * map_size.x;

Expand Down
4 changes: 2 additions & 2 deletions src/view/src/rocprofvis_project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ Project::OpenTrace(std::string& file_path)
{
rocprofvis_controller_object_type_t type =
kRPVControllerObjectTypeControllerSystem;
rocprofvis_result_t result =
rocprofvis_result_t ctrl_result =
rocprofvis_controller_get_object_type(controller, &type);
if(result == kRocProfVisResultSuccess)
if(ctrl_result == kRocProfVisResultSuccess)
{
if(type == kRPVControllerObjectTypeControllerSystem)
{
Expand Down
4 changes: 2 additions & 2 deletions src/view/src/rocprofvis_settings_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ SettingsManager::InitStyling()
colormap.push_back(255 << IM_COL32_A_SHIFT | flame_color);
}
colormap.push_back(IM_COL32(220, 50, 50, 255));
ImPlot::AddColormap("flame", colormap.data(), colormap.size());
ImPlot::AddColormap("flame", colormap.data(), static_cast<int>(colormap.size()));
colormap = { IM_COL32(255, 255, 255, 255), IM_COL32(255, 255, 255, 255) };
ImPlot::AddColormap("white", colormap.data(), colormap.size());
ImPlot::AddColormap("white", colormap.data(), static_cast<int>(colormap.size()));
}

const ImGuiStyle&
Expand Down
1 change: 1 addition & 0 deletions src/view/src/rocprofvis_stickynote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ void
StickyNote::Render(ImDrawList* draw_list, const ImVec2& window_position,
std::shared_ptr<TimePixelTransform> tpt)
{
(void)draw_list;
if(!tpt)
{
spdlog::error(
Expand Down
17 changes: 9 additions & 8 deletions src/view/src/rocprofvis_summary_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ TopKernels::RenderPieChart(const ImVec2 region, const ImPlotStyle& plot_style,
hovered_idx = PlotHoverIdx();
ImPlot::PlotPieChart(
m_kernel_pie.labels.data(), m_kernel_pie.exec_time_pct.data(),
m_kernel_pie.exec_time_pct.size(), 0.0, 0.0, PIE_CHART_RADIUS,
static_cast<int>(m_kernel_pie.exec_time_pct.size()), 0.0, 0.0, PIE_CHART_RADIUS,
[](double value, char* buff, int size, void* user_data) -> int {
(void) user_data;
if(value * 100.0 > 10.0)
Expand Down Expand Up @@ -749,9 +749,9 @@ TopKernels::RenderBarChart(const ImVec2 region, const ImPlotStyle& plot_style,
{
ImPlot::PushColormap("white");
}
ImPlot::SetNextFillStyle(ImPlot::GetColormapColor(i));
ImPlot::SetNextFillStyle(ImPlot::GetColormapColor(static_cast<int>(i)));
ImPlot::PlotBars((*m_kernels)[i].name.c_str(), &(*m_kernels)[i].exec_time_sum,
1, BAR_CHART_THICKNESS, i);
1, BAR_CHART_THICKNESS, static_cast<double>(i));
if(i == m_hovered_idx)
{
ImPlot::PopColormap();
Expand Down Expand Up @@ -873,7 +873,8 @@ TopKernels::RenderLegend(const ImVec2 region, const ImGuiStyle& style,
for(size_t i = 0; i < m_kernels->size(); i++)
{
float text_width = ImGui::CalcTextSize((*m_kernels)[i].name.c_str()).x;
ImGui::PushID(i);
(void)text_width;
ImGui::PushID(static_cast<int>(i));
ImVec2 pos = ImGui::GetCursorPos();
bool row_clicked =
ImGui::Selectable("", m_selected_idx == i,
Expand All @@ -887,7 +888,7 @@ TopKernels::RenderLegend(const ImVec2 region, const ImGuiStyle& style,
ImGui::GetCursorScreenPos() +
ImVec2(icon_width - 2 * IMPLOT_LEGEND_ICON_SHRINK,
icon_width - 2 * IMPLOT_LEGEND_ICON_SHRINK),
ImGui::GetColorU32(ImGui::GetColorU32(ImPlot::GetColormapColor(i)),
ImGui::GetColorU32(ImGui::GetColorU32(ImPlot::GetColormapColor(static_cast<int>(i))),
row_hovered ? 0.75f : 1.0f));
ImGui::BeginDisabled(i == m_padded_idx);
ImGui::SameLine(icon_width);
Expand All @@ -896,7 +897,7 @@ TopKernels::RenderLegend(const ImVec2 region, const ImGuiStyle& style,
ImGui::EndDisabled();
if(row_hovered)
{
hovered_idx = i;
hovered_idx = static_cast<int>(i);
if(row_clicked && m_selection_callback)
{
ToggleSelectKernel(i);
Expand Down Expand Up @@ -934,7 +935,7 @@ TopKernels::PlotHoverIdx() const
angle < m_kernel_pie.slices[i].angle +
m_kernel_pie.slices[i].size_angle)
{
idx = i;
idx = static_cast<int>(i);
break;
}
}
Expand All @@ -949,7 +950,7 @@ TopKernels::PlotHoverIdx() const
mouse_pos.x <= static_cast<double>(i) + PIE_CHART_RADIUS / 2.0 &&
mouse_pos.y >= 0.0 && mouse_pos.y <= (*m_kernels)[i].exec_time_sum)
{
idx = i;
idx = static_cast<int>(i);
break;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/view/src/rocprofvis_timeline_arrow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ TimelineArrow::Render(ImDrawList* draw_list, const ImVec2 window,
level_height = settings.GetEventLevelHeight();
}

float origin_x = tpt->RawTimeToPixel(origin.end_timestamp);
float origin_x = tpt->RawTimeToPixel(static_cast<double>(origin.end_timestamp));
float origin_y = track_position_y.at(origin.track_id) +
std::min(level_height * origin.level + level_height / 2,
origin_track.chart->GetTrackHeight());
Expand All @@ -111,7 +111,7 @@ TimelineArrow::Render(ImDrawList* draw_list, const ImVec2 window,
level_height = settings.GetEventLevelHeight();
}

float target_x = tpt->RawTimeToPixel(target.start_timestamp);
float target_x = tpt->RawTimeToPixel(static_cast<double>(target.start_timestamp));
float target_y = track_position_y.at(target.track_id) +
std::min(level_height * target.level + level_height / 2,
target_track.chart->GetTrackHeight());
Expand Down Expand Up @@ -185,7 +185,7 @@ TimelineArrow::Render(ImDrawList* draw_list, const ImVec2 window,
level_height = settings.GetEventLevelHeight();
}

float from_x = tpt->RawTimeToPixel(from.end_timestamp);
float from_x = tpt->RawTimeToPixel(static_cast<double>(from.end_timestamp));
float from_y = track_position_y.at(from.track_id) +
std::min(level_height * from.level + level_height / 2,
from_track.chart->GetTrackHeight());
Expand All @@ -200,7 +200,7 @@ TimelineArrow::Render(ImDrawList* draw_list, const ImVec2 window,
level_height = settings.GetEventLevelHeight();
}

float to_x = tpt->RawTimeToPixel(to.start_timestamp);
float to_x = tpt->RawTimeToPixel(static_cast<double>(to.start_timestamp));
float to_y = track_position_y.at(to.track_id) +
std::min(level_height * to.level + level_height / 2,
to_track.chart->GetTrackHeight());
Expand Down Expand Up @@ -255,7 +255,7 @@ TimelineArrow::TimelineArrow(DataProvider& data_provider,
std::shared_ptr<TimelineSelection> selection)
: m_data_provider(data_provider)
, m_timeline_selection(selection)
, m_selection_changed_token(-1)
, m_selection_changed_token(EventManager::InvalidSubscriptionToken)
, m_flow_display_mode(FlowDisplayMode::kShowAll)
, m_render_style(RenderStyle::kFan)
{
Expand Down
1 change: 1 addition & 0 deletions src/view/src/rocprofvis_timeline_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ TimelineView::TimelineView(DataProvider& dp,
static_cast<int>(RocEvents::kSetViewRange), set_view_range_handle);

auto font_changed_handler = [this](std::shared_ptr<RocEvent> e) {
(void)e;
m_recalculate_grid_interval = true;
m_ruler_height = ImGui::GetTextLineHeightWithSpacing();
CalculateMaxMetaAreaSize();
Expand Down
1 change: 1 addition & 0 deletions src/view/src/rocprofvis_track_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ Pill::Pill(const std::string& label, bool shown, bool active)
CalculatePillSize();

auto font_changed_handler = [this](std::shared_ptr<RocEvent> e) {
(void)e;
CalculatePillSize();
};
m_font_changed_token = EventManager::GetInstance()->Subscribe(
Expand Down
2 changes: 1 addition & 1 deletion src/view/src/rocprofvis_track_topology.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ TrackTopology::TrackTopology(DataProvider& dp)

//subscribe to time format changed event
auto format_changed_handler = [this](std::shared_ptr<RocEvent> e) {
// Reformat time columns
(void)e;
FormatCells();
};

Expand Down
Loading