Skip to content

Commit 0f6f57b

Browse files
authored
[SYCL][Doc] Fix typos and formating of SYCLCompat README (#13961)
Reduce line length to 80 characters.
1 parent 8a33df3 commit 0f6f57b

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

sycl/doc/syclcompat/README.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ SYCLcompat provides:
1010

1111
* A high-level API that provides closer semantics to other programming models,
1212
simplifying line by line conversions.
13-
* Alternative submission APIs that encapusulate SYCL-specific "queue" and
13+
* Alternative submission APIs that encapsulate SYCL-specific "queue" and
1414
"event" APIs for easier reference.
15-
* Ability to gradually introduce other SYCL concepts as the user familiarises
15+
* Ability to gradually introduce other SYCL concepts as the user familiarizes
1616
themselves with the core SYCL API.
1717
* Clear distinction between core SYCL API and the compatibility interface via
1818
separate namespaces.
@@ -292,9 +292,10 @@ This `launch` interface allows users to define an internal memory pool, or
292292
scratchpad, that can then be reinterpreted as the datatype required by the user
293293
within the kernel function.
294294
295-
To launch a kernel with a specified sub-group size, overloads similar to above `launch`
296-
functions are present in the `syclcompat::experimental` namespace, which accept SubgroupSize
297-
as a template parameter and can be called as `launch<Function, SubgroupSize>`
295+
To launch a kernel with a specified sub-group size, overloads similar to above
296+
`launch` functions are present in the `syclcompat::experimental` namespace,
297+
which accept SubgroupSize as a template parameter and can be called as
298+
`launch<Function, SubgroupSize>`
298299
299300
```cpp
300301
@@ -840,8 +841,9 @@ The exposed functionalities include creation and destruction of queues, through
840841
`syclcompat::create_queue` and `syclcompat::destroy_queue`, and providing the
841842
ability to wait for submitted kernels using `syclcompat::wait` or
842843
`syclcompat::wait_and_throw`. Any async errors will be output to `stderr` if
843-
`print_on_async_exceptions`, and will have the default behavior otherwise, which calls `std:terminate`. Synchronous exceptions have to be managed
844-
by users independently of what is set in this parameter.
844+
`print_on_async_exceptions`, and will have the default behavior otherwise, which
845+
calls `std:terminate`. Synchronous exceptions have to be managed by users
846+
independently of what is set in this parameter.
845847

846848
Devices are managed through a helper class, `device_ext`. The `device_ext` class
847849
associates a vector of `sycl::queues` with its `sycl::device`. The `device_ext`
@@ -853,16 +855,16 @@ can be queried through `device_ext` as well.
853855
throws a `sycl::exception` if the device does not have the specified list of
854856
`sycl::aspect`.
855857

856-
Users can manage queues through the `syclcompat::set_default_queue(sycl::queue q)`
857-
free function, and the `device_ext` `set_saved_queue`, `set_default_queue`,
858+
Users can manage queues through the `syclcompat::set_default_queue(sycl::queue
859+
q)` free function, and the `device_ext` `set_saved_queue`, `set_default_queue`,
858860
and `get_saved_queue` member functions.
859-
`set_default_queue` is blocking, and
860-
overwrites the previous default queue with a user defined one, waiting for any
861-
submitted kernels to finish.
861+
`set_default_queue` is blocking, and overwrites the previous default queue with
862+
a user defined one, waiting for any submitted kernels to finish.
862863
The `device_ext` automatically sets the saved queue to the default queue.
863864
Therefore, it's important to note that if the previous default queue was the
864865
device's saved queue, setting a new default queue will update the reference of
865-
the saved queue to the new default one to keep the state of the class consistent.
866+
the saved queue to the new default one to keep the state of the class
867+
consistent.
866868

867869
The class is exposed as follows:
868870

@@ -946,7 +948,7 @@ atomic operations is defined as `syclcompat::type_identity_t<T>` to avoid
946948
template deduction issues when an operand of a different type (e.g. double
947949
literal) is supplied. Atomic addition and subtraction free functions make use of
948950
`syclcompat::arith_t<T>` to differentiate between numeric and pointer
949-
arithmetics.
951+
arithmetic.
950952
951953
The available operations are exposed as follows:
952954
@@ -1142,8 +1144,8 @@ low 32-bits back into an integer.
11421144
position of the first least significant set bit in an integer.
11431145
`byte_level_permute` returns a byte-permutation of two input unsigned integers,
11441146
with bytes selected according to a third unsigned integer argument.
1145-
`match_all_over_sub_group` and `match_any_over_sub_group` allows comparison of values
1146-
across work-items within a sub-group.
1147+
`match_all_over_sub_group` and `match_any_over_sub_group` allows comparison of
1148+
values across work-items within a sub-group.
11471149
11481150
The functions `select_from_sub_group`, `shift_sub_group_left`,
11491151
`shift_sub_group_right` and `permute_sub_group_by_xor` provide equivalent
@@ -1153,17 +1155,17 @@ However, they provide an optional argument to represent the `logical_group` size
11531155
(default 32).
11541156
11551157
`int_as_queue_ptr` helps with translation of code by reinterpret casting an
1156-
address to `sycl::queue *`, or returning a pointer to Syclcompat's default queue
1158+
address to `sycl::queue *`, or returning a pointer to SYCLcompat's default queue
11571159
if the address is <= 2.
11581160
`args_selector` is a helper class for extracting arguments from an array of
11591161
pointers to arguments or buffer of arguments to pass to a kernel function.
11601162
The class allows users to exclude parameters such as `sycl::nd_item`.
11611163
Experimental support for masked versions of `select_from_sub_group`,
11621164
`shift_sub_group_left`, `shift_sub_group_right` and `permute_sub_group_by_xor`
1163-
is provided only for SPIRV or cuda devices.
1165+
is provided only for SPIRV or CUDA devices.
11641166
1165-
As part of the compatibility utilities to facilitate machine translation to SYCL,
1166-
two aliases for errors are provided, `err0` and `err1`.
1167+
As part of the compatibility utilities to facilitate machine translation to
1168+
SYCL, two aliases for errors are provided, `err0` and `err1`.
11671169
11681170
```c++
11691171
namespace syclcompat {
@@ -1349,11 +1351,10 @@ kernel names during machine translation.
13491351
SYCL spec supported by the current SYCL compiler.
13501352
13511353
The `SYCLCOMPAT_CHECK_ERROR` macro encapsulates an error-handling mechanism for
1352-
expressions that might throw `sycl::exception` and `std::runtime_error`.
1353-
If no exceptions are thrown, it returns `syclcompat::error_code::SUCCESS`.
1354-
If a `sycl::exception` is caught, it returns `syclcompat::error_code::BACKEND_ERROR`.
1354+
expressions that might throw `sycl::exception` and `std::runtime_error`. If no
1355+
exceptions are thrown, it returns `syclcompat::error_code::SUCCESS`. If a
1356+
`sycl::exception` is caught, it returns `syclcompat::error_code::BACKEND_ERROR`.
13551357
If a `std::runtime_error` exception is caught,
1356-
13571358
`syclcompat::error_code::DEFAULT_ERROR` is returned instead. For both cases, it
13581359
prints the error message to the standard error stream.
13591360
@@ -1407,12 +1408,12 @@ current version, `kernel_function_info` describes only maximum work-group size.
14071408

14081409
SYCLcompat also provides the `kernel_library` and `kernel_function` classes.
14091410
`kernel_library` facilitates the loading and unloading of kernel libraries.
1410-
`kernel_function` represents a specific kernel function within a loaded librariy
1411+
`kernel_function` represents a specific kernel function within a loaded library
14111412
and can be invoked with specified arguments.
1412-
`load_kernel_library`, `load_kernel_library_mem`, and `unload_kernel_library` are
1413-
free functions to handle the loading and unloading of `kernel_library` objects.
1414-
`get_kernel_function`, and `invoke_kernel_function` offer a similar functionality
1415-
for `kernel_function` objects.
1413+
`load_kernel_library`, `load_kernel_library_mem`, and `unload_kernel_library`
1414+
are free functions to handle the loading and unloading of `kernel_library`
1415+
objects. `get_kernel_function`, and `invoke_kernel_function` offer a similar
1416+
functionality for `kernel_function` objects.
14161417

14171418
``` c++
14181419
namespace syclcompat {
@@ -1487,8 +1488,8 @@ as a vector of elements, and returning `0` for vector components for which
14871488
`vectorized_sum_abs_diff` calculates the absolute difference for two values
14881489
without modulo overflow for vector types.
14891490
1490-
The functions `cmul`,`cdiv`,`cabs`, `cmul_add`, and `conj` define complex math operations
1491-
which accept `sycl::vec<T,2>` arguments representing complex values.
1491+
The functions `cmul`,`cdiv`,`cabs`, `cmul_add`, and `conj` define complex math
1492+
operations which accept `sycl::vec<T,2>` arguments representing complex values.
14921493
14931494
```cpp
14941495
inline unsigned int funnelshift_l(unsigned int low, unsigned int high,

0 commit comments

Comments
 (0)