Skip to content

Commit d27268a

Browse files
committed
reformat clang-format
Signed-off-by: Byoungro So <[email protected]>
1 parent 016c9f5 commit d27268a

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

sycl/test/regression/usm_malloc_shared.cpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,48 @@
33
// RUN: env SYCL_DEVICE_TYPE=GPU %t.out
44
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
55

6-
7-
//==-------------- usm_free.cpp - SYCL USM free malloc_shared and free test -------------==//
6+
//==-------------- usm_free.cpp - SYCL USM free malloc_shared and free test
7+
//-------------==//
88
//
9-
// This test checks if users will successfully allocate 160, 0, and -16 bytes of shared
10-
// memory, and also test user can call free() without worrying about nullptr or invalid
11-
// memory descriptor returned from malloc.
9+
// This test checks if users will successfully allocate 160, 0, and -16 bytes of
10+
// shared memory, and also test user can call free() without worrying about
11+
// nullptr or invalid memory descriptor returned from malloc.
1212
//==-------------------------------------------------------------------------------------==//
1313

1414
#include <CL/sycl.hpp>
1515
#include <iostream>
1616
#include <stdlib.h>
1717
using namespace cl::sycl;
1818

19-
int main(int argc, char * argv[]) {
19+
int main(int argc, char *argv[]) {
2020
auto exception_handler = [](cl::sycl::exception_list exceptions) {
2121
for (std::exception_ptr const &e : exceptions) {
2222
try {
23-
std::rethrow_exception(e);
24-
}
25-
catch (cl::sycl::exception const &e) {
26-
std::cout << "Caught asynchronous SYCL "
27-
"exception:\n"
28-
<< e.what() << std::endl;
23+
std::rethrow_exception(e);
24+
} catch (cl::sycl::exception const &e) {
25+
std::cout << "Caught asynchronous SYCL "
26+
"exception:\n"
27+
<< e.what() << std::endl;
2928
}
3029
}
3130
};
3231

3332
queue myQueue(default_selector{}, exception_handler);
3433
std::cout << "Device: " << myQueue.get_device().get_info<info::device::name>()
35-
<< std::endl;
36-
34+
<< std::endl;
35+
3736
double *ia = (double *)malloc_shared(160, myQueue);
3837
double *ja = (double *)malloc_shared(0, myQueue);
3938
double *result = (double *)malloc_shared(-16, myQueue);
4039

41-
std::cout << "ia : " << ia << " ja: " << ja << " result : " << result << std::endl;
40+
std::cout << "ia : " << ia << " ja: " << ja << " result : " << result
41+
<< std::endl;
4242

4343
// followings should not throws CL_INVALID_VALUE
44-
free(ia, myQueue);
45-
free(nullptr);
46-
free(ja, myQueue);
47-
free(result, myQueue);
44+
cl::sycl::free(ia, myQueue);
45+
cl::sycl::free(nullptr, myQueue);
46+
cl::sycl::free(ja, myQueue);
47+
cl::sycl::free(result, myQueue);
4848

4949
return 0;
5050
}

0 commit comments

Comments
 (0)