src/cx/array_list.h

changeset 887
e5181fe13b9c
parent 886
5f5514bb104b
equal deleted inserted replaced
886:5f5514bb104b 887:e5181fe13b9c
311 * @param arr the array to search 311 * @param arr the array to search
312 * @param size the size of the array 312 * @param size the size of the array
313 * @param elem_size the size of one element 313 * @param elem_size the size of one element
314 * @param elem the element to find 314 * @param elem the element to find
315 * @param cmp_func the compare function 315 * @param cmp_func the compare function
316 * @return the index of the largest upper bound, or \p size 316 * @return the index of the largest lower bound, or \p size
317 */ 317 */
318 size_t cx_array_binary_search_inf( 318 size_t cx_array_binary_search_inf(
319 void const *arr, 319 void const *arr,
320 size_t size, 320 size_t size,
321 size_t elem_size, 321 size_t elem_size,
371 * @param arr the array to search 371 * @param arr the array to search
372 * @param size the size of the array 372 * @param size the size of the array
373 * @param elem_size the size of one element 373 * @param elem_size the size of one element
374 * @param elem the element to find 374 * @param elem the element to find
375 * @param cmp_func the compare function 375 * @param cmp_func the compare function
376 * @return the index of the largest upper bound, or \p size 376 * @return the index of the smallest upper bound, or \p size
377 */ 377 */
378 __attribute__((__nonnull__)) 378 __attribute__((__nonnull__))
379 static inline size_t cx_array_binary_search_sup( 379 static inline size_t cx_array_binary_search_sup(
380 void const *arr, 380 void const *arr,
381 size_t size, 381 size_t size,

mercurial