Skip to content

Commit 624f14f

Browse files
authored
Fix compilation warnings (#2517)
This PR resolves compilation warnings: > warning: class template argument deduction for alias templates is a C++20 extension [-Wc++20-extensions] As for now DPNP is building with C++17 standard, and Class Template Argument Deduction is available where only for a class template, but not for a type alias. What support was added in C++20 standard. Since there are currently no plans to move to the C++20 standard, the code has been updated to conform to the C++17 standard.
1 parent 0684c1f commit 624f14f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121
* Updated existing GitHub workflows to add testing with Python 3.13 [#2510](https://github.com/IntelPython/dpnp/pull/2510)
2222
* Aligned the license expression with `PEP-639` [#2511](https://github.com/IntelPython/dpnp/pull/2511)
2323
* Bumped oneMKL version up to `v0.8` [#2514](https://github.com/IntelPython/dpnp/pull/2514)
24+
* Removed the use of class template argument deduction for alias template to conform to the C++17 standard [#2517](https://github.com/IntelPython/dpnp/pull/2517)
2425

2526
### Deprecated
2627

dpnp/backend/extensions/statistics/histogram.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,14 @@ struct HistogramF
139139
auto dispatch_edges = [&](uint32_t local_mem, const auto &weights,
140140
auto &hist) {
141141
if (device.is_gpu() && (local_mem >= bins_count + 1)) {
142-
auto edges = CachedEdges(bins_edges, bins_count + 1, cgh);
142+
auto edges =
143+
CachedEdges<BinsT>(bins_edges, bins_count + 1, cgh);
143144
submit_histogram(in, size, dims, WorkPI, hist, edges,
144145
weights, nd_range, cgh);
145146
}
146147
else {
147-
auto edges = UncachedEdges(bins_edges, bins_count + 1, cgh);
148+
auto edges =
149+
UncachedEdges<BinsT>(bins_edges, bins_count + 1, cgh);
148150
submit_histogram(in, size, dims, WorkPI, hist, edges,
149151
weights, nd_range, cgh);
150152
}
@@ -165,7 +167,8 @@ struct HistogramF
165167
}
166168
else {
167169
auto hist = HistGlobalMemory<HistType>(out);
168-
auto edges = UncachedEdges(bins_edges, bins_count + 1, cgh);
170+
auto edges =
171+
UncachedEdges<BinsT>(bins_edges, bins_count + 1, cgh);
169172
submit_histogram(in, size, dims, WorkPI, hist, edges,
170173
weights, nd_range, cgh);
171174
}

0 commit comments

Comments
 (0)