How to edit an array?

Hi all.
Could you be so kind as to tell, whether the parallel solution of the problem?

I need to make a copy of array by removing the marked elements from it.
Marked elements are to order more.
The algorithm does not have to be correct, a small portion of marked elements may remain, but it must be fast.

“The algorithm does not have to be correct”


if the marking of elements is in the form of a boolean or integer - true/ false or 1/ 0, you can sum-scan this predicate, to obtain the location of remaining elements in the new array
you would then write elements to the new array, if their predicate is set (true/ 1), and according to the sum-scan

should be chop-chop

for (elements)
sum-scan predicate[i]

if (predicate[i])
new_array[sum_scan[i] - 1] = array[i];

Thank you, amazingly simple.