You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -54,11 +54,11 @@ The function has the following parameters:
54
54
-**N**: number of indexed elements.
55
55
-**order**: sort order. If `order < 0.0`, the input strided array `x` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `x` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged.
56
56
-**x**: first input [`Float64Array`][@stdlib/array/float64].
57
-
-**strideX**: `x`index increment.
57
+
-**strideX**: `x`stride length.
58
58
-**y**: second input [`Float64Array`][@stdlib/array/float64].
59
-
-**strideY**: `y`index increment.
59
+
-**strideY**: `y`stride length.
60
60
61
-
The `N` and `stride` parameters determine which elements in `x` and `y` are accessed at runtime. For example, to sort every other element
61
+
The `N` and stride parameters determine which elements in `x` and `y` are accessed at runtime. For example, to sort every other element:
#### dsort2hp.ndarray( N, order, x, strideX, offsetX, y, strideY, offsetY )
106
106
107
-
Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array `x`using heapsort and alternative indexing semantics.
107
+
Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort and alternative indexing semantics.
@@ -126,7 +126,7 @@ The function has the following additional parameters:
126
126
-**offsetX**: `x` starting index.
127
127
-**offsetY**: `y` starting index.
128
128
129
-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying `buffer`, the `offset` parameter supports indexing semantics based on a starting index. For example, to access only the last three elements of `x`
129
+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to access only the last three elements:
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
217
+
218
+
<sectionclass="intro">
219
+
220
+
</section>
221
+
222
+
<!-- /.intro -->
223
+
224
+
<!-- C usage documentation. -->
225
+
226
+
<sectionclass="usage">
227
+
228
+
### Usage
229
+
230
+
```c
231
+
#include"stdlib/blas/ext/base/dsort2hp.h"
232
+
```
233
+
234
+
#### stdlib_strided_dsort2hp( N, order, \*X, strideX, \*Y, strideY )
235
+
236
+
Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort.
237
+
238
+
```c
239
+
double x[] = { 1.0, -2.0, 3.0, -4.0 };
240
+
double y[] = { 0.0, 1.0, 2.0, 3.0 };
241
+
242
+
stdlib_strided_dsort2hp( 4, 1, x, 1, y, 1 );
243
+
```
244
+
245
+
The function accepts the following arguments:
246
+
247
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
248
+
- **order**: `[in] CBLAS_INT` sort order. If `order < 0.0`, the input strided array `x` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `x` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged.
249
+
- **X**: `[inout] double*` input array.
250
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
251
+
- **Y**: `[inout] double*` input array.
252
+
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
Simultaneously sorts two double-precision floating-point strided arrays based on the sort order of the first array using heapsort and alternative indexing semantics.
265
+
266
+
```c
267
+
double x[] = { 1.0, -2.0, 3.0, -4.0 };
268
+
double y[] = { 0.0, 1.0, 2.0, 3.0 };
269
+
270
+
stdlib_strided_dsort2hp_ndarray( 4, 1, x, 1, 0, y, 1, 0 );
271
+
```
272
+
273
+
The function accepts the following arguments:
274
+
275
+
- **N**: `[in] CBLAS_INT` number of indexed elements.
276
+
- **order**: `[in] CBLAS_INT` sort order.
277
+
- **X**: `[inout] double*` input array. If `order < 0.0`, the input strided array `x` is sorted in **decreasing** order. If `order > 0.0`, the input strided array `x` is sorted in **increasing** order. If `order == 0.0`, the input strided arrays are left unchanged.
278
+
- **strideX**: `[in] CBLAS_INT` stride length for `X`.
279
+
- **offsetX**: `[in] CBLAS_INT` starting index for `X`.
280
+
- **Y**: `[inout] double*` input array.
281
+
- **strideY**: `[in] CBLAS_INT` stride length for `Y`.
282
+
- **offsetY**: `[in] CBLAS_INT` starting index for `Y`.
0 commit comments