Functions | |
| CS_F_HOST_DEVICE cs_lnum_t | l_binary_search (cs_lnum_t l_id_array_size, cs_lnum_t l_id, const cs_lnum_t l_id_array[]) |
| Binary search for a given local id in a given array of ordered local ids, when the id might not be present. More... | |
| void | count_to_index (cs_dispatch_context &ctx, cs_lnum_t n, cs_lnum_t a[], size_t tmp_size=0, void *tmp_storage=nullptr) |
| cs_gnum_t | count_reduce_sum (cs_dispatch_context &ctx, cs_lnum_t n, short counter[]) |
| Sum a local counter. More... | |
| cs_gnum_t count_reduce_sum | ( | cs_dispatch_context & | ctx, |
| cs_lnum_t | n, | ||
| short | counter[] | ||
| ) |
Sum a local counter.
| [in] | ctx | associated dispatch context |
| [in] | n | number of elements |
| [in] | counter | local counter |
| void count_to_index | ( | cs_dispatch_context & | ctx, |
| cs_lnum_t | n, | ||
| cs_lnum_t | a[], | ||
| size_t | tmp_size = 0, |
||
| void * | tmp_storage = nullptr |
||
| ) |
|
inline |
Binary search for a given local id in a given array of ordered local ids, when the id might not be present.
| [in] | l_id_array | size array_size |
| [in] | l_id | local id to search for |
| [in] | l_id_array | ordered unique local ids array |