@@ -25,15 +25,15 @@ module's `string_type` type.
2525## Overview of the module
2626
2727The module ` stdlib_sorting ` defines several public entities, one
28- default integer parameter, ` int_size ` , and four overloaded
28+ default integer parameter, ` int_index ` , and four overloaded
2929subroutines: ` ORD_SORT ` , ` SORT ` , ` RADIX_SORT ` and ` SORT_INDEX ` . The
3030overloaded subroutines also each have several specific names for
3131versions corresponding to different types of array arguments.
3232
33- ### The ` int_size ` parameter
33+ ### The ` int_index ` parameter
3434
35- The ` int_size ` parameter is used to specify the kind of integer used
36- in indexing the various arrays. Currently the module sets ` int_size `
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 `
3737to the value of ` int64 ` from the ` stdlib_kinds ` module.
3838
3939### The module subroutines
@@ -414,7 +414,7 @@ It is an `intent(inout)` argument. On input it
414414will be an array whose sorting indices are to be determined. On return
415415it will be the sorted array.
416416
417- ` index ` : shall be a rank one integer array of kind ` int_size ` and of
417+ ` index ` : shall be a rank one integer array of kind ` int_index ` and of
418418the size of ` array ` . It is an ` intent(out) ` argument. On return it
419419shall have values that are the indices needed to sort the original
420420array in the desired direction.
@@ -427,7 +427,7 @@ static storage, its use can significantly reduce the stack memory
427427requirements for the code. Its contents on return are undefined.
428428
429429` iwork ` (optional): shall be a rank one integer array of kind
430- ` int_size ` , and shall have at least ` size(array)/2 ` elements. It
430+ ` int_index ` , and shall have at least ` size(array)/2 ` elements. It
431431is an ` intent(out) ` argument. It is intended to be used as "scratch"
432432memory for internal record keeping. If associated with an array in
433433static storage, its use can significantly reduce the stack memory
@@ -465,8 +465,8 @@ Sorting a related rank one array:
465465 integer, intent(inout) :: a(:)
466466 integer(int32), intent(inout) :: b(:) ! The same size as a
467467 integer(int32), intent(out) :: work(:)
468- integer(int_size ), intent(out) :: index(:)
469- integer(int_size ), intent(out) :: iwork(:)
468+ integer(int_index ), intent(out) :: index(:)
469+ integer(int_index ), intent(out) :: iwork(:)
470470 ! Find the indices to sort a
471471 call sort_index(a, index(1:size(a)),&
472472 work(1:size(a)/2), iwork(1:size(a)/2))
@@ -483,8 +483,8 @@ Sorting a rank 2 array based on the data in a column
483483 integer, intent(inout) :: array(:,:)
484484 integer(int32), intent(in) :: column
485485 integer(int32), intent(out) :: work(:)
486- integer(int_size ), intent(out) :: index(:)
487- integer(int_size ), intent(out) :: iwork(:)
486+ integer(int_index ), intent(out) :: index(:)
487+ integer(int_index ), intent(out) :: iwork(:)
488488 integer, allocatable :: dummy(:)
489489 integer :: i
490490 allocate(dummy(size(array, dim=1)))
@@ -508,8 +508,8 @@ Sorting an array of a derived type based on the data in one component
508508 type(a_type), intent(inout) :: a_data(:)
509509 integer(int32), intent(inout) :: a(:)
510510 integer(int32), intent(out) :: work(:)
511- integer(int_size ), intent(out) :: index(:)
512- integer(int_size ), intent(out) :: iwork(:)
511+ integer(int_index ), intent(out) :: index(:)
512+ integer(int_index ), intent(out) :: iwork(:)
513513 ! Extract a component of `a_data`
514514 a(1:size(a_data)) = a_data(:) % a
515515 ! Find the indices to sort the component
0 commit comments