Skip to content

Commit 0c990f9

Browse files
committed
fixed formatting
1 parent 1297895 commit 0c990f9

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

sycl/test-e2e/VirtualMem/basic_access_from_kernel_virtual_mem.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ int main() {
3434
{
3535
sycl::buffer<int> CheckBuffer(ResultHostData);
3636
Q.submit([&](sycl::handler &Handle) {
37-
sycl::accessor A(CheckBuffer, Handle, sycl::write_only);
38-
Handle.parallel_for(NumItems, [=](sycl::id<1> Idx) { A[Idx] = DataPtr[Idx]; });
37+
sycl::accessor A(CheckBuffer, Handle, sycl::write_only);
38+
Handle.parallel_for(NumItems,
39+
[=](sycl::id<1> Idx) { A[Idx] = DataPtr[Idx]; });
3940
});
4041
}
4142

@@ -46,20 +47,21 @@ int main() {
4647
++Failed;
4748
}
4849
}
49-
50+
5051
Q.parallel_for(NumItems, [=](sycl::id<1> Idx) {
51-
DataPtr[Idx] = Idx;
52-
}).wait_and_throw();
53-
52+
DataPtr[Idx] = Idx;
53+
}).wait_and_throw();
54+
5455
syclext::set_access_mode(DataPtr,UsedGranularityInBytes, syclext::address_access_mode::read, Context);
5556

5657

5758
{
5859
sycl::buffer<int> ResultBuffer(ResultHostData);
59-
60+
6061
Q.submit([&](sycl::handler &Handle) {
61-
sycl::accessor A(ResultBuffer, Handle, sycl::write_only);
62-
Handle.parallel_for(NumItems, [=](sycl::id<1> Idx) { A[Idx] = DataPtr[Idx]; });
62+
sycl::accessor A(ResultBuffer, Handle, sycl::write_only);
63+
Handle.parallel_for(NumItems,
64+
[=](sycl::id<1> Idx) { A[Idx] = DataPtr[Idx]; });
6365
});
6466
}
6567

@@ -76,4 +78,4 @@ int main() {
7678
syclext::free_virtual_mem(VirtualMemoryPtr, UsedGranularityInBytes, Context);
7779

7880
return Failed;
79-
}
81+
}

0 commit comments

Comments
 (0)