Skip to content

Commit 2bc4535

Browse files
author
Alexander Batashev
committed
React to comments
Signed-off-by: Alexander Batashev <alexander.batashev@intel.com>
1 parent 6ce877d commit 2bc4535

File tree

8 files changed

+20
-23
lines changed

8 files changed

+20
-23
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ See [LICENSE.txt](sycl/LICENSE.TXT) for details.
1818
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1919

2020
## Sub-projects Documentation
21-
- oneAPI Data Parallel C++ compiler - See
22-
- [DPC++ Documentation](https://intel.github.io/llvm-docs/)
21+
- oneAPI Data Parallel C++ compiler - See [DPC++ Documentation](https://intel.github.io/llvm-docs/)
2322

2423
## DPC++ extensions
2524

sycl/include/CL/sycl/device_selector.hpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,7 @@ class __SYCL_EXPORT device_selector {
3333
virtual int operator()(const device &device) const = 0;
3434
};
3535

36-
/// The default selector chooses the first available SYCL device. Devices of
37-
/// different kinds are prioritized in the following order:
38-
/// 1. GPU
39-
/// 2. Accelerator
40-
/// 3. CPU
41-
/// 4. Host
36+
/// The default selector chooses the first available SYCL device.
4237
///
4338
/// \sa device
4439
///

sycl/include/CL/sycl/event.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace detail {
2424
class event_impl;
2525
}
2626

27-
/// An event objects an be used to synchronize memory transfers, enqueues of
27+
/// An event object can be used to synchronize memory transfers, enqueues of
2828
/// kernels and signaling barriers.
2929
///
3030
/// \ingroup sycl_api

sycl/include/CL/sycl/id.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ namespace sycl {
1818
template <int dimensions> class range;
1919
template <int dimensions, bool with_offset> class item;
2020

21-
/// A vector of dimensions that is used to represent an id into a global or
22-
/// local range.
21+
/// A unique identifier of an item in an index space.
2322
///
2423
/// \ingroup sycl_api
2524
template <int dimensions = 1> class id : public detail::array<dimensions> {
@@ -38,7 +37,7 @@ template <int dimensions = 1> class id : public detail::array<dimensions> {
3837
class __private_class;
3938

4039
template <typename N, typename T>
41-
using EnableIfIntegral = detail::enable_if_t<std::is_integral<N>::value, T>;
40+
using EnableIfIntegral = detail::enable_if_t<std::is_integral<N>::value, T>;
4241
template <bool B, typename T>
4342
using EnableIfT = detail::conditional_t<B, T, __private_class>;
4443
#endif // __SYCL_DISABLE_ID_TO_INT_CONV__
@@ -117,14 +116,14 @@ template <int dimensions = 1> class id : public detail::array<dimensions> {
117116
* will be "id op size_t"*/
118117
#define __SYCL_GEN_OPT(op) \
119118
template <typename T> \
120-
EnableIfIntegral <T, bool> operator op(const T &rhs) const { \
119+
EnableIfIntegral<T, bool> operator op(const T &rhs) const { \
121120
if (this->common_array[0] != rhs) \
122121
return false op true; \
123122
return true op true; \
124123
} \
125124
template <typename T> \
126-
friend EnableIfIntegral <T, bool> operator op(const T &lhs, \
127-
const id<dimensions> &rhs) { \
125+
friend EnableIfIntegral<T, bool> operator op(const T &lhs, \
126+
const id<dimensions> &rhs) { \
128127
if (lhs != rhs.common_array[0]) \
129128
return false op true; \
130129
return true op true; \
@@ -152,15 +151,15 @@ template <int dimensions = 1> class id : public detail::array<dimensions> {
152151
#define __SYCL_GEN_OPT(op) \
153152
__SYCL_GEN_OPT_BASE(op) \
154153
template <typename T> \
155-
EnableIfIntegral <T, id<dimensions>> operator op(const T &rhs) const { \
154+
EnableIfIntegral<T, id<dimensions>> operator op(const T &rhs) const { \
156155
id<dimensions> result; \
157156
for (int i = 0; i < dimensions; ++i) { \
158157
result.common_array[i] = this->common_array[i] op rhs; \
159158
} \
160159
return result; \
161160
} \
162161
template <typename T> \
163-
friend EnableIfIntegral <T, id<dimensions>> operator op( \
162+
friend EnableIfIntegral<T, id<dimensions>> operator op( \
164163
const T &lhs, const id<dimensions> &rhs) { \
165164
id<dimensions> result; \
166165
for (int i = 0; i < dimensions; ++i) { \

sycl/include/CL/sycl/ordered_queue.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class queue_impl;
3333
///
3434
/// \deprecated Replaced by in_order queue property.
3535
/// \sa queue
36-
///
37-
/// \ingroup sycl_api
3836
class __SYCL_EXPORT_DEPRECATED("Replaced by in_order queue property")
3937
ordered_queue {
4038
public:

sycl/include/CL/sycl/queue.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace detail {
3232
class queue_impl;
3333
}
3434

35-
/// Encapsulates a single SYCL queue which shcedules kernels on a SYCL device.
35+
/// Encapsulates a single SYCL queue which schedules kernels on a SYCL device.
3636
///
3737
/// A SYCL queue can be used to submit command groups to be executed by the SYCL
3838
/// runtime.
@@ -311,7 +311,7 @@ class __SYCL_EXPORT queue {
311311
///
312312
/// \param Ptr is a USM pointer to the memory to be prefetched to the device.
313313
/// \param Count is a number of bytes to be prefetched.
314-
event prefetch(const void* Ptr, size_t Count) {
314+
event prefetch(const void *Ptr, size_t Count) {
315315
return submit([=](handler &CGH) { CGH.prefetch(Ptr, Count); });
316316
}
317317

sycl/include/CL/sycl/types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Applied default alignment.")
342342
#define SYCL_ALIGNAS(N) alignas(N)
343343
#endif
344344

345-
/// Provides a cross-patform SIMD vector class tempate that works efficiently on
345+
/// Provides a cross-patform vector class template that works efficiently on
346346
/// SYCL devices as well as in host C++ code.
347347
///
348348
/// \ingroup sycl_api

sycl/source/device_selector.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ device device_selector::select_device() const {
3232
PI_DEVICE_NOT_FOUND);
3333
}
3434

35+
/// Devices of different kinds are prioritized in the following order:
36+
/// 1. GPU
37+
/// 2. Accelerator
38+
/// 3. CPU
39+
/// 4. Host
3540
int default_selector::operator()(const device &dev) const {
3641

3742
// Take note of the SYCL_BE environment variable when doing default selection
@@ -42,7 +47,8 @@ int default_selector::operator()(const device &dev) const {
4247
// information than the driver_version of the device.
4348
const platform platform = dev.get_info<info::device::platform>();
4449
const std::string platformVersion =
45-
platform.get_info<info::platform::version>();;
50+
platform.get_info<info::platform::version>();
51+
;
4652
// If using PI_CUDA, don't accept a non-CUDA device
4753
if (platformVersion.find("CUDA") == std::string::npos &&
4854
backend == "PI_CUDA") {

0 commit comments

Comments
 (0)