Skip to content

Commit b803bdb

Browse files
author
iburylov
committed
fix guidelines comments
Signed-off-by: iburylov <[email protected]>
1 parent 608b3c2 commit b803bdb

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

sycl/include/CL/sycl/detail/accessor_impl.hpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,22 +195,26 @@ constexpr access::mode deduceAccessMode() {
195195
std::is_same<MayBeTag2,
196196
mode_tag_t<access::mode::read>>::value) {
197197
return access::mode::read;
198-
} else if constexpr (std::is_same<MayBeTag1,
199-
mode_tag_t<access::mode::write>>::value ||
200-
std::is_same<MayBeTag2,
201-
mode_tag_t<access::mode::write>>::value) {
198+
}
199+
200+
if constexpr (std::is_same<MayBeTag1,
201+
mode_tag_t<access::mode::write>>::value ||
202+
std::is_same<MayBeTag2,
203+
mode_tag_t<access::mode::write>>::value) {
202204
return access::mode::write;
203-
} else if constexpr (
205+
}
206+
207+
if constexpr (
204208
std::is_same<MayBeTag1,
205209
mode_target_tag_t<access::mode::read,
206210
access::target::constant_buffer>>::value ||
207211
std::is_same<MayBeTag2,
208212
mode_target_tag_t<access::mode::read,
209213
access::target::constant_buffer>>::value) {
210214
return access::mode::read;
211-
} else {
212-
return access::mode::read_write;
213215
}
216+
217+
return access::mode::read_write;
214218
}
215219

216220
template <typename MayBeTag1, typename MayBeTag2>
@@ -223,9 +227,9 @@ constexpr access::target deduceAccessTarget(access::target defaultTarget) {
223227
mode_target_tag_t<access::mode::read,
224228
access::target::constant_buffer>>::value) {
225229
return access::target::constant_buffer;
226-
} else {
227-
return defaultTarget;
228230
}
231+
232+
return defaultTarget;
229233
}
230234

231235
#endif

sycl/test/basic_tests/accessor/Inputs/device_accessor.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
#include <CL/sycl.hpp>
99
#include <cassert>
1010

11-
namespace sycl {
12-
using namespace cl::sycl;
13-
}
14-
1511
int main() {
1612
// Non-placeholder accessors.
1713
{

sycl/test/basic_tests/accessor/Inputs/host_accessor.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
#include <CL/sycl.hpp>
99
#include <cassert>
1010

11-
namespace sycl {
12-
using namespace cl::sycl;
13-
}
14-
1511
int main() {
1612
{
1713
int data[3] = {3, 7, 9};

sycl/test/basic_tests/accessor/accessor.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
#include <CL/sycl.hpp>
1515
#include <cassert>
1616

17-
namespace sycl {
18-
using namespace cl::sycl;
19-
}
20-
2117
struct IdxID1 {
2218
int x;
2319

0 commit comments

Comments
 (0)