 # Need help _omitting unnecessary elements from the array omitting unnecessary elements from the array

Hi all,

Here is my problem:

I have an A matrix (actually)

A[N],B[N], C[N] defines an element

I need a loop that some of the elements are deleted from the set

iteration is as follows
1- first elements A and B is computed with all A[2…N] and B[2…N]
and some of the element from A and B is deleted Lets say A and B, A B deleted
second step:
2- compute the next undeleted element A and B with others same as explained in step 1.

Hi all

About Reduction problem of my project

let me explain the problem

A_in = [ a b c d e f ]
B_in = [ x y z t u v ] select [ a ] and [ x]
and operate with others

deviceValid = [ - 0 1 1 0 1 ] “-” shows dont delete that element
A_out = [ a c d f ]
B_in = [ x z t v ]
second iteration select c, z

deviceValid = [ 0 - 0 1 ]
A_out = [ c f ]
B_in = [ z v ]

and so on

PS:
in sequentially I am solving the problem as this
B array is not mentioned here for simplicity

A is an n element array
and S is empty array
for a =A to A[n]
for s= S to S[m] //m shows last element of S
if (Func(a,s)) delete s from S //m decreases and S should be compact list after deletion
if (Func(s,a)) dltA=1 break iteration 2nd //
end for

``````if (dltA!=1) add x to S,  m increases
``````

end for

You are looking for a classic compaction algorithm.
Check out this paper: http://www.cse.chalmers.se/~billeter/papers.html
And this template library for CUDA: http://www.cse.chalmers.se/~billeter/pub/pp/index.html (by the same authors)

Thank you very much Cygnus