1 2#include <clc/clc.h> 3 4_CLC_DEF _CLC_OVERLOAD size_t get_num_groups(uint dim) { 5 size_t global_size = get_global_size(dim); 6 size_t local_size = get_local_size(dim); 7 size_t num_groups = global_size / local_size; 8 if (global_size % local_size != 0) { 9 num_groups++; 10 } 11 return num_groups; 12} 13