Skip to content

Commit b2e482f

Browse files
committed
Fix function signatures
1 parent e511eff commit b2e482f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,46 @@ includes a test suite which can be built and run to test the sorting algorithms
88
for correctness. It also has benchmarking code to compare its performance
99
relative to std::sort. The following API's are currently supported:
1010

11-
### Quicksort
11+
#### Quicksort
1212

1313
```
14-
avx512_qsort<T>(T* arr, int64_t arrsize)
14+
void avx512_qsort<T>(T* arr, int64_t arrsize)
1515
```
1616
Supported datatypes: `uint16_t, int16_t, _Float16, uint32_t, int32_t, float,
1717
uint64_t, int64_t and double`
1818

19-
### Argsort
19+
#### Argsort
2020

2121
```
22-
std::vector<int64_t> arg = avx512_argsort(T* arr, int64_t arrsize)
23-
void avx512_argsort(T* arr, int64_t *arg, int64_t arrsize)
22+
std::vector<int64_t> arg = avx512_argsort<T>(T* arr, int64_t arrsize)
23+
void avx512_argsort<T>(T* arr, int64_t *arg, int64_t arrsize)
2424
```
2525
Supported datatypes: `uint32_t, int32_t, float, uint64_t, int64_t and double`.
26-
The algorithm resorts to scalar std::sort if the array contains NAN.
26+
The algorithm resorts to scalar `std::sort` if the array contains NAN.
2727

28-
### Quickselect
28+
#### Quickselect
2929

3030
```
31-
avx512_qselect<T>(T* arr, int64_t arrsize)
32-
avx512_qselect<T>(T* arr, int64_t arrsize, bool hasnan)
31+
void avx512_qselect<T>(T* arr, int64_t arrsize)
32+
void avx512_qselect<T>(T* arr, int64_t arrsize, bool hasnan)
3333
```
3434
Supported datatypes: `uint16_t, int16_t, _Float16 ,uint32_t, int32_t, float,
3535
uint64_t, int64_t and double`. Use an additional optional argument `bool
3636
hasnan` if you expect your arrays to contain nan.
3737

38-
### Partialsort
38+
#### Partialsort
3939

4040
```
41-
avx512_partialsort<T>(T* arr, int64_t arrsize)
42-
avx512_partialsort<T>(T* arr, int64_t arrsize, bool hasnan)
41+
void avx512_partialsort<T>(T* arr, int64_t arrsize)
42+
void avx512_partialsort<T>(T* arr, int64_t arrsize, bool hasnan)
4343
```
4444
Supported datatypes: `uint16_t, int16_t, _Float16 ,uint32_t, int32_t, float,
4545
uint64_t, int64_t and double`. Use an additional optional argument `bool
4646
hasnan` if you expect your arrays to contain nan.
4747

48-
### Key-value sort
48+
#### Key-value sort
4949
```
50-
avx512_qsort_kv<T>(T* key, uint64_t* value , int64_t arrsize)
50+
void avx512_qsort_kv<T>(T* key, uint64_t* value , int64_t arrsize)
5151
```
5252
Supported datatypes: `uint64_t, int64_t and double`
5353

@@ -70,7 +70,7 @@ If you expect your array to contain NANs, please be aware that the these
7070
routines **do not preserve your NANs as you pass them**. The quicksort,
7171
quickselect, partialsort and key-value sorting routines will sort NAN's to the
7272
end of the array and replace them with `std::nan("1")`. `avx512_argsort`
73-
routines will also resort to a scalar argsort that uses std::sort to sort array
73+
routines will also resort to a scalar argsort that uses `std::sort` to sort array
7474
that contains NAN.
7575

7676
## Example to include and build this in a C++ code
@@ -81,7 +81,7 @@ that contains NAN.
8181
#include "src/avx512-32bit-qsort.hpp"
8282

8383
int main() {
84-
const int ARRSIZE = 10;
84+
const int ARRSIZE = 1000;
8585
std::vector<float> arr;
8686

8787
/* Initialize elements is reverse order */

0 commit comments

Comments
 (0)