Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySachkov committed Apr 22, 2024
1 parent 9dcded4 commit 4c69c0b
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions tests/extension/oneapi_composite_device/more_complex_test_cases.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,12 @@ TEST_CASE("Interoperability between composite and component devices",
[=](sycl::id<1> it) { acc[it] = ptrA[it] + ptrB[it]; });
});

component_queue
.submit([&](sycl::handler& cgh) {
sycl::accessor acc(bufC, cgh, sycl::read_write);
component_queue.submit([&](sycl::handler& cgh) {
sycl::accessor acc(bufC, cgh, sycl::read_write);

cgh.parallel_for(sycl::range{count}, [=](sycl::id<1> it) {
acc[it] += ptrA[it] + ptrB[it];
});
});
cgh.parallel_for(sycl::range{count},
[=](sycl::id<1> it) { acc[it] += ptrA[it] + ptrB[it]; });
});

auto hostAcc = bufC.get_host_access();
INFO("Verifying kernel (2 x vector add) results");
Expand Down Expand Up @@ -208,15 +206,13 @@ TEST_CASE("Sharing memory to a descendent device",
[=](sycl::id<1> it) { acc[it] = ptrA[it] + ptrB[it]; });
});

component_queue
.submit([&](sycl::handler& cgh) {
cgh.depends_on({eventA, eventB});
sycl::accessor acc(bufC, cgh, sycl::read_write);
component_queue.submit([&](sycl::handler& cgh) {
cgh.depends_on({eventA, eventB});
sycl::accessor acc(bufC, cgh, sycl::read_write);

cgh.parallel_for(sycl::range{count}, [=](sycl::id<1> it) {
acc[it] += ptrA[it] + ptrB[it];
});
});
cgh.parallel_for(sycl::range{count},
[=](sycl::id<1> it) { acc[it] += ptrA[it] + ptrB[it]; });
});

auto hostAcc = bufC.get_host_access();
INFO("Verifying kernel (2 x vector add) results");
Expand Down

0 comments on commit 4c69c0b

Please sign in to comment.