| 1383 | |
| 1384 | template<class View> |
| 1385 | bool |
| 1386 | ViewArray<View>::same(void) const { |
| 1387 | if (n < 2) |
| 1388 | return false; |
| 1389 | Region r; |
| 1390 | View* y = r.alloc<View>(n); |
| 1391 | int j=0; |
| 1392 | for (int i=0; i<n; i++) |
| 1393 | if (!x[i].assigned()) |
| 1394 | y[j++] = x[i]; |
| 1395 | if (j < 2) |
| 1396 | return false; |
| 1397 | Support::quicksort<View>(y,j); |
| 1398 | for (int i=1; i<j; i++) |
| 1399 | if (y[i-1] == y[i]) |
| 1400 | return true; |
| 1401 | return false; |
| 1402 | } |
| 1403 | |
| 1404 | template<class View> |
| 1405 | bool |