Sorting many little arrays

Hi,

I have a problem, that I’m currently struggeling to solve. I have many little arrays in GPU memory (each one consists of 429 integers), they are represented as one long array.

My problem is, that I need to compute how many unique numbers are there in each of those little arrays. My idea was originally to sort each of those arrays and then easily scan them and count unique numbers, but I haven’t found solution that would have decent performance. Ideal would be to get count of unique numbers in those arrays in one call from GPU, but I just can’t seem to put it efficiently together.

Any help would be very much appretiated.

Thank in advice.

Hi,

I have a problem, that I’m currently struggeling to solve. I have many little arrays in GPU memory (each one consists of 429 integers), they are represented as one long array.

My problem is, that I need to compute how many unique numbers are there in each of those little arrays. My idea was originally to sort each of those arrays and then easily scan them and count unique numbers, but I haven’t found solution that would have decent performance. Ideal would be to get count of unique numbers in those arrays in one call from GPU, but I just can’t seem to put it efficiently together.

Any help would be very much appretiated.

Thank in advice.

There has been a recent forum post with code that seems to be able to achieve this, though I haven’t tried it myself.

There has been a recent forum post with code that seems to be able to achieve this, though I haven’t tried it myself.