fill_identity Interface

interface
public module subroutine fill_identity(perm, n, nthreads)

Arguments

Type IntentOptional Attributes Name
integer(kind=int64), intent(out) :: perm(:)

receives 1..n.

integer(kind=int64), intent(in) :: n

elements to fill.

integer(kind=int64), intent(in) :: nthreads

the sort's resolved thread count.

Description

Fills perm(1:n) with 1..n, threaded when nthreads and n justify it.

Its own procedure rather than an inline loop because it is one of the three whole-column serial loops that bound a threaded sort's end-to-end speedup, and measuring it separately is how that was found. See bench/benchmark_sort_tail.f90.