Skip to content

Commit aaf3d53

Browse files
committed
DPL: get rid of gsl::span.
1 parent 5cdac2f commit aaf3d53

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

Framework/Core/include/Framework/DeviceMetricsInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <array>
1919
#include <cstddef>
2020
#include <cstdint>
21-
#include <gsl/span>
21+
#include <span>
2222
#include <string>
2323
#include <vector>
2424

@@ -217,7 +217,7 @@ struct DeviceMetricsInfoHelpers {
217217
info.changed.clear();
218218
}
219219
}
220-
static size_t metricsStorageSize(gsl::span<DeviceMetricsInfo const> infos)
220+
static size_t metricsStorageSize(std::span<DeviceMetricsInfo const> infos)
221221
{
222222
// Count the size of the metrics storage
223223
size_t totalSize = 0;

Framework/GUISupport/src/FrameworkGUIDebugger.cxx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
#include <algorithm>
3232
#include <iostream>
33-
#include <set>
3433
#include <string>
3534
#include <cinttypes>
3635
#include <numeric>
@@ -210,8 +209,8 @@ enum MetricTypes {
210209
// so that we can display driver and device metrics in the same plot
211210
// without an if.
212211
struct AllMetricsStore {
213-
gsl::span<DeviceMetricsInfo const> metrics[TOTAL_TYPES_OF_METRICS];
214-
gsl::span<TopologyNodeInfo const> specs[TOTAL_TYPES_OF_METRICS];
212+
std::span<DeviceMetricsInfo const> metrics[TOTAL_TYPES_OF_METRICS];
213+
std::span<TopologyNodeInfo const> specs[TOTAL_TYPES_OF_METRICS];
215214
};
216215

217216
void displaySparks(
@@ -376,8 +375,8 @@ void displayDeviceMetrics(const char* label,
376375
ImPlotAxisFlags axisFlags = 0;
377376

378377
for (size_t si = 0; si < TOTAL_TYPES_OF_METRICS; ++si) {
379-
gsl::span<DeviceMetricsInfo const> metricsInfos = metricStore.metrics[si];
380-
gsl::span<TopologyNodeInfo const> specs = metricStore.specs[si];
378+
std::span<DeviceMetricsInfo const> metricsInfos = metricStore.metrics[si];
379+
std::span<TopologyNodeInfo const> specs = metricStore.specs[si];
381380
for (int di = 0; di < metricsInfos.size(); ++di) {
382381
for (size_t mi = 0; mi < metricsInfos[di].metrics.size(); ++mi) {
383382
if (state[gmi].visible == false) {
@@ -1175,10 +1174,10 @@ std::function<void(void)> getGUIDebugger(std::vector<DeviceInfo> const& infos,
11751174

11761175
AllMetricsStore metricsStore;
11771176

1178-
metricsStore.metrics[DEVICE_METRICS] = gsl::span(metricsInfos);
1179-
metricsStore.metrics[DRIVER_METRICS] = gsl::span(&driverInfo.metrics, 1);
1180-
metricsStore.specs[DEVICE_METRICS] = gsl::span(deviceNodesInfos);
1181-
metricsStore.specs[DRIVER_METRICS] = gsl::span(driverNodesInfos);
1177+
metricsStore.metrics[DEVICE_METRICS] = std::span(metricsInfos);
1178+
metricsStore.metrics[DRIVER_METRICS] = std::span(&driverInfo.metrics, 1);
1179+
metricsStore.specs[DEVICE_METRICS] = std::span(deviceNodesInfos);
1180+
metricsStore.specs[DRIVER_METRICS] = std::span(driverNodesInfos);
11821181
displayMetrics(guiState, driverInfo, infos, metadata, controls, metricsStore);
11831182
displayDriverInfo(driverInfo, driverControl);
11841183

0 commit comments

Comments
 (0)