Relay onto p_search; see oracle_argsort for why these exist.
| Type | Intent | Optional | 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) | :: | n_search |
rows belonging to the haystack. |
||
| logical, | intent(in) | :: | upper |
upper rather than lower bound. |
||
| character(len=*), | intent(in) | :: | proc |
calling procedure, for messages. |
||
| integer(kind=int64), | intent(out) | :: | pos |
the insertion position found. |
subroutine oracle_search(keys, nrows, n_search, upper, proc, pos) 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) :: n_search !! rows belonging to the haystack. logical, intent(in) :: upper !! upper rather than lower bound. character(len=*), intent(in) :: proc !! calling procedure, for messages. integer(int64), intent(out) :: pos !! the insertion position found. ! call check_oracle(associated(p_search), proc) call p_search(keys, nrows, n_search, upper, proc, pos) end subroutine oracle_search