I'm passing a large 2D array (in C) to the device and determining all possible combinations. For example:
A =
id val1 val2
1 100 200
2 400 800
Combination =
id1 id2 sumval1 sumval2
1 2 500 1000
Because of the size of the original array, storing and returning all possible combinations would not be possible. I would like to return all combinations where sumval1 > 500 and sumval2 > 1000.
How can I return just this subset of combinations to the host to be written to a file; given that I won't know how many combinations meet the conditions?