File tree Expand file tree Collapse file tree 6 files changed +14
-35
lines changed
Expand file tree Collapse file tree 6 files changed +14
-35
lines changed Original file line number Diff line number Diff line change @@ -75,10 +75,8 @@ void testRootGroup() {
7575 struct TestKernel1 {
7676 sycl::buffer<bool > m_dataBuf;
7777 sycl::handler m_h;
78- TestKernel1 (sycl::buffer<bool > dataBuf, sycl::handler h) {
79- m_dataBuf = dataBuf;
80- m_h = h;
81- }
78+ TestKernel1 (sycl::buffer<bool > dataBuf, sycl::handler h)
79+ : m_dataBuf(dataBuf), m_h(h) {}
8280 void operator ()(sycl::nd_item<1 > it) const {
8381 sycl::accessor data{m_dataBuf, m_h};
8482 volatile float X = 1 .0f ;
@@ -131,10 +129,8 @@ void testRootGroupFunctions() {
131129 struct TestKernel2 {
132130 sycl::buffer<bool > m_testResultsBuf;
133131 sycl::handler m_h;
134- TestKernel2 (sycl::buffer<bool > testResultsBuf, sycl::handler h) {
135- m_testResultsBuf = testResultsBuf;
136- m_h = h;
137- }
132+ TestKernel2 (sycl::buffer<bool > testResultsBuf, sycl::handler h)
133+ : m_testResultsBuf(testResultsBuf), m_h(h) {}
138134 void operator ()(sycl::nd_item<1 > it) const {
139135 sycl::accessor testResults{m_testResultsBuf, m_h};
140136 const auto root = it.ext_oneapi_get_root_group ();
Original file line number Diff line number Diff line change @@ -85,11 +85,8 @@ int main() try {
8585 sycl::buffer<int > mDataStorage ;
8686 sycl::handler mCGH ;
8787 KernelFunctor (sycl::buffer<storage_t > DeviceStorage,
88- sycl::buffer<int > DataStorage, sycl::handler CGH) {
89- mDeviceStorage = DeviceStorage;
90- mDataStorage = DataStorage;
91- mCGH = CGH;
92- }
88+ sycl::buffer<int > DataStorage, sycl::handler CGH)
89+ : mDeviceStorage (DeviceStorage), mDataStorage (DataStorage), mCGH (CGH) {}
9390
9491 void operator ()() const {
9592 sycl::accessor StorageAcc (mDeviceStorage , mCGH , sycl::write_only);
Original file line number Diff line number Diff line change @@ -64,11 +64,8 @@ int main() try {
6464 sycl::buffer<int > mDataStorage ;
6565 sycl::handler mCGH ;
6666 KernelFunctor (sycl::buffer<storage_t > DeviceStorage,
67- sycl::buffer<int > DataStorage, sycl::handler CGH) {
68- mDeviceStorage = DeviceStorage;
69- mDataStorage = DataStorage;
70- mCGH = CGH;
71- }
67+ sycl::buffer<int > DataStorage, sycl::handler CGH)
68+ : mDeviceStorage (DeviceStorage), mDataStorage (DataStorage), mCGH (CGH) {}
7269
7370 void operator ()() const {
7471 sycl::accessor StorageAcc (mDeviceStorage , mCGH , sycl::write_only);
Original file line number Diff line number Diff line change @@ -49,12 +49,8 @@ int main() try {
4949 sycl::buffer<int > mDataStorage ;
5050 sycl::handler mCGH ;
5151 KernelFunctor (sycl::buffer<storage_t > DeviceStorage,
52- sycl::buffer<int > DataStorage, sycl::handler CGH) {
53- mDeviceStorage = DeviceStorage;
54- mDataStorage = DataStorage;
55- mCGH = CGH;
56- }
57-
52+ sycl::buffer<int > DataStorage, sycl::handler CGH)
53+ : mDeviceStorage (DeviceStorage), mDataStorage (DataStorage), mCGH (CGH) {}
5854 void operator ()() const {
5955 sycl::accessor StorageAcc (mDeviceStorage , mCGH , sycl::write_only);
6056 sycl::accessor DataAcc (mDataStorage , mCGH , sycl::write_only);
Original file line number Diff line number Diff line change @@ -77,12 +77,8 @@ int main() try {
7777 sycl::buffer<int > mDataStorage ;
7878 sycl::handler mCGH ;
7979 KernelFunctor (sycl::buffer<storage_t > DeviceStorage,
80- sycl::buffer<int > DataStorage, sycl::handler CGH) {
81- mDeviceStorage = DeviceStorage;
82- mDataStorage = DataStorage;
83- mCGH = CGH;
84- }
85-
80+ sycl::buffer<int > DataStorage, sycl::handler CGH)
81+ : mDeviceStorage (DeviceStorage), mDataStorage (DataStorage), mCGH (CGH) {}
8682 void operator ()() const {
8783 sycl::accessor StorageAcc (mDeviceStorage , mCGH , sycl::read_write);
8884 sycl::accessor DataAcc (mDataStorage , mCGH , sycl::write_only);
Original file line number Diff line number Diff line change @@ -54,11 +54,8 @@ int main() try {
5454 sycl::buffer<int > mDataStorage ;
5555 sycl::handler mCGH ;
5656 KernelFunctor (T DeviceStorage, sycl::buffer<float > DataStorage,
57- sycl::handler CGH) {
58- mDeviceStorage = DeviceStorage;
59- mDataStorage = DataStorage;
60- mCGH = CGH;
61- }
57+ sycl::handler CGH)
58+ : mDeviceStorage (DeviceStorage), mDataStorage (DataStorage), mCGH (CGH) {}
6259
6360 void operator ()() const {
6461 sycl::accessor DataAcc (mDataStorage , mCGH , sycl::read_write);
You can’t perform that action at this time.
0 commit comments