runs_to_offsets Interface

interface
public module subroutine runs_to_offsets(tie, nrows, offsets)

Arguments

Type IntentOptional Attributes Name
integer(kind=c_int8_t), intent(in) :: tie(:)

1 where a row ties the previous one.

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

rows sorted; tie may be longer.

integer(kind=int64), intent(out), allocatable :: offsets(:)

the group offsets.

Description

Turns engine_build_runs' tie flags into the offsets group_offsets promises: length ngroups + 1, last entry nrows + 1, so group g is perm(o(g):o(g+1)-1) for every g with no last-iteration special case.