Skip to content

Commit db0dbc8

Browse files
committed
Update specs
1 parent 35b20e4 commit db0dbc8

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

doc/specs/stdlib_sorting.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ module's `string_type` type.
2424

2525
## Overview of the module
2626

27-
The module `stdlib_sorting` defines several public entities, one
28-
default integer parameter, `int_index`, and four overloaded
27+
The module `stdlib_sorting` defines several public entities, two
28+
default integer parameters, `int_index` and `int_index_low`, and four overloaded
2929
subroutines: `ORD_SORT`, `SORT`, `RADIX_SORT` and `SORT_INDEX`. The
3030
overloaded subroutines also each have several specific names for
3131
versions corresponding to different types of array arguments.
3232

33-
### The `int_index` parameter
33+
### The parameters `int_index` and `int_index_low`
3434

35-
The `int_index` parameter is used to specify the kind of integer used
36-
in indexing the various arrays. Currently the module sets `int_index`
37-
to the value of `int64` from the `stdlib_kinds` module.
35+
The parameters `int_index` and `int_index_low` are used to specify the kind of integer used
36+
in indexing the various arrays. Currently the module sets `int_index` and
37+
`int_index_low`
38+
to the value of `int64` and `int32` from the `stdlib_kinds` module, respectively.
3839

3940
### The module subroutines
4041

@@ -414,7 +415,7 @@ It is an `intent(inout)` argument. On input it
414415
will be an array whose sorting indices are to be determined. On return
415416
it will be the sorted array.
416417

417-
`index`: shall be a rank one integer array of kind `int_index` and of
418+
`index`: shall be a rank one integer array of kind `int_index` or `int_index_low` and of
418419
the size of `array`. It is an `intent(out)` argument. On return it
419420
shall have values that are the indices needed to sort the original
420421
array in the desired direction.
@@ -426,8 +427,8 @@ memory for internal record keeping. If associated with an array in
426427
static storage, its use can significantly reduce the stack memory
427428
requirements for the code. Its contents on return are undefined.
428429

429-
`iwork` (optional): shall be a rank one integer array of kind
430-
`int_index`, and shall have at least `size(array)/2` elements. It
430+
`iwork` (optional): shall be a rank one integer array of the same kind
431+
of the array `index`, and shall have at least `size(array)/2` elements. It
431432
is an `intent(out)` argument. It is intended to be used as "scratch"
432433
memory for internal record keeping. If associated with an array in
433434
static storage, its use can significantly reduce the stack memory

0 commit comments

Comments
 (0)