Skip to content

Commit c2d65bd

Browse files
committed
Bump clang-format from 12 to 22 version
1 parent 7b4c3bf commit c2d65bd

55 files changed

Lines changed: 231 additions & 391 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BinPackParameters: false
1616
BraceWrapping:
1717
AfterCaseLabel: true
1818
AfterClass: true
19-
AfterControlStatement: MultiLine
19+
AfterControlStatement: Never
2020
AfterEnum: true
2121
AfterFunction: true
2222
AfterNamespace: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ repos:
8989
- flake8-docstrings==1.7.0
9090
- flake8-bugbear==24.12.12
9191
- repo: https://github.com/pre-commit/mirrors-clang-format
92-
rev: v12.0.1
92+
rev: v22.1.0
9393
hooks:
9494
- id: clang-format
9595
args: ["-i"]

benchmarks/asv.conf.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515

1616
// List of branches to benchmark. If not provided, defaults to "master"
1717
// (for git) or "tip" (for mercurial).
18-
"branches": ["HEAD"],
18+
"branches": [
19+
"HEAD"
20+
],
1921

2022
// The DVCS being used. If not set, it will be automatically
2123
// determined from "repo" by looking at the protocol in the URL
@@ -35,7 +37,9 @@
3537

3638
// The Pythons you'd like to test against. If not provided, defaults
3739
// to the current version of Python used to run `asv`.
38-
"pythons": ["3.7"],
40+
"pythons": [
41+
"3.7"
42+
],
3943

4044
// The matrix of dependencies to test. Each key is the name of a
4145
// package (in PyPI) and the values are version numbers. An empty
@@ -53,7 +57,6 @@
5357
// environments in. If not provided, defaults to "env"
5458
"env_dir": "env",
5559

56-
5760
// The directory (relative to the current directory) that raw benchmark
5861
// results are stored in. If not provided, defaults to "results".
5962
"results_dir": "results",
@@ -79,7 +82,8 @@
7982
// skipped for the matching benchmark.
8083
//
8184
// "regressions_first_commits": {
82-
// "some_benchmark": "352cdf", // Consider regressions only after this commit
85+
// "some_benchmark": "352cdf", // Consider regressions only after this
86+
// commit
8387
// "another_benchmark": null, // Skip regression detection altogether
8488
// }
8589
}

dpnp/backend/extensions/blas/dot_common.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ std::pair<sycl::event, sycl::event>
9797

9898
if (!dpctl::utils::queues_are_compatible(
9999
exec_q,
100-
{vectorX.get_queue(), vectorY.get_queue(), result.get_queue()}))
101-
{
100+
{vectorX.get_queue(), vectorY.get_queue(), result.get_queue()})) {
102101
throw py::value_error(
103102
"USM allocations are not compatible with the execution queue.");
104103
}
@@ -120,8 +119,8 @@ std::pair<sycl::event, sycl::event>
120119
const int vectorY_typenum = vectorY.get_typenum();
121120
const int result_typenum = result.get_typenum();
122121

123-
if (result_typenum != vectorX_typenum || result_typenum != vectorY_typenum)
124-
{
122+
if (result_typenum != vectorX_typenum ||
123+
result_typenum != vectorY_typenum) {
125124
throw py::value_error("Given arrays must be of the same type.");
126125
}
127126

dpnp/backend/extensions/blas/gemm.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,7 @@ std::tuple<sycl::event, sycl::event, bool>
181181

182182
if (!dpctl::utils::queues_are_compatible(
183183
exec_q,
184-
{matrixA.get_queue(), matrixB.get_queue(), resultC.get_queue()}))
185-
{
184+
{matrixA.get_queue(), matrixB.get_queue(), resultC.get_queue()})) {
186185
throw py::value_error(
187186
"USM allocations are not compatible with the execution queue.");
188187
}

dpnp/backend/extensions/blas/gemm_batch.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,7 @@ std::tuple<sycl::event, sycl::event, bool>
237237

238238
if (!dpctl::utils::queues_are_compatible(
239239
exec_q,
240-
{matrixA.get_queue(), matrixB.get_queue(), resultC.get_queue()}))
241-
{
240+
{matrixA.get_queue(), matrixB.get_queue(), resultC.get_queue()})) {
242241
throw py::value_error(
243242
"USM allocations are not compatible with the execution queue.");
244243
}

dpnp/backend/extensions/blas/gemv.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ std::pair<sycl::event, sycl::event>
169169

170170
if (!dpctl::utils::queues_are_compatible(
171171
exec_q,
172-
{matrixA.get_queue(), vectorX.get_queue(), vectorY.get_queue()}))
173-
{
172+
{matrixA.get_queue(), vectorX.get_queue(), vectorY.get_queue()})) {
174173
throw py::value_error(
175174
"USM allocations are not compatible with the execution queue.");
176175
}

dpnp/backend/extensions/blas/syrk.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@ std::pair<sycl::event, sycl::event>
248248
}
249249

250250
if (!dpctl::utils::queues_are_compatible(
251-
exec_q, {matrixA.get_queue(), resultC.get_queue()}))
252-
{
251+
exec_q, {matrixA.get_queue(), resultC.get_queue()})) {
253252
throw py::value_error(
254253
"USM allocations are not compatible with the execution queue.");
255254
}

dpnp/backend/extensions/common/ext/common.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,7 @@ sycl::nd_range<1>
213213
pybind11::dtype dtype_from_typenum(int dst_typenum);
214214

215215
template <typename dispatchT,
216-
template <typename fnT, typename T>
217-
typename factoryT,
216+
template <typename fnT, typename T> typename factoryT,
218217
int _num_types = type_dispatch::num_types>
219218
inline void init_dispatch_vector(dispatchT dispatch_vector[])
220219
{
@@ -223,8 +222,7 @@ inline void init_dispatch_vector(dispatchT dispatch_vector[])
223222
}
224223

225224
template <typename dispatchT,
226-
template <typename fnT, typename D, typename S>
227-
typename factoryT,
225+
template <typename fnT, typename D, typename S> typename factoryT,
228226
int _num_types = type_dispatch::num_types>
229227
inline void init_dispatch_table(dispatchT dispatch_table[][_num_types])
230228
{

dpnp/backend/extensions/common/ext/dispatch_table.hpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ using SupportedDTypeList2 = std::vector<DTypePair>;
9999

100100
template <typename FnT,
101101
typename SupportedTypes,
102-
template <typename>
103-
typename Func>
102+
template <typename> typename Func>
104103
struct TableBuilder
105104
{
106105
template <typename _FnT, typename T>
@@ -125,8 +124,7 @@ struct TableBuilder
125124

126125
template <typename FnT,
127126
typename SupportedTypes,
128-
template <typename, typename>
129-
typename Func>
127+
template <typename, typename> typename Func>
130128
struct TableBuilder2
131129
{
132130
template <typename _FnT, typename T1, typename T2>
@@ -232,8 +230,7 @@ class DispatchTable2
232230
}
233231

234232
template <typename SupportedTypes,
235-
template <typename, typename>
236-
typename Func>
233+
template <typename, typename> typename Func>
237234
void populate_dispatch_table()
238235
{
239236
using TBulder = typename TableBuilder2<FnT, SupportedTypes, Func>::type;

0 commit comments

Comments
 (0)