Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 4dd16ed

Browse files
committed
fix clang-format issue
1 parent 6fd3429 commit 4dd16ed

10 files changed

+33
-37
lines changed

SYCL/Basic/buffer/buffer_aspect-fp64.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ template <class T, int D> void check_set_write_back() {
4545
Queue.submit([&](sycl::handler &cgh) {
4646
auto Accessor =
4747
buf_shrd.template get_access<sycl::access::mode::write>(cgh);
48-
cgh.parallel_for<class fill_buffer_for_write_back<T>>(r, [=](sycl::id<1> WIid) {
49-
Accessor[WIid] = write_back_result<T>;
50-
});
48+
cgh.parallel_for<class fill_buffer_for_write_back<T>>(
49+
r, [=](sycl::id<1> WIid) { Accessor[WIid] = write_back_result<T>; });
5150
});
5251
} // Data is copied back
5352
for (size_t i = 0; i < size; i++) {

SYCL/ESIMD/api/bin_and_cmp_ops_heavy_aspect-fp64.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//==--------------- bin_un_cmp_ops_heavy_aspect-fp64.cpp - DPC++ ESIMD
2-
//on-device test -==//
2+
// on-device test -==//
33
//
44
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
55
// See https://llvm.org/LICENSE.txt for license information.

SYCL/ESIMD/api/saturation_smoke_aspect-fp64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//==---- saturation_smoke_aspect-fp64.cpp - DPC++ ESIMD on-device test -----==//
1+
//==---- saturation_smoke_aspect-fp64.cpp - DPC++ ESIMD on-device test
2+
//-----==//
23
//
34
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45
// See https://llvm.org/LICENSE.txt for license information.

SYCL/ESIMD/ext_math.hpp

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,11 @@ enum class MathOp {
8686

8787
// --- Template functions calculating given math operation on host and device
8888

89-
enum ArgKind {
90-
AllVec,
91-
AllSca,
92-
Sca1Vec2,
93-
Sca2Vec1
94-
};
89+
enum ArgKind { AllVec, AllSca, Sca1Vec2, Sca2Vec1 };
9590

96-
template <class T, int N, MathOp Op, int Args=AllVec> struct ESIMDf;
97-
template <class T, int N, MathOp Op, int Args=AllVec> struct BinESIMDf;
98-
template <class T, int N, MathOp Op, int Args=AllVec> struct SYCLf;
91+
template <class T, int N, MathOp Op, int Args = AllVec> struct ESIMDf;
92+
template <class T, int N, MathOp Op, int Args = AllVec> struct BinESIMDf;
93+
template <class T, int N, MathOp Op, int Args = AllVec> struct SYCLf;
9994

10095
template <class T, MathOp Op> struct HostFunc;
10196

@@ -288,8 +283,8 @@ struct BinaryDeviceFunc {
288283
template <class T, int N, MathOp Op,
289284
template <class, int, MathOp, int> class Kernel,
290285
typename InitF = InitNarrow<T>>
291-
bool test(queue &Q, const std::string &Name,
292-
InitF Init = InitNarrow<T>{}, float delta = 0.0f) {
286+
bool test(queue &Q, const std::string &Name, InitF Init = InitNarrow<T>{},
287+
float delta = 0.0f) {
293288

294289
constexpr size_t Size = 1024 * 128;
295290
constexpr bool IsBinOp = (Op == MathOp::div_ieee) || (Op == MathOp::pow);
@@ -303,9 +298,9 @@ bool test(queue &Q, const std::string &Name,
303298
Init(A, B, Size);
304299
}
305300
const char *kind =
306-
std::is_same_v<Kernel<T, N, Op, AllVec>, ESIMDf<T, N, Op, AllVec>>
307-
? "ESIMD"
308-
: "SYCL";
301+
std::is_same_v<Kernel<T, N, Op, AllVec>, ESIMDf<T, N, Op, AllVec>>
302+
? "ESIMD"
303+
: "SYCL";
309304
std::cout << " " << Name << " test, kind=" << kind << "...\n";
310305

311306
try {
@@ -324,12 +319,11 @@ bool test(queue &Q, const std::string &Name,
324319
auto PC = BufC.template get_access<access::mode::write>(CGH);
325320
if constexpr (IsBinOp) {
326321
auto PB = BufB.template get_access<access::mode::read>(CGH);
327-
BinaryDeviceFunc<T, N, Op, Kernel, decltype(PA), decltype(PC)> F(
328-
PA, PB, PC);
322+
BinaryDeviceFunc<T, N, Op, Kernel, decltype(PA), decltype(PC)> F(PA, PB,
323+
PC);
329324
CGH.parallel_for(nd_range<1>{GlobalRange, LocalRange}, F);
330325
} else {
331-
UnaryDeviceFunc<T, N, Op, Kernel, decltype(PA), decltype(PC)> F(PA,
332-
PC);
326+
UnaryDeviceFunc<T, N, Op, Kernel, decltype(PA), decltype(PC)> F(PA, PC);
333327
CGH.parallel_for(nd_range<1>{GlobalRange, LocalRange}, F);
334328
}
335329
});
@@ -418,10 +412,9 @@ template <class T, int N> bool testESIMDDivIEEE(queue &Q) {
418412

419413
template <class T, int N> bool testESIMDPow(queue &Q) {
420414
bool Pass = true;
421-
std::cout << "--- TESTING ESIMD pow, T=" << typeid(T).name()
422-
<< ", N = " << N << "...\n";
423-
Pass &= test<T, N, MathOp::pow, BinESIMDf>(
424-
Q, "pow", InitBin<T>{}, 0.1);
415+
std::cout << "--- TESTING ESIMD pow, T=" << typeid(T).name() << ", N = " << N
416+
<< "...\n";
417+
Pass &= test<T, N, MathOp::pow, BinESIMDf>(Q, "pow", InitBin<T>{}, 0.1);
425418
return Pass;
426419
}
427420

SYCL/ESIMD/regression/dgetrf_8x8.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,9 @@ static float fp_norm1(int64_t m, int64_t n, float *a, int64_t lda) {
209209
}
210210

211211
static int dgetrfnp_batch_strided_check(int64_t m, int64_t n, float *a_in,
212-
float *a, int64_t lda,
213-
int64_t stride_a, int64_t *ipiv,
214-
int64_t stride_ipiv, int64_t batch,
215-
int64_t *info) {
212+
float *a, int64_t lda, int64_t stride_a,
213+
int64_t *ipiv, int64_t stride_ipiv,
214+
int64_t batch, int64_t *info) {
216215
float thresh = 30.0;
217216
int fail = 0;
218217
int64_t i, j, k, l;

SYCL/SubGroup/generic-shuffle_aspect-fp64.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out
55
// RUN: %ACC_RUN_PLACEHOLDER %t.out
66
//
7-
//==-- generic_shuffle_aspect-fp64.cpp - SYCL sub_group generic shuffle test *- C++ -*--==//
7+
//==-- generic_shuffle_aspect-fp64.cpp - SYCL sub_group generic shuffle test *-
8+
//C++ -*--==//
89
//
910
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
1011
// See https://llvm.org/LICENSE.txt for license information.
@@ -18,7 +19,8 @@ using namespace sycl;
1819

1920
int main() {
2021
queue Queue;
21-
if (Queue.get_device().is_host() or !Queue.get_device().has(sycl::aspect::fp64)) {
22+
if (Queue.get_device().is_host() or
23+
!Queue.get_device().has(sycl::aspect::fp64)) {
2224
std::cout << "Skipping test\n";
2325
return 0;
2426
}

SYCL/SubGroup/load_store_aspect-fp64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ using namespace sycl;
2222

2323
int main() {
2424
queue Queue;
25-
if (Queue.get_device().is_host() or !Queue.get_device().has(sycl::aspect::fp64)) {
25+
if (Queue.get_device().is_host() or
26+
!Queue.get_device().has(sycl::aspect::fp64)) {
2627
std::cout << "Skipping test\n";
2728
return 0;
2829
}

SYCL/USM/copy_aspect-fp64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//==---- copy_aspect-fp64.cp - USM copy test ------------------------------------------==//
1+
//==---- copy_aspect-fp64.cp - USM copy test
2+
//------------------------------------------==//
23
//
34
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45
// See https://llvm.org/LICENSE.txt for license information.

SYCL/USM/fill.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ bool operator==(const test_struct &lhs, const test_struct &rhs) {
3030
lhs.e == rhs.e && lhs.f == rhs.f;
3131
}
3232

33-
3433
int main() {
3534
queue q;
3635
auto dev = q.get_device();

SYCL/USM/fill_aspect-fp64.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
//==---- fill_aspect-fp64.cpp - USM fill test for double type ---------------==//
1+
//==---- fill_aspect-fp64.cpp - USM fill test for double type
2+
//---------------==//
23
//
34
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
45
// See https://llvm.org/LICENSE.txt for license information.

0 commit comments

Comments
 (0)