oracle_runs Subroutine

public subroutine oracle_runs(keys, nrows, nthreads, gek, proc, perm, tie)

Relay onto p_runs; see oracle_argsort for why these exist.

Arguments

Type IntentOptional Attributes Name
type(sort_key_buf), intent(in), target :: keys(:)

the keys, primary first.

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

rows each key describes.

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

resolved thread count.

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

engine keys defining a group.

character(len=*), intent(in) :: proc

calling procedure, for messages.

integer(kind=int64), intent(inout) :: perm(:)

the permutation to fill.

integer(kind=c_int8_t), intent(inout) :: tie(:)

1 where a row ties the previous.


Source Code

    subroutine oracle_runs(keys, nrows, nthreads, gek, proc, perm, tie)
        type(sort_key_buf), intent(in), target :: keys(:)  !! the keys, primary first.
        integer(int64), intent(in) :: nrows                !! rows each key describes.
        integer(int64), intent(in) :: nthreads             !! resolved thread count.
        integer(int64), intent(in) :: gek                  !! engine keys defining a group.
        character(len=*), intent(in) :: proc               !! calling procedure, for messages.
        integer(int64), intent(inout) :: perm(:)           !! the permutation to fill.
        integer(c_int8_t), intent(inout) :: tie(:)         !! 1 where a row ties the previous.
        !
        call check_oracle(associated(p_runs), proc)
        call p_runs(keys, nrows, nthreads, gek, proc, perm, tie)
    end subroutine oracle_runs