Function find_bounds_in_offset

Function Documentation

inline int find_bounds_in_offset(t8_shmem_array_t array, const int guess, const t8_gloidx_t value)

Find the bounds of a value in a given offset array. Used for a binary search to find the rank that contains the value.

Parameters:
  • array[in] The offset array.

  • guess[in] The index to start searching from.

  • value[in] The value to find the bounds for.

Returns:

0 if the value is within the bounds, -1 if it is below the bounds, and 1 otherwise.