| 221 | |
| 222 | template<class VX> |
| 223 | forceinline void |
| 224 | eliminate_zero(ViewArray<VX>& x, int& n_zero) { |
| 225 | if (n_zero > 0) { |
| 226 | int n=x.size(); |
| 227 | // Eliminate all zeros |
| 228 | for (int i=n; i--; ) |
| 229 | if (x[i].zero()) { |
| 230 | x[i]=x[--n]; n_zero--; |
| 231 | } |
| 232 | x.size(n); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | template<class VX, class VY> |
| 237 | Actor* |