Hi Community!

Right know I try to handle a problem, and my google-Research did not work out. I do some calculations of Voronoi-Cells (nearest neighbor-problem). Therefore, I write into my Result array, which is quite big (Number of Points > 250.000).

I only want to store True/False to keep the information of closest neighbors. (i.e. Pnt 12 is Neighbour of Pnt 13 => 12/13 = 1)

I compressed this information to a uint8 linear array (Values 0-255) and I do bit manipulations to store 8 Neighbor Informations.

Furthermore the array grows with the Gaussian sum:

Matrix looks like:

0 1 2 3


1 0

2 0 1

3 0 1 0


nachbar = zeros(array_size, dtype=uint

nachbar_buf = cl.Buffer(ctx, mf.READ_WRITE | mf.USE_HOST_PTR, hostbuf=nachbar)

int index = (cur_compare_pnt-1)*cur_compare_pnt/2 + cur_pnt;

int main_index = index / 8;

int sub_index = index % 8;

nachbar_buf[main_index] |= 1<<sub_index;

I am not sure, if this was understandable… I hope so. My problem is, that this process is not vectorizable, since I write with different Point Tupels into the same uint8 Entry.

My question is: Is there a way to use a bool-linear- array in OpenCL? Or is there a better way at all?