Skip to content

Commit ee172c6

Browse files
committed
Improve spelling
1 parent b8ffbd1 commit ee172c6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
sorting_network_cpp offers templated implementations of various types of [sorting networks](https://en.wikipedia.org/wiki/Sorting_network) which can drastically improve performance for small problem sizes of simple data compared to regular sorting algorithms (e.g. `std::sort`).
44

5-
Following listing shows the execution time for different algorithms to sort one million arrays of each 32 random `float` values on an AMD Ryzen 7 2700x @3.70 GHz (compiled with clang 12.0.0 `-O3`):
5+
The following listing shows the execution time for different algorithms to sort one million arrays of each 32 random `float` values on an AMD Ryzen 7 2700x @3.70 GHz (compiled with clang 12.0.0 `-O3`):
66

77
| algorithm | time (ms) | speedup vs `std::sort` |
88
|-----------------------------|:---------:|:----------------------:|
@@ -19,7 +19,7 @@ An interactive overview of performance measurements for the sorting networks on
1919

2020
A single class `sorting_network` is available which encapsulates the implementation of the different sorting networks.
2121

22-
Following listing gives a few examples:
22+
The following listing gives a few examples:
2323

2424
```cpp
2525
#include <sorting_network_cpp/sorting_network.h>
@@ -53,7 +53,7 @@ void example()
5353
{
5454
int data[N];
5555

56-
// by default std::less<T> is used as comparator, custom comparators
56+
// by default, std::less<T> is used as the comparator; custom comparators
5757
// may be passed as follows:
5858

5959
// custom comparators
@@ -80,14 +80,14 @@ Available network types ATM are:
8080
* `bitonic_merge_sort`
8181
* `size_optimized_sort`
8282

83-
Following example shows how to specify a different `type` than the default one:
83+
The following example shows how to specify a different `type` than the default one:
8484

8585
```cpp
8686
quxflux::sorting_net::sorting_network<N, quxflux::sorting_net::type::bitonic_merge_sort>()(std::begin(data_to_be_sorted));
8787
```
8888
## Using custom compare and swap implementations
8989

90-
The compare and swap operation is the fundamental element a sorting network is composed of. The default implementation works well on scalar types, but if you want to specify a custom implementation (e.g. when hardware intrinsics should be used) you may do this by providing a compare and swap functor to the `sorting_network::operator()` as in following example:
90+
The compare and swap operation is the fundamental element a sorting network is composed of. The default implementation works well on scalar types. However, if you want to specify a custom implementation (e.g., when hardware intrinsics should be used), you may do this by providing a compare and swap functor to the `sorting_network::operator()` as in the following example:
9191

9292
```cpp
9393
#include <sorting_network_cpp/sorting_network.h>
@@ -105,17 +105,17 @@ void example(std::array<float,3>& arr)
105105
```
106106
107107
## Single header implementation
108-
A single header implementation is available which allows experimenting with the sorting networks on [godbolt](https://godbolt.org/z/69WMqMY3c).
108+
A single header implementation is available which allows experimenting with the sorting networks on [****godbolt](https://godbolt.org/z/69WMqMY3c).
109109
110110
## Requirements
111111
A compiler with C++17 support
112112
113113
## Dependencies
114-
For the bare sorting functionality no dependencies are required. If you want to run the tests, the needed dependencies will be installed via conan.
114+
For the bare sorting functionality, no dependencies are required. If you want to run the tests, the required dependencies will automatically be fetched via [CPM](https://github.com/cpm-cmake/CPM.cmake).
115115
116116
## Limitations
117117
* Depending on the implementation of the comparator the performance advantage of a sorting net compared to a regular sorting algorithm (e.g. `std::sort`) may diminish or even result in worse performance. This can be seen in the [interactive benchmark results overview](https://raw.githack.com/quxflux/sorting_network_cpp/master/doc/data_explorer.htm) for the data type `Vec2i Z-order` which causes in most cases all variants of sorting networks being outperformed by `std::sort` (see [src/benchmark.cpp](src/benchmark.cpp) for the implementation of the aforementioned data type).
118-
* msvc will fail compiling larger `insertion_sort` networks in certain (unknown) configurations with `fatal error C1202: recursive type or function dependency context too complex`
118+
* msvc will fail to compile larger `insertion_sort` networks in certain (unknown) configurations with `fatal error C1202: recursive type or function dependency context too complex`
119119
120120
## Development notes
121121
* A pre-push [githook](https://git-scm.com/docs/githooks) is available in [.githooks](./.githooks/) which will automatically create the single header implementation.

0 commit comments

Comments
 (0)